125 #define PIXEL_invalid 0 132 #define PIXEL_transparent SysPixelIndex[0] 139 #define PIXEL_darkblue SysPixelIndex[1] 146 #define PIXEL_darkgreen SysPixelIndex[2] 153 #define PIXEL_darkcyan SysPixelIndex[3] 160 #define PIXEL_darkred SysPixelIndex[4] 167 #define PIXEL_darkmagenta SysPixelIndex[5] 174 #define PIXEL_darkyellow SysPixelIndex[6] 181 #define PIXEL_darkgray SysPixelIndex[7] 188 #define PIXEL_lightgray SysPixelIndex[8] 195 #define PIXEL_blue SysPixelIndex[9] 202 #define PIXEL_green SysPixelIndex[10] 209 #define PIXEL_cyan SysPixelIndex[11] 216 #define PIXEL_red SysPixelIndex[12] 223 #define PIXEL_magenta SysPixelIndex[13] 230 #define PIXEL_yellow SysPixelIndex[14] 237 #define PIXEL_lightwhite SysPixelIndex[15] 244 #define PIXEL_black SysPixelIndex[16] 251 #define COLOR_invalid PIXEL_invalid 257 #define COLOR_transparent PIXEL_transparent 263 #define COLOR_darkred PIXEL_darkred 269 #define COLOR_darkgreen PIXEL_darkgreen 275 #define COLOR_darkyellow PIXEL_darkyellow 281 #define COLOR_darkblue PIXEL_darkblue 287 #define COLOR_darkmagenta PIXEL_darkmagenta 293 #define COLOR_darkcyan PIXEL_darkcyan 299 #define COLOR_lightgray PIXEL_lightgray 305 #define COLOR_darkgray PIXEL_darkgray 311 #define COLOR_red PIXEL_red 317 #define COLOR_green PIXEL_green 323 #define COLOR_yellow PIXEL_yellow 329 #define COLOR_blue PIXEL_blue 335 #define COLOR_magenta PIXEL_magenta 341 #define COLOR_cyan PIXEL_cyan 347 #define COLOR_lightwhite PIXEL_lightwhite 353 #define COLOR_black PIXEL_black 359 #define SysColorIndex SysPixelIndex 395 pthread_mutex_t lock;
584 #define NULLREGION 0x00 585 #define SIMPLEREGION 0x01 586 #define COMPLEXREGION 0x02 647 #define InitFreeClipRectList(heap, size) \ 648 InitBlockDataHeap (heap, sizeof (CLIPRECT), size) 660 #define ClipRectAlloc(heap) BlockDataAlloc (heap) 674 #define FreeClipRect(heap, cr) BlockDataFree (heap, cr); 687 #define DestroyFreeClipRectList(heap) DestroyBlockDataHeap (heap); 709 MG_EXPORT
void GUIAPI
InitClipRgn (PCLIPRGN pRgn, PBLOCKHEAP pFreeList);
930 const RECT *rcScroll,
int x,
int y);
943 MG_EXPORT
void GUIAPI
OffsetRegion (PCLIPRGN region,
int x,
int y);
1006 #define UnionRectWithRegion AddClipRect 1013 #define CopyRegion ClipRgnCopy 1020 #define IntersectRegion ClipRgnIntersect 1052 int x,
int y,
int rx,
int ry);
1067 const POINT* pts,
int vertices);
1114 #define HDC_SCREEN ((HDC)0) 1120 #define HDC_SCREEN_SYS ((HDC)1) 1126 #define HDC_INVALID ((HDC)-1) 1128 #define GDCAP_COLORNUM 0 1129 #define GDCAP_HPIXEL 1 1130 #define GDCAP_VPIXEL 2 1131 #define GDCAP_MAXX 3 1132 #define GDCAP_MAXY 4 1133 #define GDCAP_DEPTH 5 1135 #define GDCAP_BITSPP 7 1136 #define GDCAP_RMASK 8 1137 #define GDCAP_GMASK 9 1138 #define GDCAP_BMASK 10 1139 #define GDCAP_AMASK 11 1140 #define GDCAP_PITCH 12 1251 MG_EXPORT
HDC GUIAPI
GetSubDC (
HDC hdc,
int off_x,
int off_y,
int width,
int height);
1329 #define MEMDC_FLAG_NONE 0x00000000 1330 #define MEMDC_FLAG_SWSURFACE 0x00000000 1331 #define MEMDC_FLAG_HWSURFACE 0x00000001 1332 #define MEMDC_FLAG_SRCCOLORKEY 0x00001000 1333 #define MEMDC_FLAG_SRCALPHA 0x00010000 1334 #define MEMDC_FLAG_SRCPIXELALPHA 0x00020000 1335 #define MEMDC_FLAG_RLEACCEL 0x00004000 1420 void* bits,
int pitch);
1458 return CreateMemDCEx (width, height, depth, flags, Rmask, Gmask, Bmask, Amask,
1487 int width,
int height,
BOOL comp_to_parent);
1637 #define CreateCompatibleDC(hdc) CreateCompatibleDCEx(hdc, 0, 0) 1649 #define DeleteCompatibleDC(hdc) DeleteMemDC(hdc) 1689 int* width,
int* height,
int* pitch);
1708 int pitch,
int bytesPerPixel,
const RECT* rc,
void* context);
1817 int width,
int height);
1893 HDC real_dc,
const RECT* secondary_rc,
const RECT* real_rc,
1894 const RECT* main_update_rc);
1896 #define ON_UPDSECDC_DEFAULT ((ON_UPDATE_SECONDARYDC)0) 1897 #define ON_UPDSECDC_DONOTHING ((ON_UPDATE_SECONDARYDC)0xFFFFFFFF) 1993 #define BM_TRANSPARENT 1 1996 #define DC_ATTR_BK_COLOR 0 1997 #define DC_ATTR_PEN_COLOR 1 1998 #define DC_ATTR_BRUSH_COLOR 2 1999 #define DC_ATTR_TEXT_COLOR 3 2001 #define DC_ATTR_BK_MODE 4 2003 #define DC_ATTR_TAB_STOP 5 2004 #define DC_ATTR_CHAR_EXTRA 6 2005 #define DC_ATTR_ALINE_EXTRA 7 2006 #define DC_ATTR_BLINE_EXTRA 8 2008 #define DC_ATTR_MAP_MODE 9 2010 #define DC_ATTR_TEXT_ALIGN 10 2012 #ifdef _MGHAVE_ADV_2DAPI 2014 #define DC_ATTR_PEN_TYPE 11 2015 #define DC_ATTR_PEN_CAP_STYLE 12 2016 #define DC_ATTR_PEN_JOIN_STYLE 13 2017 #define DC_ATTR_PEN_WIDTH 14 2019 #define DC_ATTR_BRUSH_TYPE 15 2021 #define NR_DC_ATTRS 16 2025 #define NR_DC_ATTRS 11 2100 #define GetBkColor(hdc) GetDCAttr (hdc, DC_ATTR_BK_COLOR) 2117 #define GetBkMode(hdc) GetDCAttr (hdc, DC_ATTR_BK_MODE) 2128 #define GetPenColor(hdc) GetDCAttr (hdc, DC_ATTR_PEN_COLOR) 2139 #define GetBrushColor(hdc) GetDCAttr (hdc, DC_ATTR_BRUSH_COLOR) 2150 #define GetTextColor(hdc) GetDCAttr (hdc, DC_ATTR_TEXT_COLOR) 2161 #define GetTabStop(hdc) GetDCAttr (hdc, DC_ATTR_TAB_STOP) 2173 #define SetBkColor(hdc, color) \ 2174 SetDCAttr (hdc, DC_ATTR_BK_COLOR, (DWORD) color) 2193 #define SetBkMode(hdc, mode) \ 2194 SetDCAttr (hdc, DC_ATTR_BK_MODE, (DWORD) mode) 2206 #define SetPenColor(hdc, color) \ 2207 SetDCAttr (hdc, DC_ATTR_PEN_COLOR, (DWORD) color) 2219 #define SetBrushColor(hdc, color) \ 2220 SetDCAttr (hdc, DC_ATTR_BRUSH_COLOR, (DWORD) color) 2232 #define SetTextColor(hdc, color) \ 2233 SetDCAttr (hdc, DC_ATTR_TEXT_COLOR, (DWORD) color) 2245 #define SetTabStop(hdc, value) \ 2246 SetDCAttr (hdc, DC_ATTR_TAB_STOP, (DWORD) value) 2252 #define ROP_COMPOSITE 4 2253 #define ROP_COMP_USER 0x0100 2713 RGB rgb = {r, g, b, a};
2756 RGB rgb = {r, g, b, 0};
2778 RGB* rgbs,
int count);
2806 *r = rgb.
r; *g = rgb.
g, *b = rgb.
b;
2824 RGB* rgbs,
int count);
2854 *r = rgb.
r; *g = rgb.
g, *b = rgb.
b; *a = rgb.
a;
2874 #define PIXEL2DWORD(hdc, pixel) Pixel2DWORD(hdc, pixel) 2910 MG_EXPORT
void GUIAPI
FocusRect (
HDC hdc,
int x0,
int y0,
int x1,
int y1);
2947 #define DrawHDotLine(hdc, x, y, w) DrawHVDotLine (hdc, x, y, w, TRUE); 2965 #define DrawVDotLine(hdc, x, y, h) DrawHVDotLine (hdc, x, y, h, FALSE); 2997 int *_x0,
int *_y0,
int *_x1,
int *_y1);
3003 typedef void (*
CB_LINE) (
void* context,
int stepx,
int stepy);
3028 int x1,
int y1,
int x2,
int y2,
CB_LINE cb);
3034 typedef void (*
CB_CIRCLE) (
void* context,
int x1,
int x2,
int y);
3070 typedef void (*
CB_ELLIPSE) (
void* context,
int x1,
int x2,
int y);
3097 int sx,
int sy,
int rx,
int ry,
CB_ELLIPSE cb);
3103 typedef void (*
CB_ARC) (
void* context,
int x,
int y);
3129 int sx,
int sy,
int r,
int ang1,
int ang2,
CB_ARC cb);
3135 typedef void (*
CB_POLYGON) (
void* context,
int x1,
int x2,
int y);
3235 #define PolygonGenerator(context, pts, vertices, cb) \ 3236 PolygonGeneratorEx(context, pts, vertices, cb, NULL) 3271 const RECT* src_rc,
int x,
int y,
3275 #define BITMAP_SCALER_DDA 0 3277 #define BITMAP_SCALER_BILINEAR 1 3310 MG_EXPORT
void GUIAPI
MoveTo (
HDC hdc,
int x,
int y);
3326 MG_EXPORT
void GUIAPI
LineTo (
HDC hdc,
int x,
int y);
3343 MG_EXPORT
void GUIAPI
Rectangle (
HDC hdc,
int x0,
int y0,
int x1,
int y1);
3391 MG_EXPORT
void GUIAPI
Circle (
HDC hdc,
int sx,
int sy,
int r);
3409 MG_EXPORT
void GUIAPI
Ellipse (
HDC hdc,
int sx,
int sy,
int rx,
int ry);
3432 MG_EXPORT
void GUIAPI
CircleArc (
HDC hdc,
int sx,
int sy,
int r,
3433 int ang1,
int ang2);
3449 MG_EXPORT
void GUIAPI
FillBox (
HDC hdc,
int x,
int y,
int w,
int h);
3464 MG_EXPORT
void GUIAPI
FillCircle (
HDC hdc,
int sx,
int sy,
int r);
3482 MG_EXPORT
void GUIAPI
FillEllipse (
HDC hdc,
int sx,
int sy,
int rx,
int ry);
3514 #ifdef _MGHAVE_ADV_2DAPI 3554 #define GetPenType(hdc) \ 3555 GetDCAttr (hdc, DC_ATTR_PEN_TYPE) 3567 #define SetPenType(hdc, type) \ 3568 SetDCAttr (hdc, DC_ATTR_PEN_TYPE, (DWORD) type) 3590 const unsigned char* dash_list,
int n);
3623 #define GetPenCapStyle(hdc) \ 3624 GetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE) 3636 #define SetPenCapStyle(hdc, style) \ 3637 SetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE, (DWORD) style) 3668 #define GetPenJoinStyle(hdc) GetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE) 3680 #define SetPenJoinStyle(hdc, style) \ 3681 SetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE, (DWORD) style) 3692 #define GetPenWidth(hdc) \ 3693 GetDCAttr (hdc, DC_ATTR_PEN_WIDTH) 3705 #define SetPenWidth(hdc, width) \ 3706 SetDCAttr (hdc, DC_ATTR_PEN_WIDTH, (DWORD) width) 3750 #define GetBrushType(hdc) \ 3751 GetDCAttr (hdc, DC_ATTR_BRUSH_TYPE) 3763 #define SetBrushType(hdc, type) \ 3764 SetDCAttr (hdc, DC_ATTR_BRUSH_TYPE, (DWORD) type) 3831 MG_EXPORT
void GUIAPI
LineEx (
HDC hdc,
int x1,
int y1,
int x2,
int y2);
3856 MG_EXPORT
void GUIAPI
ArcEx (
HDC hdc,
int x,
int y,
int width,
int height,
3857 int ang1,
int ang2);
3882 MG_EXPORT
void GUIAPI
FillArcEx (
HDC hdc,
int x,
int y,
int width,
int height,
3883 int ang1,
int ang2);
3937 MG_EXPORT
void GUIAPI
PolyArcEx (
HDC hdc,
const ARC* arcs,
int nr_arcs);
3971 MG_EXPORT
BOOL GUIAPI
RoundRect (
HDC hdc,
int x0,
int y0,
int x1,
int y1,
int cw,
int ch);
4024 #define MM_ANISOTROPIC 1 4041 #define GetMapMode(hdc) GetDCAttr (hdc, DC_ATTR_MAP_MODE) 4058 #define SetMapMode(hdc, mapmode) \ 4059 SetDCAttr (hdc, DC_ATTR_MAP_MODE, (DWORD)mapmode) 4113 #define DC_LCS_VORG 0 4114 #define DC_LCS_VEXT 1 4115 #define DC_LCS_WORG 2 4116 #define DC_LCS_WEXT 3 4117 #define NR_DC_LCS_PTS 4 4132 #define GetViewportOrg(hdc, pPt) GetDCLCS(hdc, DC_LCS_VORG, pPt) 4147 #define GetViewportExt(hdc, pPt) GetDCLCS(hdc, DC_LCS_VEXT, pPt) 4162 #define GetWindowOrg(hdc, pPt) GetDCLCS(hdc, DC_LCS_WORG, pPt) 4177 #define GetWindowExt(hdc, pPt) GetDCLCS(hdc, DC_LCS_WEXT, pPt) 4192 #define SetViewportOrg(hdc, pPt) SetDCLCS(hdc, DC_LCS_VORG, pPt) 4207 #define SetViewportExt(hdc, pPt) SetDCLCS(hdc, DC_LCS_VEXT, pPt) 4222 #define SetWindowOrg(hdc, pPt) SetDCLCS(hdc, DC_LCS_WORG, pPt) 4237 #define SetWindowExt(hdc, pPt) SetDCLCS(hdc, DC_LCS_WEXT, pPt) 4403 #define RGN_COPY 0x00 4404 #define RGN_DIFF 0x01 4405 #define RGN_AND 0x02 4407 #define RGN_XOR 0x04 4612 int x,
int y,
int w,
int h,
BITMAP* bmp);
4706 int x,
int y,
int w,
int h,
4707 int bw,
int bh,
const BITMAP* bmp,
int xo,
int yo);
4732 int box_w,
int box_h,
const BITMAP* pbmp,
int bmp_x,
int bmp_y,
4733 int bmp_w,
int bmp_h);
4768 MG_EXPORT
void GUIAPI
BitBlt (
HDC hsdc,
int sx,
int sy,
int sw,
int sh,
4769 HDC hddc,
int dx,
int dy,
DWORD dwRop);
4809 MG_EXPORT
void GUIAPI
StretchBlt (
HDC hsdc,
int sx,
int sy,
int sw,
int sh,
4810 HDC hddc,
int dx,
int dy,
int dw,
int dh,
DWORD dwRop);
4834 #define ScaleBitmap(dst, src) ScaleBitmapEx(dst, src, HDC_SCREEN) 4905 MG_EXPORT
BOOL GUIAPI SetPixelInBitmapEx (
const BITMAP* bmp,
4931 return SetPixelInBitmapEx (bmp, x, y, pixel,
NULL);
4934 #ifdef _MGMISC_SAVESCREEN 4955 const char* filename);
5049 const BYTE* AndBits,
const BYTE* XorBits,
int colornum,
5055 #define CreateIcon(hdc, w, h, AndBits, XorBits, colornum) \ 5056 CreateIconEx(hdc, w, h, AndBits, XorBits, colornum, NULL) 5105 int x,
int y,
int w,
int h,
HICON hicon);
5128 static inline void SetRect (
RECT* prc,
int left,
int top,
int right,
int bottom)
5130 (prc)->left = left; (prc)->top = top;
5131 (prc)->right = right; (prc)->bottom = bottom;
5149 (prc)->left = (prc)->top = (prc)->right = (prc)->bottom = 0;
5166 (pdrc)->left = (psrc)->left; (pdrc)->top = (psrc)->top;
5167 (pdrc)->right = (psrc)->right; (pdrc)->bottom = (psrc)->bottom;
5187 (prc)->left += x; (prc)->top += y; (prc)->right += x; (prc)->bottom += y;
5208 (prc)->left -= cx; (prc)->top -= cy;
5209 (prc)->right += cx; (prc)->bottom += cy;
5227 if ((x) < (prc)->left) (prc)->left = (x);
5228 if ((y) < (prc)->top) (prc)->top = (y);
5229 if ((x) > (prc)->right) (prc)->right = (x);
5230 if ((y) > (prc)->bottom) (prc)->bottom = (y);
5250 if (x >= prc->
left && x < prc->right && y >= prc->
top && y < prc->bottom)
5315 const RECT* psrc1,
const RECT* psrc2);
5367 const RECT* psrc1,
const RECT* psrc2);
5385 const RECT* psrc1,
const RECT* psrc2);
5409 #define RECTWP(prc) ((prc)->right - (prc)->left) 5414 #define RECTHP(prc) ((prc)->bottom - (prc)->top) 5419 #define RECTW(rc) ((rc).right - (rc).left) 5424 #define RECTH(rc) ((rc).bottom - (rc).top) 5440 #define LEN_FONT_NAME 31 5441 #define LEN_DEVFONT_NAME 79 5442 #define LEN_UNIDEVFONT_NAME 127 5444 #define FONT_WEIGHT_NIL '\0' 5445 #define FONT_WEIGHT_ALL '*' 5446 #define FONT_WEIGHT_BLACK 'c' 5447 #define FONT_WEIGHT_BOLD 'b' 5448 #define FONT_WEIGHT_BOOK 'k' 5449 #define FONT_WEIGHT_DEMIBOLD 'd' 5450 #define FONT_WEIGHT_LIGHT 'l' 5451 #define FONT_WEIGHT_MEDIUM 'm' 5452 #define FONT_WEIGHT_REGULAR 'r' 5453 #define FONT_WEIGHT_SUBPIXEL 's' 5455 #define FS_WEIGHT_MASK 0x000000FF 5456 #define FS_WEIGHT_BLACK 0x00000001 5457 #define FS_WEIGHT_BOLD 0x00000002 5458 #define FS_WEIGHT_BOOK 0x00000004 5459 #define FS_WEIGHT_DEMIBOLD 0x00000006 5460 #define FS_WEIGHT_LIGHT 0x00000010 5461 #define FS_WEIGHT_MEDIUM 0x00000020 5462 #define FS_WEIGHT_SUBPIXEL 0x00000040 5463 #define FS_WEIGHT_REGULAR 0x00000000 5465 #define FONT_SLANT_NIL '\0' 5466 #define FONT_SLANT_ALL '*' 5467 #define FONT_SLANT_ITALIC 'i' 5468 #define FONT_SLANT_OBLIQUE 'o' 5469 #define FONT_SLANT_ROMAN 'r' 5471 #define FS_SLANT_MASK 0x00000F00 5472 #define FS_SLANT_ITALIC 0x00000100 5473 #define FS_SLANT_OBLIQUE 0x00000200 5474 #define FS_SLANT_ROMAN 0x00000000 5476 #define FONT_FLIP_NIL '\0' 5477 #define FONT_FLIP_HORZ 'H' 5478 #define FONT_FLIP_VERT 'V' 5479 #define FONT_FLIP_HORZVERT 'T' 5481 #define FS_FLIP_MASK 0x0000F000 5482 #define FS_FLIP_HORZ 0x00001000 5483 #define FS_FLIP_VERT 0x00002000 5484 #define FS_FLIP_HORZVERT 0x00003000 5486 #define FONT_OTHER_NIL '\0' 5487 #define FONT_OTHER_AUTOSCALE 'S' 5488 #define FONT_OTHER_TTFNOCACHE 'N' 5489 #define FONT_OTHER_TTFKERN 'K' 5490 #define FONT_OTHER_TTFNOCACHEKERN 'R' 5491 #define FONT_OTHER_LCDPORTRAIT 'P' 5492 #define FONT_OTHER_LCDPORTRAITKERN 'Q' 5494 #define FS_OTHER_MASK 0x00FF0000 5495 #define FS_OTHER_AUTOSCALE 0x00010000 5496 #define FS_OTHER_TTFNOCACHE 0x00020000 5497 #define FS_OTHER_TTFKERN 0x00040000 5498 #define FS_OTHER_TTFNOCACHEKERN 0x00060000 5499 #define FS_OTHER_LCDPORTRAIT 0x00100000 5500 #define FS_OTHER_LCDPORTRAITKERN 0x00140000 5507 #define FONT_SETWIDTH_NIL '\0' 5508 #define FONT_SETWIDTH_ALL '*' 5509 #define FONT_SETWIDTH_BOLD 'b' 5510 #define FONT_SETWIDTH_CONDENSED 'c' 5511 #define FONT_SETWIDTH_SEMICONDENSED 's' 5512 #define FONT_SETWIDTH_NORMAL 'n' 5513 #define FONT_SETWIDTH_TTFNOCACHE 'w' 5524 #define FONT_SPACING_NIL '\0' 5525 #define FONT_SPACING_ALL '*' 5526 #define FONT_SPACING_MONOSPACING 'm' 5527 #define FONT_SPACING_PROPORTIONAL 'p' 5528 #define FONT_SPACING_CHARCELL 'c' 5537 #define FONT_UNDERLINE_NIL '\0' 5538 #define FONT_UNDERLINE_ALL '*' 5539 #define FONT_UNDERLINE_LINE 'u' 5540 #define FONT_UNDERLINE_NONE 'n' 5542 #define FS_UNDERLINE_MASK 0x00F00000 5543 #define FS_UNDERLINE_LINE 0x00100000 5544 #define FS_UNDERLINE_NONE 0x00000000 5546 #define FONT_STRUCKOUT_NIL '\0' 5547 #define FONT_STRUCKOUT_ALL '*' 5548 #define FONT_STRUCKOUT_LINE 's' 5549 #define FONT_STRUCKOUT_NONE 'n' 5551 #define FS_STRUCKOUT_MASK 0x0F000000 5552 #define FS_STRUCKOUT_LINE 0x01000000 5553 #define FS_STRUCKOUT_NONE 0x00000000 5555 #define FONT_TYPE_NAME_LEN 3 5556 #define FONT_TYPE_NAME_BITMAP_RAW "rbf" 5557 #define FONT_TYPE_NAME_BITMAP_VAR "vbf" 5558 #define FONT_TYPE_NAME_BITMAP_QPF "qpf" 5559 #define FONT_TYPE_NAME_BITMAP_UPF "upf" 5560 #define FONT_TYPE_NAME_BITMAP_BMP "bmp" 5561 #define FONT_TYPE_NAME_SCALE_TTF "ttf" 5562 #define FONT_TYPE_NAME_SCALE_T1F "t1f" 5563 #define FONT_TYPE_NAME_ALL "*" 5565 #define FONT_ETC_SECTION_NAME_VBF "varbitmapfonts" 5566 #define FONT_ETC_SECTION_NAME_RBF "rawbitmapfonts" 5567 #define FONT_ETC_SECTION_NAME_UPF "upf" 5568 #define FONT_ETC_SECTION_NAME_QPF "qpf" 5569 #define FONT_ETC_SECTION_NAME_TTF "truetypefonts" 5571 #define FONT_TYPE_BITMAP_RAW 0x0001 5572 #define FONT_TYPE_BITMAP_VAR 0x0002 5573 #define FONT_TYPE_BITMAP_QPF 0x0003 5574 #define FONT_TYPE_BITMAP_BMP 0x0004 5575 #define FONT_TYPE_BITMAP_UPF 0x0005 5576 #define FONT_TYPE_SCALE_TTF 0x0010 5577 #define FONT_TYPE_SCALE_T1F 0x0011 5578 #define FONT_TYPE_ALL 0x00FF 5580 #define FONT_CHARSET_US_ASCII "US-ASCII" 5582 #define FONT_CHARSET_ISO8859_1 "ISO8859-1" 5583 #define FONT_CHARSET_ISO8859_2 "ISO8859-2" 5584 #define FONT_CHARSET_ISO8859_3 "ISO8859-3" 5585 #define FONT_CHARSET_ISO8859_4 "ISO8859-4" 5586 #define FONT_CHARSET_ISO8859_5 "ISO8859-5" 5587 #define FONT_CHARSET_ISO8859_6 "ISO8859-6" 5588 #define FONT_CHARSET_ISO8859_7 "ISO8859-7" 5589 #define FONT_CHARSET_ISO8859_8 "ISO8859-8" 5590 #define FONT_CHARSET_ISO8859_9 "ISO8859-9" 5591 #define FONT_CHARSET_ISO8859_10 "ISO8859-10" 5592 #define FONT_CHARSET_ISO8859_11 "ISO8859-11" 5593 #define FONT_CHARSET_ISO8859_12 "ISO8859-12" 5594 #define FONT_CHARSET_ISO8859_13 "ISO8859-13" 5595 #define FONT_CHARSET_ISO8859_14 "ISO8859-14" 5596 #define FONT_CHARSET_ISO8859_15 "ISO8859-15" 5597 #define FONT_CHARSET_ISO8859_16 "ISO8859-16" 5599 #define FONT_CHARSET_EUC_CN "EUC-CN" 5605 #define FONT_CHARSET_GB1988_0 "GB1988-0" 5611 #define FONT_CHARSET_GB2312_0 "GB2312-0" 5612 #define FONT_CHARSET_GBK "GBK" 5618 #define FONT_CHARSET_GB18030_0 "GB18030-0" 5619 #define FONT_CHARSET_BIG5 "BIG5" 5625 #define FONT_CHARSET_EUCTW "EUC-TW" 5626 #define FONT_CHARSET_EUCKR "EUC-KR" 5632 #define FONT_CHARSET_KSC5636_0 "KSC5636-0" 5638 #define FONT_CHARSET_KSC5601_0 "KSC5601-0" 5639 #define FONT_CHARSET_EUCJP "EUC-JP" 5645 #define FONT_CHARSET_JISX0201_0 "JISX0201-0" 5651 #define FONT_CHARSET_JISX0208_0 "JISX0208-0" 5652 #define FONT_CHARSET_SHIFTJIS "SHIFT-JIS" 5658 #define FONT_CHARSET_JISX0201_1 "JISX0201-1" 5664 #define FONT_CHARSET_JISX0208_1 "JISX0208-1" 5670 #define FONT_CHARSET_ISO_10646_1 "ISO-10646-1" 5676 #define FONT_CHARSET_UTF8 "UTF-8" 5682 #define FONT_CHARSET_UTF16LE "UTF-16LE" 5688 #define FONT_CHARSET_UTF16BE "UTF-16BE" 5690 #define FONT_MAX_SIZE 256 5691 #define FONT_MIN_SIZE 4 5699 char type [LEN_FONT_NAME + 1];
5701 char family [LEN_FONT_NAME + 1];
5703 char charset [LEN_FONT_NAME + 1];
5741 #define MAX_LEN_MCHAR 6 5743 typedef unsigned short UChar16;
5744 typedef int UChar32;
5746 #define MCHAR_TYPE_UNKNOWN 0xFFFF 5747 #define MCHAR_TYPE_NUL 0x0000 5748 #define MCHAR_TYPE_CTRL1 0x0100 5749 #define MCHAR_TYPE_BEL 0x0200 5750 #define MCHAR_TYPE_BS 0x0300 5751 #define MCHAR_TYPE_HT 0x0400 5752 #define MCHAR_TYPE_LF 0x0500 5753 #define MCHAR_TYPE_VT 0x0600 5754 #define MCHAR_TYPE_FF 0x0700 5755 #define MCHAR_TYPE_CR 0x0800 5756 #define MCHAR_TYPE_CTRL2 0x0900 5757 #define MCHAR_TYPE_SPACE 0x0A00 5758 #define MCHAR_TYPE_ZEROWIDTH 0x0B00 5759 #define MCHAR_TYPE_GENERIC 0x0C00 5760 #define MCHAR_TYPE_NOSPACING_MARK 0x0001 5761 #define MCHAR_TYPE_LIGATURE (MCHAR_TYPE_NOSPACING_MARK |0x0D00) 5762 #define MCHAR_TYPE_VOWEL (MCHAR_TYPE_NOSPACING_MARK |0x0E00) 5763 #define MCHAR_TYPE_VOWEL_ABOVE (MCHAR_TYPE_VOWEL |0x0002) 5764 #define MCHAR_TYPE_VOWEL_BELLOW (MCHAR_TYPE_VOWEL |0x0004) 5766 #define MCHAR_TYPE_ASCII 0x0080 5767 #define MCHAR_TYPE_LATIN1 0x0081 5768 #define MCHAR_TYPE_LATIN2 0x0082 5769 #define MCHAR_TYPE_LATIN3 0x0083 5770 #define MCHAR_TYPE_LATIN4 0x0084 5771 #define MCHAR_TYPE_LATIN5 0x0085 5772 #define MCHAR_TYPE_LATIN6 0x0086 5773 #define MCHAR_TYPE_LATIN7 0x0087 5774 #define MCHAR_TYPE_LATIN8 0x0088 5775 #define MCHAR_TYPE_LATIN9 0x0089 5776 #define MCHAR_TYPE_LATIN10 0x008A 5777 #define MCHAR_TYPE_CYRILLIC 0x008B 5778 #define MCHAR_TYPE_ARABIC 0x008C 5779 #define MCHAR_TYPE_GREEK 0x008D 5780 #define MCHAR_TYPE_HEBREW 0x008E 5781 #define MCHAR_TYPE_THAI 0x008F 5783 #define MCHAR_TYPE_DIGIT 0x0091 5784 #define MCHAR_TYPE_SYMBOL_PUNCT 0x0092 5785 #define MCHAR_TYPE_SYMBOL_MATH 0x0093 5786 #define MCHAR_TYPE_SYMBOL_OTHER 0x0094 5787 #define MCHAR_TYPE_FW_DIGIT 0x0095 5788 #define MCHAR_TYPE_FW_SYM_PUNCT 0x0096 5789 #define MCHAR_TYPE_FW_SYM_MATH 0x0097 5790 #define MCHAR_TYPE_FW_SYM_OTHER 0x0098 5792 #define MCHAR_TYPE_HANGUL 0x00A1 5793 #define MCHAR_TYPE_KATAKANA 0x00A2 5794 #define MCHAR_TYPE_CJK 0x00A3 5799 typedef struct _FONTOPS FONTOPS;
5800 typedef struct _CHARSETOPS CHARSETOPS;
5807 char name [LEN_UNIDEVFONT_NAME + 1];
5831 #define SBC_DEVFONT_INFO(logfont) (logfont.sbc_devfont) 5832 #define MBC_DEVFONT_INFO(logfont) (logfont.mbc_devfont) 5834 #define SBC_DEVFONT_INFO_P(logfont) (logfont->sbc_devfont) 5835 #define MBC_DEVFONT_INFO_P(logfont) (logfont->mbc_devfont) 5841 #define INV_LOGFONT 0 5919 const char* mchar,
int mchar_len,
5922 #ifndef _MGRM_THREADS 5942 MG_EXPORT
BOOL GUIAPI InitVectorialFonts (
void);
5957 MG_EXPORT
void GUIAPI TermVectorialFonts (
void);
6065 MG_EXPORT PLOGFONT GUIAPI
CreateLogFont (
const char* type,
const char* family,
6066 const char* charset,
char weight,
char slant,
char flip,
6067 char other,
char underline,
char struckout,
6068 int size,
int rotation);
6157 MG_EXPORT PLOGFONT GUIAPI
SelectFont (
HDC hdc, PLOGFONT log_font);
6211 #if defined(_MGFONT_QPF) || defined(_MGFONT_FT2) || defined(_MGFONT_TTF) || defined(_MGFONT_UPF) 6229 const char *file_name);
6261 #define SYSLOGFONT_DEFAULT 0 6267 #define SYSLOGFONT_WCHAR_DEF 1 6273 #define SYSLOGFONT_FIXED 2 6279 #define SYSLOGFONT_CAPTION 3 6285 #define SYSLOGFONT_MENU 4 6291 #define SYSLOGFONT_CONTROL 5 6293 #define NR_SYSLOGFONTS 6 6296 extern MG_EXPORT PLOGFONT g_SysLogFont [];
6323 if (font_id >= 0 && font_id < NR_SYSLOGFONTS)
6324 return g_SysLogFont [font_id];
6326 return (PLOGFONT)
NULL;
6479 const char* mstr,
int len,
int* pos_chars);
6504 MG_EXPORT
int GUIAPI
GetTextWordInfo (PLOGFONT log_font,
const char* mstr,
6505 int len,
int* pos_words,
WORDINFO* info_words);
6523 const char* mstr,
int len);
6546 const char* mstr,
int len,
WORDINFO* word_info);
6548 #ifdef _MGCHARSET_UNICODE 6573 MG_EXPORT
int GUIAPI
MB2WCEx (PLOGFONT log_font,
void* dest,
BOOL wc32,
6574 const unsigned char* mstr,
int n);
6582 #define MB2WC(log_font, dest, mstr, n) \ 6583 MB2WCEx (log_font, dest, sizeof(wchar_t) == 4, mstr, n) 6602 MG_EXPORT
int GUIAPI
WC2MBEx (PLOGFONT log_font,
unsigned char *s, UChar32 wc);
6610 #define WC2MB(log_font, s, wc) \ 6611 WC2MBEx (log_font, s, (UChar32)wc) 6645 MG_EXPORT
int GUIAPI
MBS2WCSEx (PLOGFONT log_font,
void* dest,
BOOL wc32,
6646 const unsigned char* mstr,
int mstr_len,
int n,
6647 int* conved_mstr_len);
6655 #define MBS2WCS(log_font, dest, mstr, mstr_len, n) \ 6656 MBS2WCSEx(log_font, dest, sizeof (wchar_t) == 4, mstr, \ 6691 MG_EXPORT
int GUIAPI
WCS2MBSEx (PLOGFONT log_font,
unsigned char* dest,
6692 const void *wcs,
int wcs_len,
BOOL wc32,
int n,
6693 int* conved_wcs_len);
6701 #define WCS2MBS(log_font, dest, wcs, wcs_len, n) \ 6702 WCS2MBSEx (log_font, dest, wcs, wcs_len, sizeof (wchar_t) == 4, \ 6739 int max_extent,
int* fit_chars,
int* pos_chars,
6740 int* dx_chars,
SIZE* size);
6751 const char* text,
int len,
int max_extent,
6752 int* fit_chars,
int* pos_chars,
int* dx_chars,
SIZE* size);
6810 const char* spText,
int len,
SIZE* pSize);
6833 const char* spText,
int len,
SIZE* pSize);
6841 #define GetTextCharacterExtra(hdc) GetDCAttr (hdc, DC_ATTR_CHAR_EXTRA) 6849 #define GetTextAboveLineExtra(hdc) GetDCAttr (hdc, DC_ATTR_ALINE_EXTRA) 6857 #define GetTextBellowLineExtra(hdc) GetDCAttr (hdc, DC_ATTR_BLINE_EXTRA) 6866 #define SetTextCharacterExtra(hdc, extra) \ 6867 SetDCAttr (hdc, DC_ATTR_CHAR_EXTRA, (DWORD) extra) 6875 #define SetTextAboveLineExtra(hdc, extra) \ 6876 SetDCAttr (hdc, DC_ATTR_ALINE_EXTRA, (DWORD) extra) 6884 #define SetTextBellowLineExtra(hdc, extra) \ 6885 SetDCAttr (hdc, DC_ATTR_BLINE_EXTRA, (DWORD) extra) 6887 #define TA_LEFT 0x0000 6888 #define TA_RIGHT 0x0001 6889 #define TA_CENTER 0x0002 6890 #define TA_X_MASK 0x000F 6892 #define TA_TOP 0x0000 6893 #define TA_BASELINE 0x0010 6894 #define TA_BOTTOM 0x0020 6895 #define TA_Y_MASK 0x00F0 6897 #define TA_NOUPDATECP 0x0000 6898 #define TA_UPDATECP 0x0100 6899 #define TA_CP_MASK 0x0F00 6952 #define GetTextAlign(hdc) GetDCAttr (hdc, DC_ATTR_TEXT_ALIGN) 7010 #define SetTextAlign(hdc, ta_flags) \ 7011 SetDCAttr (hdc, DC_ATTR_TEXT_ALIGN, (DWORD)ta_flags) 7032 const char* spText,
int len);
7057 const char *mtext,
int len,
int max_extent);
7081 const char* spText,
int len);
7110 const char* spText,
int nCount,
7111 int nTabPositions,
int *pTabPositions,
int nTabOrigin);
7132 #define TextOut(hdc, x, y, text) TextOutLen (hdc, x, y, text, -1) 7142 #define TabbedTextOut(hdc, x, y, text) TabbedTextOutLen (hdc, x, y, text, -1) 7144 #define DT_TOP 0x00000000 7145 #define DT_LEFT 0x00000000 7146 #define DT_CENTER 0x00000001 7147 #define DT_RIGHT 0x00000002 7148 #define DT_VCENTER 0x00000004 7149 #define DT_BOTTOM 0x00000008 7150 #define DT_WORDBREAK 0x00000010 7151 #define DT_SINGLELINE 0x00000020 7152 #define DT_EXPANDTABS 0x00000040 7153 #define DT_TABSTOP 0x00000080 7154 #define DT_NOCLIP 0x00000100 7155 #define DT_EXTERNALLPADING 0x00000200 7156 #define DT_CALCRECT 0x00000400 7157 #define DT_NOPREFIX 0x00000800 7158 #define DT_INTERNAL 0x00001000 7159 #define DT_CHARBREAK 0x00002000 7253 MG_EXPORT
int GUIAPI
DrawTextEx2 (
HDC hdc,
const char* pText,
int nCount,
7265 #define DrawText(hdc, text, n, rc, format) \ 7266 DrawTextEx2 (hdc, text, n, rc, 0, format, NULL) 7276 #define DrawTextEx(hdc, text, n, rc, indent, format) \ 7277 DrawTextEx2 (hdc, text, n, rc, indent, format, NULL) 7289 #define MYBMP_TYPE_NORMAL 0x00000000 7290 #define MYBMP_TYPE_RLE4 0x00000001 7291 #define MYBMP_TYPE_RLE8 0x00000002 7292 #define MYBMP_TYPE_RGB 0x00000003 7293 #define MYBMP_TYPE_BGR 0x00000004 7294 #define MYBMP_TYPE_RGBA 0x00000005 7295 #define MYBMP_TYPE_MASK 0x0000000F 7297 #define MYBMP_FLOW_DOWN 0x00000010 7298 #define MYBMP_FLOW_UP 0x00000020 7299 #define MYBMP_FLOW_MASK 0x000000F0 7301 #define MYBMP_TRANSPARENT 0x00000100 7302 #define MYBMP_ALPHACHANNEL 0x00000200 7303 #define MYBMP_ALPHA 0x00000400 7305 #define MYBMP_RGBSIZE_3 0x00001000 7306 #define MYBMP_RGBSIZE_4 0x00002000 7308 #define MYBMP_LOAD_GRAYSCALE 0x00010000 7309 #define MYBMP_LOAD_ALLOCATE_ONE 0x00020000 7310 #define MYBMP_LOAD_NONE 0x00000000 7368 #define BMP_TYPE_NORMAL 0x00 7369 #define BMP_TYPE_RLE 0x01 7370 #define BMP_TYPE_ALPHA 0x02 7371 #define BMP_TYPE_ALPHACHANNEL 0x04 7372 #define BMP_TYPE_COLORKEY 0x10 7374 #define BMP_TYPE_ALPHA_MASK 0x20 7375 #define BMP_TYPE_PRIV_PIXEL 0x00 7377 #ifdef _FOR_MONOBITMAP 7378 #define BMP_TYPE_MONOKEY 0x40 7422 #ifdef _FOR_MONOBITMAP 7502 void (*cleanup) (
void* init_info),
7564 #define MLS_BLENDMODE_NONE 0x00 7565 #define MLS_BLENDMODE_COLORKEY 0x01 7566 #define MLS_BLENDMODE_ALPHA 0x02 7568 #define MLS_INFOMASK_OFFSET 0x01 7569 #define MLS_INFOMASK_BLEND 0x02 7570 #define MLS_INFOMASK_ZORDER 0x04 7571 #define MLS_INFOMASK_ALL 0x07 7572 #define MLS_INFOMASK_ENABLE 0x08 7574 MG_EXPORT
BOOL GUIAPI mlsSetSlaveScreenInfo (
HDC dc_mls,
DWORD mask,
int offset_x,
int offset_y,
7577 MG_EXPORT
BOOL GUIAPI mlsGetSlaveScreenInfo (
HDC dc_mls,
DWORD mask,
int* offset_x,
int* offset_y,
7578 DWORD blend_flags,
gal_pixel* color_key,
int* alpha,
int* z_order);
7595 #define ERR_BMP_OK 0 7596 #define ERR_BMP_IMAGE_TYPE -1 7597 #define ERR_BMP_UNKNOWN_TYPE -2 7598 #define ERR_BMP_CANT_READ -3 7599 #define ERR_BMP_CANT_SAVE -4 7600 #define ERR_BMP_NOT_SUPPORTED -5 7601 #define ERR_BMP_MEM -6 7602 #define ERR_BMP_LOAD -7 7603 #define ERR_BMP_FILEIO -8 7604 #define ERR_BMP_OTHER -9 7605 #define ERR_BMP_ERROR_SOURCE -10 7644 const char* spFileName);
7652 #define LoadBitmap LoadBitmapFromFile 7662 const void* mem,
int size,
const char* ext);
7820 const char* file_name);
7828 #define LoadMyBitmap LoadMyBitmapFromFile 7846 const void* mem,
int size,
const char* ext);
7861 #ifdef _MGMISC_SAVEBITMAP 7880 const char* spFileName);
7898 const char* spFileName);
7899 #define SaveBitmap SaveBitmapToFile 7924 BYTE* bits, PBITMAP bmp);
7974 typedef struct GAL_PixelFormat {
7978 Uint8 BytesPerPixel;
7980 Uint8 DitheredPalette;
8004 #define _FILL_MYBITMAP 8006 #ifndef MYBITMAP_CONTXT 8007 typedef struct _MYBITMAP_CONTXT{
8010 GAL_PixelFormat* AlphaPixelFormat;
8015 typedef BYTE* (* CB_DRAW_PIXEL) (
HDC hdc, MYBITMAP_CONTXT* mybmp,
Uint32 pixel,
BYTE* dest);
8033 const MYBITMAP* my_bmp,
const RGB* pal,
int frame);
8061 MG_EXPORT
void GUIAPI Expand16CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
8091 Expand16CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
8092 w, h, flags, pal,
FALSE, 0xFF);
8095 MG_EXPORT
void GUIAPI Expand256CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
8099 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
8127 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp)
8129 Expand256CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
8130 w, h, flags, pal,
FALSE, 0xFF, cb_draw, mybmp);
8159 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
8176 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp,
8179 #ifdef _FILL_MYBITMAP 8180 MG_EXPORT
int GUIAPI FillBoxWithMyBitmap (
HDC hdc,
int x,
int y,
MYBITMAP* mybmp,
RGB* pal);
8182 MG_EXPORT
void GUIAPI ExpandPartMonoBitmap (
HDC hdc,
BYTE* bits,
Uint32 pitch,
8185 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
8187 MG_EXPORT
void GUIAPI ExpandPart16CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
8191 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
8193 static inline void GUIAPI ExpandPart16CBitmap (
HDC hdc,
BYTE* bits,
Uint32 pitch,
8196 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp)
8198 ExpandPart16CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
8199 w, h, flags, pal,
FALSE, 0xFF, stepx, cb_draw, mybmp);
8204 #define CompileRGBBitmap CompileRGBABitmap 8252 const char* spFileName);
8271 const void* mem,
int size,
const char* ext);
8324 int w,
int h,
const char* spFileName);
8345 int w,
int h,
const void* mem,
int size,
const char* ext);
8347 #ifdef _MGHAVE_FIXED_MATH 8365 int lx,
int ty,
int angle);
8378 int lx,
int ty,
int angle);
8389 int lx,
int ty,
int angle);
8400 int lx,
int ty,
int angle,
int w,
int h);
8414 int lx,
int ty,
int angle,
int w,
int h);
8428 int lx,
int ty,
int angle,
int w,
int h);
8442 int lx,
int ty,
int cx,
int cy,
int angle);
8502 const BITMAP* glyph_bmp,
const char* start_mchar,
int nr_glyphs,
8521 const char* start_mchar,
int nr_glyphs,
int glyph_width);
8539 void dump_tree (
DEVFONT *dev_font);
8544 int avl_look_up (
DEVFONT *dev_font,
char *start_mchar,
int n);
8549 void destroy_avl_tree (
DEVFONT *dev_font);
8568 typedef int Glyph32;
8572 #define INV_GLYPH_VALUE -1 8580 #define IS_MBC_GLYPH(glyph) ((glyph) & 0x80000000) 8588 #define SET_MBC_GLYPH(glyph) ((glyph) | 0x80000000) 8596 #define REAL_GLYPH(glyph) ((glyph) & 0x7FFFFFFF) 8607 #define SELECT_DEVFONT(plogfont, glyph) \ 8608 ((glyph) & 0x80000000 ? \ 8609 (plogfont)->mbc_devfont : \ 8610 (plogfont)->sbc_devfont) 8627 typedef struct _GLYPHMAPINFO{
8634 #define GLYPH_INFO_TYPE 1 8635 #define GLYPH_INFO_METRICS 2 8636 #define GLYPH_INFO_BMP 4 8639 #define GLYPHBMP_TYPE_MONO 0 8640 #define GLYPHBMP_TYPE_GREY 1 8641 #define GLYPHBMP_TYPE_SUBPIXEL 2 8642 #define GLYPHBMP_TYPE_PRERENDER 3 8649 typedef struct _GLYPHINFO
8666 int advance_x, advance_y;
8676 const unsigned char* bits;
8696 int mchar_len,
const char* pre_mchar,
int pre_len);
8711 int mchar_len, SHAPETYPE shape_type);
8731 MG_EXPORT
int GUIAPI
DrawGlyph (
HDC hdc,
int x,
int y, Glyph32 glyph_value,
8732 int* adv_x,
int* adv_y);
8753 MG_EXPORT
int GUIAPI DrawGlyphString (
HDC hdc,
int x,
int y, Glyph32* glyph_string,
8754 int len,
int* adv_x,
int* adv_y);
8809 int nr_glyphs,
int max_extent,
SIZE* size);
8828 const char* text,
int text_len, Glyph32** glyphs,
8847 const char* text,
int text_len, Glyph32** glyphs,
8867 Glyph32* glyphs,
int nr_glyphs,
GLYPHMAPINFO* glyphs_map);
8886 int text_len,
int start_index,
int end_index,
int** ranges,
8904 Glyph32* glyphs,
int nr_glyphs,
Uint8** embedding_level_list);
8920 Glyph32* glyphs,
int nr_glyphs,
Uint8** embedding_level_list);
8930 typedef struct _COMP_CTXT {
8935 void* user_comp_ctxt;
8951 typedef struct _SPAN_CTXT {
8952 GAL_PixelFormat* dst_format;
8953 GAL_PixelFormat* src_format;
8954 void * user_context;
8961 typedef struct _COMPOSITE_CTXT {
8964 const int *far_bkmode;
8965 const int *far_step;
8973 typedef struct _RASTER_CTXT {
8986 typedef void (*CB_COMP_SETPIXEL) (COMP_CTXT* comp_ctxt);
8997 typedef void (*CB_COMP_SETHLINE) (COMP_CTXT* comp_ctxt,
int w);
9008 typedef void (*CB_COMP_PUTHLINE) (COMP_CTXT* comp_ctxt,
gal_uint8* src,
int bkmode,
int w);
9031 MG_EXPORT
int GUIAPI SetUserCompositionOps (
HDC hdc, CB_COMP_SETPIXEL comp_setpixel,
9032 CB_COMP_SETHLINE comp_sethline, CB_COMP_PUTHLINE comp_puthline,
void* user_comp_ctxt);
9036 #ifdef _MGGAL_HI3560 9041 MG_EXPORT
int hi3560GetVideoFD (
void);
9042 MG_EXPORT
void* hi3560GetFBAddress (
void);
9043 MG_EXPORT
int hi3560SetScreenAttr (
Uint8 siAttr,
void* pValue);
9047 MG_EXPORT
int GUIAPI
GetTextMCharInfo (PLOGFONT log_font,
const char* mstr,
int len,
9049 MG_EXPORT
int GUIAPI
GetTextWordInfo (PLOGFONT log_font,
const char* mstr,
int len,
9050 int* pos_words,
WORDINFO* info_words);
9051 MG_EXPORT
int GUIAPI
GetFirstMCharLen (PLOGFONT log_font,
const char* mstr,
int len);
9052 MG_EXPORT
int GUIAPI GetLastMCharLen (PLOGFONT log_font,
const char* mstr,
int len);
9053 MG_EXPORT
int GUIAPI
GetFirstWord (PLOGFONT log_font,
const char* mstr,
int len,
9055 MG_EXPORT
int GUIAPI
MB2WCEx (PLOGFONT log_font,
void* dest,
BOOL wc32,
9056 const unsigned char* mchar,
int n);
9057 MG_EXPORT
int GUIAPI
WC2MBEx (PLOGFONT log_font,
unsigned char *s, UChar32 wc);
9058 MG_EXPORT
int GUIAPI
MBS2WCSEx (PLOGFONT log_font,
void* dest,
BOOL wc32,
9059 const unsigned char* mstr,
int mstr_len,
int n,
9060 int* conved_mstr_len);
9061 MG_EXPORT
int GUIAPI
WCS2MBSEx (PLOGFONT log_font,
unsigned char* dest,
9062 const void *wcs,
int wcs_len,
BOOL wc32,
int n,
9063 int* conved_wcs_len);
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.
static BOOL PtInRect(const RECT *prc, int x, int y)
Determines whether a point lies within an rectangle.
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.
MG_EXPORT int GUIAPI GetSysFontHeight(int font_id)
Gets the height of a single-byte character of a system font.
static gal_pixel DWORD2Pixel(HDC hdc, DWORD dword)
An inline function to convert DWORD color to gal_pixel.
MG_EXPORT int GUIAPI PaintImageFromFile(HDC hdc, int x, int y, const char *spFileName)
Paints an image from file on device directly.
MG_EXPORT BOOL GUIAPI RealizePalette(HDC hdc)
This function maps palette entries from the current logical palette to the system palette...
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.
MG_EXPORT BOOL GUIAPI RestoreDC(HDC hdc, int saved_dc)
Restores a device context (DC) to the specified state.
MG_EXPORT BOOL GUIAPI DestroyIcon(HICON hicon)
Destroys an icon object.
MG_EXPORT void GUIAPI LPtoSP(HDC hdc, POINT *pPt)
Converts logical coordinates into screen coordinates.
MG_EXPORT void GUIAPI GetDCLCS(HDC hdc, int which, POINT *pt)
Retrieves mapping parameters of a device context.
MG_EXPORT void GUIAPI UnloadMyBitmap(PMYBITMAP my_bmp)
Unloads a bitmap.
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 t...
void(* CB_ONE_SCANLINE)(void *context, MYBITMAP *my_bmp, int y)
The type of scanline loaded callback.
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.
MG_EXPORT BOOL GUIAPI IsCovered(const RECT *prc1, const RECT *prc2)
Determines whether one rectangle is covered by another.
int BOOL
A type definition for boolean value.
MG_EXPORT HDC GUIAPI GetPrivateClientDC(HWND hwnd)
Returns the private client DC of a window.
#define GetAValue(rgba)
Gets the alpha component from a RGBA triple value rgba.
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.
#define GetBValue(rgba)
Gets the blue component from a RGBA triple value rgba.
MG_EXPORT const char *GUIAPI CheckBitmapType(MG_RWops *fp)
Checks the type of the bitmap in a data source.
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.
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
MG_EXPORT int GUIAPI GetRasterOperation(HDC hdc)
Gets the raster operation of a DC.
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 ...
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.
MG_EXPORT BOOL GUIAPI DoesIntersect(const RECT *psrc1, const RECT *psrc2)
Determines whether two rectangles intersect.
struct _DTFIRSTLINE DTFIRSTLINE
MG_EXPORT void GUIAPI Circle(HDC hdc, int sx, int sy, int r)
Draws a circle.
struct _GLYPHINFO GLYPHINFO
Data type of struct _GLYPHINFO.
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 necessar...
MG_EXPORT BOOL GUIAPI UnionRect(RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
Unions two source rectangles.
MG_EXPORT void GUIAPI MoveTo(HDC hdc, int x, int y)
Moves the current zero pen position.
MG_EXPORT void GUIAPI ClipRectIntersect(HDC hdc, const RECT *prc)
Intersects the specified rectangle with the visible region of the DC.
MG_EXPORT BOOL GUIAPI SetClipRgn(PCLIPRGN pRgn, const RECT *pRect)
Sets a region to contain only one rect.
MG_EXPORT BOOL GUIAPI InitCircleRegion(PCLIPRGN dst, int x, int y, int r)
Initializes a region to be an enclosed circle.
MG_EXPORT HDC GUIAPI CreateSecondaryDC(HWND hwnd)
Creates a secondary window DC of a window.
MG_EXPORT void GUIAPI DestroyBMPFont(DEVFONT *dev_font)
Destroy the bitmap device font.
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.
MG_EXPORT HDC GUIAPI CreatePrivateClientDC(HWND hwnd)
Creates a private client DC of a window.
MG_EXPORT BOOL GUIAPI SetColorfulPalette(HDC hdc)
Sets a DC with colorfule palette.
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.
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 lo...
static void CopyRect(RECT *pdrc, const RECT *psrc)
Copies one rectangle to another.
MG_EXPORT BOOL GUIAPI SaveMainWindowContent(HWND hWnd, const char *filename)
Saves content of a main window to a file.
MG_EXPORT void GUIAPI RotateBitmapVFlip(HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
Flips vertically and rotates a bitmap object.
MG_EXPORT void GUIAPI SPtoLP(HDC hdc, POINT *pPt)
Converts screen coordinates into logical coordinates.
MG_EXPORT BOOL GUIAPI SetPalette(HDC hdc, int start, int len, GAL_Color *cmap)
Sets palette entries of a DC.
MG_EXPORT Uint32 GUIAPI GetDCAttr(HDC hdc, int attr)
Gets a specified attribute value of a DC.
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.
static gal_pixel GUIAPI GetPixelInBitmap(const BITMAP *bmp, int x, int y)
Returns the pixel value in a BITMAP object.
MG_EXPORT void GUIAPI SetBrushOrigin(HDC hdc, int x, int y)
Set the origin when using tiles or stipples with the DC.
MG_EXPORT BOOL GUIAPI IsEmptyClipRgn(const CLIPRGN *pRgn)
Determines whether a region is an empty region.
MG_EXPORT BOOL GUIAPI AddClipRect(PCLIPRGN pRgn, const RECT *pRect)
Unions one rectangle to a region.
MG_EXPORT int GUIAPI GetSysCCharWidth(void)
Gets the width of a multi-byte character of the default system font.
HDC GUIAPI CreatePrivateSubDC(HDC hdc, int off_x, int off_y, int width, int height)
Creates a private SubDC of a window.
MG_EXPORT void GUIAPI LPtoDP(HDC hdc, POINT *pPt)
Converts logical coordinates into device coordinates.
CLIPRGN * PCLIPRGN
Data type of the pointer to a CLIPRGN.
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.
MG_EXPORT HWND GUIAPI WindowFromDC(HDC hdc)
Get the window handle from DC.
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.
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.
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.
struct _GLYPHBITMAP GLYPHBITMAP
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.
MG_EXPORT void GUIAPI DeleteBitmapAlphaPixel(PBITMAP bmp)
Deletes the bitmap alpha pixel format information of a BITMAP object.
MG_EXPORT int GUIAPI GetPaletteEntries(HPALETTE hpal, int start, int len, GAL_Color *cmap)
Gets palette entries of a logical palette.
MG_EXPORT HPALETTE GUIAPI CreatePalette(GAL_Palette *pal)
Creates a logical palette.
MG_EXPORT int GUIAPI SetPaletteEntries(HPALETTE hpal, int start, int len, GAL_Color *cmap)
Sets palette entries of a logical palette.
MG_EXPORT BOOL GUIAPI RectInRegion(PCLIPRGN region, const RECT *rect)
Determines whether a rectangle is intersected with a region.
MG_EXPORT HDC GUIAPI GetSecondaryDC(HWND hwnd)
Retrives and returns the secondary DC of a specific window.
MG_EXPORT void * BlockDataAlloc(PBLOCKHEAP heap)
Allocates a data block from private heap.
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.
struct _BLOCKHEAP BLOCKHEAP
MG_EXPORT int GUIAPI LoadMyBitmapEx(PMYBITMAP my_bmp, RGB *pal, MG_RWops *area, const char *ext)
Loads a MYBITMAP object from a data source.
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.
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.
MG_EXPORT int GUIAPI OffsetClipRegion(HDC hdc, int nXOffset, int nYOffset)
Moves the clipping region of a device context by the specified offsets.
MG_EXPORT int GUIAPI SubtractRect(RECT *rc, const RECT *psrc1, const RECT *psrc2)
Obtains the rectangles when substracting one rectangle from another.
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.
Uint32 gal_pixel
Data type of pixel value.
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.
MG_EXPORT BOOL GUIAPI IsCompatibleDC(HDC hdc1, HDC hdc2)
Check whether a given DC is compliant to a specific DC.
static void SetRect(RECT *prc, int left, int top, int right, int bottom)
Sets a rectangle.
MG_EXPORT void GUIAPI CircleArcGenerator(void *context, int sx, int sy, int r, int ang1, int ang2, CB_ARC cb)
An arc generator.
MG_EXPORT int GUIAPI SetRasterOperation(HDC hdc, int rop)
Sets the raster operation of a DC to a new value.
MG_EXPORT void InitBlockDataHeap(PBLOCKHEAP heap, size_t bd_size, size_t heap_size)
Initializes a private block data heap.
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.
MG_EXPORT void GUIAPI GetBoundRect(PRECT pdrc, const RECT *psrc1, const RECT *psrc2)
Gets the bound rectangle of two source rectangles.
MG_EXPORT void GUIAPI FillBox(HDC hdc, int x, int y, int w, int h)
Fills a rectangle box.
MG_EXPORT HDC GUIAPI CreateMemDCFromBitmap(HDC hdc, const BITMAP *bmp)
Creates a memory DC from a reference DC and a BITMAP object.
MG_EXPORT void GUIAPI GetFontMetrics(LOGFONT *log_font, FONTMETRICS *font_metrics)
Gets metrics information of a logical font.
MG_EXPORT Glyph32 GUIAPI GetGlyphShape(LOGFONT *logfont, const char *mchar, int mchar_len, SHAPETYPE shape_type)
Get the glyph shape of a character.
MG_EXPORT BOOL GUIAPI IntersectClipRect(PCLIPRGN pRgn, const RECT *pRect)
Intersects a rectangle with a region.
MG_EXPORT void GUIAPI Rectangle(HDC hdc, int x0, int y0, int x1, int y1)
Draws a rectangle.
MG_EXPORT int GUIAPI SaveDC(HDC hdc)
Saves the current state of a device context.
MG_EXPORT BOOL GUIAPI LineClipper(const RECT *cliprc, int *_x0, int *_y0, int *_x1, int *_y1)
The line clipper using Cohen-Sutherland algorithm.
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.
static DWORD Pixel2DWORD(HDC hdc, gal_pixel pixel)
An inline function to convert pixel value to DWORD color.
MG_EXPORT int GUIAPI GetGlyphInfo(LOGFONT *logfont, Glyph32 glyph_value, GLYPHINFO *glyph_info)
Retriev the information of a glyph.
MG_EXPORT void GUIAPI SelectClipRect(HDC hdc, const RECT *prc)
Sets the visible region of a DC to be a rectangle.
DWORD32 RGBCOLOR
A type definition for a RGB color.
MG_EXPORT int GUIAPI GetMaxFontWidth(HDC hdc)
Retrieves the maximal character width of the current logical font in a DC.
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.
MG_EXPORT int GUIAPI GetFontHeight(HDC hdc)
Retrieves the height of the current logical font in a DC.
MG_EXPORT const char *GUIAPI GetSysCharset(BOOL wchar)
Gets the current system charset.
void(* CB_ARC)(void *context, int x, int y)
The type of arc generator callback.
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.
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.
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.
MG_EXPORT BOOL GUIAPI UnionRegion(PCLIPRGN dst, const CLIPRGN *src1, const CLIPRGN *src2)
Unions two regions.
void(* CB_ELLIPSE)(void *context, int x1, int x2, int y)
The type of ellipse generator callback.
MG_EXPORT BOOL GUIAPI ClipRgnIntersect(PCLIPRGN pRstRgn, const CLIPRGN *pRgn1, const CLIPRGN *pRgn2)
Intersects two region.
MG_EXPORT BOOL GUIAPI GetIconSize(HICON hicon, int *w, int *h)
Gets the size of an icon object.
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.
MG_EXPORT void GUIAPI DestroyDynamicDevFont(DEVFONT **devfont)
Destroy device font loaded dynamically from font file.
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.
MG_EXPORT void BlockDataFree(PBLOCKHEAP heap, void *data)
Frees an allocated data block.
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.
MG_EXPORT void GUIAPI GetLogFontInfo(HDC hdc, LOGFONT *log_font)
Gets logical font information of a DC.
MG_EXPORT void GUIAPI ReleaseSecondaryDC(HWND hwnd, HDC hdc)
Release the DC returned by GetSecondaryDC or GetSecondaryClientDC.
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.
GHANDLE HDC
Handle to device context.
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. ...
MG_EXPORT void GUIAPI SelectClipRegion(HDC hdc, const CLIPRGN *pRgn)
Sets the visible region of a DC to be a region.
MG_EXPORT void GUIAPI FocusRect(HDC hdc, int x0, int y0, int x1, int y1)
Draws a focus rectangle.
MG_EXPORT PLOGFONT GUIAPI CreateLogFontIndirect(LOGFONT *logfont)
Creates a logical font indirectly from a LOGFONT structure.
MG_EXPORT BOOL GUIAPI SaveScreenRectContent(const RECT *rcWin, const char *filename)
Saves content of a rectangle in the screen to a file.
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 t...
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.
MG_EXPORT void GUIAPI SetPenDashes(HDC hdc, int dash_offset, const unsigned char *dash_list, int n)
Sets the way dashed-lines are drawn.
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.
struct _GLYPHMAPINFO GLYPHMAPINFO
Data type of struct _GLYPHMAPINFO.
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.
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.
MG_EXPORT DEVFONT *GUIAPI LoadDevFontFromFile(const char *devfont_name, const char *file_name)
Load device font from font file.
MG_EXPORT HDC GUIAPI InitSlaveScreen(const char *name, const char *mode)
Initializes slave screen.
MG_EXPORT void GUIAPI DPtoLP(HDC hdc, POINT *pPt)
Converts device coordinates into logical coordinates.
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.
void(* CB_CIRCLE)(void *context, int x1, int x2, int y)
The type of circle generator callback.
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 lo...
MG_EXPORT BOOL GUIAPI PolygonIsMonotoneVertical(const POINT *pts, int vertices)
Checks a polygon is monotone vertical or not.
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.
MG_EXPORT void GUIAPI DeleteSecondaryDC(HWND hwnd)
Deletes the secondary DC of the window.
MG_EXPORT int GUIAPI TabbedTextOutLen(HDC hdc, int x, int y, const char *spText, int len)
Outputs a formatted text.
MG_EXPORT void GUIAPI EmptyClipRgn(PCLIPRGN pRgn)
Empties a clipping region.
#define TRUE
TRUE value, defined as 1 by MiniGUI.
MG_EXPORT void GUIAPI SetBrushInfo(HDC hdc, const BITMAP *tile, const STIPPLE *stipple)
Set the tile or stipple with the DC.
MG_EXPORT BOOL GUIAPI mlsEnableSlaveScreen(HDC dc_mls, BOOL enable)
Enable or Disable a MLShadow slave screen.
MG_EXPORT void GUIAPI CircleGenerator(void *context, int sx, int sy, int r, CB_CIRCLE cb)
A circle generator.
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.
const unsigned char * bits
MG_EXPORT void GUIAPI GetLastTextOutPos(HDC hdc, POINT *pt)
Retrieves the last text output position.
MG_EXPORT BOOL GUIAPI ResizePalette(HPALETTE hpal, int len)
Resizes a logical palette.
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.
MG_EXPORT void GUIAPI DestroyClipRgn(PCLIPRGN pRgn)
Empties and destroys a clipping region.
Uint8 gal_uint8
Data type of 8-bit unsigned integer.
GHANDLE HWND
Handle to main window or control.
static void SetRectEmpty(RECT *prc)
Empties a rectangle.
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.
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.
MG_EXPORT BOOL GUIAPI ClipRgnCopy(PCLIPRGN pDstRgn, const CLIPRGN *pSrcRgn)
Copies one region to another.
MG_EXPORT void GUIAPI GetClipRgnBoundRect(PCLIPRGN pRgn, PRECT pRect)
Gets the bounding rectangle of a region.
MG_EXPORT const DEVFONT *GUIAPI GetNextDevFont(const DEVFONT *dev_font)
Get next devfont information.
MG_EXPORT BOOL GUIAPI SelectPalette(HDC hdc, HPALETTE hpal, BOOL reserved)
Selects a palette for a DC.
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.
MG_EXPORT int GUIAPI GetSysCharHeight(void)
Gets the height of a character of the default system font.
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.
MG_EXPORT BOOL GUIAPI InitPolygonRegion(PCLIPRGN dst, const POINT *pts, int vertices)
Initializes a region to be an enclosed polygon.
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.
MG_EXPORT int GUIAPI GetTabbedTextExtent(HDC hdc, const char *spText, int len, SIZE *pSize)
Computes the output extent of a formatted text.
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.
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. ...
MG_EXPORT gal_pixel GUIAPI GetPixelInBitmapEx(const BITMAP *bmp, int x, int y, Uint8 *alpha)
Returns the pixel value in a BITMAP object.
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.
MG_EXPORT void GUIAPI PivotBitmap(HDC hdc, const BITMAP *bmp, int lx, int ty, int cx, int cy, int angle)
Pivot a bitmap object.
MG_EXPORT void GUIAPI ReleaseDC(HDC hdc)
Releases a DC from DC pool.
void(* CB_LINE)(void *context, int stepx, int stepy)
The type of line generator callback.
#define MakeRGBA(r, g, b, a)
Makes a RGBA triple value from red r, green g, blue b and alpha components.
struct _FONTMETRICS FONTMETRICS
BOOL(* CB_EQUAL_PIXEL)(void *context, int x, int y)
Flodd filling generator's equation callback.
MG_EXPORT BOOL GUIAPI IntersectRect(RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
Calculates the intersection of two rectangles.
MG_EXPORT void GUIAPI LineTo(HDC hdc, int x, int y)
Draws a zero line to a position.
MG_EXPORT BOOL GUIAPI InitBitmapPixelFormat(HDC hdc, PBITMAP bmp)
Initializes the bitmap pixel format information of a BITMAP object.
MG_EXPORT void GUIAPI EllipseGenerator(void *context, int sx, int sy, int rx, int ry, CB_ELLIPSE cb)
An ellipse generator.
static void OffsetRect(RECT *prc, int x, int y)
Moves a rectangle by offsets.
MG_EXPORT void GUIAPI PolyLineTo(HDC hdc, const POINT *pts, int vertices)
Draws a polyline.
MG_EXPORT int GUIAPI LoadBitmapFromMem(HDC hdc, PBITMAP pBitmap, const void *mem, int size, const char *ext)
Loads a device-dependent bitmap from memory.
MG_EXPORT gal_pixel SysPixelIndex[]
The pre-defined system pixel values.
MG_EXPORT void GUIAPI InitClipRgn(PCLIPRGN pRgn, PBLOCKHEAP pFreeList)
Initializes a clipping region.
MG_EXPORT BOOL GUIAPI SubtractRegion(CLIPRGN *rgnD, const CLIPRGN *rgnM, const CLIPRGN *rgnS)
Substrcts a region from another.
MG_EXPORT int GUIAPI LoadMyBitmapFromFile(PMYBITMAP my_bmp, RGB *pal, const char *file_name)
Loads a MYBITMAP object from a file.
MG_EXPORT void GUIAPI Ellipse(HDC hdc, int sx, int sy, int rx, int ry)
Draws a ellipse.
const LOGFONT * CPLOGFONT
Data type of pointer to a const LOGFONT.
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.
MG_EXPORT gal_pixel GUIAPI GetPixel(HDC hdc, int x, int y)
Gets the pixel value at the specified position on a DC.
#define NULL
A value indicates null pointer.
MG_EXPORT void GUIAPI UnlockDC(HDC hdc)
Unlocks a locked DC.
MG_EXPORT int GUIAPI GetPalette(HDC hdc, int start, int len, GAL_Color *cmap)
Gets palette entries of a DC.
MG_EXPORT HDC GUIAPI CreateMemDCFromMyBitmap(const MYBITMAP *my_bmp, const RGB *pal)
Creates a memory DC from a device independent MYBITMAP object.
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.
void(* CB_FLOOD_FILL)(void *context, int x1, int x2, int y)
Flodd filling generator's scan line callback.
MG_EXPORT HDC GUIAPI GetClientDC(HWND hwnd)
Gets a client DC of a window.
MG_EXPORT int GUIAPI DrawGlyph(HDC hdc, int x, int y, Glyph32 glyph_value, int *adv_x, int *adv_y)
Draw a glyph.
MG_EXPORT BOOL GUIAPI MonotoneVerticalPolygonGenerator(void *context, const POINT *pts, int vertices, CB_POLYGON cb)
A monotone vertical polygon generator.
#define GetRValue(rgba)
Gets the red component from a RGBA triple value rgba.
MG_EXPORT void GUIAPI FillCircle(HDC hdc, int sx, int sy, int r)
Fills a circle.
#define GetGValue(rgba)
Gets the green component from a RGBA triple value rgba.
MG_EXPORT void GUIAPI RotateBitmapHFlip(HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
Flips horizontally and rotates a bitmap object.
MG_EXPORT int GUIAPI GetClipRegion(HDC hdc, CLIPRGN *cliprgn)
Gets the current clipping region of a DC.
unsigned char Uint8
A type definition for an 8-bit unsigned character.
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.
MG_EXPORT BOOL GUIAPI XorRegion(CLIPRGN *dst, const CLIPRGN *src1, const CLIPRGN *src2)
Does the XOR operation between two regions.
GHANDLE HPALETTE
Handle to a logical palette.
MG_EXPORT void GUIAPI PolyLineEx(HDC hdc, const POINT *pts, int nr_pts)
Draws a polyline with the current pen in a DC.
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.
MG_EXPORT void GUIAPI FillEllipse(HDC hdc, int sx, int sy, int rx, int ry)
Fills an ellipse.
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.
MG_EXPORT HDC GUIAPI CreateCompatibleDCEx(HDC hdc, int width, int height)
Creates a memory DC which is compatible with the specified reference DC.
MG_EXPORT BOOL GUIAPI PolygonGeneratorEx(void *context, const POINT *pts, int vertices, CB_POLYGON cb, RECT *rc_output)
A general polygon generator.
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.
MG_EXPORT unsigned int GUIAPI GetGDCapability(HDC hdc, int iItem)
Returns a capability of a DC.
MG_EXPORT void GUIAPI DestroyPalette(HPALETTE hpal)
Destroy a logical palette.
SHAPETYPE
Data type of enum.
MG_EXPORT int GUIAPI GetClipBox(HDC hdc, RECT *clipbox)
Retrieves the bounding rectangle of the current clipping region of a DC.
MG_EXPORT void GUIAPI DrawIcon(HDC hdc, int x, int y, int w, int h, HICON hicon)
Draws an icon into a box.
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...
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.
const MG_EXPORT RGB SysPixelColor[]
The pre-defined system RGB colors.
MG_EXPORT void GUIAPI HFlipBitmap(BITMAP *bmp, unsigned char *inter_buff)
Horizontal Flip the special Bitmap object.
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.
MG_EXPORT PCLIPRGN GUIAPI CreateClipRgn(void)
Creates a clipping region.
MG_EXPORT void GUIAPI SetDCLCS(HDC hdc, int which, const POINT *pt)
Sets mapping parameters of a device context.
static void InflateRectToPt(RECT *prc, int x, int y)
Inflates a rectangle to contain a point.
MG_EXPORT void GUIAPI OffsetRegion(PCLIPRGN region, int x, int y)
Offsets the region.
MG_EXPORT void GUIAPI RotateBitmap(HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
Rotate a bitmap object.
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.
MG_EXPORT void GUIAPI GetBoundsRect(HDC hdc, RECT *pRect)
Retrieves the bounding rectangle of the current visible region of a DC.
MG_EXPORT BOOL GUIAPI LockDCEx(HDC hdc, const PCLIPRGN region, void *context, CB_DIRECT_DRAW_RECT cb)
directly access the pixels in a DC.
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...
MG_EXPORT PLOGFONT GUIAPI CreateLogFontByName(const char *font_name)
Creates a logical font by a font name.
MG_EXPORT void GUIAPI DeletePrivateDC(HDC hdc)
Deletes the DC returned by CreatePrivateDC or CreatePrivateClientDC or CreatePrivateSubDC.
struct _MYBITMAP * PMYBITMAP
Data type of pointer to a struct _MYBITMAP.
MG_EXPORT int GUIAPI SetBitmapKeyColor(HDC hdc, PBITMAP bmp, Uint8 r, Uint8 g, Uint8 b)
Set the bitmap color key.
const unsigned char * bits
long fixed
Data type of fixed point.
unsigned int Uint32
A type definition for a 32-bit unsigned integer.
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.
MG_EXPORT void GUIAPI ExcludeClipRect(HDC hdc, const RECT *prc)
Excludes the specified rectangle from the current visible region of a DC.
MG_EXPORT HPALETTE GUIAPI GetDefaultPalette(void)
Gets the system default logical palette.
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
LOGFONT * PLOGFONT
Data type of pointer to a LOGFONT.
MG_EXPORT int GUIAPI SaveMyBitmapToFile(PMYBITMAP my_bmp, RGB *pal, const char *spFileName)
Saves a MYBITMAP object to a bitmap file.
MG_EXPORT int GUIAPI LoadMyBitmapFromMem(PMYBITMAP my_bmp, RGB *pal, const void *mem, int size, const char *ext)
Loads a MYBITMAP object from memory.
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.
This file includes functions for reading and writing data from general sources, such as file...
MG_EXPORT int GUIAPI LoadBitmapFromFile(HDC hdc, PBITMAP pBitmap, const char *spFileName)
Loads a device-dependent bitmap from a file.
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.
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...
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.
static PLOGFONT GUIAPI GetSystemFont(int font_id)
Gets the system logical font through an font identifier.
MG_EXPORT HDC GUIAPI GetDC(HWND hwnd)
Gets a window DC of a window.
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.
MG_EXPORT PLOGFONT GUIAPI SelectFont(HDC hdc, PLOGFONT log_font)
Selects a logical font into a DC.
MG_EXPORT void GUIAPI NormalizeRect(RECT *pRect)
Normalizes a rectangle.
static BOOL GUIAPI SetPixelInBitmap(const BITMAP *bmp, int x, int y, gal_pixel pixel)
Sets pixel value in a BITMAP object.
MG_EXPORT BOOL GUIAPI SubtractClipRect(PCLIPRGN pRgn, const RECT *pRect)
Subtracts a rectangle from a region.
MG_EXPORT int GUIAPI GetGlyphsExtent(HDC hdc, Glyph32 *glyphs, int nr_glyphs, SIZE *size)
Get visual extent value of a glyph string.
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.
MG_EXPORT void GUIAPI TerminateSlaveScreen(HDC hdc)
Terminates slave screen.
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.
MG_EXPORT BOOL GUIAPI IsRectEmpty(const RECT *prc)
Determines whether an rectangle is empty.
MG_EXPORT BOOL GUIAPI EqualRect(const RECT *prc1, const RECT *prc2)
Determines whether two rectangles are equal.
MG_EXPORT void GUIAPI PolyFillArcEx(HDC hdc, const ARC *arcs, int nr_arcs)
Fill a polyarc with the current brush in a DC.
#define FALSE
FALSE value, defined as 0 by MiniGUI.
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.
MG_EXPORT void DestroyBlockDataHeap(PBLOCKHEAP heap)
Destroys a private block data heap.
MG_EXPORT int GUIAPI GetSysCharWidth(void)
Gets the width of a single-byte character of the default system font.
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.
MG_EXPORT void GUIAPI PolyArcEx(HDC hdc, const ARC *arcs, int nr_arcs)
Draws a polyarc with the current pen in a DC.
unsigned int UINT
A type definition for unsigned integer.
struct _CLIPRECT CLIPRECT
MG_EXPORT BOOL GUIAPI ScaleBitmapEx(BITMAP *dst, const BITMAP *src, HDC ref_dc)
Scales a BITMAP object into another BITMAP object by specify algorithm.
MG_EXPORT void GUIAPI CircleArc(HDC hdc, int sx, int sy, int r, int ang1, int ang2)
Draws an arc.
MG_EXPORT HDC GUIAPI CreatePrivateDC(HWND hwnd)
Creates a private window DC of a window.
MG_EXPORT void GUIAPI UnloadBitmap(PBITMAP pBitmap)
Unloads a bitmap.
MG_EXPORT HICON GUIAPI LoadIconFromMem(HDC hdc, const void *area, int which)
Loads an icon from a memory area.
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.
MG_EXPORT BOOL GUIAPI FillPolygon(HDC hdc, const POINT *pts, int vertices)
Fills an polygon.
MG_EXPORT HDC GUIAPI GetSecondaryClientDC(HWND hwnd)
Retrives and returns the client secondary DC of a specific window.
MG_EXPORT Uint32 GUIAPI SetDCAttr(HDC hdc, int attr, Uint32 value)
Sets a specified attribute value of a DC.
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.
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.
MG_EXPORT void GUIAPI VFlipBitmap(BITMAP *bmp, unsigned char *inter_buff)
Vertical Flip the special Bitmap object.
MG_EXPORT int GUIAPI CleanupMyBitmapSL(MYBITMAP *my_bmp, void *load_info)
Cleanups the scanline loader.
MG_EXPORT void GUIAPI IncludeClipRect(HDC hdc, const RECT *prc)
Includes the specified rectangle to the current visible region of a DC.
BLOCKHEAP * PBLOCKHEAP
Data type of the pointer to a BLOCKHEAP.
MG_EXPORT void GUIAPI DeleteMemDC(HDC mem_dc)
Deletes a memory DC.
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.
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.
MG_EXPORT int GUIAPI TextOutLen(HDC hdc, int x, int y, const char *spText, int len)
Outputs a string of text.
MG_EXPORT HICON GUIAPI LoadIconFromFile(HDC hdc, const char *filename, int which)
Loads an icon from a Windows ICO file.
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 vis...
MG_EXPORT BOOL GUIAPI PtVisible(HDC hdc, int x, int y)
Checks whether a point is visible.
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.
MG_EXPORT BOOL GUIAPI SetMemDCColorKey(HDC mem_dc, DWORD flags, Uint32 color_key)
Sets the color key (transparent pixel) of a memory DC.
MG_EXPORT PLOGFONT GUIAPI GetCurFont(HDC hdc)
Gets the pointer to the current logical font of a DC.
MG_EXPORT BOOL GUIAPI PtInRegion(PCLIPRGN region, int x, int y)
Determines whether a point is in a region.
MG_EXPORT BOOL GUIAPI FloodFill(HDC hdc, int x, int y)
Fills an enclosed area starting at point (x,y).
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.
MG_EXPORT BOOL GUIAPI RectVisible(HDC hdc, const RECT *pRect)
Checks whether the specified rectangle is visible.
MG_EXPORT void GUIAPI SplineTo(HDC hdc, const POINT *pts)
Draws a bezier spline.
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.
MG_EXPORT BOOL GUIAPI InitEllipseRegion(PCLIPRGN dst, int x, int y, int rx, int ry)
Initializes a region to be an enclosed ellipse.
MG_EXPORT int GUIAPI GetTextExtent(HDC hdc, const char *spText, int len, SIZE *pSize)
Computes the output extent of a string of text.
static HDC GUIAPI CreateMemDC(int width, int height, int depth, DWORD flags, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
Creates a memory DC.
static void InflateRect(RECT *prc, int cx, int cy)
Increases or decreases the width and height of an rectangle.
BITMAP * PBITMAP
Data type of pointer to a BITMAP.
void(* CB_POLYGON)(void *context, int x1, int x2, int y)
The type of polygon generator callback.
MG_EXPORT BOOL GUIAPI ft2SetLcdFilter(LOGFONT *logfont, mg_FT_LcdFilter filter)
Set freetype2 smooth mode.
MG_EXPORT int GUIAPI GetSysFontAveWidth(int font_id)
Gets the average width of a single-byte character of a system font.
MG_EXPORT int GUIAPI SaveBitmapToFile(HDC hdc, PBITMAP pBitmap, const char *spFileName)
Saves a BITMAP object to a bitmap file.
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.
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.
MG_EXPORT int GUIAPI SetBitmapScalerType(HDC hdc, int scaler_type)
set bitmap scaler algorithm callback of DC according by scaler_type.
MG_EXPORT void GUIAPI DestroyLogFont(PLOGFONT log_font)
Destroys a logical font.
GHANDLE HICON
Handle to icon.
MG_EXPORT int GUIAPI GetSysFontMaxWidth(int font_id)
Gets the maximal width of a single-byte character of a system font.
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.