MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
gdi.h File Reference

This file includes graphics device interfaces (GDI) of MiniGUI. More...

#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include "endianrw.h"

Go to the source code of this file.

Data Structures

struct  _BLOCKHEAP
 
struct  _CLIPRECT
 
struct  _CLIPRGN
 
struct  _STIPPLE
 
struct  _ARC
 
struct  _LOGFONT
 
struct  _DEVFONT
 
struct  _FONTMETRICS
 
struct  _GLYPHBITMAP
 
struct  _WORDINFO
 
struct  _DTFIRSTLINE
 
struct  _MYBITMAP
 
struct  _BITMAP
 

Macros

#define PIXEL_invalid   0
 Invalid pixel. More...
 
#define PIXEL_transparent   SysPixelIndex[0]
 Transparent. More...
 
#define PIXEL_darkblue   SysPixelIndex[1]
 Dark blue. More...
 
#define PIXEL_darkgreen   SysPixelIndex[2]
 Dark green. More...
 
#define PIXEL_darkcyan   SysPixelIndex[3]
 Dark cyan. More...
 
#define PIXEL_darkred   SysPixelIndex[4]
 Dark red. More...
 
#define PIXEL_darkmagenta   SysPixelIndex[5]
 Dark magenta. More...
 
#define PIXEL_darkyellow   SysPixelIndex[6]
 Dark yellow. More...
 
#define PIXEL_darkgray   SysPixelIndex[7]
 Dark gray. More...
 
#define PIXEL_lightgray   SysPixelIndex[8]
 Light gray. More...
 
#define PIXEL_blue   SysPixelIndex[9]
 Blue. More...
 
#define PIXEL_green   SysPixelIndex[10]
 Green. More...
 
#define PIXEL_cyan   SysPixelIndex[11]
 Cyan. More...
 
#define PIXEL_red   SysPixelIndex[12]
 Red. More...
 
#define PIXEL_magenta   SysPixelIndex[13]
 Magenta. More...
 
#define PIXEL_yellow   SysPixelIndex[14]
 Yellow. More...
 
#define PIXEL_lightwhite   SysPixelIndex[15]
 Light white. More...
 
#define PIXEL_black   SysPixelIndex[16]
 Black. More...
 
#define COLOR_invalid   PIXEL_invalid
 
#define COLOR_transparent   PIXEL_transparent
 
#define COLOR_darkred   PIXEL_darkred
 
#define COLOR_darkgreen   PIXEL_darkgreen
 
#define COLOR_darkyellow   PIXEL_darkyellow
 
#define COLOR_darkblue   PIXEL_darkblue
 
#define COLOR_darkmagenta   PIXEL_darkmagenta
 
#define COLOR_darkcyan   PIXEL_darkcyan
 
#define COLOR_lightgray   PIXEL_lightgray
 
#define COLOR_darkgray   PIXEL_darkgray
 
#define COLOR_red   PIXEL_red
 
#define COLOR_green   PIXEL_green
 
#define COLOR_yellow   PIXEL_yellow
 
#define COLOR_blue   PIXEL_blue
 
#define COLOR_magenta   PIXEL_magenta
 
#define COLOR_cyan   PIXEL_cyan
 
#define COLOR_lightwhite   PIXEL_lightwhite
 
#define COLOR_black   PIXEL_black
 
#define SysColorIndex   SysPixelIndex
 
#define InitFreeClipRectList(heap, size)   InitBlockDataHeap (heap, sizeof (CLIPRECT), size)
 Initializes the private block data heap used to allocate clipping rectangles. More...
 
#define ClipRectAlloc(heap)   BlockDataAlloc (heap)
 Allocates a clipping rectangles from the private block data heap. More...
 
#define FreeClipRect(heap, cr)   BlockDataFree (heap, cr);
 Frees a clipping rectangle which is allocated from the private block data heap. More...
 
#define DestroyFreeClipRectList(heap)   DestroyBlockDataHeap (heap);
 Destroys the private block data heap used to allocate clipping rectangles. More...
 
#define UnionRectWithRegion   AddClipRect
 Is an alias of AddClipRect. More...
 
#define CopyRegion   ClipRgnCopy
 Is an alias of ClipRgnCopy. More...
 
#define IntersectRegion   ClipRgnIntersect
 Is an alias of ClipRgnIntersect. More...
 
#define HDC_SCREEN   ((HDC)0)
 Handle to the device context of the whole screen. More...
 
#define HDC_INVALID   ((HDC)-1)
 Indicates an invalid handle to device context. More...
 
#define CreateCompatibleDC(hdc)   CreateCompatibleDCEx(hdc, 0, 0)
 Creates a memory DC which is compatible with a given DC. More...
 
#define DeleteCompatibleDC(hdc)   DeleteMemDC(hdc)
 Deletes a memory DC. More...
 
#define GetBkColor(hdc)   GetDCAttr (hdc, DC_ATTR_BK_COLOR)
 Gets the background color of a DC. More...
 
#define GetBkMode(hdc)   GetDCAttr (hdc, DC_ATTR_BK_MODE)
 Gets the background mode of a DC. More...
 
#define GetPenColor(hdc)   GetDCAttr (hdc, DC_ATTR_PEN_COLOR)
 Gets the pen color of a DC. More...
 
#define GetBrushColor(hdc)   GetDCAttr (hdc, DC_ATTR_BRUSH_COLOR)
 Gets the brush color of a DC. More...
 
#define GetTextColor(hdc)   GetDCAttr (hdc, DC_ATTR_TEXT_COLOR)
 Gets the text color of a DC. More...
 
#define GetTabStop(hdc)   GetDCAttr (hdc, DC_ATTR_TAB_STOP)
 Gets the tabstop value of a DC. More...
 
#define SetBkColor(hdc, color)   SetDCAttr (hdc, DC_ATTR_BK_COLOR, (DWORD) color)
 Sets the background color of a DC to a new value. More...
 
#define SetBkMode(hdc, mode)   SetDCAttr (hdc, DC_ATTR_BK_MODE, (DWORD) mode)
 Sets the background color of a DC to a new mode. More...
 
#define SetPenColor(hdc, color)   SetDCAttr (hdc, DC_ATTR_PEN_COLOR, (DWORD) color)
 Sets the pen color of a DC to a new value. More...
 
#define SetBrushColor(hdc, color)   SetDCAttr (hdc, DC_ATTR_BRUSH_COLOR, (DWORD) color)
 Sets the brush color of a DC to a new value. More...
 
#define SetTextColor(hdc, color)   SetDCAttr (hdc, DC_ATTR_TEXT_COLOR, (DWORD) color)
 Sets the text color of a DC to a new value. More...
 
#define SetTabStop(hdc, value)   SetDCAttr (hdc, DC_ATTR_TAB_STOP, (DWORD) value)
 Sets the tabstop of a DC to a new value. More...
 
#define DrawHDotLine(hdc, x, y, w)   DrawHVDotLine (hdc, x, y, w, TRUE);
 Draws a horizontal dot dash line. More...
 
#define DrawVDotLine(hdc, x, y, h)   DrawHVDotLine (hdc, x, y, h, FALSE);
 Draws a vertical dot line. More...
 
#define PolygonGenerator(context, pts, vertices, cb)   PolygonGeneratorEx(context, pts, vertices, cb, NULL)
 This is a general polygon generator. More...
 
#define GetPenType(hdc)   GetDCAttr (hdc, DC_ATTR_PEN_TYPE)
 Gets the pen type of a DC. More...
 
#define SetPenType(hdc, type)   SetDCAttr (hdc, DC_ATTR_PEN_TYPE, (DWORD) type)
 Sets the pen type of a DC to a new type. More...
 
#define GetPenCapStyle(hdc)   GetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE)
 Gets the pen cap style of a DC. More...
 
#define SetPenCapStyle(hdc, style)   SetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE, (DWORD) style)
 Sets the pen type of a DC to a new type. More...
 
#define GetPenJoinStyle(hdc)   GetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE)
 Gets the pen join style of a DC. More...
 
#define SetPenJoinStyle(hdc, style)   SetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE, (DWORD) style)
 Sets the pen type of a DC to a new type. More...
 
#define GetPenWidth(hdc)   GetDCAttr (hdc, DC_ATTR_PEN_WIDTH)
 Gets the pen width of a DC. More...
 
#define SetPenWidth(hdc, width)   SetDCAttr (hdc, DC_ATTR_PEN_WIDTH, (DWORD) width)
 Sets the pen width of a DC to a new width. More...
 
#define GetBrushType(hdc)   GetDCAttr (hdc, DC_ATTR_BRUSH_TYPE)
 Gets the brush type of a DC. More...
 
#define SetBrushType(hdc, type)   SetDCAttr (hdc, DC_ATTR_BRUSH_TYPE, (DWORD) type)
 Sets the brush type of a DC to a new type. More...
 
#define GetMapMode(hdc)   GetDCAttr (hdc, DC_ATTR_MAP_MODE)
 Retrieves the current mapping mode of a DC. More...
 
#define SetMapMode(hdc, mapmode)   SetDCAttr (hdc, DC_ATTR_MAP_MODE, (DWORD)mapmode)
 Sets the mapping mode of a display context. More...
 
#define GetViewportOrg(hdc, pPt)   GetDCLCS(hdc, DC_LCS_VORG, pPt)
 Retrieves the x-coordinates and y-coordinates of the viewport origin for a device context. More...
 
#define GetViewportExt(hdc, pPt)   GetDCLCS(hdc, DC_LCS_VEXT, pPt)
 Retrieves the x-extents and y-extents of the current viewport for a device context. More...
 
#define GetWindowOrg(hdc, pPt)   GetDCLCS(hdc, DC_LCS_WORG, pPt)
 Retrieves the x-coordinates and y-coordinates of the window for a device context. More...
 
#define GetWindowExt(hdc, pPt)   GetDCLCS(hdc, DC_LCS_WEXT, pPt)
 Retrieves the x-extents and y-extents of the current window for a device context. More...
 
#define SetViewportOrg(hdc, pPt)   SetDCLCS(hdc, DC_LCS_VORG, pPt)
 Sets the x-coordinates and y-coordinates of the viewport origin for a device context. More...
 
#define SetViewportExt(hdc, pPt)   SetDCLCS(hdc, DC_LCS_VEXT, pPt)
 Sets the x-extents and y-extents of the current viewport for a device context. More...
 
#define SetWindowOrg(hdc, pPt)   SetDCLCS(hdc, DC_LCS_WORG, pPt)
 Sets the x-coordinates and y-coordinates of the window for a device context. More...
 
#define SetWindowExt(hdc, pPt)   SetDCLCS(hdc, DC_LCS_WEXT, pPt)
 Sets the x-extents and y-extents of the current window for a device context. More...
 
#define CreateIcon(hdc, w, h, AndBits, XorBits, colornum)   CreateIconEx(hdc, w, h, AndBits, XorBits, colornum, NULL)
 
#define RECTWP(prc)   ((prc)->right - (prc)->left)
 Gets the width of a RECT object by using the pointer to it. More...
 
#define RECTHP(prc)   ((prc)->bottom - (prc)->top)
 Gets the height of a RECT object by using the pointer to it. More...
 
#define RECTW(rc)   ((rc).right - (rc).left)
 Gets the width of a RECT object. More...
 
#define RECTH(rc)   ((rc).bottom - (rc).top)
 Gets the height of a RECT object. More...
 
#define FONT_CHARSET_GB1988_0   "GB1988-0"
 EUC encoding of GB1988 charset, treat as ISO8859-1. More...
 
#define FONT_CHARSET_GB2312_0   "GB2312-0"
 EUC encoding of GB2312 charset. More...
 
#define FONT_CHARSET_GB18030_0   "GB18030-0"
 EUC encoding of GB18030 charset. More...
 
#define FONT_CHARSET_EUCTW   "EUC-TW"
 EUC encoding of CNS11643 charset, not supported. More...
 
#define FONT_CHARSET_KSC5636_0   "KSC5636-0"
 EUC encoding of KSC5636 charset, treat as ISO8859-1. More...
 
#define FONT_CHARSET_KSC5601_0   "KSC5601-0"
 EUC encoding of KSC5601 charset. More...
 
#define FONT_CHARSET_JISX0201_0   "JISX0201-0"
 EUC encoding of JISX0201 charset. More...
 
#define FONT_CHARSET_JISX0208_0   "JISX0208-0"
 EUC encoding of JISX0208 charset. More...
 
#define FONT_CHARSET_JISX0201_1   "JISX0201-1"
 Shift-JIS encoding of JISX0201 charset. More...
 
#define FONT_CHARSET_JISX0208_1   "JISX0208-1"
 Shift-JIS encoding of JISX0208 charset. More...
 
#define FONT_CHARSET_ISO_10646_1   "ISO-10646-1"
 UCS-2 encoding of UNICODE. More...
 
#define FONT_CHARSET_UTF8   "UTF-8"
 UTF-8 encoding of UNICODE. More...
 
#define FONT_CHARSET_UTF16LE   "UTF-16LE"
 UTF-16 encoding (Little-Endian) of UNICODE. More...
 
#define FONT_CHARSET_UTF16BE   "UTF-16BE"
 UTF-16 encoding (Big-Endian) of UNICODE. More...
 
#define INV_LOGFONT   0
 Invalid logfont. More...
 
#define SYSLOGFONT_DEFAULT   0
 
#define SYSLOGFONT_WCHAR_DEF   1
 
#define SYSLOGFONT_FIXED   2
 
#define SYSLOGFONT_CAPTION   3
 
#define SYSLOGFONT_MENU   4
 
#define SYSLOGFONT_CONTROL   5
 
#define MB2WC(log_font, dest, mstr, n)   MB2WCEx (log_font, dest, sizeof(wchar_t) == 4, mstr, n)
 The backward compatibility version of MB2WCEx. More...
 
#define WC2MB(log_font, s, wc)   WC2MBEx (log_font, s, (UChar32)wc)
 The backward compatibility version of WC2MBEx. More...
 
#define MBS2WCS(log_font, dest, mstr, mstr_len, n)
 The backward compatibility version of MBS2WCSEx. More...
 
#define WCS2MBS(log_font, dest, wcs, wcs_len, n)
 The backward compatibility version of WCS2MBSEx. More...
 
#define GetTextCharacterExtra(hdc)   GetDCAttr (hdc, DC_ATTR_CHAR_EXTRA)
 Retrieves the current intercharacter spacing for the DC. More...
 
#define GetTextAboveLineExtra(hdc)   GetDCAttr (hdc, DC_ATTR_ALINE_EXTRA)
 Retrieves the current spacing above line for the DC. More...
 
#define GetTextBellowLineExtra(hdc)   GetDCAttr (hdc, DC_ATTR_BLINE_EXTRA)
 Retrieves the current spacing bellow line for the DC. More...
 
#define SetTextCharacterExtra(hdc, extra)   SetDCAttr (hdc, DC_ATTR_CHAR_EXTRA, (DWORD) extra)
 Sets the intercharacter spacing for the DC and returns the old spacing value. More...
 
#define SetTextAboveLineExtra(hdc, extra)   SetDCAttr (hdc, DC_ATTR_ALINE_EXTRA, (DWORD) extra)
 Sets the spacing above line for the DC and returns the old value. More...
 
#define SetTextBellowLineExtra(hdc, extra)   SetDCAttr (hdc, DC_ATTR_BLINE_EXTRA, (DWORD) extra)
 Sets the spacing bellow line for the DC and returns the old value. More...
 
#define GetTextAlign(hdc)   GetDCAttr (hdc, DC_ATTR_TEXT_ALIGN)
 Retrieves the current text-alignment flags of a DC. More...
 
#define SetTextAlign(hdc, ta_flags)   SetDCAttr (hdc, DC_ATTR_TEXT_ALIGN, (DWORD)ta_flags)
 Sets text-alignment flags of a DC. More...
 
#define TextOut(hdc, x, y, text)   TextOutLen (hdc, x, y, text, -1)
 Outputs text. More...
 
#define TabbedTextOut(hdc, x, y, text)   TabbedTextOutLen (hdc, x, y, text, -1)
 Outputs formatted text. More...
 
#define DrawText(hdc, text, n, rc, format)   DrawTextEx2 (hdc, text, n, rc, 0, format, NULL)
 Draws a formatted text in a rectangle. More...
 
#define DrawTextEx(hdc, text, n, rc, indent, format)   DrawTextEx2 (hdc, text, n, rc, indent, format, NULL)
 Draws a formatted text in a rectangle. More...
 
#define MLS_BLENDMODE_NONE   0x00
 
#define LoadBitmap   LoadBitmapFromFile
 An alias of LoadBitmapFromFile. More...
 
#define LoadMyBitmap   LoadMyBitmapFromFile
 Alias of LoadMyBitmapFromFile. More...
 
#define IS_MBC_GLYPH(glyph)   ((glyph) & 0x80000000)
 to judge wether the glyph is multibyte glyph More...
 
#define SET_MBC_GLYPH(glyph)   ((glyph) | 0x80000000)
 set the glyph with multibyte mask More...
 
#define REAL_GLYPH(glyph)   ((glyph) & 0x7FFFFFFF)
 get real glyph value from a glyph More...
 
#define SELECT_DEVFONT(plogfont, glyph)
 select a device font acording to the glyph value. More...
 

Typedefs

typedef struct _BLOCKHEAP BLOCKHEAP
 
typedef BLOCKHEAPPBLOCKHEAP
 Data type of the pointer to a BLOCKHEAP. More...
 
typedef struct _BITMAP BITMAP
 
typedef BITMAPPBITMAP
 Data type of pointer to a BITMAP. More...
 
typedef struct _MYBITMAP MYBITMAP
 
typedef struct _MYBITMAPPMYBITMAP
 Data type of pointer to a struct _MYBITMAP. More...
 
typedef struct _CLIPRECT CLIPRECT
 
typedef struct _CLIPRGN CLIPRGN
 
typedef CLIPRGNPCLIPRGN
 Data type of the pointer to a CLIPRGN. More...
 
typedef void(* CB_DIRECT_DRAW_RECT) (HDC hdc, Uint8 *pixels, int pitch, int bytesPerPixel, const RECT *rc, void *context)
 Type of directly access pixels hook function. More...
 
typedef int(* ON_UPDATE_SECONDARYDC) (HWND hwnd, HDC secondary_dc, HDC real_dc, const RECT *secondary_rc, const RECT *real_rc, const RECT *main_update_rc)
 The callback type of on updating secondary DC. More...
 
typedef void(* CB_LINE) (void *context, int stepx, int stepy)
 The type of line generator callback. More...
 
typedef void(* CB_CIRCLE) (void *context, int x1, int x2, int y)
 The type of circle generator callback. More...
 
typedef void(* CB_ELLIPSE) (void *context, int x1, int x2, int y)
 The type of ellipse generator callback. More...
 
typedef void(* CB_ARC) (void *context, int x, int y)
 The type of arc generator callback. More...
 
typedef void(* CB_POLYGON) (void *context, int x1, int x2, int y)
 The type of polygon generator callback. More...
 
typedef BOOL(* CB_EQUAL_PIXEL) (void *context, int x, int y)
 Flodd filling generator's equation callback. More...
 
typedef void(* CB_FLOOD_FILL) (void *context, int x1, int x2, int y)
 Flodd filling generator's scan line callback. More...
 
typedef struct _STIPPLE STIPPLE
 
typedef struct _ARC ARC
 
typedef struct _LOGFONT LOGFONT
 
typedef LOGFONTPLOGFONT
 Data type of pointer to a LOGFONT. More...
 
typedef const LOGFONTCPLOGFONT
 Data type of pointer to a const LOGFONT. More...
 
typedef struct _WORDINFO WORDINFO
 Date type of _WORDINFO. More...
 
typedef struct _FONTMETRICS FONTMETRICS
 
typedef struct _GLYPHBITMAP GLYPHBITMAP
 
typedef struct _DTFIRSTLINE DTFIRSTLINE
 
typedef void(* CB_ONE_SCANLINE) (void *context, MYBITMAP *my_bmp, int y)
 The type of scanline loaded callback. More...
 
typedef struct _GLYPHMAPINFO GLYPHMAPINFO
 Data type of struct _GLYPHMAPINFO. More...
 
typedef struct _GLYPHINFO GLYPHINFO
 Data type of struct _GLYPHINFO. More...
 

Enumerations

Functions

MG_EXPORT void InitBlockDataHeap (PBLOCKHEAP heap, size_t bd_size, size_t heap_size)
 Initializes a private block data heap. More...
 
MG_EXPORT void * BlockDataAlloc (PBLOCKHEAP heap)
 Allocates a data block from private heap. More...
 
MG_EXPORT void BlockDataFree (PBLOCKHEAP heap, void *data)
 Frees an allocated data block. More...
 
MG_EXPORT void DestroyBlockDataHeap (PBLOCKHEAP heap)
 Destroys a private block data heap. More...
 
MG_EXPORT void GUIAPI InitClipRgn (PCLIPRGN pRgn, PBLOCKHEAP pFreeList)
 Initializes a clipping region. More...
 
MG_EXPORT void GUIAPI EmptyClipRgn (PCLIPRGN pRgn)
 Empties a clipping region. More...
 
MG_EXPORT PCLIPRGN GUIAPI CreateClipRgn (void)
 Creates a clipping region. More...
 
MG_EXPORT void GUIAPI DestroyClipRgn (PCLIPRGN pRgn)
 Empties and destroys a clipping region. More...
 
MG_EXPORT BOOL GUIAPI ClipRgnCopy (PCLIPRGN pDstRgn, const CLIPRGN *pSrcRgn)
 Copies one region to another. More...
 
MG_EXPORT BOOL GUIAPI ClipRgnIntersect (PCLIPRGN pRstRgn, const CLIPRGN *pRgn1, const CLIPRGN *pRgn2)
 Intersects two region. More...
 
MG_EXPORT void GUIAPI GetClipRgnBoundRect (PCLIPRGN pRgn, PRECT pRect)
 Gets the bounding rectangle of a region. More...
 
MG_EXPORT BOOL GUIAPI SetClipRgn (PCLIPRGN pRgn, const RECT *pRect)
 Sets a region to contain only one rect. More...
 
MG_EXPORT BOOL GUIAPI IsEmptyClipRgn (const CLIPRGN *pRgn)
 Determines whether a region is an empty region. More...
 
MG_EXPORT BOOL GUIAPI AddClipRect (PCLIPRGN pRgn, const RECT *pRect)
 Unions one rectangle to a region. More...
 
MG_EXPORT BOOL GUIAPI IntersectClipRect (PCLIPRGN pRgn, const RECT *pRect)
 Intersects a rectangle with a region. More...
 
MG_EXPORT BOOL GUIAPI SubtractClipRect (PCLIPRGN pRgn, const RECT *pRect)
 Subtracts a rectangle from a region. More...
 
MG_EXPORT BOOL GUIAPI PtInRegion (PCLIPRGN region, int x, int y)
 Determines whether a point is in a region. More...
 
MG_EXPORT BOOL GUIAPI RectInRegion (PCLIPRGN region, const RECT *rect)
 Determines whether a rectangle is intersected with a region. More...
 
MG_EXPORT void GUIAPI OffsetRegionEx (PCLIPRGN region, const RECT *rcClient, const RECT *rcScroll, int x, int y)
 Offsets the region in the specified window's scroll area. More...
 
MG_EXPORT void GUIAPI OffsetRegion (PCLIPRGN region, int x, int y)
 Offsets the region. More...
 
MG_EXPORT BOOL GUIAPI UnionRegion (PCLIPRGN dst, const CLIPRGN *src1, const CLIPRGN *src2)
 Unions two regions. More...
 
MG_EXPORT BOOL GUIAPI SubtractRegion (CLIPRGN *rgnD, const CLIPRGN *rgnM, const CLIPRGN *rgnS)
 Substrcts a region from another. More...
 
MG_EXPORT BOOL GUIAPI XorRegion (CLIPRGN *dst, const CLIPRGN *src1, const CLIPRGN *src2)
 Does the XOR operation between two regions. More...
 
MG_EXPORT BOOL GUIAPI InitCircleRegion (PCLIPRGN dst, int x, int y, int r)
 Initializes a region to be an enclosed circle. More...
 
MG_EXPORT BOOL GUIAPI InitEllipseRegion (PCLIPRGN dst, int x, int y, int rx, int ry)
 Initializes a region to be an enclosed ellipse. More...
 
MG_EXPORT BOOL GUIAPI InitPolygonRegion (PCLIPRGN dst, const POINT *pts, int vertices)
 Initializes a region to be an enclosed polygon. More...
 
MG_EXPORT unsigned int GUIAPI GetGDCapability (HDC hdc, int iItem)
 Returns a capability of a DC. More...
 
MG_EXPORT HDC GUIAPI GetDC (HWND hwnd)
 Gets a window DC of a window. More...
 
MG_EXPORT HDC GUIAPI GetClientDC (HWND hwnd)
 Gets a client DC of a window. More...
 
MG_EXPORT HDC GUIAPI GetSubDC (HDC hdc, int off_x, int off_y, int width, int height)
 This function gets a sub DC which is compliant to the specified client DC. More...
 
MG_EXPORT void GUIAPI ReleaseDC (HDC hdc)
 Releases a DC from DC pool. More...
 
MG_EXPORT HWND GUIAPI WindowFromDC (HDC hdc)
 Get the window handle from DC. More...
 
MG_EXPORT int GUIAPI SaveDC (HDC hdc)
 Saves the current state of a device context. More...
 
MG_EXPORT BOOL GUIAPI RestoreDC (HDC hdc, int saved_dc)
 Restores a device context (DC) to the specified state. More...
 
MG_EXPORT HDC GUIAPI CreateCompatibleDCEx (HDC hdc, int width, int height)
 Creates a memory DC which is compatible with the specified reference DC. More...
 
MG_EXPORT BOOL GUIAPI IsCompatibleDC (HDC hdc1, HDC hdc2)
 Check whether a given DC is compliant to a specific DC. More...
 
MG_EXPORT HDC GUIAPI CreateMemDCEx (int width, int height, int depth, DWORD flags, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, void *bits, int pitch)
 Creates a memory DC. More...
 
static HDC GUIAPI CreateMemDC (int width, int height, int depth, DWORD flags, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 Creates a memory DC. More...
 
MG_EXPORT HDC GUIAPI CreateSubMemDC (HDC parent, int off_x, int off_y, int width, int height, BOOL comp_to_parent)
 Creates a sub memory DC in the given memory DC. More...
 
MG_EXPORT HDC GUIAPI CreateMemDCFromBitmap (HDC hdc, const BITMAP *bmp)
 Creates a memory DC from a reference DC and a BITMAP object. More...
 
MG_EXPORT HDC GUIAPI CreateMemDCFromMyBitmap (const MYBITMAP *my_bmp, const RGB *pal)
 Creates a memory DC from a device independent MYBITMAP object. More...
 
MG_EXPORT BOOL GUIAPI ConvertMemDC (HDC mem_dc, HDC ref_dc, DWORD flags)
 Converts a memory DC to have a same format as a reference DC. More...
 
MG_EXPORT BOOL GUIAPI SetMemDCAlpha (HDC mem_dc, DWORD flags, Uint8 alpha)
 Sets the alpha value for the entire surface of a DC, as opposed to using the alpha component of each pixel. More...
 
MG_EXPORT BOOL GUIAPI SetMemDCColorKey (HDC mem_dc, DWORD flags, Uint32 color_key)
 Sets the color key (transparent pixel) of a memory DC. More...
 
MG_EXPORT void GUIAPI DeleteMemDC (HDC mem_dc)
 Deletes a memory DC. More...
 
MG_EXPORT Uint8 *GUIAPI LockDC (HDC hdc, const RECT *rw_rc, int *width, int *height, int *pitch)
 Locks a dc to get direct access to pixels in the DC. More...
 
MG_EXPORT BOOL GUIAPI LockDCEx (HDC hdc, const PCLIPRGN region, void *context, CB_DIRECT_DRAW_RECT cb)
 directly access the pixels in a DC. More...
 
MG_EXPORT void GUIAPI UnlockDC (HDC hdc)
 Unlocks a locked DC. More...
 
MG_EXPORT HDC GUIAPI CreatePrivateDC (HWND hwnd)
 Creates a private window DC of a window. More...
 
MG_EXPORT HDC GUIAPI CreatePrivateClientDC (HWND hwnd)
 Creates a private client DC of a window. More...
 
HDC GUIAPI CreatePrivateSubDC (HDC hdc, int off_x, int off_y, int width, int height)
 Creates a private SubDC of a window. More...
 
MG_EXPORT HDC GUIAPI GetPrivateClientDC (HWND hwnd)
 Returns the private client DC of a window. More...
 
MG_EXPORT void GUIAPI DeletePrivateDC (HDC hdc)
 Deletes the DC returned by CreatePrivateDC or CreatePrivateClientDC or CreatePrivateSubDC. More...
 
MG_EXPORT HDC GUIAPI CreateSecondaryDC (HWND hwnd)
 Creates a secondary window DC of a window. More...
 
MG_EXPORT HDC GUIAPI SetSecondaryDC (HWND hwnd, HDC secondary_dc, ON_UPDATE_SECONDARYDC on_update_secondarydc)
 Set a window's secondary DC and the callback procedure for the secondary DC update. More...
 
MG_EXPORT HDC GUIAPI GetSecondaryDC (HWND hwnd)
 Retrives and returns the secondary DC of a specific window. More...
 
MG_EXPORT HDC GUIAPI GetSecondaryClientDC (HWND hwnd)
 Retrives and returns the client secondary DC of a specific window. More...
 
MG_EXPORT void GUIAPI ReleaseSecondaryDC (HWND hwnd, HDC hdc)
 Release the DC returned by GetSecondaryDC or GetSecondaryClientDC. More...
 
MG_EXPORT void GUIAPI DeleteSecondaryDC (HWND hwnd)
 Deletes the secondary DC of the window. More...
 
MG_EXPORT Uint32 GUIAPI GetDCAttr (HDC hdc, int attr)
 Gets a specified attribute value of a DC. More...
 
MG_EXPORT Uint32 GUIAPI SetDCAttr (HDC hdc, int attr, Uint32 value)
 Sets a specified attribute value of a DC. More...
 
MG_EXPORT int GUIAPI GetRasterOperation (HDC hdc)
 Gets the raster operation of a DC. More...
 
MG_EXPORT int GUIAPI SetRasterOperation (HDC hdc, int rop)
 Sets the raster operation of a DC to a new value. More...
 
MG_EXPORT int GUIAPI GetPalette (HDC hdc, int start, int len, GAL_Color *cmap)
 Gets palette entries of a DC. More...
 
MG_EXPORT BOOL GUIAPI SetPalette (HDC hdc, int start, int len, GAL_Color *cmap)
 Sets palette entries of a DC. More...
 
MG_EXPORT BOOL GUIAPI SetColorfulPalette (HDC hdc)
 Sets a DC with colorfule palette. More...
 
MG_EXPORT HPALETTE GUIAPI CreatePalette (GAL_Palette *pal)
 Creates a logical palette. More...
 
MG_EXPORT BOOL GUIAPI SelectPalette (HDC hdc, HPALETTE hpal, BOOL reserved)
 Selects a palette for a DC. More...
 
MG_EXPORT BOOL GUIAPI RealizePalette (HDC hdc)
 This function maps palette entries from the current logical palette to the system palette. More...
 
MG_EXPORT BOOL GUIAPI ResizePalette (HPALETTE hpal, int len)
 Resizes a logical palette. More...
 
MG_EXPORT void GUIAPI DestroyPalette (HPALETTE hpal)
 Destroy a logical palette. More...
 
MG_EXPORT HPALETTE GUIAPI GetDefaultPalette (void)
 Gets the system default logical palette. More...
 
MG_EXPORT int GUIAPI GetPaletteEntries (HPALETTE hpal, int start, int len, GAL_Color *cmap)
 Gets palette entries of a logical palette. More...
 
MG_EXPORT int GUIAPI SetPaletteEntries (HPALETTE hpal, int start, int len, GAL_Color *cmap)
 Sets palette entries of a logical palette. More...
 
MG_EXPORT UINT GUIAPI GetNearestPaletteIndex (HPALETTE hpal, Uint8 red, Uint8 green, Uint8 blue)
 Gets the nearest palette index in the logical palette for a spefici color. More...
 
MG_EXPORT RGBCOLOR GUIAPI GetNearestColor (HDC hdc, Uint8 red, Uint8 green, Uint8 blue)
 Gets the nearest color compliant to a DC for a spefici color. More...
 
MG_EXPORT void GUIAPI SetPixel (HDC hdc, int x, int y, gal_pixel pixel)
 Sets the pixel with a new pixel value at the specified position on a DC. More...
 
MG_EXPORT gal_pixel GUIAPI SetPixelRGB (HDC hdc, int x, int y, Uint8 r, Uint8 g, Uint8 b)
 Sets the pixel by a RGB triple at the specified position on a DC. More...
 
MG_EXPORT gal_pixel GUIAPI SetPixelRGBA (HDC hdc, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Sets the pixel by a RGBA quarter at the specified position on a DC. More...
 
MG_EXPORT gal_pixel GUIAPI GetPixel (HDC hdc, int x, int y)
 Gets the pixel value at the specified position on a DC. More...
 
MG_EXPORT gal_pixel GUIAPI GetPixelRGB (HDC hdc, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b)
 Gets the pixel value at the specified position on a DC in RGB triple. More...
 
MG_EXPORT gal_pixel GUIAPI GetPixelRGBA (HDC hdc, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 Gets the pixel value at the specified position on a DC in RGBA quarter. More...
 
MG_EXPORT void GUIAPI RGBA2Pixels (HDC hdc, const RGB *rgbs, gal_pixel *pixels, int count)
 Gets the pixel values from a color array in RGBA quarter under a DC. More...
 
static gal_pixel RGBA2Pixel (HDC hdc, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Gets the pixel value from a color in RGBA quarter under a DC. More...
 
MG_EXPORT void GUIAPI RGB2Pixels (HDC hdc, const RGB *rgbs, gal_pixel *pixels, int count)
 Gets the pixel values from a color array in RGB triple under a DC. More...
 
static gal_pixel RGB2Pixel (HDC hdc, Uint8 r, Uint8 g, Uint8 b)
 Gets the pixel value from a color in RGB triple under a DC. More...
 
MG_EXPORT void GUIAPI Pixel2RGBs (HDC hdc, const gal_pixel *pixels, RGB *rgbs, int count)
 Gets the colors in RGB triple from a pixel value array under a DC. More...
 
static void Pixel2RGB (HDC hdc, gal_pixel pixel, Uint8 *r, Uint8 *g, Uint8 *b)
 Gets the color in RGB triple from a pixel value under a DC. More...
 
MG_EXPORT void GUIAPI Pixel2RGBAs (HDC hdc, const gal_pixel *pixels, RGB *rgbs, int count)
 Gets the colors in RGBA quarter from a array of pixel values under a DC. More...
 
static void Pixel2RGBA (HDC hdc, gal_pixel pixel, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 Gets the color in RGBA quarter from a pixel value under a DC. More...
 
static DWORD Pixel2DWORD (HDC hdc, gal_pixel pixel)
 An inline function to convert pixel value to DWORD color. More...
 
static gal_pixel DWORD2Pixel (HDC hdc, DWORD dword)
 An inline function to convert DWORD color to gal_pixel. More...
 
MG_EXPORT void GUIAPI FocusRect (HDC hdc, int x0, int y0, int x1, int y1)
 Draws a focus rectangle. More...
 
MG_EXPORT void GUIAPI DrawHVDotLine (HDC hdc, int x, int y, int w_h, BOOL H_V)
 Draws a horizontal or vertical dot dash line. More...
 
MG_EXPORT BOOL GUIAPI LineClipper (const RECT *cliprc, int *_x0, int *_y0, int *_x1, int *_y1)
 The line clipper using Cohen-Sutherland algorithm. More...
 
MG_EXPORT void GUIAPI LineGenerator (void *context, int x1, int y1, int x2, int y2, CB_LINE cb)
 A line generator based-on Breshenham algorithm. More...
 
MG_EXPORT void GUIAPI CircleGenerator (void *context, int sx, int sy, int r, CB_CIRCLE cb)
 A circle generator. More...
 
MG_EXPORT void GUIAPI EllipseGenerator (void *context, int sx, int sy, int rx, int ry, CB_ELLIPSE cb)
 An ellipse generator. More...
 
MG_EXPORT void GUIAPI CircleArcGenerator (void *context, int sx, int sy, int r, int ang1, int ang2, CB_ARC cb)
 An arc generator. More...
 
MG_EXPORT BOOL GUIAPI MonotoneVerticalPolygonGenerator (void *context, const POINT *pts, int vertices, CB_POLYGON cb)
 A monotone vertical polygon generator. More...
 
MG_EXPORT BOOL GUIAPI PolygonIsMonotoneVertical (const POINT *pts, int vertices)
 Checks a polygon is monotone vertical or not. More...
 
MG_EXPORT BOOL GUIAPI PolygonGeneratorEx (void *context, const POINT *pts, int vertices, CB_POLYGON cb, RECT *rc_output)
 A general polygon generator. More...
 
MG_EXPORT BOOL GUIAPI FloodFillGenerator (void *context, const RECT *src_rc, int x, int y, CB_EQUAL_PIXEL cb_equal_pixel, CB_FLOOD_FILL cb_flood_fill)
 A flood filling generator. More...
 
MG_EXPORT int GUIAPI SetBitmapScalerType (HDC hdc, int scaler_type)
 set bitmap scaler algorithm callback of DC according by scaler_type. More...
 
MG_EXPORT void GUIAPI MoveTo (HDC hdc, int x, int y)
 Moves the current zero pen position. More...
 
MG_EXPORT void GUIAPI LineTo (HDC hdc, int x, int y)
 Draws a zero line to a position. More...
 
MG_EXPORT void GUIAPI Rectangle (HDC hdc, int x0, int y0, int x1, int y1)
 Draws a rectangle. More...
 
MG_EXPORT void GUIAPI PolyLineTo (HDC hdc, const POINT *pts, int vertices)
 Draws a polyline. More...
 
MG_EXPORT void GUIAPI SplineTo (HDC hdc, const POINT *pts)
 Draws a bezier spline. More...
 
MG_EXPORT void GUIAPI Circle (HDC hdc, int sx, int sy, int r)
 Draws a circle. More...
 
MG_EXPORT void GUIAPI Ellipse (HDC hdc, int sx, int sy, int rx, int ry)
 Draws a ellipse. More...
 
MG_EXPORT void GUIAPI CircleArc (HDC hdc, int sx, int sy, int r, int ang1, int ang2)
 Draws an arc. More...
 
MG_EXPORT void GUIAPI FillBox (HDC hdc, int x, int y, int w, int h)
 Fills a rectangle box. More...
 
MG_EXPORT void GUIAPI FillCircle (HDC hdc, int sx, int sy, int r)
 Fills a circle. More...
 
MG_EXPORT void GUIAPI FillEllipse (HDC hdc, int sx, int sy, int rx, int ry)
 Fills an ellipse. More...
 
MG_EXPORT BOOL GUIAPI FillPolygon (HDC hdc, const POINT *pts, int vertices)
 Fills an polygon. More...
 
MG_EXPORT BOOL GUIAPI FloodFill (HDC hdc, int x, int y)
 Fills an enclosed area starting at point (x,y). More...
 
MG_EXPORT void GUIAPI SetPenDashes (HDC hdc, int dash_offset, const unsigned char *dash_list, int n)
 Sets the way dashed-lines are drawn. More...
 
MG_EXPORT void GUIAPI SetBrushInfo (HDC hdc, const BITMAP *tile, const STIPPLE *stipple)
 Set the tile or stipple with the DC. More...
 
MG_EXPORT void GUIAPI SetBrushOrigin (HDC hdc, int x, int y)
 Set the origin when using tiles or stipples with the DC. More...
 
MG_EXPORT void GUIAPI LineEx (HDC hdc, int x1, int y1, int x2, int y2)
 Draws a line with the current pen in the DC hdc. More...
 
MG_EXPORT void GUIAPI ArcEx (HDC hdc, int x, int y, int width, int height, int ang1, int ang2)
 Draws an arc with the current pen in a DC. More...
 
MG_EXPORT void GUIAPI FillArcEx (HDC hdc, int x, int y, int width, int height, int ang1, int ang2)
 Fills an arc with the current brush in a DC. More...
 
MG_EXPORT void GUIAPI PolyLineEx (HDC hdc, const POINT *pts, int nr_pts)
 Draws a polyline with the current pen in a DC. More...
 
MG_EXPORT void GUIAPI PolyArcEx (HDC hdc, const ARC *arcs, int nr_arcs)
 Draws a polyarc with the current pen in a DC. More...
 
MG_EXPORT void GUIAPI PolyFillArcEx (HDC hdc, const ARC *arcs, int nr_arcs)
 Fill a polyarc with the current brush in a DC. More...
 
MG_EXPORT BOOL GUIAPI RoundRect (HDC hdc, int x0, int y0, int x1, int y1, int cw, int ch)
 Draw and fill a rectangle with rounded corners in a DC. More...
 
MG_EXPORT void GUIAPI GetDCLCS (HDC hdc, int which, POINT *pt)
 Retrieves mapping parameters of a device context. More...
 
MG_EXPORT void GUIAPI SetDCLCS (HDC hdc, int which, const POINT *pt)
 Sets mapping parameters of a device context. More...
 
MG_EXPORT void GUIAPI DPtoLP (HDC hdc, POINT *pPt)
 Converts device coordinates into logical coordinates. More...
 
MG_EXPORT void GUIAPI LPtoDP (HDC hdc, POINT *pPt)
 Converts logical coordinates into device coordinates. More...
 
MG_EXPORT void GUIAPI SPtoLP (HDC hdc, POINT *pPt)
 Converts screen coordinates into logical coordinates. More...
 
MG_EXPORT void GUIAPI LPtoSP (HDC hdc, POINT *pPt)
 Converts logical coordinates into screen coordinates. More...
 
MG_EXPORT void GUIAPI ExcludeClipRect (HDC hdc, const RECT *prc)
 Excludes the specified rectangle from the current visible region of a DC. More...
 
MG_EXPORT void GUIAPI IncludeClipRect (HDC hdc, const RECT *prc)
 Includes the specified rectangle to the current visible region of a DC. More...
 
MG_EXPORT BOOL GUIAPI PtVisible (HDC hdc, int x, int y)
 Checks whether a point is visible. More...
 
MG_EXPORT void GUIAPI ClipRectIntersect (HDC hdc, const RECT *prc)
 Intersects the specified rectangle with the visible region of the DC. More...
 
MG_EXPORT void GUIAPI SelectClipRect (HDC hdc, const RECT *prc)
 Sets the visible region of a DC to be a rectangle. More...
 
MG_EXPORT int GUIAPI SelectClipRegionEx (HDC hdc, const CLIPRGN *pRgn, int fnMode)
 Combines the specified region with the current clipping region using the specified mode. More...
 
MG_EXPORT void GUIAPI SelectClipRegion (HDC hdc, const CLIPRGN *pRgn)
 Sets the visible region of a DC to be a region. More...
 
MG_EXPORT int GUIAPI OffsetClipRegion (HDC hdc, int nXOffset, int nYOffset)
 Moves the clipping region of a device context by the specified offsets. More...
 
MG_EXPORT void GUIAPI GetBoundsRect (HDC hdc, RECT *pRect)
 Retrieves the bounding rectangle of the current visible region of a DC. More...
 
MG_EXPORT BOOL GUIAPI RectVisible (HDC hdc, const RECT *pRect)
 Checks whether the specified rectangle is visible. More...
 
MG_EXPORT int GUIAPI GetClipBox (HDC hdc, RECT *clipbox)
 Retrieves the bounding rectangle of the current clipping region of a DC. More...
 
MG_EXPORT int GUIAPI GetClipRegion (HDC hdc, CLIPRGN *cliprgn)
 Gets the current clipping region of a DC. More...
 
MG_EXPORT BOOL GUIAPI GetBitmapFromDC (HDC hdc, int x, int y, int w, int h, BITMAP *bmp)
 Gets image box on a DC and saves it into a BITMAP object. More...
 
MG_EXPORT BOOL GUIAPI FillBoxWithBitmap (HDC hdc, int x, int y, int w, int h, const BITMAP *bmp)
 Fills a box with a BITMAP object. More...
 
MG_EXPORT BOOL GUIAPI FillBoxWithBitmapPart (HDC hdc, int x, int y, int w, int h, int bw, int bh, const BITMAP *bmp, int xo, int yo)
 Fills a box with a part of a bitmap oject. More...
 
MG_EXPORT BOOL GUIAPI FillBitmapPartInBox (HDC hdc, int box_x, int box_y, int box_w, int box_h, const BITMAP *pbmp, int bmp_x, int bmp_y, int bmp_w, int bmp_h)
 Fills a part of bitmap into a box, and the parts bitmap will be scaled if needed. More...
 
MG_EXPORT void GUIAPI BitBlt (HDC hsdc, int sx, int sy, int sw, int sh, HDC hddc, int dx, int dy, DWORD dwRop)
 Performs a bit-block transfer from a device context into another device context. More...
 
MG_EXPORT void GUIAPI StretchBlt (HDC hsdc, int sx, int sy, int sw, int sh, HDC hddc, int dx, int dy, int dw, int dh, DWORD dwRop)
 Copies a bitmap from a source rectangle into a destination rectangle, streches the bitmap if necessary. More...
 
MG_EXPORT BOOL GUIAPI ScaleBitmapEx (BITMAP *dst, const BITMAP *src, HDC ref_dc)
 Scales a BITMAP object into another BITMAP object by specify algorithm. More...
 
MG_EXPORT gal_pixel GUIAPI GetPixelInBitmapEx (const BITMAP *bmp, int x, int y, Uint8 *alpha)
 Returns the pixel value in a BITMAP object. More...
 
static gal_pixel GUIAPI GetPixelInBitmap (const BITMAP *bmp, int x, int y)
 Returns the pixel value in a BITMAP object. More...
 
static BOOL GUIAPI SetPixelInBitmap (const BITMAP *bmp, int x, int y, gal_pixel pixel)
 Sets pixel value in a BITMAP object. More...
 
MG_EXPORT BOOL GUIAPI SaveScreenRectContent (const RECT *rcWin, const char *filename)
 Saves content of a rectangle in the screen to a file. More...
 
MG_EXPORT BOOL GUIAPI SaveMainWindowContent (HWND hWnd, const char *filename)
 Saves content of a main window to a file. More...
 
MG_EXPORT HICON GUIAPI LoadIconFromFile (HDC hdc, const char *filename, int which)
 Loads an icon from a Windows ICO file. More...
 
MG_EXPORT HICON GUIAPI LoadIconFromMem (HDC hdc, const void *area, int which)
 Loads an icon from a memory area. More...
 
MG_EXPORT HICON GUIAPI CreateIconEx (HDC hdc, int w, int h, const BYTE *AndBits, const BYTE *XorBits, int colornum, const RGB *pal)
 Creates an icon object from the memory. More...
 
MG_EXPORT BOOL GUIAPI DestroyIcon (HICON hicon)
 Destroys an icon object. More...
 
MG_EXPORT BOOL GUIAPI GetIconSize (HICON hicon, int *w, int *h)
 Gets the size of an icon object. More...
 
MG_EXPORT void GUIAPI DrawIcon (HDC hdc, int x, int y, int w, int h, HICON hicon)
 Draws an icon into a box. More...
 
static void SetRect (RECT *prc, int left, int top, int right, int bottom)
 Sets a rectangle. More...
 
static void SetRectEmpty (RECT *prc)
 Empties a rectangle. More...
 
static void CopyRect (RECT *pdrc, const RECT *psrc)
 Copies one rectangle to another. More...
 
static void OffsetRect (RECT *prc, int x, int y)
 Moves a rectangle by offsets. More...
 
static void InflateRect (RECT *prc, int cx, int cy)
 Increases or decreases the width and height of an rectangle. More...
 
static void InflateRectToPt (RECT *prc, int x, int y)
 Inflates a rectangle to contain a point. More...
 
static BOOL PtInRect (const RECT *prc, int x, int y)
 Determines whether a point lies within an rectangle. More...
 
MG_EXPORT BOOL GUIAPI IsRectEmpty (const RECT *prc)
 Determines whether an rectangle is empty. More...
 
MG_EXPORT BOOL GUIAPI EqualRect (const RECT *prc1, const RECT *prc2)
 Determines whether two rectangles are equal. More...
 
MG_EXPORT void GUIAPI NormalizeRect (RECT *pRect)
 Normalizes a rectangle. More...
 
MG_EXPORT BOOL GUIAPI IntersectRect (RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
 Calculates the intersection of two rectangles. More...
 
MG_EXPORT BOOL GUIAPI IsCovered (const RECT *prc1, const RECT *prc2)
 Determines whether one rectangle is covered by another. More...
 
MG_EXPORT BOOL GUIAPI DoesIntersect (const RECT *psrc1, const RECT *psrc2)
 Determines whether two rectangles intersect. More...
 
MG_EXPORT BOOL GUIAPI UnionRect (RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
 Unions two source rectangles. More...
 
MG_EXPORT void GUIAPI GetBoundRect (PRECT pdrc, const RECT *psrc1, const RECT *psrc2)
 Gets the bound rectangle of two source rectangles. More...
 
MG_EXPORT int GUIAPI SubtractRect (RECT *rc, const RECT *psrc1, const RECT *psrc2)
 Obtains the rectangles when substracting one rectangle from another. More...
 
MG_EXPORT void GUIAPI GetFontMetrics (LOGFONT *log_font, FONTMETRICS *font_metrics)
 Gets metrics information of a logical font. More...
 
MG_EXPORT void GUIAPI GetGlyphBitmap (LOGFONT *log_font, const char *mchar, int mchar_len, GLYPHBITMAP *glyph_bitmap)
 Gets the glyph bitmap information when uses a logical font to output a character. More...
 
MG_EXPORT BOOL GUIAPI InitVectorialFonts (void)
 Initializes vectorial font renderer. More...
 
MG_EXPORT void GUIAPI TermVectorialFonts (void)
 Terminates vectorial font renderer. More...
 
MG_EXPORT PLOGFONT GUIAPI CreateLogFont (const char *type, const char *family, const char *charset, char weight, char slant, char flip, char other, char underline, char struckout, int size, int rotation)
 Creates a logical font. More...
 
MG_EXPORT PLOGFONT GUIAPI CreateLogFontByName (const char *font_name)
 Creates a logical font by a font name. More...
 
MG_EXPORT PLOGFONT GUIAPI CreateLogFontIndirect (LOGFONT *logfont)
 Creates a logical font indirectly from a LOGFONT structure. More...
 
MG_EXPORT void GUIAPI DestroyLogFont (PLOGFONT log_font)
 Destroys a logical font. More...
 
MG_EXPORT void GUIAPI GetLogFontInfo (HDC hdc, LOGFONT *log_font)
 Gets logical font information of a DC. More...
 
MG_EXPORT PLOGFONT GUIAPI GetCurFont (HDC hdc)
 Gets the pointer to the current logical font of a DC. More...
 
MG_EXPORT PLOGFONT GUIAPI SelectFont (HDC hdc, PLOGFONT log_font)
 Selects a logical font into a DC. More...
 
MG_EXPORT const DEVFONT *GUIAPI GetNextDevFont (const DEVFONT *dev_font)
 Get next devfont information. More...
 
MG_EXPORT BOOL GUIAPI ft2SetLcdFilter (LOGFONT *logfont, mg_FT_LcdFilter filter)
 Set freetype2 smooth mode. More...
 
MG_EXPORT DEVFONT *GUIAPI LoadDevFontFromFile (const char *devfont_name, const char *file_name)
 Load device font from font file. More...
 
MG_EXPORT void GUIAPI DestroyDynamicDevFont (DEVFONT **devfont)
 Destroy device font loaded dynamically from font file. More...
 
static PLOGFONT GUIAPI GetSystemFont (int font_id)
 Gets the system logical font through an font identifier. More...
 
MG_EXPORT int GUIAPI GetSysFontMaxWidth (int font_id)
 Gets the maximal width of a single-byte character of a system font. More...
 
MG_EXPORT int GUIAPI GetSysFontAveWidth (int font_id)
 Gets the average width of a single-byte character of a system font. More...
 
MG_EXPORT int GUIAPI GetSysFontHeight (int font_id)
 Gets the height of a single-byte character of a system font. More...
 
MG_EXPORT const char *GUIAPI GetSysCharset (BOOL wchar)
 Gets the current system charset. More...
 
MG_EXPORT int GUIAPI GetSysCharHeight (void)
 Gets the height of a character of the default system font. More...
 
MG_EXPORT int GUIAPI GetSysCharWidth (void)
 Gets the width of a single-byte character of the default system font. More...
 
MG_EXPORT int GUIAPI GetSysCCharWidth (void)
 Gets the width of a multi-byte character of the default system font. More...
 
MG_EXPORT int GUIAPI GetTextMCharInfo (PLOGFONT log_font, const char *mstr, int len, int *pos_chars)
 Retrieves positions of multi-byte characters in a string. More...
 
MG_EXPORT int GUIAPI GetTextWordInfo (PLOGFONT log_font, const char *mstr, int len, int *pos_words, WORDINFO *info_words)
 Retrieves information of multi-byte words in a string. More...
 
MG_EXPORT int GUIAPI GetFirstMCharLen (PLOGFONT log_font, const char *mstr, int len)
 Retrieves the length of the first multi-byte character in a string. More...
 
MG_EXPORT int GUIAPI GetFirstWord (PLOGFONT log_font, const char *mstr, int len, WORDINFO *word_info)
 Retrieves the length and info of the first multi-byte word in a string. More...
 
MG_EXPORT int GUIAPI MB2WCEx (PLOGFONT log_font, void *dest, BOOL wc32, const unsigned char *mstr, int n)
 Converts a multibyte character to a wide character in UCS according to the charset/encoding of the logical font. More...
 
MG_EXPORT int GUIAPI WC2MBEx (PLOGFONT log_font, unsigned char *s, UChar32 wc)
 Converts a wide character in UCS to a multibyte character according to the charset/encoding of the logical font. More...
 
MG_EXPORT int GUIAPI MBS2WCSEx (PLOGFONT log_font, void *dest, BOOL wc32, const unsigned char *mstr, int mstr_len, int n, int *conved_mstr_len)
 Converts a multibyte string to a wide character string in UC16 according to the charset/encoding of the logical font. More...
 
MG_EXPORT int GUIAPI WCS2MBSEx (PLOGFONT log_font, unsigned char *dest, const void *wcs, int wcs_len, BOOL wc32, int n, int *conved_wcs_len)
 Converts a wide character string in UC16 to a multibyte string according to the charset/encoding of the logical font. More...
 
MG_EXPORT int GUIAPI GetTextExtentPoint (HDC hdc, const char *text, int len, int max_extent, int *fit_chars, int *pos_chars, int *dx_chars, SIZE *size)
 Computes the extent of a string when output the string in a limited space. More...
 
MG_EXPORT int GUIAPI GetTabbedTextExtentPoint (HDC hdc, const char *text, int len, int max_extent, int *fit_chars, int *pos_chars, int *dx_chars, SIZE *size)
 Computes the extent of a string when output the formatted string in a limited space. More...
 
MG_EXPORT int GUIAPI GetFontHeight (HDC hdc)
 Retrieves the height of the current logical font in a DC. More...
 
MG_EXPORT int GUIAPI GetMaxFontWidth (HDC hdc)
 Retrieves the maximal character width of the current logical font in a DC. More...
 
MG_EXPORT int GUIAPI GetTextExtent (HDC hdc, const char *spText, int len, SIZE *pSize)
 Computes the output extent of a string of text. More...
 
MG_EXPORT int GUIAPI GetTabbedTextExtent (HDC hdc, const char *spText, int len, SIZE *pSize)
 Computes the output extent of a formatted text. More...
 
MG_EXPORT int GUIAPI TextOutLen (HDC hdc, int x, int y, const char *spText, int len)
 Outputs a string of text. More...
 
MG_EXPORT int GUIAPI TextOutOmitted (HDC hdc, int x, int y, const char *mtext, int len, int max_extent)
 Outputs a string of text with omitted format. More...
 
MG_EXPORT int GUIAPI TabbedTextOutLen (HDC hdc, int x, int y, const char *spText, int len)
 Outputs a formatted text. More...
 
MG_EXPORT int GUIAPI TabbedTextOutEx (HDC hdc, int x, int y, const char *spText, int nCount, int nTabPositions, int *pTabPositions, int nTabOrigin)
 Writes a character string at a specified location, expanding tabs to the values specified in an anrry of tab-stop positions. More...
 
MG_EXPORT void GUIAPI GetLastTextOutPos (HDC hdc, POINT *pt)
 Retrieves the last text output position. More...
 
MG_EXPORT int GUIAPI DrawTextEx2 (HDC hdc, const char *pText, int nCount, RECT *pRect, int nIndent, UINT nFormat, DTFIRSTLINE *firstline)
 Draws a formatted text in a rectangle. More...
 
MG_EXPORT BOOL GUIAPI RegisterBitmapFileType (const char *ext, void *(*init)(MG_RWops *fp, MYBITMAP *my_bmp, RGB *pal), int(*load)(MG_RWops *fp, void *init_info, MYBITMAP *my_bmp, CB_ONE_SCANLINE cb, void *context), void(*cleanup)(void *init_info), int(*save)(MG_RWops *fp, MYBITMAP *my_bmp, RGB *pal), BOOL(*check)(MG_RWops *fp))
 Registers a bitmap file loader, saver, and checker. More...
 
MG_EXPORT const char *GUIAPI CheckBitmapType (MG_RWops *fp)
 Checks the type of the bitmap in a data source. More...
 
MG_EXPORT BOOL GUIAPI mlsEnableSlaveScreen (HDC dc_mls, BOOL enable)
 Enable or Disable a MLShadow slave screen. More...
 
MG_EXPORT int GUIAPI LoadBitmapEx (HDC hdc, PBITMAP pBitmap, MG_RWops *area, const char *ext)
 Loads a device-dependent bitmap from a general data source. More...
 
MG_EXPORT int GUIAPI LoadBitmapFromFile (HDC hdc, PBITMAP pBitmap, const char *spFileName)
 Loads a device-dependent bitmap from a file. More...
 
MG_EXPORT int GUIAPI LoadBitmapFromMem (HDC hdc, PBITMAP pBitmap, const void *mem, int size, const char *ext)
 Loads a device-dependent bitmap from memory. More...
 
MG_EXPORT void GUIAPI UnloadBitmap (PBITMAP pBitmap)
 Unloads a bitmap. More...
 
MG_EXPORT int GUIAPI SetBitmapKeyColor (HDC hdc, PBITMAP bmp, Uint8 r, Uint8 g, Uint8 b)
 Set the bitmap color key. More...
 
MG_EXPORT void GUIAPI ReplaceBitmapColor (HDC hdc, PBITMAP pBitmap, gal_pixel iOColor, gal_pixel iNColor)
 Replaces a specific pixels in a bitmap with another pixel. More...
 
MG_EXPORT void GUIAPI HFlipBitmap (BITMAP *bmp, unsigned char *inter_buff)
 Horizontal Flip the special Bitmap object. More...
 
MG_EXPORT void GUIAPI VFlipBitmap (BITMAP *bmp, unsigned char *inter_buff)
 Vertical Flip the special Bitmap object. More...
 
MG_EXPORT void *GUIAPI InitMyBitmapSL (MG_RWops *area, const char *ext, MYBITMAP *my_bmp, RGB *pal)
 Initializes scanline loader of the MYBITMAP object from a data source. More...
 
MG_EXPORT int GUIAPI LoadMyBitmapSL (MG_RWops *area, void *load_info, MYBITMAP *my_bmp, CB_ONE_SCANLINE cb, void *context)
 Loads MYBITMAP scanlines from a data source one by one. More...
 
MG_EXPORT int GUIAPI CleanupMyBitmapSL (MYBITMAP *my_bmp, void *load_info)
 Cleanups the scanline loader. More...
 
MG_EXPORT int GUIAPI LoadMyBitmapEx (PMYBITMAP my_bmp, RGB *pal, MG_RWops *area, const char *ext)
 Loads a MYBITMAP object from a data source. More...
 
MG_EXPORT int GUIAPI LoadMyBitmapFromFile (PMYBITMAP my_bmp, RGB *pal, const char *file_name)
 Loads a MYBITMAP object from a file. More...
 
MG_EXPORT int GUIAPI LoadMyBitmapFromMem (PMYBITMAP my_bmp, RGB *pal, const void *mem, int size, const char *ext)
 Loads a MYBITMAP object from memory. More...
 
MG_EXPORT void GUIAPI UnloadMyBitmap (PMYBITMAP my_bmp)
 Unloads a bitmap. More...
 
MG_EXPORT int GUIAPI SaveMyBitmapToFile (PMYBITMAP my_bmp, RGB *pal, const char *spFileName)
 Saves a MYBITMAP object to a bitmap file. More...
 
MG_EXPORT int GUIAPI SaveBitmapToFile (HDC hdc, PBITMAP pBitmap, const char *spFileName)
 Saves a BITMAP object to a bitmap file. More...
 
MG_EXPORT BOOL GUIAPI InitBitmap (HDC hdc, Uint32 w, Uint32 h, Uint32 pitch, BYTE *bits, PBITMAP bmp)
 Initializes a BITMAP object as a normal bitmap. More...
 
MG_EXPORT HDC GUIAPI InitSlaveScreen (const char *name, const char *mode)
 Initializes slave screen. More...
 
MG_EXPORT void GUIAPI TerminateSlaveScreen (HDC hdc)
 Terminates slave screen. More...
 
MG_EXPORT BOOL GUIAPI InitBitmapPixelFormat (HDC hdc, PBITMAP bmp)
 Initializes the bitmap pixel format information of a BITMAP object. More...
 
MG_EXPORT void GUIAPI DeleteBitmapAlphaPixel (PBITMAP bmp)
 Deletes the bitmap alpha pixel format information of a BITMAP object. More...
 
MG_EXPORT int GUIAPI ExpandMyBitmap (HDC hdc, PBITMAP bmp, const MYBITMAP *my_bmp, const RGB *pal, int frame)
 Expands a MYBITMAP object to a BITMAP object. More...
 
MG_EXPORT void GUIAPI ExpandMonoBitmap (HDC hdc, BYTE *bits, Uint32 pitch, const BYTE *my_bits, Uint32 my_pitch, Uint32 w, Uint32 h, DWORD flags, Uint32 bg, Uint32 fg)
 Convert a mono color MYBITMAP pixel data to a BITMAP pixel data. More...
 
static void GUIAPI Expand16CBitmap (HDC hdc, BYTE *bits, Uint32 pitch, const BYTE *my_bits, Uint32 my_pitch, Uint32 w, Uint32 h, DWORD flags, const RGB *pal)
 Convert a 16 color MYBITMAP pixel data to a BITMAP pixel data. More...
 
static void GUIAPI Expand256CBitmap (HDC hdc, BYTE *bits, Uint32 pitch, const BYTE *my_bits, Uint32 my_pitch, Uint32 w, Uint32 h, DWORD flags, const RGB *pal, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT *mybmp)
 Convert a 256 color MYBITMAP pixel data to a BITMAP pixel data. More...
 
MG_EXPORT void GUIAPI CompileRGBABitmap (HDC hdc, BYTE *bits, Uint32 pitch, const BYTE *my_bits, Uint32 my_pitch, Uint32 w, Uint32 h, DWORD flags, void *pixel_format, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT *mybmp)
 Convert a MYBITMAP pixel data to a BITMAP pixel data. More...
 
MG_EXPORT void GUIAPI CompileRGBABitmapEx (HDC hdc, BYTE *bits, Uint32 pitch, const BYTE *my_bits, Uint32 my_pitch, Uint32 w, Uint32 h, DWORD flags, void *pixel_format, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT *mybmp, BYTE *alpha_mask)
 Compile a MYBITMAP pixel data to a BITMAP pixel data. More...
 
MG_EXPORT int GUIAPI PaintImageEx (HDC hdc, int x, int y, MG_RWops *area, const char *ext)
 Paints an image from data source on device directly. More...
 
MG_EXPORT int GUIAPI PaintImageFromFile (HDC hdc, int x, int y, const char *spFileName)
 Paints an image from file on device directly. More...
 
MG_EXPORT int GUIAPI PaintImageFromMem (HDC hdc, int x, int y, const void *mem, int size, const char *ext)
 Paints an image from memory on device directly. More...
 
MG_EXPORT int GUIAPI StretchPaintImageEx (HDC hdc, int x, int y, int w, int h, MG_RWops *area, const char *ext)
 Paints an image from data source on device directly. More...
 
MG_EXPORT int GUIAPI StretchPaintImageFromFile (HDC hdc, int x, int y, int w, int h, const char *spFileName)
 Paints an image from file on device directly. More...
 
MG_EXPORT int GUIAPI StretchPaintImageFromMem (HDC hdc, int x, int y, int w, int h, const void *mem, int size, const char *ext)
 Paints an image from memory on device directly. More...
 
MG_EXPORT void GUIAPI RotateBitmap (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
 Rotate a bitmap object. More...
 
MG_EXPORT void GUIAPI RotateBitmapVFlip (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
 Flips vertically and rotates a bitmap object. More...
 
MG_EXPORT void GUIAPI RotateBitmapHFlip (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
 Flips horizontally and rotates a bitmap object. More...
 
MG_EXPORT void GUIAPI RotateScaledBitmap (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle, int w, int h)
 Stretches or shrinks a bitmap object at the same as rotating it. More...
 
MG_EXPORT void GUIAPI RotateScaledBitmapVFlip (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle, int w, int h)
 Flip vertically, rotates, stretch or shrinks a bitmap object. More...
 
MG_EXPORT void GUIAPI RotateScaledBitmapHFlip (HDC hdc, const BITMAP *bmp, int lx, int ty, int angle, int w, int h)
 Flip horizontaly, rotates, stretch or shrinks a bitmap object. More...
 
MG_EXPORT void GUIAPI PivotBitmap (HDC hdc, const BITMAP *bmp, int lx, int ty, int cx, int cy, int angle)
 Pivot a bitmap object. More...
 
MG_EXPORT void GUIAPI PivotScaledBitmapFlip (HDC hdc, const BITMAP *bmp, fixed x, fixed y, fixed cx, fixed cy, int angle, fixed scale_x, fixed scale_y, BOOL h_flip, BOOL v_flip)
 Rotates, stretches or shrinks, flips a bitmap object. More...
 
MG_EXPORT DEVFONT *GUIAPI CreateBMPDevFont (const char *bmpfont_name, const BITMAP *glyph_bmp, const char *start_mchar, int nr_glyphs, int glyph_width)
 Create a bitmap device font. More...
 
MG_EXPORT BOOL GUIAPI AddGlyphsToBMPFont (DEVFONT *dev_font, BITMAP *glyph_bmp, const char *start_mchar, int nr_glyphs, int glyph_width)
 Add a new segment in device font. More...
 
MG_EXPORT void GUIAPI DestroyBMPFont (DEVFONT *dev_font)
 Destroy the bitmap device font. More...
 
MG_EXPORT Glyph32 GUIAPI GetGlyphValue (LOGFONT *logfont, const char *mchar, int mchar_len, const char *pre_mchar, int pre_len)
 Get the glyph value of a multi-byte character. More...
 
MG_EXPORT Glyph32 GUIAPI GetGlyphShape (LOGFONT *logfont, const char *mchar, int mchar_len, SHAPETYPE shape_type)
 Get the glyph shape of a character. More...
 
MG_EXPORT int GUIAPI DrawGlyph (HDC hdc, int x, int y, Glyph32 glyph_value, int *adv_x, int *adv_y)
 Draw a glyph. More...
 
MG_EXPORT int GUIAPI GetGlyphInfo (LOGFONT *logfont, Glyph32 glyph_value, GLYPHINFO *glyph_info)
 Retriev the information of a glyph. More...
 
MG_EXPORT int GUIAPI GetGlyphsExtent (HDC hdc, Glyph32 *glyphs, int nr_glyphs, SIZE *size)
 Get visual extent value of a glyph string. More...
 
MG_EXPORT int GUIAPI GetGlyphsExtentPoint (HDC hdc, Glyph32 *glyphs, int nr_glyphs, int max_extent, SIZE *size)
 Get the visual extent value of a glyph string. More...
 
MG_EXPORT int GUIAPI BIDIGetTextLogicalGlyphs (LOGFONT *log_font, const char *text, int text_len, Glyph32 **glyphs, GLYPHMAPINFO **glyphs_map)
 Get logical glyphs string of the text. More...
 
MG_EXPORT int GUIAPI BIDIGetTextVisualGlyphs (LOGFONT *log_font, const char *text, int text_len, Glyph32 **glyphs, GLYPHMAPINFO **glyphs_map)
 Get visual glyphs and glyph_map info relative with logical string byte index. More...
 
MG_EXPORT Glyph32 *GUIAPI BIDILogGlyphs2VisGlyphs (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, GLYPHMAPINFO *glyphs_map)
 Reorder the logical glyphs string to visual glyphs string. More...
 
MG_EXPORT void GUIAPI GetTextRangesLog2Vis (LOGFONT *log_font, char *text, int text_len, int start_index, int end_index, int **ranges, int *nr_ranges)
 Get a list of visual ranges corresponding to a given logical range. More...
 
MG_EXPORT void GUIAPI BIDIGetLogicalEmbeddLevels (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, Uint8 **embedding_level_list)
 Get the logical embedding levels for the logical glyph string and generate runs by embedding levels, the for reorder to get visual glyph string. More...
 
MG_EXPORT void GUIAPI BIDIGetVisualEmbeddLevels (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, Uint8 **embedding_level_list)
 Get the visual embedding levels for the given logical glyph string, then you can get the edge for visual glyphs. More...
 

Variables

MG_EXPORT gal_pixel SysPixelIndex []
 The pre-defined system pixel values. More...
 
const MG_EXPORT RGB SysPixelColor []
 The pre-defined system RGB colors. More...
 

Detailed Description

This file includes graphics device interfaces (GDI) of MiniGUI.

Author
Wei Yongming vince.nosp@m.nt@m.nosp@m.inigu.nosp@m.i.or.nosp@m.g
Date
2002/01/06
   This file is part of MiniGUI, a mature cross-platform windowing 
   and Graphics User Interface (GUI) support system for embedded systems
   and smart IoT devices.

   Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
   Copyright (C) 1998~2002, WEI Yongming

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

   Or,

   As this program is a library, any link to this program must follow
   GNU General Public License version 3 (GPLv3). If you cannot accept
   GPLv3, you need to be licensed from FMSoft.

   If you have got a commercial license of this program, please use it
   under the terms and conditions of the commercial license.

   For more information about the commercial license, please refer to
   <http://www.minigui.com/en/about/licensing-policy/>.

Definition in file gdi.h.

Function Documentation

BOOL GUIAPI AddGlyphsToBMPFont ( DEVFONT dev_font,
BITMAP glyph_bmp,
const char *  start_mchar,
int  nr_glyphs,
int  glyph_width 
)

Add a new segment in device font.

This function add a new segment to the device font pointed by dev_font.

Parameters
dev_fontThe pointer to the device font.
glyph_bmpThe pointer to the segment glyph bitmap object.
start_mcharThe pointer to the first char of the segment.
nr_glyphsThe character count of the segment.
glyph_widthThe character width in the segment.
Returns
TRUE if success, otherwise FALSE.

Referenced by Expand256CBitmap().

DEVFONT *GUIAPI CreateBMPDevFont ( const char *  bmpfont_name,
const BITMAP glyph_bmp,
const char *  start_mchar,
int  nr_glyphs,
int  glyph_width 
)

Create a bitmap device font.

This function create a bitmap device font and return the pointer to the new device font.

Parameters
bmpfont_nameThe font name.
glyph_bmpThe pointer to the bitmap object.
start_mcharThe pointer to the first char of segment.
nr_glyphsThe character count of the segment.
glyph_widthThe character width.
Returns
The pointer to the new device font on sucess, otherwise NULL.

Referenced by Expand256CBitmap().

void GUIAPI DestroyBMPFont ( DEVFONT dev_font)

Destroy the bitmap device font.

This function destroy the bitmap device font pointed by dev_font.

Parameters
dev_fontThe pointer to the device font which will be destroyed.
Returns
TRUE if success, otherwise FALSE.

Referenced by Expand256CBitmap().