MiniGUI API Reference (MiniGUI-Standalone)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Go to the documentation of this file.
187 #define PIXEL_invalid 0
194 #define PIXEL_transparent SysPixelIndex[0]
201 #define PIXEL_darkblue SysPixelIndex[1]
208 #define PIXEL_darkgreen SysPixelIndex[2]
215 #define PIXEL_darkcyan SysPixelIndex[3]
222 #define PIXEL_darkred SysPixelIndex[4]
229 #define PIXEL_darkmagenta SysPixelIndex[5]
236 #define PIXEL_darkyellow SysPixelIndex[6]
243 #define PIXEL_darkgray SysPixelIndex[7]
250 #define PIXEL_lightgray SysPixelIndex[8]
257 #define PIXEL_blue SysPixelIndex[9]
264 #define PIXEL_green SysPixelIndex[10]
271 #define PIXEL_cyan SysPixelIndex[11]
278 #define PIXEL_red SysPixelIndex[12]
285 #define PIXEL_magenta SysPixelIndex[13]
292 #define PIXEL_yellow SysPixelIndex[14]
299 #define PIXEL_lightwhite SysPixelIndex[15]
306 #define PIXEL_black SysPixelIndex[16]
312 #define COLOR_invalid PIXEL_invalid
318 #define COLOR_transparent PIXEL_transparent
324 #define COLOR_darkred PIXEL_darkred
330 #define COLOR_darkgreen PIXEL_darkgreen
336 #define COLOR_darkyellow PIXEL_darkyellow
342 #define COLOR_darkblue PIXEL_darkblue
348 #define COLOR_darkmagenta PIXEL_darkmagenta
354 #define COLOR_darkcyan PIXEL_darkcyan
360 #define COLOR_lightgray PIXEL_lightgray
366 #define COLOR_darkgray PIXEL_darkgray
372 #define COLOR_red PIXEL_red
378 #define COLOR_green PIXEL_green
384 #define COLOR_yellow PIXEL_yellow
390 #define COLOR_blue PIXEL_blue
396 #define COLOR_magenta PIXEL_magenta
402 #define COLOR_cyan PIXEL_cyan
408 #define COLOR_lightwhite PIXEL_lightwhite
414 #define COLOR_black PIXEL_black
420 #define RGBA_transparent \
421 (MakeRGBA(SysPixelColor[0].r, SysPixelColor[0].g, \
422 SysPixelColor[0].b, SysPixelColor[0].a))
428 #define RGBA_darkblue \
429 (MakeRGBA(SysPixelColor[1].r, SysPixelColor[1].g, \
430 SysPixelColor[1].b, SysPixelColor[1].a))
436 #define RGBA_darkgreen \
437 (MakeRGBA(SysPixelColor[2].r, SysPixelColor[2].g, \
438 SysPixelColor[2].b, SysPixelColor[2].a))
444 #define RGBA_darkcyan \
445 (MakeRGBA(SysPixelColor[3].r, SysPixelColor[3].g, \
446 SysPixelColor[3].b, SysPixelColor[3].a))
452 #define RGBA_darkred \
453 (MakeRGBA(SysPixelColor[4].r, SysPixelColor[4].g, \
454 SysPixelColor[4].b, SysPixelColor[4].a))
460 #define RGBA_darkmagenta \
461 (MakeRGBA(SysPixelColor[5].r, SysPixelColor[5].g, \
462 SysPixelColor[5].b, SysPixelColor[5].a))
468 #define RGBA_darkyellow \
469 (MakeRGBA(SysPixelColor[6].r, SysPixelColor[6].g, \
470 SysPixelColor[6].b, SysPixelColor[6].a))
476 #define RGBA_darkgray \
477 (MakeRGBA(SysPixelColor[7].r, SysPixelColor[7].g, \
478 SysPixelColor[7].b, SysPixelColor[7].a))
484 #define RGBA_lightgray \
485 (MakeRGBA(SysPixelColor[8].r, SysPixelColor[8].g, \
486 SysPixelColor[8].b, SysPixelColor[8].a))
493 (MakeRGBA(SysPixelColor[9].r, SysPixelColor[9].g, \
494 SysPixelColor[9].b, SysPixelColor[9].a))
501 (MakeRGBA(SysPixelColor[10].r, SysPixelColor[10].g, \
502 SysPixelColor[10].b, SysPixelColor[10].a))
509 (MakeRGBA(SysPixelColor[11].r, SysPixelColor[11].g, \
510 SysPixelColor[11].b, SysPixelColor[11].a))
517 (MakeRGBA(SysPixelColor[12].r, SysPixelColor[12].g, \
518 SysPixelColor[12].b, SysPixelColor[12].a))
524 #define RGBA_magenta \
525 (MakeRGBA(SysPixelColor[13].r, SysPixelColor[13].g, \
526 SysPixelColor[13].b, SysPixelColor[13].a))
532 #define RGBA_yellow \
533 (MakeRGBA(SysPixelColor[14].r, SysPixelColor[14].g, \
534 SysPixelColor[14].b, SysPixelColor[14].a))
540 #define RGBA_lightwhite \
541 (MakeRGBA(SysPixelColor[15].r, SysPixelColor[15].g, \
542 SysPixelColor[15].b, SysPixelColor[15].a))
549 (MakeRGBA(SysPixelColor[16].r, SysPixelColor[16].g, \
550 SysPixelColor[16].b, SysPixelColor[16].a))
556 #define SysColorIndex SysPixelColor
591 pthread_mutex_t lock;
635 size_t bd_size,
size_t heap_size);
773 #define NULLREGION 0x00
774 #define SIMPLEREGION 0x01
775 #define COMPLEXREGION 0x02
836 #define InitFreeClipRectList(heap, size) \
837 InitBlockDataHeap (heap, sizeof (CLIPRECT), size)
849 #define ClipRectAlloc(heap) BlockDataAlloc (heap)
863 #define FreeClipRect(heap, cr) BlockDataFree (heap, cr);
876 #define DestroyFreeClipRectList(heap) DestroyBlockDataHeap (heap);
1146 const RECT *rcScroll,
int x,
int y);
1222 #define UnionRectWithRegion AddClipRect
1229 #define CopyRegion ClipRgnCopy
1236 #define IntersectRegion ClipRgnIntersect
1268 int x,
int y,
int rx,
int ry);
1283 const POINT* pts,
int vertices);
1358 #define HDC_SCREEN ((HDC)0)
1376 #define HDC_SCREEN_SYS ((HDC)1)
1382 #define HDC_INVALID ((HDC)-1)
1384 #define GDCAP_COLORNUM 0
1385 #define GDCAP_HPIXEL 1
1386 #define GDCAP_VPIXEL 2
1387 #define GDCAP_MAXX 3
1388 #define GDCAP_MAXY 4
1389 #define GDCAP_DEPTH 5
1391 #define GDCAP_BITSPP 7
1392 #define GDCAP_RMASK 8
1393 #define GDCAP_GMASK 9
1394 #define GDCAP_BMASK 10
1395 #define GDCAP_AMASK 11
1396 #define GDCAP_PITCH 12
1397 #define GDCAP_DPI 13
1398 #define GDCAP_DPI_DEFAULT 96
1399 #define GDCAP_DPI_MINIMAL 36
1541 MG_EXPORT
HDC GUIAPI
GetSubDC (
HDC hdc,
int off_x,
int off_y,
int width,
int height);
1619 #define MEMDC_FLAG_NONE 0x00000000
1620 #define MEMDC_FLAG_SWSURFACE 0x00000000
1621 #define MEMDC_FLAG_HWSURFACE 0x00000001
1622 #define MEMDC_FLAG_SRCCOLORKEY 0x00001000
1623 #define MEMDC_FLAG_SRCALPHA 0x00010000
1624 #define MEMDC_FLAG_SRCPIXELALPHA 0x00020000
1625 #define MEMDC_FLAG_RLEACCEL 0x00004000
1752 void* bits,
int pitch);
1790 return CreateMemDCEx (width, height, depth, flags, Rmask, Gmask, Bmask, Amask,
1819 int width,
int height,
BOOL comp_to_parent);
1969 #define CreateCompatibleDC(hdc) CreateCompatibleDCEx(hdc, 0, 0)
1981 #define DeleteCompatibleDC(hdc) DeleteMemDC(hdc)
2021 int* width,
int* height,
int* pitch);
2040 int pitch,
int bytesPerPixel,
const RECT* rc,
void* context);
2157 int width,
int height);
2236 HDC real_dc,
const RECT* secondary_rc,
const RECT* real_rc,
2237 const RECT* main_update_rc);
2239 #define ON_UPDSECDC_DEFAULT ((ON_UPDATE_SECONDARYDC)0)
2240 #define ON_UPDSECDC_DONOTHING ((ON_UPDATE_SECONDARYDC)-1)
2426 #define BM_TRANSPARENT 1
2429 #define DC_ATTR_BK_COLOR 0
2430 #define DC_ATTR_PEN_COLOR 1
2431 #define DC_ATTR_BRUSH_COLOR 2
2432 #define DC_ATTR_TEXT_COLOR 3
2434 #define DC_ATTR_BK_MODE 4
2436 #define DC_ATTR_TAB_STOP 5
2437 #define DC_ATTR_CHAR_EXTRA 6
2438 #define DC_ATTR_WORD_EXTRA 7
2439 #define DC_ATTR_ALINE_EXTRA 8
2440 #define DC_ATTR_BLINE_EXTRA 9
2442 #define DC_ATTR_MAP_MODE 10
2444 #define DC_ATTR_TEXT_ALIGN 11
2446 #define DC_ATTR_BIDI_FLAGS 12
2448 #ifdef _MGHAVE_ADV_2DAPI
2449 # define DC_ATTR_PEN_TYPE 13
2450 # define DC_ATTR_PEN_CAP_STYLE 14
2451 # define DC_ATTR_PEN_JOIN_STYLE 15
2452 # define DC_ATTR_PEN_WIDTH 16
2453 # define DC_ATTR_BRUSH_TYPE 17
2454 # define NR_DC_ATTRS 18
2456 # define NR_DC_ATTRS 13
2533 #define GetBkColor(hdc) GetDCAttr (hdc, DC_ATTR_BK_COLOR)
2550 #define GetBkMode(hdc) GetDCAttr (hdc, DC_ATTR_BK_MODE)
2561 #define GetPenColor(hdc) GetDCAttr (hdc, DC_ATTR_PEN_COLOR)
2572 #define GetBrushColor(hdc) GetDCAttr (hdc, DC_ATTR_BRUSH_COLOR)
2583 #define GetTextColor(hdc) GetDCAttr (hdc, DC_ATTR_TEXT_COLOR)
2594 #define GetTabStop(hdc) GetDCAttr (hdc, DC_ATTR_TAB_STOP)
2606 #define SetBkColor(hdc, color) \
2607 SetDCAttr (hdc, DC_ATTR_BK_COLOR, (DWORD) color)
2626 #define SetBkMode(hdc, mode) \
2627 SetDCAttr (hdc, DC_ATTR_BK_MODE, (DWORD) mode)
2639 #define SetPenColor(hdc, color) \
2640 SetDCAttr (hdc, DC_ATTR_PEN_COLOR, (DWORD) color)
2652 #define SetBrushColor(hdc, color) \
2653 SetDCAttr (hdc, DC_ATTR_BRUSH_COLOR, (DWORD) color)
2665 #define SetTextColor(hdc, color) \
2666 SetDCAttr (hdc, DC_ATTR_TEXT_COLOR, (DWORD) color)
2678 #define SetTabStop(hdc, value) \
2679 SetDCAttr (hdc, DC_ATTR_TAB_STOP, (DWORD) value)
2685 #define ROP_COMPOSITE 4
2686 #define ROP_COMP_USER 0x0100
3145 RGB rgb = {r, g, b, a};
3188 RGB rgb = {r, g, b, 0xFF};
3210 RGB* rgbs,
int count);
3238 *r = rgb.
r; *g = rgb.
g, *b = rgb.
b;
3256 RGB* rgbs,
int count);
3286 *r = rgb.
r; *g = rgb.
g, *b = rgb.
b; *a = rgb.
a;
3306 #define PIXEL2DWORD(hdc, pixel) Pixel2DWORD(hdc, pixel)
3342 MG_EXPORT
void GUIAPI
FocusRect (
HDC hdc,
int x0,
int y0,
int x1,
int y1);
3379 #define DrawHDotLine(hdc, x, y, w) DrawHVDotLine (hdc, x, y, w, TRUE);
3397 #define DrawVDotLine(hdc, x, y, h) DrawHVDotLine (hdc, x, y, h, FALSE);
3429 int *_x0,
int *_y0,
int *_x1,
int *_y1);
3435 typedef void (*
CB_LINE) (
void* context,
int stepx,
int stepy);
3460 int x1,
int y1,
int x2,
int y2,
CB_LINE cb);
3466 typedef void (*
CB_CIRCLE) (
void* context,
int x1,
int x2,
int y);
3502 typedef void (*
CB_ELLIPSE) (
void* context,
int x1,
int x2,
int y);
3529 int sx,
int sy,
int rx,
int ry,
CB_ELLIPSE cb);
3535 typedef void (*
CB_ARC) (
void* context,
int x,
int y);
3561 int sx,
int sy,
int r,
int ang1,
int ang2,
CB_ARC cb);
3567 typedef void (*
CB_POLYGON) (
void* context,
int x1,
int x2,
int y);
3667 #define PolygonGenerator(context, pts, vertices, cb) \
3668 PolygonGeneratorEx(context, pts, vertices, cb, NULL)
3703 const RECT* src_rc,
int x,
int y,
3707 #define BITMAP_SCALER_DDA 0
3709 #define BITMAP_SCALER_BILINEAR 1
3741 MG_EXPORT
void GUIAPI
MoveTo (
HDC hdc,
int x,
int y);
3757 MG_EXPORT
void GUIAPI
LineTo (
HDC hdc,
int x,
int y);
3774 MG_EXPORT
void GUIAPI
Rectangle (
HDC hdc,
int x0,
int y0,
int x1,
int y1);
3822 MG_EXPORT
void GUIAPI
Circle (
HDC hdc,
int sx,
int sy,
int r);
3840 MG_EXPORT
void GUIAPI
Ellipse (
HDC hdc,
int sx,
int sy,
int rx,
int ry);
3863 MG_EXPORT
void GUIAPI
CircleArc (
HDC hdc,
int sx,
int sy,
int r,
3864 int ang1,
int ang2);
3880 MG_EXPORT
void GUIAPI
FillBox (
HDC hdc,
int x,
int y,
int w,
int h);
3895 MG_EXPORT
void GUIAPI
FillCircle (
HDC hdc,
int sx,
int sy,
int r);
3913 MG_EXPORT
void GUIAPI
FillEllipse (
HDC hdc,
int sx,
int sy,
int rx,
int ry);
3945 #ifdef _MGHAVE_ADV_2DAPI
3985 #define GetPenType(hdc) \
3986 GetDCAttr (hdc, DC_ATTR_PEN_TYPE)
3998 #define SetPenType(hdc, type) \
3999 SetDCAttr (hdc, DC_ATTR_PEN_TYPE, (DWORD) type)
4021 const unsigned char* dash_list,
int n);
4054 #define GetPenCapStyle(hdc) \
4055 GetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE)
4067 #define SetPenCapStyle(hdc, style) \
4068 SetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE, (DWORD) style)
4099 #define GetPenJoinStyle(hdc) GetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE)
4111 #define SetPenJoinStyle(hdc, style) \
4112 SetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE, (DWORD) style)
4123 #define GetPenWidth(hdc) \
4124 GetDCAttr (hdc, DC_ATTR_PEN_WIDTH)
4136 #define SetPenWidth(hdc, width) \
4137 SetDCAttr (hdc, DC_ATTR_PEN_WIDTH, (DWORD) width)
4180 #define GetBrushType(hdc) \
4181 GetDCAttr (hdc, DC_ATTR_BRUSH_TYPE)
4193 #define SetBrushType(hdc, type) \
4194 SetDCAttr (hdc, DC_ATTR_BRUSH_TYPE, (DWORD) type)
4261 MG_EXPORT
void GUIAPI
LineEx (
HDC hdc,
int x1,
int y1,
int x2,
int y2);
4286 MG_EXPORT
void GUIAPI
ArcEx (
HDC hdc,
int x,
int y,
int width,
int height,
4287 int ang1,
int ang2);
4312 MG_EXPORT
void GUIAPI
FillArcEx (
HDC hdc,
int x,
int y,
int width,
int height,
4313 int ang1,
int ang2);
4367 MG_EXPORT
void GUIAPI
PolyArcEx (
HDC hdc,
const ARC* arcs,
int nr_arcs);
4401 MG_EXPORT
BOOL GUIAPI
RoundRect (
HDC hdc,
int x0,
int y0,
int x1,
int y1,
int cw,
int ch);
4454 #define MM_ANISOTROPIC 1
4471 #define GetMapMode(hdc) GetDCAttr (hdc, DC_ATTR_MAP_MODE)
4488 #define SetMapMode(hdc, mapmode) \
4489 SetDCAttr (hdc, DC_ATTR_MAP_MODE, (DWORD)mapmode)
4543 #define DC_LCS_VORG 0
4544 #define DC_LCS_VEXT 1
4545 #define DC_LCS_WORG 2
4546 #define DC_LCS_WEXT 3
4547 #define NR_DC_LCS_PTS 4
4562 #define GetViewportOrg(hdc, pPt) GetDCLCS(hdc, DC_LCS_VORG, pPt)
4577 #define GetViewportExt(hdc, pPt) GetDCLCS(hdc, DC_LCS_VEXT, pPt)
4592 #define GetWindowOrg(hdc, pPt) GetDCLCS(hdc, DC_LCS_WORG, pPt)
4607 #define GetWindowExt(hdc, pPt) GetDCLCS(hdc, DC_LCS_WEXT, pPt)
4622 #define SetViewportOrg(hdc, pPt) SetDCLCS(hdc, DC_LCS_VORG, pPt)
4637 #define SetViewportExt(hdc, pPt) SetDCLCS(hdc, DC_LCS_VEXT, pPt)
4652 #define SetWindowOrg(hdc, pPt) SetDCLCS(hdc, DC_LCS_WORG, pPt)
4667 #define SetWindowExt(hdc, pPt) SetDCLCS(hdc, DC_LCS_WEXT, pPt)
4833 #define RGN_COPY 0x00
4834 #define RGN_DIFF 0x01
4835 #define RGN_AND 0x02
4837 #define RGN_XOR 0x04
5042 int x,
int y,
int w,
int h,
BITMAP* bmp);
5136 int x,
int y,
int w,
int h,
5137 int bw,
int bh,
const BITMAP* bmp,
int xo,
int yo);
5162 int box_w,
int box_h,
const BITMAP* pbmp,
int bmp_x,
int bmp_y,
5163 int bmp_w,
int bmp_h);
5172 COLOR_BLEND_LEGACY = 0,
5173 COLOR_BLEND_FLAGS_MASK = 0x00FF,
5204 COLOR_BLEND_PD_FLAG = 0x0100,
5269 COLOR_BLEND_SP_FLAG = 0x0800,
5299 COLOR_BLEND_NS_FLAG = 0x1000,
5304 COLOR_BLEND_LAST = COLOR_BLEND_NS_LAST,
5311 COLOR_LOGICOP_CLEAR = 0,
5313 COLOR_LOGICOP_AND_INVERTED,
5314 COLOR_LOGICOP_COPY_INVERTED,
5315 COLOR_LOGICOP_AND_REVERSE,
5316 COLOR_LOGICOP_INVERT,
5320 COLOR_LOGICOP_EQUIV,
5321 COLOR_LOGICOP_NOOP0,
5322 COLOR_LOGICOP_OR_INVERTED1,
5324 COLOR_LOGICOP_OR_REVERSE,
5366 MG_EXPORT
void GUIAPI
BitBlt (
HDC hsdc,
int sx,
int sy,
int sw,
int sh,
5367 HDC hddc,
int dx,
int dy,
DWORD dwRop);
5385 SCALING_FILTER_SHIFT = 16,
5453 MG_EXPORT
BOOL GUIAPI StretchBltEx (
HDC hsdc,
int sx,
int sy,
int sw,
int sh,
5454 HDC hddc,
int dx,
int dy,
int dw,
int dh,
5494 HDC hddc,
int dx,
int dy,
int dw,
int dh,
DWORD dwRop)
5496 StretchBltEx (hsdc, sx, sy, sw, sh, hddc, dx, dy, dw, dh,
NULL, dwRop);
5500 MG_EXPORT
void GUIAPI StretchBltLegacy (
HDC hsdc,
int sx,
int sy,
int sw,
int sh,
5501 HDC hddc,
int dx,
int dy,
int dw,
int dh,
DWORD dwRop);
5525 #define ScaleBitmap(dst, src) ScaleBitmapEx(dst, src, HDC_SCREEN)
5596 MG_EXPORT
BOOL GUIAPI SetPixelInBitmapEx (
const BITMAP* bmp,
5622 return SetPixelInBitmapEx (bmp, x, y, pixel,
NULL);
5625 #ifdef _MGMISC_SAVESCREEN
5646 const char* filename);
5741 const BYTE* AndBits,
const BYTE* XorBits,
int colornum,
5747 #define CreateIcon(hdc, w, h, AndBits, XorBits, colornum) \
5748 CreateIconEx(hdc, w, h, AndBits, XorBits, colornum, NULL)
5782 const char* file_name);
5802 const void* mem,
size_t size,
const char* ext);
5850 int x,
int y,
int w,
int h,
HICON hicon);
5873 static inline void SetRect (
RECT* prc,
int left,
int top,
int right,
int bottom)
5875 (prc)->left = left; (prc)->top = top;
5876 (prc)->right = right; (prc)->bottom = bottom;
5894 (prc)->left = (prc)->top = (prc)->right = (prc)->bottom = 0;
5911 (pdrc)->left = (psrc)->left; (pdrc)->top = (psrc)->top;
5912 (pdrc)->right = (psrc)->right; (pdrc)->bottom = (psrc)->bottom;
5932 (prc)->left += x; (prc)->top += y; (prc)->right += x; (prc)->bottom += y;
5953 (prc)->left -= cx; (prc)->top -= cy;
5954 (prc)->right += cx; (prc)->bottom += cy;
5972 if ((x) < (prc)->left) (prc)->left = (x);
5973 if ((y) < (prc)->top) (prc)->top = (y);
5974 if ((x) > (prc)->right) (prc)->right = (x);
5975 if ((y) > (prc)->bottom) (prc)->bottom = (y);
5995 if (x >= prc->
left && x < prc->right && y >= prc->
top && y < prc->bottom)
6060 const RECT* psrc1,
const RECT* psrc2);
6112 const RECT* psrc1,
const RECT* psrc2);
6130 const RECT* psrc1,
const RECT* psrc2);
6154 #define RECTWP(prc) ((prc)->right - (prc)->left)
6159 #define RECTHP(prc) ((prc)->bottom - (prc)->top)
6164 #define RECTW(rc) ((rc).right - (rc).left)
6169 #define RECTH(rc) ((rc).bottom - (rc).top)
6185 #define LEN_LOGFONT_NAME_FIELD 31
6186 #define LEN_LOGFONT_FAMILY_FIELD (LEN_LOGFONT_NAME_FIELD*7+6)
6187 #define LEN_LOGFONT_NAME_FULL (LEN_LOGFONT_FAMILY_FIELD + 32)
6188 #define LEN_UNIDEVFONT_NAME 255
6190 #define LEN_FONT_NAME LEN_LOGFONT_NAME_FIELD
6191 #define LEN_DEVFONT_NAME LEN_UNIDEVFONT_NAME
6193 #define FONT_WEIGHT_NIL '\0'
6194 #define FONT_WEIGHT_ANY '*'
6195 #define FONT_WEIGHT_THIN 't'
6196 #define FONT_WEIGHT_EXTRA_LIGHT 'e'
6197 #define FONT_WEIGHT_LIGHT 'l'
6198 #define FONT_WEIGHT_NORMAL 'n'
6199 #define FONT_WEIGHT_REGULAR 'r'
6200 #define FONT_WEIGHT_MEDIUM 'm'
6201 #define FONT_WEIGHT_DEMIBOLD 'd'
6202 #define FONT_WEIGHT_BOLD 'b'
6203 #define FONT_WEIGHT_EXTRA_BOLD 'x'
6204 #define FONT_WEIGHT_BLACK 'c'
6209 #define FONT_WEIGHT_SUBPIXEL 's'
6210 #define FONT_WEIGHT_BOOK 'k'
6212 #define FS_WEIGHT_MASK 0x000000FF
6213 #define FS_WEIGHT_ANY 0
6214 #define FS_WEIGHT_THIN 10
6215 #define FS_WEIGHT_EXTRA_LIGHT 20
6216 #define FS_WEIGHT_LIGHT 30
6217 #define FS_WEIGHT_NORMAL 35
6218 #define FS_WEIGHT_REGULAR 40
6219 #define FS_WEIGHT_MEDIUM 50
6220 #define FS_WEIGHT_DEMIBOLD 60
6221 #define FS_WEIGHT_EXTRA_BOLD 70
6222 #define FS_WEIGHT_BOLD 80
6223 #define FS_WEIGHT_BLACK 90
6225 #define FONT_SLANT_NIL '\0'
6226 #define FONT_SLANT_ANY '*'
6227 #define FONT_SLANT_ROMAN 'r'
6228 #define FONT_SLANT_ITALIC 'i'
6229 #define FONT_SLANT_OBLIQUE 'o'
6231 #define FS_SLANT_MASK 0x00000F00
6232 #define FS_SLANT_ANY 0x00000000
6233 #define FS_SLANT_ROMAN 0x00000100
6234 #define FS_SLANT_ITALIC 0x00000200
6235 #define FS_SLANT_OBLIQUE 0x00000300
6237 #define FONT_FLIP_NONE 'n'
6238 #define FONT_FLIP_HORZ 'h'
6239 #define FONT_FLIP_VERT 'v'
6240 #define FONT_FLIP_HORZVERT 't'
6241 #define FONT_FLIP_NIL FONT_FLIP_NONE
6243 #define FS_FLIP_MASK 0x0000F000
6244 #define FS_FLIP_NONE 0x00000000
6245 #define FS_FLIP_HORZ 0x00001000
6246 #define FS_FLIP_VERT 0x00002000
6247 #define FS_FLIP_HORZVERT 0x00003000
6249 #define FONT_OTHER_NONE 'n'
6250 #define FONT_OTHER_AUTOSCALE 's'
6251 #define FONT_OTHER_TTFNOCACHE 'c'
6252 #define FONT_OTHER_TTFKERN 'k'
6253 #define FONT_OTHER_TTFNOCACHEKERN 'r'
6254 #define FONT_OTHER_NIL FONT_OTHER_NONE
6256 #define FS_OTHER_MASK 0x00F00000
6257 #define FS_OTHER_NONE 0x00000000
6258 #define FS_OTHER_AUTOSCALE 0x00100000
6259 #define FS_OTHER_TTFNOCACHE 0x00200000
6260 #define FS_OTHER_TTFKERN 0x00400000
6261 #define FS_OTHER_TTFNOCACHEKERN 0x00600000
6263 #define FONT_DECORATE_NIL '\0'
6264 #define FONT_DECORATE_NONE 'n'
6265 #define FONT_DECORATE_UNDERLINE 'u'
6266 #define FONT_DECORATE_STRUCKOUT 's'
6267 #define FONT_DECORATE_REVERSE 'r'
6268 #define FONT_DECORATE_OUTLINE 'o'
6269 #define FONT_DECORATE_US 'U'
6271 #define FS_DECORATE_MASK 0x0F000000
6272 #define FS_DECORATE_NONE 0x00000000
6273 #define FS_DECORATE_UNDERLINE 0x01000000
6274 #define FS_DECORATE_STRUCKOUT 0x02000000
6275 #define FS_DECORATE_REVERSE 0x04000000
6276 #define FS_DECORATE_OUTLINE 0x08000000
6277 #define FS_DECORATE_US (FS_DECORATE_UNDERLINE | FS_DECORATE_STRUCKOUT)
6279 #define FONT_RENDER_NIL '\0'
6280 #define FONT_RENDER_ANY '*'
6281 #define FONT_RENDER_MONO 'n'
6282 #define FONT_RENDER_GREY 'g'
6283 #define FONT_RENDER_SUBPIXEL 's'
6285 #define FS_RENDER_MASK 0xF0000000
6286 #define FS_RENDER_MONO 0x00000000
6287 #define FS_RENDER_GREY 0x10000000
6288 #define FS_RENDER_SUBPIXEL 0x20000000
6289 #define FS_RENDER_ANY FS_RENDER_MONO
6292 #define FONT_OTHER_LCDPORTRAIT 'p'
6293 #define FONT_OTHER_LCDPORTRAITKERN 'q'
6295 #define FONT_WEIGHT_ALL FONT_WEIGHT_ANY
6296 #define FONT_SLANT_ALL FONT_SLANT_ANY
6297 #define FS_WEIGHT_ALL FS_WEIGHT_ANY
6298 #define FS_SLANT_ALL FS_SLANT_ANY
6304 #define FONT_SETWIDTH_NIL '\0'
6305 #define FONT_SETWIDTH_ALL '*'
6306 #define FONT_SETWIDTH_BOLD 'b'
6307 #define FONT_SETWIDTH_CONDENSED 'c'
6308 #define FONT_SETWIDTH_SEMICONDENSED 's'
6309 #define FONT_SETWIDTH_NORMAL 'n'
6310 #define FONT_SETWIDTH_TTFNOCACHE 'w'
6312 #define FONT_SPACING_NIL '\0'
6313 #define FONT_SPACING_ALL '*'
6314 #define FONT_SPACING_MONOSPACING 'm'
6315 #define FONT_SPACING_PROPORTIONAL 'p'
6316 #define FONT_SPACING_CHARCELL 'c'
6318 #define FONT_UNDERLINE_NIL '\0'
6319 #define FONT_UNDERLINE_ALL '*'
6320 #define FONT_UNDERLINE_LINE 'u'
6321 #define FONT_UNDERLINE_NONE 'n'
6323 #define FONT_STRUCKOUT_NIL '\0'
6324 #define FONT_STRUCKOUT_ALL '*'
6325 #define FONT_STRUCKOUT_LINE 's'
6326 #define FONT_STRUCKOUT_NONE 'n'
6329 #define FONT_TYPE_NAME_LEN 3
6330 #define FONT_TYPE_NAME_BITMAP_NUF "nuf"
6331 #define FONT_TYPE_NAME_BITMAP_RAW "rbf"
6332 #define FONT_TYPE_NAME_BITMAP_VAR "vbf"
6333 #define FONT_TYPE_NAME_BITMAP_QPF "qpf"
6334 #define FONT_TYPE_NAME_BITMAP_UPF "upf"
6335 #define FONT_TYPE_NAME_BITMAP_BMP "bmp"
6336 #define FONT_TYPE_NAME_SCALE_TTF "ttf"
6337 #define FONT_TYPE_NAME_SCALE_T1F "t1f"
6338 #define FONT_TYPE_NAME_ANY "*"
6339 #define FONT_TYPE_NAME_ALL FONT_TYPE_NAME_ANY
6341 #define FONT_ETC_SECTION_NAME_VBF "varbitmapfonts"
6342 #define FONT_ETC_SECTION_NAME_RBF "rawbitmapfonts"
6343 #define FONT_ETC_SECTION_NAME_UPF "upf"
6344 #define FONT_ETC_SECTION_NAME_QPF "qpf"
6345 #define FONT_ETC_SECTION_NAME_TTF "truetypefonts"
6347 #define FONT_TYPE_BITMAP_RAW 0x0001
6348 #define FONT_TYPE_BITMAP_VAR 0x0002
6349 #define FONT_TYPE_BITMAP_QPF 0x0003
6350 #define FONT_TYPE_BITMAP_BMP 0x0004
6351 #define FONT_TYPE_BITMAP_UPF 0x0005
6352 #define FONT_TYPE_SCALE_TTF 0x0010
6353 #define FONT_TYPE_SCALE_T1F 0x0011
6354 #define FONT_TYPE_ANY 0x0000
6355 #define FONT_TYPE_ALL FONT_TYPE_ANY
6357 #define FONT_CHARSET_US_ASCII "US-ASCII"
6359 #define FONT_CHARSET_ISO8859_1 "ISO8859-1"
6360 #define FONT_CHARSET_ISO8859_2 "ISO8859-2"
6361 #define FONT_CHARSET_ISO8859_3 "ISO8859-3"
6362 #define FONT_CHARSET_ISO8859_4 "ISO8859-4"
6363 #define FONT_CHARSET_ISO8859_5 "ISO8859-5"
6364 #define FONT_CHARSET_ISO8859_6 "ISO8859-6"
6365 #define FONT_CHARSET_ISO8859_7 "ISO8859-7"
6366 #define FONT_CHARSET_ISO8859_8 "ISO8859-8"
6367 #define FONT_CHARSET_ISO8859_9 "ISO8859-9"
6368 #define FONT_CHARSET_ISO8859_10 "ISO8859-10"
6369 #define FONT_CHARSET_ISO8859_11 "ISO8859-11"
6370 #define FONT_CHARSET_ISO8859_12 "ISO8859-12"
6371 #define FONT_CHARSET_ISO8859_13 "ISO8859-13"
6372 #define FONT_CHARSET_ISO8859_14 "ISO8859-14"
6373 #define FONT_CHARSET_ISO8859_15 "ISO8859-15"
6374 #define FONT_CHARSET_ISO8859_16 "ISO8859-16"
6376 #define FONT_CHARSET_EUC_CN "EUC-CN"
6382 #define FONT_CHARSET_GB1988_0 "GB1988-0"
6388 #define FONT_CHARSET_GB2312_0 "GB2312-0"
6389 #define FONT_CHARSET_GBK "GBK"
6395 #define FONT_CHARSET_GB18030_0 "GB18030-0"
6396 #define FONT_CHARSET_BIG5 "BIG5"
6402 #define FONT_CHARSET_EUCTW "EUC-TW"
6403 #define FONT_CHARSET_EUCKR "EUC-KR"
6409 #define FONT_CHARSET_KSC5636_0 "KSC5636-0"
6415 #define FONT_CHARSET_KSC5601_0 "KSC5601-0"
6416 #define FONT_CHARSET_EUCJP "EUC-JP"
6422 #define FONT_CHARSET_JISX0201_0 "JISX0201-0"
6428 #define FONT_CHARSET_JISX0208_0 "JISX0208-0"
6429 #define FONT_CHARSET_SHIFTJIS "SHIFT-JIS"
6435 #define FONT_CHARSET_JISX0201_1 "JISX0201-1"
6441 #define FONT_CHARSET_JISX0208_1 "JISX0208-1"
6447 #define FONT_CHARSET_ISO_10646_1 "ISO-10646-1"
6453 #define FONT_CHARSET_UTF8 "UTF-8"
6459 #define FONT_CHARSET_UTF16LE "UTF-16LE"
6465 #define FONT_CHARSET_UTF16BE "UTF-16BE"
6467 #define FONT_MAX_SIZE 256
6468 #define FONT_MIN_SIZE 1
6469 #define MAXNR_DEVFONTS 8
6504 unsigned short scales[MAXNR_DEVFONTS];
6506 DEVFONT* devfonts[MAXNR_DEVFONTS];
6529 #define MAX_LEN_MCHAR 6
6551 #define ACHARTYPE_BASIC_MASK 0x0000FFFF
6552 #define ACHARTYPE_CATEGORY_MASK 0x00FF0000
6553 #define ACHARTYPE_BREAK_MASK 0xFF000000
6559 #define ACHARTYPE_EXTRACT_BASIC(t) \
6560 (((t) & ACHARTYPE_BASIC_MASK))
6566 #define ACHARTYPE_EXTRACT_CATEGORY(t) \
6567 (((t) & ACHARTYPE_CATEGORY_MASK) >> 16)
6573 #define ACHARTYPE_EXTRACT_BREAK(t) \
6574 (((t) & ACHARTYPE_BREAK_MASK) >> 24)
6580 #define ACHARTYPE_UNKNOWN 0
6582 #define ACHAR_BASIC_NOSPACING_MARK 0x0001
6583 #define ACHAR_BASIC_ABOVE_MARK 0x0002
6584 #define ACHAR_BASIC_BELLOW_MARK 0x0004
6586 #define ACHAR_BASIC_UNKNOWN 0x0000
6587 #define ACHAR_BASIC_NUL (0x0000 | ACHAR_BASIC_NOSPACING_MARK)
6589 #define ACHAR_BASIC_CTRL1 0x0100
6591 #define ACHAR_BASIC_BEL 0x0200
6593 #define ACHAR_BASIC_BS 0x0300
6595 #define ACHAR_BASIC_HT 0x0400
6597 #define ACHAR_BASIC_LF 0x0500
6599 #define ACHAR_BASIC_VT 0x0600
6601 #define ACHAR_BASIC_FF 0x0700
6603 #define ACHAR_BASIC_CR 0x0800
6605 #define ACHAR_BASIC_CTRL2 0x0900
6607 #define ACHAR_BASIC_SPACE 0x0A00
6609 #define ACHAR_BASIC_ZEROWIDTH 0x0B00
6610 #define ACHAR_BASIC_GENERIC 0x0C00
6612 #define ACHAR_BASIC_LIGATURE (0x0D00 | ACHAR_BASIC_NOSPACING_MARK)
6613 #define ACHAR_BASIC_VOWEL (0x0E00 | ACHAR_BASIC_NOSPACING_MARK)
6614 #define ACHAR_BASIC_VOWEL_ABOVE (ACHAR_BASIC_VOWEL | ACHAR_BASIC_ABOVE_MARK)
6615 #define ACHAR_BASIC_VOWEL_BELLOW (ACHAR_BASIC_VOWEL | ACHAR_BASIC_BELLOW_MARK)
6618 #define MCHAR_TYPE_UNKNOWN ACHAR_BASIC_UNKNOWN
6619 #define MCHAR_TYPE_NUL ACHAR_BASIC_NUL
6620 #define MCHAR_TYPE_CTRL1 ACHAR_BASIC_CTRL1
6621 #define MCHAR_TYPE_BEL ACHAR_BASIC_BEL
6622 #define MCHAR_TYPE_BS ACHAR_BASIC_BS
6623 #define MCHAR_TYPE_HT ACHAR_BASIC_HT
6624 #define MCHAR_TYPE_LF ACHAR_BASIC_LF
6625 #define MCHAR_TYPE_VT ACHAR_BASIC_VT
6626 #define MCHAR_TYPE_FF ACHAR_BASIC_FF
6627 #define MCHAR_TYPE_CR ACHAR_BASIC_CR
6628 #define MCHAR_TYPE_CTRL2 ACHAR_BASIC_CTRL2
6629 #define MCHAR_TYPE_SPACE ACHAR_BASIC_SPACE
6630 #define MCHAR_TYPE_ZEROWIDTH ACHAR_BASIC_ZEROWIDTH
6631 #define MCHAR_TYPE_GENERIC ACHAR_BASIC_GENERIC
6632 #define MCHAR_TYPE_NOSPACING_MARK ACHAR_BASIC_NOSPACING_MARK
6633 #define MCHAR_TYPE_LIGATURE ACHAR_BASIC_LIGATURE
6634 #define MCHAR_TYPE_VOWEL ACHAR_BASIC_VOWEL
6635 #define MCHAR_TYPE_VOWEL_ABOVE ACHAR_BASIC_VOWEL_ABOVE
6636 #define MCHAR_TYPE_VOWEL_BELLOW ACHAR_BASIC_VOWEL_BELLOW
6639 #define MCHAR_TYPE_ASCII 0x0080
6640 #define MCHAR_TYPE_LATIN1 0x0081
6641 #define MCHAR_TYPE_LATIN2 0x0082
6642 #define MCHAR_TYPE_LATIN3 0x0083
6643 #define MCHAR_TYPE_LATIN4 0x0084
6644 #define MCHAR_TYPE_LATIN5 0x0085
6645 #define MCHAR_TYPE_LATIN6 0x0086
6646 #define MCHAR_TYPE_LATIN7 0x0087
6647 #define MCHAR_TYPE_LATIN8 0x0088
6648 #define MCHAR_TYPE_LATIN9 0x0089
6649 #define MCHAR_TYPE_LATIN10 0x008A
6650 #define MCHAR_TYPE_CYRILLIC 0x008B
6651 #define MCHAR_TYPE_ARABIC 0x008C
6652 #define MCHAR_TYPE_GREEK 0x008D
6653 #define MCHAR_TYPE_HEBREW 0x008E
6654 #define MCHAR_TYPE_THAI 0x008F
6656 #define MCHAR_TYPE_DIGIT 0x0091
6657 #define MCHAR_TYPE_SYMBOL_PUNCT 0x0092
6658 #define MCHAR_TYPE_SYMBOL_MATH 0x0093
6659 #define MCHAR_TYPE_SYMBOL_OTHER 0x0094
6660 #define MCHAR_TYPE_FW_DIGIT 0x0095
6661 #define MCHAR_TYPE_FW_SYM_PUNCT 0x0096
6662 #define MCHAR_TYPE_FW_SYM_MATH 0x0097
6663 #define MCHAR_TYPE_FW_SYM_OTHER 0x0098
6665 #define MCHAR_TYPE_HANGUL 0x00A1
6666 #define MCHAR_TYPE_KATAKANA 0x00A2
6667 #define MCHAR_TYPE_CJK 0x00A3
6709 UCHAR_CATEGORY_CONTROL,
6710 UCHAR_CATEGORY_FORMAT,
6711 UCHAR_CATEGORY_UNASSIGNED,
6712 UCHAR_CATEGORY_PRIVATE_USE,
6713 UCHAR_CATEGORY_SURROGATE,
6714 UCHAR_CATEGORY_LOWERCASE_LETTER,
6715 UCHAR_CATEGORY_MODIFIER_LETTER,
6716 UCHAR_CATEGORY_OTHER_LETTER,
6717 UCHAR_CATEGORY_TITLECASE_LETTER,
6718 UCHAR_CATEGORY_UPPERCASE_LETTER,
6719 UCHAR_CATEGORY_SPACING_MARK,
6720 UCHAR_CATEGORY_ENCLOSING_MARK,
6721 UCHAR_CATEGORY_NON_SPACING_MARK,
6722 UCHAR_CATEGORY_DECIMAL_NUMBER,
6723 UCHAR_CATEGORY_LETTER_NUMBER,
6724 UCHAR_CATEGORY_OTHER_NUMBER,
6725 UCHAR_CATEGORY_CONNECT_PUNCTUATION,
6726 UCHAR_CATEGORY_DASH_PUNCTUATION,
6727 UCHAR_CATEGORY_CLOSE_PUNCTUATION,
6728 UCHAR_CATEGORY_FINAL_PUNCTUATION,
6729 UCHAR_CATEGORY_INITIAL_PUNCTUATION,
6730 UCHAR_CATEGORY_OTHER_PUNCTUATION,
6731 UCHAR_CATEGORY_OPEN_PUNCTUATION,
6732 UCHAR_CATEGORY_CURRENCY_SYMBOL,
6733 UCHAR_CATEGORY_MODIFIER_SYMBOL,
6734 UCHAR_CATEGORY_MATH_SYMBOL,
6735 UCHAR_CATEGORY_OTHER_SYMBOL,
6736 UCHAR_CATEGORY_LINE_SEPARATOR,
6737 UCHAR_CATEGORY_PARAGRAPH_SEPARATOR,
6738 UCHAR_CATEGORY_SPACE_SEPARATOR
6796 UCHAR_BREAK_MANDATORY,
6797 UCHAR_BREAK_CARRIAGE_RETURN,
6798 UCHAR_BREAK_LINE_FEED,
6799 UCHAR_BREAK_COMBINING_MARK,
6800 UCHAR_BREAK_SURROGATE,
6801 UCHAR_BREAK_ZERO_WIDTH_SPACE,
6802 UCHAR_BREAK_INSEPARABLE,
6803 UCHAR_BREAK_NON_BREAKING_GLUE,
6804 UCHAR_BREAK_CONTINGENT,
6808 UCHAR_BREAK_BEFORE_AND_AFTER,
6810 UCHAR_BREAK_NON_STARTER,
6811 UCHAR_BREAK_OPEN_PUNCTUATION,
6812 UCHAR_BREAK_CLOSE_PUNCTUATION,
6813 UCHAR_BREAK_QUOTATION,
6814 UCHAR_BREAK_EXCLAMATION,
6815 UCHAR_BREAK_IDEOGRAPHIC,
6816 UCHAR_BREAK_NUMERIC,
6817 UCHAR_BREAK_INFIX_SEPARATOR,
6819 UCHAR_BREAK_ALPHABETIC,
6821 UCHAR_BREAK_POSTFIX,
6822 UCHAR_BREAK_COMPLEX_CONTEXT,
6823 UCHAR_BREAK_AMBIGUOUS,
6824 UCHAR_BREAK_UNKNOWN,
6825 UCHAR_BREAK_NEXT_LINE,
6826 UCHAR_BREAK_WORD_JOINER,
6827 UCHAR_BREAK_HANGUL_L_JAMO,
6828 UCHAR_BREAK_HANGUL_V_JAMO,
6829 UCHAR_BREAK_HANGUL_T_JAMO,
6830 UCHAR_BREAK_HANGUL_LV_SYLLABLE,
6831 UCHAR_BREAK_HANGUL_LVT_SYLLABLE,
6832 UCHAR_BREAK_CLOSE_PARANTHESIS,
6833 UCHAR_BREAK_CONDITIONAL_JAPANESE_STARTER,
6834 UCHAR_BREAK_HEBREW_LETTER,
6835 UCHAR_BREAK_REGIONAL_INDICATOR,
6836 UCHAR_BREAK_EMOJI_BASE,
6837 UCHAR_BREAK_EMOJI_MODIFIER,
6838 UCHAR_BREAK_ZERO_WIDTH_JOINER
7014 SCRIPT_INVALID_CODE = 0xFF,
7055 SCRIPT_CANADIAN_ABORIGINAL,
7077 SCRIPT_SYLOTI_NAGRI,
7105 SCRIPT_EGYPTIAN_HIEROGLYPHS,
7106 SCRIPT_IMPERIAL_ARAMAIC,
7107 SCRIPT_INSCRIPTIONAL_PAHLAVI,
7108 SCRIPT_INSCRIPTIONAL_PARTHIAN,
7112 SCRIPT_MEETEI_MAYEK,
7113 SCRIPT_OLD_SOUTH_ARABIAN,
7126 SCRIPT_MEROITIC_CURSIVE,
7127 SCRIPT_MEROITIC_HIEROGLYPHS,
7130 SCRIPT_SORA_SOMPENG,
7135 SCRIPT_CAUCASIAN_ALBANIAN,
7144 SCRIPT_MENDE_KIKAKUI,
7148 SCRIPT_OLD_NORTH_ARABIAN,
7150 SCRIPT_PAHAWH_HMONG,
7153 SCRIPT_PSALTER_PAHLAVI,
7160 SCRIPT_ANATOLIAN_HIEROGLYPHS,
7163 SCRIPT_OLD_HUNGARIAN,
7175 SCRIPT_MASARAM_GONDI,
7178 SCRIPT_ZANABAZAR_SQUARE,
7182 SCRIPT_GUNJALA_GONDI,
7183 SCRIPT_HANIFI_ROHINGYA,
7192 SCRIPT_NYIAKENG_PUACHUE_HMONG,
7556 typedef struct _FONTOPS FONTOPS;
7557 typedef struct _CHARSETOPS CHARSETOPS;
7574 char name [LEN_UNIDEVFONT_NAME + 1];
7590 CHARSETOPS* charset_ops;
7606 #define INV_LOGFONT 0
7685 const char* mchar,
int mchar_len,
7708 _WRN_PRINTF(
"deprecated\n");
7728 _WRN_PRINTF(
"deprecated\n");
7856 const char* charset,
char weight,
char slant,
char flip,
7857 char other,
char underline,
char struckout,
7858 int size,
int rotation);
7990 const char* charset,
char weight,
char slant,
char flip,
7991 char other,
char decoration,
char rendering,
7992 int size,
int rotation);
8026 #ifdef _MGCHARSET_UNICODE
8229 const char *file_name);
8260 #define SYSLOGFONT_DEFAULT 0
8266 #define SYSLOGFONT_WCHAR_DEF 1
8272 #define SYSLOGFONT_FIXED 2
8278 #define SYSLOGFONT_CAPTION 3
8284 #define SYSLOGFONT_MENU 4
8290 #define SYSLOGFONT_CONTROL 5
8292 #define NR_SYSLOGFONTS 6
8295 extern MG_EXPORT
PLOGFONT g_SysLogFont [];
8322 if (font_id >= 0 && font_id < NR_SYSLOGFONTS)
8323 return g_SysLogFont [font_id];
8478 const char* mstr,
int len,
int* pos_chars);
8504 int len,
int* pos_words,
WORDINFO* info_words);
8522 const char* mstr,
int len);
8545 const char* mstr,
int len,
WORDINFO* word_info);
8579 int max_extent,
int* fit_chars,
int* pos_chars,
8580 int* dx_chars,
SIZE* size);
8591 const char* text,
int len,
int max_extent,
8592 int* fit_chars,
int* pos_chars,
int* dx_chars,
SIZE* size);
8594 #ifdef _MGCHARSET_UNICODE
8617 const unsigned char* mstr,
int n);
8625 #define MB2WC(log_font, dest, mstr, n) \
8626 MB2WCEx (log_font, dest, sizeof(wchar_t) == 4, mstr, n)
8645 MG_EXPORT
int GUIAPI
WC2MBEx (
PLOGFONT log_font,
unsigned char *s, Uchar32 wc);
8653 #define WC2MB(log_font, s, wc) \
8654 WC2MBEx (log_font, s, (Uchar32)wc)
8689 const unsigned char* mstr,
int mstr_len,
int n,
8690 int* conved_mstr_len);
8698 #define MBS2WCS(log_font, dest, mstr, mstr_len, n) \
8699 MBS2WCSEx(log_font, dest, sizeof (wchar_t) == 4, mstr, \
8734 MG_EXPORT
int GUIAPI WCS2MBSEx (
PLOGFONT log_font,
unsigned char* dest,
8735 const void *wcs,
int wcs_len,
BOOL wc32,
int n,
8736 int* conved_wcs_len);
8744 #define WCS2MBS(log_font, dest, wcs, wcs_len, n) \
8745 WCS2MBSEx (log_font, dest, wcs, wcs_len, sizeof (wchar_t) == 4, \
8794 #define BIDI_FLAG_SHAPE_MIRRORING 0x00000001
8795 #define BIDI_FLAG_REORDER_NSM 0x00000002
8796 #define BIDI_FLAG_SHAPE_ARAB_PRES 0x00000100
8797 #define BIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200
8798 #define BIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400
8800 #define BIDI_FLAGS_DEFAULT \
8801 (BIDI_FLAG_REORDER_NSM | BIDI_FLAG_REMOVE_SPECIALS)
8803 #define BIDI_FLAGS_ARABIC \
8804 (BIDI_FLAG_SHAPE_ARAB_PRES | BIDI_FLAG_SHAPE_ARAB_LIGA)
8806 #define BIDI_FLAG_REMOVE_BIDI 0x00010000
8807 #define BIDI_FLAG_REMOVE_JOINING 0x00020000
8808 #define BIDI_FLAG_REMOVE_SPECIALS 0x00040000
8810 #define BIDI_BRACKET_NONE 0
8811 #define BIDI_BRACKET_OPEN_MASK 0x80000000
8812 #define BIDI_BRACKET_CHAR_MASK 0X7FFFFFFF
8813 #define BIDI_IS_BRACKET_OPEN(bt) ((bt & BIDI_BRACKET_OPEN_MASK)>0)
8814 #define BIDI_BRACKET_CHAR(bt) ((bt & BIDI_BRACKET_CHAR_MASK))
8821 #define BIDI_TYPE_INVALID 0x0000
8823 #define BIDI_MASK_RTL 0x0001
8824 #define BIDI_MASK_ARABIC 0x0002
8825 #define BIDI_MASK_FIRST 0x0004
8826 #define BIDI_MASK_SEPARATOR 0x0008
8828 #define BIDI_MASK_STRONG 0x0010
8829 #define BIDI_MASK_WEAK 0x0020
8830 #define BIDI_MASK_NEUTRAL 0x0040
8831 #define BIDI_MASK_SENTINEL 0x0080
8834 #define BIDI_MASK_LETTER 0x0100
8835 #define BIDI_MASK_NUMBER 0x0200
8836 #define BIDI_MASK_NUMSEPTER 0x0300
8837 #define BIDI_MASK_SPACE 0x0400
8838 #define BIDI_MASK_EXPLICIT 0x0500
8839 #define BIDI_MASK_ISOLATE 0x0600
8840 #define BIDI_MASK_NSM 0x0700
8841 # define BIDI_TYPE_MASK 0x0700
8843 #define BIDI_MASK_OVERRIDE 0x8000
8846 #define BIDI_MASK_ES 0x1000
8847 #define BIDI_MASK_CS 0x2000
8848 #define BIDI_MASK_ET 0x3000
8849 #define BIDI_MASK_BS 0x4000
8850 #define BIDI_MASK_SS 0x5000
8851 #define BIDI_MASK_BN 0x6000
8852 #define BIDI_MASK_WS 0x7000
8853 # define BIDI_MISC_MASK 0x7000
8856 #define BIDI_MASK_PRIVATE 0x8000
8862 #define BIDI_TYPE_LTR \
8863 (BIDI_MASK_STRONG | BIDI_MASK_LETTER)
8869 #define BIDI_TYPE_RTL \
8870 (BIDI_MASK_STRONG | BIDI_MASK_LETTER | BIDI_MASK_RTL)
8876 #define BIDI_TYPE_AL \
8877 (BIDI_MASK_STRONG | BIDI_MASK_LETTER | BIDI_MASK_RTL | BIDI_MASK_ARABIC)
8883 #define BIDI_TYPE_LRE \
8884 (BIDI_MASK_STRONG | BIDI_MASK_EXPLICIT)
8890 #define BIDI_TYPE_RLE \
8891 (BIDI_MASK_STRONG | BIDI_MASK_EXPLICIT | BIDI_MASK_RTL)
8897 #define BIDI_TYPE_LRO \
8898 (BIDI_MASK_STRONG | BIDI_MASK_EXPLICIT | BIDI_MASK_OVERRIDE)
8904 #define BIDI_TYPE_RLO \
8905 (BIDI_MASK_STRONG | BIDI_MASK_EXPLICIT | BIDI_MASK_RTL | BIDI_MASK_OVERRIDE)
8911 #define BIDI_TYPE_PDF \
8912 (BIDI_MASK_WEAK | BIDI_MASK_EXPLICIT)
8918 #define BIDI_TYPE_EN \
8919 (BIDI_MASK_WEAK | BIDI_MASK_NUMBER)
8925 #define BIDI_TYPE_AN \
8926 (BIDI_MASK_WEAK | BIDI_MASK_NUMBER | BIDI_MASK_ARABIC)
8932 #define BIDI_TYPE_ES \
8933 (BIDI_MASK_WEAK | BIDI_MASK_NUMSEPTER | BIDI_MASK_ES)
8939 #define BIDI_TYPE_ET \
8940 (BIDI_MASK_WEAK | BIDI_MASK_NUMSEPTER | BIDI_MASK_ET)
8946 #define BIDI_TYPE_CS \
8947 (BIDI_MASK_WEAK | BIDI_MASK_NUMSEPTER | BIDI_MASK_CS)
8953 #define BIDI_TYPE_NSM \
8954 (BIDI_MASK_WEAK | BIDI_MASK_NSM)
8960 #define BIDI_TYPE_BN \
8961 (BIDI_MASK_WEAK | BIDI_MASK_SPACE | BIDI_MASK_BN)
8967 #define BIDI_TYPE_BS \
8968 (BIDI_MASK_NEUTRAL | BIDI_MASK_SPACE | BIDI_MASK_SEPARATOR | BIDI_MASK_BS)
8974 #define BIDI_TYPE_SS \
8975 (BIDI_MASK_NEUTRAL | BIDI_MASK_SPACE | BIDI_MASK_SEPARATOR | BIDI_MASK_SS)
8981 #define BIDI_TYPE_WS \
8982 (BIDI_MASK_NEUTRAL | BIDI_MASK_SPACE | BIDI_MASK_WS)
8988 #define BIDI_TYPE_ON \
8995 #define BIDI_TYPE_LRI \
8996 (BIDI_MASK_NEUTRAL | BIDI_MASK_ISOLATE)
9002 #define BIDI_TYPE_RLI \
9003 (BIDI_MASK_NEUTRAL | BIDI_MASK_ISOLATE | BIDI_MASK_RTL)
9009 #define BIDI_TYPE_FSI \
9010 (BIDI_MASK_NEUTRAL | BIDI_MASK_ISOLATE | BIDI_MASK_FIRST)
9016 #define BIDI_TYPE_PDI \
9017 (BIDI_MASK_NEUTRAL | BIDI_MASK_WEAK | BIDI_MASK_ISOLATE)
9019 #define BIDI_TYPE_SENTINEL (BIDI_MASK_SENTINEL)
9024 #define BIDI_TYPE_WLTR (BIDI_MASK_WEAK)
9026 #define BIDI_TYPE_WRTL (BIDI_MASK_WEAK | BIDI_MASK_RTL)
9029 #define BIDI_TYPE_SOT (BIDI_MASK_SENTINEL)
9031 #define BIDI_TYPE_EOT (BIDI_MASK_SENTINEL | BIDI_MASK_RTL)
9033 #define BIDI_TYPE_PRIVATE (BIDI_MASK_PRIVATE)
9036 #define BIDI_IS_PRIVATE(p) ((p) & BIDI_MASK_PRIVATE)
9039 #define BIDI_IS_RTL(p) ((p) & BIDI_MASK_RTL)
9042 #define BIDI_IS_ARABIC(p) ((p) & BIDI_MASK_ARABIC)
9045 #define BIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
9049 #define BIDI_LEVEL_TO_DIR(lev) \
9050 (BIDI_LEVEL_IS_RTL(lev) ? BIDI_TYPE_RTL : BIDI_TYPE_LTR)
9054 #define BIDI_DIR_TO_LEVEL(dir) \
9055 ((BidiLevel) (BIDI_IS_RTL(dir) ? 1 : 0))
9058 #define BIDI_IS_STRONG(p) ((p) & BIDI_MASK_STRONG)
9060 #define BIDI_IS_WEAK(p) ((p) & BIDI_MASK_WEAK)
9062 #define BIDI_IS_NEUTRAL(p) ((p) & BIDI_MASK_NEUTRAL)
9064 #define BIDI_IS_SENTINEL(p) ((p) & BIDI_MASK_SENTINEL)
9067 #define BIDI_IS_LETTER(p) (((p) & BIDI_TYPE_MASK) == BIDI_MASK_LETTER)
9070 #define BIDI_IS_NUMBER(p) (((p) & BIDI_TYPE_MASK) == BIDI_MASK_NUMBER)
9073 #define BIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \
9074 (((p) & BIDI_TYPE_MASK) == BIDI_MASK_NUMSEPTER)
9077 #define BIDI_IS_SPACE(p) (((p) & BIDI_TYPE_MASK) == BIDI_MASK_SPACE)
9079 #define BIDI_IS_EXPLICIT(p) (((p) & BIDI_TYPE_MASK) == BIDI_MASK_EXPLICIT)
9082 #define BIDI_IS_SEPARATOR(p) ((p) & BIDI_MASK_SEPARATOR)
9085 #define BIDI_IS_OVERRIDE(p) ((p) & BIDI_MASK_OVERRIDE)
9088 #define BIDI_IS_ISOLATE(p) (((p) & BIDI_TYPE_MASK) == BIDI_MASK_ISOLATE)
9091 #define BIDI_IS_LTR_LETTER(p) \
9092 ((p) & (BIDI_MASK_LETTER | BIDI_MASK_RTL) == BIDI_MASK_LETTER)
9095 #define BIDI_IS_RTL_LETTER(p) \
9096 ((p) & (BIDI_MASK_LETTER | BIDI_MASK_RTL) \
9097 == (BIDI_MASK_LETTER | BIDI_MASK_RTL))
9100 #define BIDI_IS_ES_OR_CS(p) \
9101 (((p) & BIDI_MISC_MASK) == BIDI_MASK_ES || \
9102 ((p) & BIDI_MISC_MASK) == BIDI_MASK_CS)
9105 #define BIDI_NUMBER_TO_RTL(p) \
9106 (BIDI_IS_NUMBER(p) ? BIDI_TYPE_RTL : (p))
9109 #define BIDI_IS_EXPLICIT_OR_BN(p) \
9110 ((((p) & BIDI_TYPE_MASK) == BIDI_MASK_EXPLICIT) || \
9111 (((p) & BIDI_MISC_MASK) == BIDI_MASK_BN))
9114 #define BIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \
9115 ((((p) & BIDI_TYPE_MASK) == BIDI_MASK_EXPLICIT) || \
9116 (((p) & BIDI_MISC_MASK) == BIDI_MASK_BN) || \
9117 (((p) & BIDI_MISC_MASK) == BIDI_MASK_WS))
9120 #define BIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \
9121 ((((p) & BIDI_TYPE_MASK) == BIDI_MASK_EXPLICIT) || \
9122 ((p) & BIDI_MASK_SEPARATOR) || \
9123 (((p) & BIDI_MISC_MASK) == BIDI_MASK_BN) || \
9124 (((p) & BIDI_MISC_MASK) == BIDI_MASK_WS))
9127 #define BIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \
9128 ((((p) & BIDI_TYPE_MASK) == BIDI_MASK_EXPLICIT) || \
9129 (((p) & BIDI_TYPE_MASK) == BIDI_MASK_NSM) || \
9130 (((p) & BIDI_MISC_MASK) == BIDI_MASK_BN))
9134 #define BIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \
9135 (BIDI_IS_OVERRIDE(p) ? BIDI_LEVEL_TO_DIR(BIDI_DIR_TO_LEVEL(p)) \
9139 #define BIDI_CHANGE_NUMBER_TO_RTL(p) \
9140 (BIDI_IS_NUMBER(p) ? BIDI_TYPE_RTL : (p))
9142 #define BIDI_PGDIR_LTR BIDI_TYPE_LTR
9143 #define BIDI_PGDIR_RTL BIDI_TYPE_RTL
9144 #define BIDI_PGDIR_WLTR BIDI_TYPE_WLTR
9145 #define BIDI_PGDIR_WRTL BIDI_TYPE_WRTL
9146 #define BIDI_PGDIR_ON BIDI_TYPE_ON
9152 #define BIDI_MASK_JOINS_RIGHT 0x01
9153 #define BIDI_MASK_JOINS_LEFT 0x02
9154 #define BIDI_MASK_ARAB_SHAPES 0x04
9155 #define BIDI_MASK_TRANSPARENT 0x08
9156 #define BIDI_MASK_IGNORED 0x10
9157 #define BIDI_MASK_LIGATURED 0x20
9164 #define BIDI_JOINING_TYPE_U_VAL ( 0 )
9167 #define BIDI_JOINING_TYPE_R_VAL \
9168 ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_ARAB_SHAPES )
9171 #define BIDI_JOINING_TYPE_D_VAL \
9172 ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT \
9173 | BIDI_MASK_ARAB_SHAPES )
9176 #define BIDI_JOINING_TYPE_C_VAL \
9177 ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT )
9180 #define BIDI_JOINING_TYPE_L_VAL \
9181 ( BIDI_MASK_JOINS_LEFT | BIDI_MASK_ARAB_SHAPES )
9184 #define BIDI_JOINING_TYPE_T_VAL \
9185 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_ARAB_SHAPES )
9188 #define BIDI_JOINING_TYPE_G_VAL ( BIDI_MASK_IGNORED )
9197 #define BIDI_IS_JOINING_TYPE_U(p) \
9199 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9200 | BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT ) ) )
9203 #define BIDI_IS_JOINING_TYPE_R(p) \
9204 ( BIDI_MASK_JOINS_RIGHT == ( (p) & \
9205 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9206 | BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT ) ) )
9209 #define BIDI_IS_JOINING_TYPE_D(p) \
9210 ( ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT \
9211 | BIDI_MASK_ARAB_SHAPES ) == ( (p) & \
9212 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9213 | BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT \
9214 | BIDI_MASK_ARAB_SHAPES ) ) )
9217 #define BIDI_IS_JOINING_TYPE_C(p) \
9218 ( ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT ) == ( (p) & \
9219 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9220 | BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT \
9221 | BIDI_MASK_ARAB_SHAPES ) ) )
9224 #define BIDI_IS_JOINING_TYPE_L(p) \
9225 ( BIDI_MASK_JOINS_LEFT == ( (p) & \
9226 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9227 | BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT ) ) )
9230 #define BIDI_IS_JOINING_TYPE_T(p) \
9231 ( BIDI_MASK_TRANSPARENT == ( (p) & \
9232 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED ) ) )
9235 #define BIDI_IS_JOINING_TYPE_G(p) \
9236 ( BIDI_MASK_IGNORED == ( (p) & \
9237 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED ) ) )
9242 #define BIDI_IS_JOINING_TYPE_RC(p) \
9243 ( BIDI_MASK_JOINS_RIGHT == ( (p) & \
9244 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9245 | BIDI_MASK_JOINS_RIGHT ) ) )
9248 #define BIDI_IS_JOINING_TYPE_LC(p) \
9249 ( BIDI_MASK_JOINS_LEFT == ( (p) & \
9250 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9251 | BIDI_MASK_JOINS_LEFT ) ) )
9259 #define BIDI_JOINS_RIGHT(p) ((p) & BIDI_MASK_JOINS_RIGHT)
9262 #define BIDI_JOINS_LEFT(p) ((p) & BIDI_MASK_JOINS_LEFT)
9265 #define BIDI_ARAB_SHAPES(p) ((p) & BIDI_MASK_ARAB_SHAPES)
9268 #define BIDI_IS_JOIN_SKIPPED(p) \
9269 ((p) & (BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED))
9272 #define BIDI_IS_JOIN_BASE_SHAPES(p) \
9273 ( BIDI_MASK_ARAB_SHAPES == ( (p) & \
9274 ( BIDI_MASK_TRANSPARENT | BIDI_MASK_IGNORED \
9275 | BIDI_MASK_ARAB_SHAPES ) ) )
9277 #define BIDI_JOINS_PRECEDING_MASK(level) \
9278 (BIDI_LEVEL_IS_RTL (level) ? BIDI_MASK_JOINS_RIGHT \
9279 : BIDI_MASK_JOINS_LEFT)
9281 #define BIDI_JOINS_FOLLOWING_MASK(level) \
9282 (BIDI_LEVEL_IS_RTL (level) ? BIDI_MASK_JOINS_LEFT \
9283 : BIDI_MASK_JOINS_RIGHT)
9285 #define BIDI_JOIN_SHAPE(p) \
9286 ((p) & ( BIDI_MASK_JOINS_RIGHT | BIDI_MASK_JOINS_LEFT ))
9290 #ifdef _MGCHARSET_UNICODE
9419 const BidiType *bidi_types,
int len_ucs,
9560 MG_EXPORT
BidiLevel GUIAPI UBidiGetParagraphEmbeddingLevels(
9601 const Uchar32* ucs,
int nr_ucs,
9613 typedef void (*CB_REVERSE_ARRAY) (
void* extra,
int len,
int pos);
9675 const BidiType *bidi_types,
int len,
int off,
9677 Uchar32 *visual_str,
int *indices_map,
9678 void* extra, CB_REVERSE_ARRAY cb_reverse_extra);
9703 int len, Uchar32* ucs);
9739 const BidiLevel *embedding_levels,
int len,
9780 const BidiLevel *embedding_levels,
int len,
9815 MG_EXPORT
void GUIAPI UBidiShape(
Uint32 shaping_flags,
9816 const BidiLevel *embedding_levels,
int len,
9837 #define CTR_NONE 0x00
9839 #define CTR_CASE_MASK 0x0F
9847 #define CTR_CAPITALIZE 0x01
9854 #define CTR_UPPERCASE 0x02
9861 #define CTR_LOWERCASE 0x03
9871 #define CTR_FULL_WIDTH 0x10
9882 #define CTR_FULL_SIZE_KANA 0x20
9901 #define WBR_NORMAL 0x00
9908 #define WBR_BREAK_ALL 0x01
9915 #define WBR_KEEP_ALL 0x02
9934 #define LBP_NORMAL 0x00
9942 #define LBP_LOOSE 0x01
9949 #define LBP_STRICT 0x02
9961 #define LBP_ANYWHERE 0x03
9981 #define BOV_UNKNOWN 0x0000
9985 #define BOV_WHITESPACE 0x8000
9989 #define BOV_EXPANDABLE_SPACE 0x0800
9994 #define BOV_ZERO_WIDTH 0x0080
9996 #define BOV_GB_MASK 0x7000
10000 #define BOV_GB_CHAR_BREAK 0x1000
10005 #define BOV_GB_CURSOR_POS 0x2000
10010 #define BOV_GB_BACKSPACE_DEL_CH 0x4000
10012 #define BOV_WB_MASK 0x0700
10016 #define BOV_WB_WORD_BOUNDARY 0x0100
10020 #define BOV_WB_WORD_START 0x0200
10024 #define BOV_WB_WORD_END 0x0400
10026 #define BOV_SB_MASK 0x0070
10030 #define BOV_SB_SENTENCE_BOUNDARY 0x0010
10034 #define BOV_SB_SENTENCE_START 0x0020
10038 #define BOV_SB_SENTENCE_END 0x0040
10040 #define BOV_LB_MASK 0x000F
10041 #define BOV_LB_BREAK_FLAG 0x0004
10042 #define BOV_LB_MANDATORY_FLAG 0x0008
10046 #define BOV_LB_ALLOWED (BOV_LB_BREAK_FLAG | 0x0001)
10050 #define BOV_LB_MANDATORY (BOV_LB_BREAK_FLAG | BOV_LB_MANDATORY_FLAG | 0x0002)
10054 #define BOV_LB_NOTALLOWED 0x0003
10124 Uchar32* ucs,
int nr_ucs,
BreakOppo** break_oppos);
10126 MG_EXPORT
void GUIAPI UStrTailorBreaks(
ScriptType writing_system,
10127 const Uchar32* ucs,
int nr_ucs,
BreakOppo* break_oppos);
10248 Uchar32 *result,
int result_len);
10346 iso15924[2], iso15924[1], iso15924[0]));
10349 typedef enum _UVerticalOrient {
10357 GLYPH_RUN_DIR_LTR = 0,
10364 GLYPH_GRAVITY_SOUTH = 0,
10365 GLYPH_GRAVITY_EAST,
10366 GLYPH_GRAVITY_NORTH,
10367 GLYPH_GRAVITY_WEST,
10368 GLYPH_GRAVITY_AUTO,
10372 GLYPH_GRAVITY_POLICY_NATURAL,
10373 GLYPH_GRAVITY_POLICY_STRONG,
10374 GLYPH_GRAVITY_POLICY_LINE,
10375 GLYPH_GRAVITY_POLICY_MIXED,
10376 } GlyphGravityPolicy;
10401 MG_EXPORT GlyphGravity GUIAPI ScriptGetGlyphGravity(
ScriptType script,
10402 BOOL vertical, GlyphGravity base_gravity, GlyphGravityPolicy policy);
10432 GlyphGravity ScriptGetGlyphGravityForWide (
ScriptType script,
10434 GlyphGravity base_gravity, GlyphGravityPolicy policy);
10494 const char* spText,
int len,
SIZE* pSize);
10517 const char* spText,
int len,
SIZE* pSize);
10525 #define GetTextCharacterExtra(hdc) GetDCAttr (hdc, DC_ATTR_CHAR_EXTRA)
10533 #define GetTextWordExtra(hdc) GetDCAttr (hdc, DC_ATTR_WORD_EXTRA)
10541 #define GetTextAboveLineExtra(hdc) GetDCAttr (hdc, DC_ATTR_ALINE_EXTRA)
10549 #define GetTextBellowLineExtra(hdc) GetDCAttr (hdc, DC_ATTR_BLINE_EXTRA)
10558 #define SetTextCharacterExtra(hdc, extra) \
10559 SetDCAttr (hdc, DC_ATTR_CHAR_EXTRA, (DWORD) extra)
10568 #define SetTextWordExtra(hdc, extra) \
10569 SetDCAttr (hdc, DC_ATTR_WORD_EXTRA, (DWORD) extra)
10577 #define SetTextAboveLineExtra(hdc, extra) \
10578 SetDCAttr (hdc, DC_ATTR_ALINE_EXTRA, (DWORD) extra)
10586 #define SetTextBellowLineExtra(hdc, extra) \
10587 SetDCAttr (hdc, DC_ATTR_BLINE_EXTRA, (DWORD) extra)
10589 #define TA_LEFT 0x0000
10590 #define TA_RIGHT 0x0001
10591 #define TA_CENTER 0x0002
10592 #define TA_X_MASK 0x000F
10594 #define TA_TOP 0x0000
10595 #define TA_BASELINE 0x0010
10596 #define TA_BOTTOM 0x0020
10597 #define TA_Y_MASK 0x00F0
10599 #define TA_NOUPDATECP 0x0000
10600 #define TA_UPDATECP 0x0100
10601 #define TA_CP_MASK 0x0F00
10654 #define GetTextAlign(hdc) GetDCAttr (hdc, DC_ATTR_TEXT_ALIGN)
10712 #define SetTextAlign(hdc, ta_flags) \
10713 SetDCAttr (hdc, DC_ATTR_TEXT_ALIGN, (DWORD)ta_flags)
10715 #define BIDI_FLAG_LTR 0x00
10716 #define BIDI_FLAG_RTL 0x10
10718 #define GetBIDIFlags(hdc) \
10719 GetDCAttr (hdc, DC_ATTR_BIDI_FLAGS)
10721 #define SetBIDIFlags(hdc, bidi_flags) \
10722 SetDCAttr (hdc, DC_ATTR_BIDI_FLAGS, (DWORD)bidi_flags)
10743 const char* spText,
int len);
10768 const char *mtext,
int len,
int max_extent);
10792 const char* spText,
int len);
10821 const char* spText,
int nCount,
10822 int nTabPositions,
int *pTabPositions,
int nTabOrigin);
10843 #define TextOut(hdc, x, y, text) TextOutLen (hdc, x, y, text, -1)
10853 #define TabbedTextOut(hdc, x, y, text) TabbedTextOutLen (hdc, x, y, text, -1)
10855 #define DT_TOP 0x00000000
10856 #define DT_LEFT 0x00000000
10857 #define DT_CENTER 0x00000001
10858 #define DT_RIGHT 0x00000002
10859 #define DT_VCENTER 0x00000004
10860 #define DT_BOTTOM 0x00000008
10861 #define DT_WORDBREAK 0x00000010
10862 #define DT_SINGLELINE 0x00000020
10863 #define DT_EXPANDTABS 0x00000040
10864 #define DT_TABSTOP 0x00000080
10865 #define DT_NOCLIP 0x00000100
10866 #define DT_EXTERNALLPADING 0x00000200
10867 #define DT_CALCRECT 0x00000400
10868 #define DT_NOPREFIX 0x00000800
10869 #define DT_INTERNAL 0x00001000
10870 #define DT_CHARBREAK 0x00002000
10964 MG_EXPORT
int GUIAPI
DrawTextEx2 (
HDC hdc,
const char* pText,
int nCount,
10976 #define DrawText(hdc, text, n, rc, format) \
10977 DrawTextEx2 (hdc, text, n, rc, 0, format, NULL)
10987 #define DrawTextEx(hdc, text, n, rc, indent, format) \
10988 DrawTextEx2 (hdc, text, n, rc, indent, format, NULL)
11000 #define MYBMP_TYPE_NORMAL 0x00000000
11001 #define MYBMP_TYPE_RLE4 0x00000001
11002 #define MYBMP_TYPE_RLE8 0x00000002
11003 #define MYBMP_TYPE_RGB 0x00000003
11004 #define MYBMP_TYPE_BGR 0x00000004
11005 #define MYBMP_TYPE_RGBA 0x00000005
11006 #define MYBMP_TYPE_MASK 0x0000000F
11008 #define MYBMP_FLOW_DOWN 0x00000010
11009 #define MYBMP_FLOW_UP 0x00000020
11010 #define MYBMP_FLOW_MASK 0x000000F0
11012 #define MYBMP_TRANSPARENT 0x00000100
11013 #define MYBMP_ALPHACHANNEL 0x00000200
11014 #define MYBMP_ALPHA 0x00000400
11016 #define MYBMP_RGBSIZE_3 0x00001000
11017 #define MYBMP_RGBSIZE_4 0x00002000
11019 #define MYBMP_LOAD_GRAYSCALE 0x00010000
11020 #define MYBMP_LOAD_ALLOCATE_ONE 0x00020000
11021 #define MYBMP_LOAD_NONE 0x00000000
11062 Uint8 reserved [2];
11079 #define BMP_TYPE_NORMAL 0x00
11080 #define BMP_TYPE_RLE 0x01
11081 #define BMP_TYPE_ALPHA 0x02
11082 #define BMP_TYPE_ALPHACHANNEL 0x04
11083 #define BMP_TYPE_COLORKEY 0x10
11084 #define BMP_TYPE_ALPHA_MASK 0x20
11085 #define BMP_TYPE_REPLACEKEY 0x40
11213 MG_EXPORT
BOOL GUIAPI RegisterBitmapFileType (
const char *ext,
11217 void (*cleanup) (
void* init_info),
11279 #define MLS_BLENDMODE_NONE 0x00
11280 #define MLS_BLENDMODE_COLORKEY 0x01
11281 #define MLS_BLENDMODE_ALPHA 0x02
11283 #define MLS_INFOMASK_OFFSET 0x01
11284 #define MLS_INFOMASK_BLEND 0x02
11285 #define MLS_INFOMASK_ZORDER 0x04
11286 #define MLS_INFOMASK_ALL 0x07
11287 #define MLS_INFOMASK_ENABLE 0x08
11289 MG_EXPORT
BOOL GUIAPI mlsSetSlaveScreenInfo (
HDC dc_mls,
DWORD mask,
int offset_x,
int offset_y,
11290 DWORD blend_flags,
gal_pixel color_key,
int alpha,
int z_order);
11292 MG_EXPORT
BOOL GUIAPI mlsGetSlaveScreenInfo (
HDC dc_mls,
DWORD mask,
int* offset_x,
int* offset_y,
11293 DWORD blend_flags,
gal_pixel* color_key,
int* alpha,
int* z_order);
11309 #define ERR_BMP_OK 0
11310 #define ERR_BMP_IMAGE_TYPE -1
11311 #define ERR_BMP_UNKNOWN_TYPE -2
11312 #define ERR_BMP_CANT_READ -3
11313 #define ERR_BMP_CANT_SAVE -4
11314 #define ERR_BMP_NOT_SUPPORTED -5
11315 #define ERR_BMP_MEM -6
11316 #define ERR_BMP_LOAD -7
11317 #define ERR_BMP_FILEIO -8
11318 #define ERR_BMP_OTHER -9
11319 #define ERR_BMP_ERROR_SOURCE -10
11387 MG_RWops* area,
const char* ext) {
11399 const char* spFileName);
11407 #define LoadBitmap LoadBitmapFromFile
11417 const void* mem,
size_t size,
const char* ext);
11575 const char* file_name);
11583 #define LoadMyBitmap LoadMyBitmapFromFile
11601 const void* mem,
size_t size,
const char* ext);
11616 #ifdef _MGMISC_SAVEBITMAP
11635 const char* spFileName);
11653 const char* spFileName);
11654 #define SaveBitmap SaveBitmapToFile
11745 typedef struct GAL_PixelFormat {
11748 Uint8 BitsPerPixel;
11749 Uint8 BytesPerPixel;
11751 Uint8 DitheredPalette;
11775 #define _FILL_MYBITMAP
11777 #ifndef MYBITMAP_CONTXT
11778 typedef struct _MYBITMAP_CONTXT{
11781 GAL_PixelFormat* AlphaPixelFormat;
11786 typedef BYTE* (* CB_DRAW_PIXEL) (
HDC hdc, MYBITMAP_CONTXT* mybmp,
Uint32 pixel,
BYTE* dest);
11804 const MYBITMAP* my_bmp,
const RGB* pal,
int frame);
11832 MG_EXPORT
void GUIAPI Expand16CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
11862 Expand16CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
11863 w, h, flags, pal,
FALSE, 0xFF);
11866 MG_EXPORT
void GUIAPI Expand256CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
11870 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
11898 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp)
11900 Expand256CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
11901 w, h, flags, pal,
FALSE, 0xFF, cb_draw, mybmp);
11930 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
11947 CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp,
11950 #ifdef _FILL_MYBITMAP
11951 MG_EXPORT
int GUIAPI FillBoxWithMyBitmap (
HDC hdc,
int x,
int y,
MYBITMAP* mybmp,
RGB* pal);
11953 MG_EXPORT
void GUIAPI ExpandPartMonoBitmap (
HDC hdc,
BYTE* bits,
Uint32 pitch,
11956 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
11958 MG_EXPORT
void GUIAPI ExpandPart16CBitmapEx (
HDC hdc,
BYTE* bits,
Uint32 pitch,
11962 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp);
11964 static inline void GUIAPI ExpandPart16CBitmap (
HDC hdc,
BYTE* bits,
Uint32 pitch,
11967 int stepx, CB_DRAW_PIXEL cb_draw, MYBITMAP_CONTXT* mybmp)
11969 ExpandPart16CBitmapEx (hdc, bits, pitch, my_bits, my_pitch,
11970 w, h, flags, pal,
FALSE, 0xFF, stepx, cb_draw, mybmp);
11975 #define CompileRGBBitmap CompileRGBABitmap
12023 const char* spFileName);
12042 const void* mem,
size_t size,
const char* ext);
12095 int w,
int h,
const char* spFileName);
12116 int w,
int h,
const void* mem,
size_t size,
const char* ext);
12118 #ifdef _MGHAVE_FIXED_MATH
12136 int lx,
int ty,
int angle);
12149 int lx,
int ty,
int angle);
12160 int lx,
int ty,
int angle);
12171 int lx,
int ty,
int angle,
int w,
int h);
12185 int lx,
int ty,
int angle,
int w,
int h);
12199 int lx,
int ty,
int angle,
int w,
int h);
12213 int lx,
int ty,
int cx,
int cy,
int angle);
12253 #ifdef _MGFONT_BMPF
12272 MG_EXPORT
DEVFONT* GUIAPI CreateBMPDevFont (
const char *bmpfont_name,
12273 const BITMAP* glyph_bmp,
const char* start_mchar,
int nr_glyphs,
12292 const char* start_mchar,
int nr_glyphs,
int glyph_width);
12376 #define INV_ACHAR_VALUE 0xFFFFFFFF
12381 #define INV_GLYPH_VALUE 0xFFFFFFFF
12397 int mchar_len,
const char* pre_mchar,
int pre_len);
12399 #ifdef _MGCHARSET_UNICODE
12419 int mchar_len, Uchar32* uc);
12509 Achar32* mirrored);
12537 typedef struct _ACHARMAPINFO {
12571 const char* text,
int text_len, Achar32** achars,
12600 const char* text,
int text_len,
int start_index,
int end_index,
12601 int** ranges,
int* nr_ranges);
12628 const char* text,
int text_len, Achar32** achars,
12665 Achar32* achars,
int nr_achars,
int pel,
12666 void* extra, CB_REVERSE_ARRAY cb_reverse_extra);
12695 Achar32* achars,
int nr_achars,
ACHARMAPINFO* achars_map);
12725 MG_EXPORT
void GUIAPI BIDIGetLogicalEmbedLevelsEx (
LOGFONT* log_font,
12726 Achar32* achars,
int nr_achars,
int pel,
Uint8** embedding_levels);
12728 static inline void BIDIGetLogicalEmbeddLevels (
LOGFONT* log_font,
12729 Achar32* achars,
int nr_achars,
Uint8** embedding_levels)
12731 BIDIGetLogicalEmbedLevelsEx (log_font, achars, nr_achars, -1,
12766 MG_EXPORT
void GUIAPI BIDIGetVisualEmbedLevelsEx (
LOGFONT* log_font,
12767 Achar32* achars,
int nr_achars,
int pel,
Uint8** embedding_levels);
12769 static inline void BIDIGetVisualEmbeddLevels (
LOGFONT* log_font,
12770 Achar32* achars,
int nr_achars,
Uint8** embedding_levels)
12772 BIDIGetVisualEmbedLevelsEx (log_font, achars, nr_achars, -1,
12798 MG_EXPORT
int GUIAPI DrawACharString (
HDC hdc,
int x,
int y, Achar32* achars,
12799 int nr_achars,
int* adv_x,
int* adv_y);
12838 int nr_achars,
int max_extent,
SIZE* size);
12854 int mchar_len,
const char* pre_mchar,
int pre_len);
12886 MG_EXPORT
int GUIAPI
DrawGlyph (
HDC hdc,
int x,
int y, Glyph32 glyph_value,
12887 int* adv_x,
int* adv_y);
12908 MG_EXPORT
int GUIAPI DrawGlyphString (
HDC hdc, Glyph32* glyphs,
int nr_glyphs,
12950 int nr_glyphs,
int max_extent,
SIZE* size);
12952 #define GLYPH_INFO_METRICS 0x01
12953 #define GLYPH_INFO_BMP 0x02
12954 #define GLYPH_INFO_FACE 0x04
12957 #define GLYPHBMP_TYPE_MONO 0x00
12959 #define GLYPHBMP_TYPE_GREY 0x01
12961 #define GLYPHBMP_TYPE_GREY4b 0x02
12963 #define GLYPHBMP_TYPE_SUBPIXEL 0x03
12965 #define GLYPHBMP_TYPE_PRERENDER 0x04
12971 typedef struct _GLYPHINFO {
12982 int bbox_x, bbox_y, bbox_w, bbox_h;
12984 int advance_x, advance_y;
13003 const unsigned char* bits;
13018 const char* file_path;
13042 #ifdef _MGCHARSET_UNICODE
13061 #define WSR_NORMAL 0x00
13071 #define WSR_PRE 0x01
13079 #define WSR_NOWRAP 0x02
13087 #define WSR_PRE_WRAP 0x03
13103 #define WSR_BREAK_SPACES 0x04
13112 #define WSR_PRE_LINE 0x05
13154 const char* mstr,
int mstr_len,
Uint8 wsr,
13155 Uchar32** uchars,
int* nr_uchars);
13194 Uchar32* ucs,
int n);
13207 #define UCHAR2ACHAR(uc) ((uc) | 0x80000000)
13254 Achar32* acs,
int n);
13272 #define GRF_WRITING_MODE_MASK 0xF0000000
13273 #define GRF_WRITING_MODE_VERTICAL_FLAG 0x20000000
13278 #define GRF_WRITING_MODE_HORIZONTAL_TB 0x00000000
13284 #define GRF_WRITING_MODE_HORIZONTAL_BT 0x10000000
13290 #define GRF_WRITING_MODE_VERTICAL_RL 0x20000000
13296 #define GRF_WRITING_MODE_VERTICAL_LR 0x30000000
13298 #define GRF_TEXT_ORIENTATION_MASK 0x0F000000
13303 #define GRF_TEXT_ORIENTATION_UPRIGHT 0x00000000
13308 #define GRF_TEXT_ORIENTATION_SIDEWAYS 0x01000000
13313 #define GRF_TEXT_ORIENTATION_UPSIDE_DOWN 0x02000000
13318 #define GRF_TEXT_ORIENTATION_SIDEWAYS_LEFT 0x03000000
13323 #define GRF_TEXT_ORIENTATION_AUTO 0x04000000
13331 #define GRF_TEXT_ORIENTATION_MIXED 0x05000000
13333 #define GRF_TEXT_ORIENTATION_LINE 0x06000000
13335 #define GRF_LINE_EXTENT_MASK 0x00C00000
13341 #define GRF_LINE_EXTENT_FIXED 0x00000000
13347 #define GRF_LINE_EXTENT_VARIABLE 0x00400000
13349 #define GRF_INDENT_MASK 0x00300000
13353 #define GRF_INDENT_NONE 0x00000000
13357 #define GRF_INDENT_FIRST_LINE 0x00100000
13361 #define GRF_INDENT_HANGING 0x00200000
13363 #define GRF_OVERFLOW_WRAP_MASK 0x000C0000
13367 #define GRF_OVERFLOW_WRAP_NORMAL 0x00000000
13371 #define GRF_OVERFLOW_WRAP_BREAK_WORD 0x00040000
13377 #define GRF_OVERFLOW_WRAP_ANYWHERE 0x00080000
13379 #define GRF_OVERFLOW_ELLIPSIZE_MASK 0x00030000
13383 #define GRF_OVERFLOW_ELLIPSIZE_NONE 0x00000000
13387 #define GRF_OVERFLOW_ELLIPSIZE_START 0x00010000
13391 #define GRF_OVERFLOW_ELLIPSIZE_MIDDLE 0x00020000
13395 #define GRF_OVERFLOW_ELLIPSIZE_END 0x00030000
13397 #define GRF_ALIGN_MASK 0x0000F000
13401 #define GRF_ALIGN_START 0x00000000
13405 #define GRF_ALIGN_END 0x00001000
13410 #define GRF_ALIGN_LEFT 0x00002000
13415 #define GRF_ALIGN_RIGHT 0x00003000
13419 #define GRF_ALIGN_CENTER 0x00004000
13427 #define GRF_ALIGN_JUSTIFY 0x00005000
13429 #define GRF_TEXT_JUSTIFY_MASK 0x00000F00
13433 #define GRF_TEXT_JUSTIFY_NONE 0x00000000
13439 #define GRF_TEXT_JUSTIFY_AUTO 0x00000100
13443 #define GRF_TEXT_JUSTIFY_INTER_WORD 0x00000200
13448 #define GRF_TEXT_JUSTIFY_INTER_CHAR 0x00000300
13450 #define GRF_HANGING_PUNC_MASK 0x000000F0
13454 #define GRF_HANGING_PUNC_NONE 0x00000000
13458 #define GRF_HANGING_PUNC_FORCE_END 0x00000010
13463 #define GRF_HANGING_PUNC_ALLOW_END 0x00000020
13467 #define GRF_HANGING_PUNC_OPEN 0x00000040
13471 #define GRF_HANGING_PUNC_CLOSE 0x00000080
13473 #define GRF_SPACES_MASK 0x0000000F
13477 #define GRF_SPACES_KEEP 0x00000000
13481 #define GRF_SPACES_REMOVE_START 0x00000001
13485 #define GRF_SPACES_REMOVE_END 0x00000002
13489 #define GRF_SPACES_HANGE_END 0x00000004
13494 GLYPH_ORIENT_UPRIGHT = GLYPH_GRAVITY_SOUTH,
13495 GLYPH_ORIENT_SIDEWAYS = GLYPH_GRAVITY_EAST,
13496 GLYPH_ORIENT_UPSIDE_DOWN = GLYPH_GRAVITY_NORTH,
13497 GLYPH_ORIENT_SIDEWAYS_LEFT = GLYPH_GRAVITY_WEST,
13501 GLYPH_HANGED_NONE = 0,
13502 GLYPH_HANGED_START,
13681 const Achar32* uchars,
int nr_uchars,
const BreakOppo* break_oppos,
13682 Uint32 render_flags,
int x,
int y,
13683 int letter_spacing,
int word_spacing,
int tab_size,
int max_extent,
13714 MG_EXPORT
int GUIAPI DrawGlyphStringEx (
HDC hdc,
13716 const Glyph32* glyphs,
const GLYPHPOS* glyph_pos,
13766 const Uchar32* ucs,
int nr_ucs,
13789 int start_index,
int length,
const char* logfont_name);
13797 const TEXTRUNS* truns,
int index);
13817 int start_index,
int length,
RGBCOLOR color);
13825 const TEXTRUNS* truns,
int index);
13848 int start_index,
int length,
RGBCOLOR color);
13856 const TEXTRUNS* truns,
int index);
13911 #ifdef _MGCOMPLEX_SCRIPTS
13999 int max_line_extent,
int indent,
14000 int letter_spacing,
int word_spacing,
int tab_size,
14001 int* tabs,
int nr_tabs);
14023 typedef struct _RENDERDATA {
14080 Glyph32 glyph_value,
const GLYPHPOS* glyph_pos,
14081 const RENDERDATA* render_data);
14127 CB_GLYPH_LAID_OUT cb_laid_out,
GHANDLE ctxt);
14180 int* x,
int* y,
int line_height,
RECT* line_rc);
14218 int max_line_extent,
int max_height,
int line_height,
14219 int x,
int y,
RECT* bounding);
14250 MG_EXPORT
BOOL DrawShapedGlyph(
HDC hdc,
14251 Glyph32 glyph_value,
const GLYPHPOS* glyph_pos,
14252 const RENDERDATA* render_data);
14288 #ifdef _MGDEVEL_MODE
14289 typedef struct _TextRun TEXTRUN;
14291 MG_EXPORT TEXTRUN* GetNextTextRunInfo(
TEXTRUNS* runinfo,
14293 const char** fontname,
int* start_index,
int* length,
14299 int* max_extent,
int* nr_chars,
int* nr_glyphs,
14300 int** log_widths,
int* width,
int* height,
14301 BOOL* is_ellipsized,
BOOL* is_wrapped);
14314 typedef struct _COMP_CTXT {
14319 void* user_comp_ctxt;
14335 typedef struct _SPAN_CTXT {
14336 GAL_PixelFormat* dst_format;
14337 GAL_PixelFormat* src_format;
14338 void * user_context;
14345 typedef struct _COMPOSITE_CTXT {
14348 const int *far_bkmode;
14349 const int *far_step;
14362 typedef void (*CB_COMP_SETPIXEL) (COMP_CTXT* comp_ctxt);
14373 typedef void (*CB_COMP_SETHLINE) (COMP_CTXT* comp_ctxt,
int w);
14384 typedef void (*CB_COMP_PUTHLINE) (COMP_CTXT* comp_ctxt,
gal_uint8* src,
int bkmode,
int w);
14407 MG_EXPORT
int GUIAPI SetUserCompositionOps (
HDC hdc,
14408 CB_COMP_SETPIXEL comp_setpixel,
14409 CB_COMP_SETHLINE comp_sethline,
14410 CB_COMP_PUTHLINE comp_puthline,
14411 void* user_comp_ctxt);
14512 uint32_t name, uint32_t drm_format, off_t offset,
14513 uint32_t width, uint32_t height, uint32_t pitch);
14515 static inline HDC drmCreateDCFromName (
GHANDLE video,
14516 uint32_t name, uint32_t drm_format,
14517 uint32_t width, uint32_t height, uint32_t pitch)
14520 name, drm_format, 0, width, height, pitch);
14539 int prime_fd,
size_t size, uint32_t drm_format, off_t offset,
14540 uint32_t width, uint32_t height, uint32_t pitch);
14542 static inline HDC drmCreateDCFromPrimeFd (
GHANDLE video,
14543 int prime_fd,
size_t size, uint32_t drm_format,
14544 uint32_t width, uint32_t height, uint32_t pitch)
14547 prime_fd, size, drm_format, 0, width, height, pitch);
14566 uint32_t handle,
size_t size, uint32_t drm_format, off_t offset,
14567 uint32_t width, uint32_t height, uint32_t pitch);
14569 static inline HDC drmCreateDCFromHandle (
GHANDLE video,
14570 uint32_t handle,
size_t size, uint32_t drm_format,
14571 uint32_t width, uint32_t height, uint32_t pitch)
14574 handle, size, drm_format, 0, width, height, pitch);
14583 #ifdef _MGGAL_HI3560
14586 #define SCREEN_ATTR_ALPHA_CHANNEL 0x01 // alpha channel
14587 #define SCREEN_ATTR_COLORKEY 0x02 // colorkey
14588 #define SCREEN_ATTR_COLORSPACE 0x03 // colorspace
14589 #define SCREEN_ATTR_ALPHA 0x04
14590 #define SCREEN_NO_EXIST -99 // screen don't exist
14593 MG_EXPORT
int hi3560GetVideoFD (
void);
14594 MG_EXPORT
void* hi3560GetFBAddress (
void);
14595 MG_EXPORT
int hi3560SetScreenAttr (
Uint8 siAttr,
void* pValue);
MG_EXPORT BOOL GUIAPI SetMemDCColorKey(HDC mem_dc, DWORD flags, Uint32 color_key)
Set the color key (transparent pixel) of a memory DC.
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.
static gal_pixel DWORD2Pixel(HDC hdc, DWORD dword)
An inline function to convert DWORD color to gal_pixel.
MG_EXPORT PLOGFONT GUIAPI CreateLogFontEx(const char *type, const char *family, const char *charset, char weight, char slant, char flip, char other, char decoration, char rendering, int size, int rotation)
Creates a logical font.
MG_EXPORT int GUIAPI GetClipBox(HDC hdc, RECT *clipbox)
Retrieve the bounding rectangle of the current clipping region of a DC.
MG_EXPORT BOOL GUIAPI DoesIntersect(const RECT *psrc1, const RECT *psrc2)
Determine whether two rectangles intersect.
MG_EXPORT BOOL GUIAPI ClipRgnIntersect(PCLIPRGN pRstRgn, const CLIPRGN *pRgn1, const CLIPRGN *pRgn2)
Intersects two region.
MG_EXPORT Uchar32 GUIAPI UCharToLower(Uchar32 uc)
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 void Pixel2RGBA(HDC hdc, gal_pixel pixel, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
Get the color in RGBA quarter from a pixel value under a DC.
static HDC GUIAPI CreateMemDC(int width, int height, int depth, DWORD flags, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
Creates a memory DC.
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 int GUIAPI LoadBitmapFromFile(HDC hdc, PBITMAP pBitmap, const char *spFileName)
Load a device-dependent bitmap from a file.
static gal_pixel RGB2Pixel(HDC hdc, Uint8 r, Uint8 g, Uint8 b)
Get the pixel value from a color in RGB triple under a DC.
#define NULL
A value indicates null pointer.
MG_EXPORT LAYOUTLINE *GUIAPI LayoutNextLine(LAYOUT *layout, LAYOUTLINE *prev_line, int max_extent, BOOL last_line, CB_GLYPH_LAID_OUT cb_laid_out, GHANDLE ctxt)
Layout the next line of a paragraph according to the layout information.
MG_EXPORT HDC GUIAPI CreatePrivateDC(HWND hwnd)
Creates a private window DC of a window.
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 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.
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
static ScriptType GUIAPI ScriptTypeFromISO15924Code(const char *iso15924)
static 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 void GUIAPI SetPenDashes(HDC hdc, int dash_offset, const unsigned char *dash_list, int n)
Set the way dashed-lines are drawn.
static void OffsetRect(RECT *prc, int x, int y)
Moves a rectangle by offsets.
long fixed
Data type of fixed point.
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 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 int GUIAPI AChars2UChars(LOGFONT *logfont, const Achar32 *chs, Uchar32 *ucs, int n)
Convert an Achar32 array to Unicode character array.
MG_EXPORT HDC GUIAPI CreatePrivateClientDC(HWND hwnd)
Creates a private client DC of a window.
MG_EXPORT int GUIAPI GetGlyphInfo(LOGFONT *logfont, Glyph32 glyph_value, GLYPHINFO *glyph_info)
Retrieve the information of a glyph.
MG_EXPORT BOOL GUIAPI AddClipRect(PCLIPRGN pRgn, const RECT *pRect)
Unions one rectangle to a region.
@ SCALING_FILTER_BILINEAR
GHANDLE HWND
Handle to main window or control.
MG_EXPORT void DestroyBlockDataHeap(PBLOCKHEAP heap)
Destroys a private block data heap.
MG_EXPORT int GUIAPI BIDIGetTextVisualAChars(LOGFONT *log_font, const char *text, int text_len, Achar32 **achars, ACHARMAPINFO **achars_map)
Get visual achars and glyph_map info relative with logical string byte index.
static HDC GUIAPI GetClientDC(HWND hWnd)
Get a client DC of a window.
MG_EXPORT int GUIAPI GetTabbedTextExtent(HDC hdc, const char *spText, int len, SIZE *pSize)
Computes the output extent of a formatted text.
struct _GLYPHEXTINFO GLYPHEXTINFO
MG_EXPORT BOOL GUIAPI IsCompatibleDC(HDC hdc1, HDC hdc2)
Check whether a given DC is compliant to a specific DC.
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 BOOL GUIAPI RestoreDC(HDC hdc, int saved_dc)
Restores a device context (DC) to the specified state.
GHANDLE HDC
Handle to device context.
MG_EXPORT BOOL GUIAPI SaveMainWindowContent(HWND hWnd, const char *filename)
Saves content of a main window to a file.
MG_EXPORT BOOL GUIAPI SetPalette(HDC hdc, int start, int len, GAL_Color *cmap)
Set palette entries of a DC.
MG_EXPORT int GUIAPI GetFontHeight(HDC hdc)
Retrieve the height of the current logical font in a DC.
MG_EXPORT Uint32 GUIAPI GetDCAttr(HDC hdc, int attr)
Get a specified attribute value of a DC.
MG_EXPORT void GUIAPI GetDCLCS(HDC hdc, int which, POINT *pt)
Retrieve mapping parameters of a device context.
MG_EXPORT void GUIAPI Circle(HDC hdc, int sx, int sy, int r)
Draws a circle.
static gal_pixel GUIAPI GetPixelInBitmap(const BITMAP *bmp, int x, int y)
Returns the pixel value in a BITMAP object.
MG_EXPORT HDC GUIAPI GetDCEx(HWND hWnd, BOOL bClient)
Get a window or client DC of a window.
MG_EXPORT UCharGeneralCategory GUIAPI UCharGetCategory(Uchar32 uc)
Get the general category of a Unicode character.
MG_EXPORT int GUIAPI CalcLayoutBoundingRect(LAYOUT *layout, int max_line_extent, int max_height, int line_height, int x, int y, RECT *bounding)
Calculate the bounding rectangle of a layout.
MG_EXPORT int GUIAPI GetUCharsUntilParagraphBoundary(LOGFONT *logfont, const char *mstr, int mstr_len, Uint8 wsr, Uchar32 **uchars, int *nr_uchars)
Convert a multi-byte character string to a Unicode character (Uchar32) string until the end of text (...
MG_EXPORT Uint32 GUIAPI GetGDCapability(HDC hdc, int iItem)
Returns a capability of a DC.
MG_EXPORT PCLIPRGN GUIAPI CreateClipRgn(void)
Creates a clipping region.
MG_EXPORT void GUIAPI SetPixel(HDC hdc, int x, int y, gal_pixel pixel)
Set the pixel with a new pixel value at the specified position on a DC.
MG_EXPORT int GUIAPI GetMaxFontWidth(HDC hdc)
Retrieve the maximal character width of the current logical font in a DC.
MG_EXPORT void GUIAPI DestroyLogFont(PLOGFONT log_font)
Destroys a logical font.
MG_EXPORT int GUIAPI SaveDC(HDC hdc)
Saves the current state of a device context.
MG_EXPORT BOOL GUIAPI InitBasicShapingEngine(TEXTRUNS *truns)
Initialize the base shaping engine for a TEXTRUNS object.
MG_EXPORT void GUIAPI LineTo(HDC hdc, int x, int y)
Draws a zero line to a position.
MG_EXPORT BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
Get bidi type of a Unicode character.
MG_EXPORT void GUIAPI InitClipRgn(PCLIPRGN pRgn, PBLOCKHEAP pFreeList)
Initializes a clipping region.
MG_EXPORT BOOL GUIAPI UnionRect(RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
Unions two source rectangles.
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 BOOL GUIAPI IsUCharAlnum(Uchar32 uc)
MG_EXPORT BOOL GUIAPI SetTextColorInTextRuns(TEXTRUNS *truns, int start_index, int length, RGBCOLOR color)
Set text color in a TEXTRUNS object.
MG_EXPORT BOOL GUIAPI PtInRegion(const PCLIPRGN region, int x, int y)
Determine whether a point is in a region.
MG_EXPORT BOOL GUIAPI IsScreenDC(HDC hdc)
Check whether a given DC is a screen DC.
MG_EXPORT ScriptType GUIAPI NormalizeScriptType(LanguageCode cl, ScriptType ws)
This file includes functions for reading and writing data from general sources, such as file,...
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.
MG_EXPORT BOOL GUIAPI IsUCharAlpha(Uchar32 uc)
MG_EXPORT BOOL GUIAPI SyncUpdateSurface(HWND hwnd)
Synchronize the update rectangles of the backing surface of a window to screen.
MG_EXPORT void GUIAPI PolyArcEx(HDC hdc, const ARC *arcs, int nr_arcs)
Draws a polyarc with the current pen in a DC.
MG_EXPORT BOOL GUIAPI SyncUpdateDC(HDC hdc)
Synchronize the update rectangles of the surface corresponding to a DC to screen.
MG_EXPORT void GUIAPI RGBA2Pixels(HDC hdc, const RGB *rgbs, gal_pixel *pixels, int count)
Get the pixel values from a color array in RGBA quarter under a DC.
MG_EXPORT void GUIAPI SetBrushOrigin(HDC hdc, int x, int y)
Set the origin when using tiles or stipples with the DC.
MG_EXPORT HPALETTE GUIAPI CreatePalette(GAL_Palette *pal)
Creates a logical palette.
MG_EXPORT BOOL GUIAPI XorRegion(CLIPRGN *dst, const CLIPRGN *src1, const CLIPRGN *src2)
Does the XOR operation between two regions.
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 InitCircleRegion(PCLIPRGN dst, int x, int y, int r)
Initializes a region to be an enclosed circle.
MG_EXPORT BOOL GUIAPI IsMemDC(HDC hdc)
Check whether a given DC is a memory DC.
MG_EXPORT int GUIAPI LoadMyBitmapEx(PMYBITMAP my_bmp, RGB *pal, MG_RWops *area, const char *ext)
Load a MYBITMAP object from a data source.
MG_EXPORT GHANDLE GetVideoHandle(HDC hdc)
#define GetBValue(rgba)
Get the blue component from a RGBA quadruple value rgba.
MG_EXPORT BOOL GUIAPI SetColorfulPalette(HDC hdc)
Set a DC with colorful palette.
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 void GUIAPI SPtoLP(HDC hdc, POINT *pPt)
Converts screen coordinates into logical coordinates.
MG_EXPORT LAYOUT *GUIAPI CreateLayout(const TEXTRUNS *truns, Uint32 render_flags, const BreakOppo *break_oppos, BOOL persist_lines, int max_line_extent, int indent, int letter_spacing, int word_spacing, int tab_size, int *tabs, int nr_tabs)
Create layout information structure for laying out a paragraph.
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 void GUIAPI UnloadMyBitmap(PMYBITMAP my_bmp)
Unloads a bitmap.
PVOID GHANDLE
General handle.
unsigned int UINT
A type definition for unsigned integer.
MG_EXPORT int GUIAPI GetSysCharHeight(void)
Get the height of a character of the default system font.
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
MG_EXPORT int GUIAPI GetTextExtent(HDC hdc, const char *spText, int len, SIZE *pSize)
Computes the output extent of a string of text.
MG_EXPORT HDC GUIAPI GetEffectiveCDC(HWND hwnd)
Get the effective client DC of a window.
static gal_pixel RGBA2Pixel(HDC hdc, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Get the pixel value from a color in RGBA quarter under a DC.
MG_EXPORT BOOL GUIAPI IsUCharSpace(Uchar32 uc)
MG_EXPORT void GUIAPI LPtoDP(HDC hdc, POINT *pPt)
Converts logical coordinates into device coordinates.
MG_EXPORT HDC GUIAPI GetPrivateClientDC(HWND hwnd)
Returns the private client DC of a window.
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 HICON GUIAPI LoadIconFromFile(HDC hdc, const char *filename, int which)
Load an icon from a Windows ICO file.
MG_EXPORT BOOL GUIAPI SubtractClipRect(PCLIPRGN pRgn, const RECT *pRect)
Subtracts a rectangle from a region.
MG_EXPORT void GUIAPI DestroyBMPFont(DEVFONT *dev_font)
Destroy the bitmap device font.
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 BOOL GUIAPI UCharCompose(Uchar32 a, Uchar32 b, Uchar32 *ch)
MG_EXPORT BOOL GUIAPI SetClipRgn(PCLIPRGN pRgn, const RECT *pRect)
Set a region to contain only one rect.
MG_EXPORT BidiJoiningType GUIAPI UCharGetJoiningType(Uchar32 uc)
Get character joining type.
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.
MG_EXPORT void GUIAPI RotateBitmapHFlip(HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
Flips horizontally and rotates a bitmap object.
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 int GUIAPI LoadMyBitmapSL(MG_RWops *area, void *load_info, MYBITMAP *my_bmp, CB_ONE_SCANLINE cb, void *context)
Load MYBITMAP scanlines from a data source one by one.
const MG_EXPORT char *GUIAPI GetSysCharset(BOOL wchar)
Get the current system charset.
static HDC InitSlaveScreen(const char *name, const char *mode)
Initializes slave screen.
@ COLOR_BLEND_SP_COLOR_DODGE
MG_EXPORT void GUIAPI DeleteSecondaryDC(HWND hwnd)
Deletes the secondary DC of the window.
MG_EXPORT int GUIAPI PaintImageFromMem(HDC hdc, int x, int y, const void *mem, size_t size, const char *ext)
Paints an image from memory on device directly.
MG_EXPORT void BlockDataFree(PBLOCKHEAP heap, void *data)
Frees an allocated data block.
MG_EXPORT HICON GUIAPI LoadBitmapIconFromMem(HDC hdc, const void *mem, size_t size, const char *ext)
Load an icon from memory.
MG_EXPORT void GUIAPI FillBox(HDC hdc, int x, int y, int w, int h)
Fills a rectangle box.
MG_EXPORT BOOL GUIAPI SetMemDCAlpha(HDC mem_dc, DWORD flags, Uint8 alpha)
Set the alpha value for the entire surface of a DC, as opposed to using the alpha component of each p...
@ COLOR_BLEND_SP_SOFT_LIGHT
static BOOL GUIAPI InitVectorialFonts(void)
Initializes vectorial font renderer.
MG_EXPORT int GUIAPI GetPaletteEntries(HPALETTE hpal, int start, int len, GAL_Color *cmap)
Get palette entries of a logical palette.
MG_EXPORT int GUIAPI SetPaletteEntries(HPALETTE hpal, int start, int len, GAL_Color *cmap)
Set palette entries of a logical palette.
MG_EXPORT ScriptType GUIAPI UCharGetScriptType(Uchar32 ch)
MG_EXPORT RGBCOLOR GUIAPI GetBackgroundColorInTextRuns(const TEXTRUNS *truns, int index)
MG_EXPORT int GUIAPI PaintImageFromFile(HDC hdc, int x, int y, const char *spFileName)
Paints an image from file on device directly.
#define FALSE
FALSE value, defined as 0 by MiniGUI.
MG_EXPORT gal_pixel GUIAPI SetPixelRGBA(HDC hdc, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Set the pixel by a RGBA quarter at the specified position on a DC.
MG_EXPORT BOOL GUIAPI IsWindowDC(HDC hdc)
Check whether a given DC is a window DC.
MG_EXPORT int GUIAPI LoadMyBitmapFromMem(PMYBITMAP my_bmp, RGB *pal, const void *mem, size_t size, const char *ext)
Load a MYBITMAP object from memory.
MG_EXPORT UINT GUIAPI GetNearestPaletteIndex(HPALETTE hpal, Uint8 red, Uint8 green, Uint8 blue)
Get the nearest palette index in the logical palette for a spefici color.
MG_EXPORT HDC GUIAPI GetSecondaryDC(HWND hwnd)
Retrieve and return the secondary DC of a specific window.
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.
unsigned short Uint16
A type definition for a 16-bit unsigned integer.
#define GetGValue(rgba)
Get the green component from a RGBA quadruple value rgba.
MG_EXPORT int GUIAPI GetTextMCharInfo(PLOGFONT log_font, const char *mstr, int len, int *pos_chars)
Retrieve positions of multi-byte characters in a string.
static void Pixel2RGB(HDC hdc, gal_pixel pixel, Uint8 *r, Uint8 *g, Uint8 *b)
Get the color in RGB triple from a pixel value under a DC.
MG_EXPORT BOOL GUIAPI IsRectEmpty(const RECT *prc)
Determine whether an rectangle is empty.
@ COLOR_BLEND_SP_EXCLUSION
MG_EXPORT void GUIAPI UCharCanonicalOrdering(Uchar32 *string, int len)
MG_EXPORT BOOL GUIAPI SubtractRegion(CLIPRGN *rgnD, const CLIPRGN *rgnM, const CLIPRGN *rgnS)
Substrcts a region from another.
MG_EXPORT int GUIAPI BIDIGetTextLogicalAChars(LOGFONT *log_font, const char *text, int text_len, Achar32 **achars, ACHARMAPINFO **achars_map)
Get logical achars string of the text.
static void InflateRect(RECT *prc, int cx, int cy)
Increases or decreases the width and height of an rectangle.
MG_EXPORT void GUIAPI GetFontMetrics(LOGFONT *log_font, FONTMETRICS *font_metrics)
Get metrics information of a logical font.
signed char Sint8
A type definition for an 8-bit signed character.
BOOL(* CB_ALLOC_BITMAP_BUFF)(void *context, BITMAP *bmp)
The type of callback to allocate pixel buffer for BITMAP object.
GHANDLE HICON
Handle to icon.
void(* CB_ELLIPSE)(void *context, int x1, int x2, int y)
The type of ellipse generator callback.
MG_EXPORT BOOL GUIAPI SaveScreenRectContent(const RECT *rcWin, const char *filename)
Saves content of a rectangle in the screen to a file.
MG_EXPORT HDC GUIAPI CreateMemDCFromBitmap(HDC hdc, const BITMAP *bmp)
Creates a memory DC from a reference DC and a BITMAP object.
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.
HDC GUIAPI CreatePrivateSubDC(HDC hdc, int off_x, int off_y, int width, int height)
Creates a private SubDC of a window.
MG_EXPORT Uchar32 GUIAPI UCharToFullSizeKana(Uchar32 uc)
MG_EXPORT int GUIAPI GetClipRegion(HDC hdc, CLIPRGN *cliprgn)
Get the current clipping region of a DC.
MG_EXPORT BOOL GUIAPI GetBitmapFromDC(HDC hdc, int x, int y, int w, int h, BITMAP *bmp)
Get image box on a DC and saves it into a BITMAP object.
MG_EXPORT void GUIAPI GetLastTextOutPos(HDC hdc, POINT *pt)
Retrieve the last text output position.
struct _DrmSurfaceInfo DrmSurfaceInfo
MG_EXPORT HICON GUIAPI LoadBitmapIconFromFile(HDC hdc, const char *file_name)
Load an icon from a bitmap file.
MG_EXPORT PLOGFONT GUIAPI CreateLogFontForMChar2UChar(const char *charset)
Create a logical font for conversion from multi-byte character string to Uchar32 string.
MG_EXPORT BOOL GUIAPI DestroyIcon(HICON hicon)
Destroys an icon object.
const typedef LOGFONT * CPLOGFONT
Data type of pointer to a LOGFONT.
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 void GUIAPI UStrGetBidiTypes(const Uchar32 *ucs, int nr_ucs, BidiType *bdts)
Get bidi types for an string of Unicode characters.
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.
MG_EXPORT HWND GUIAPI WindowFromDC(HDC hdc)
Get the window handle from DC.
void(* CB_ARC)(void *context, int x, int y)
The type of arc generator callback.
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.
struct _CLIPRECT CLIPRECT
unsigned char Uint8
A type definition for an 8-bit unsigned character.
MG_EXPORT BOOL GUIAPI IsUCharControl(Uchar32 uc)
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 GetGlyphsExtent(HDC hdc, Glyph32 *glyphs, int nr_glyphs, SIZE *size)
Get visual extent value of a glyph string.
MG_EXPORT BOOL GUIAPI GetLayoutLineSize(const LAYOUTLINE *line, SIZE *line_size)
Get the size of a layout line.
MG_EXPORT void GUIAPI FocusRect(HDC hdc, int x0, int y0, int x1, int y1)
Draws a focus rectangle.
MG_EXPORT BOOL GUIAPI InitPolygonRegion(PCLIPRGN dst, const POINT *pts, int vertices)
Initializes a region to be an enclosed polygon.
MG_EXPORT void GUIAPI ExcludeClipRect(HDC hdc, const RECT *prc)
Excludes the specified rectangle from the current visible region of a DC.
MG_EXPORT BOOL GUIAPI ResizePalette(HPALETTE hpal, int len)
Resizes a logical palette.
MG_EXPORT void GUIAPI CircleGenerator(void *context, int sx, int sy, int r, CB_CIRCLE cb)
A circle generator.
@ COLOR_BLEND_PD_DST_ATOP
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 BidiType GUIAPI UBidiGetParagraphDir(const BidiType *bidi_types, int len)
Get the base paragraph direction.
int BOOL
A type definition for boolean value.
@ COLOR_BLEND_SP_COLOR_BURN
DWORD32 RGBCOLOR
A type definition for a RGB color value.
MG_EXPORT DEVFONT *GUIAPI LoadDevFontFromFile(const char *devfont_name, const char *file_name)
Load device font 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 int GUIAPI GetRasterOperation(HDC hdc)
Get the raster operation of a DC.
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.
static void GUIAPI ReleaseSecondaryDC(HWND hwnd, HDC hdc)
Release the DC returned by GetSecondaryClientDC.
MG_EXPORT void GUIAPI UBidiJoinArabic(const BidiType *bidi_types, const BidiLevel *embedding_levels, int len, BidiArabicProp *ar_props)
Do Arabic joining.
MG_EXPORT BOOL GUIAPI GetIconSize(HICON hicon, int *w, int *h)
Get the size of an icon object.
MG_EXPORT void GUIAPI UStrGetBracketTypes(const Uchar32 *ucs, const BidiType *bidi_types, int len_ucs, BidiBracketType *bracket_types)
Get bracketed characters of a Uchar32 string.
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 Uchar32 GUIAPI UCharToFullWidth(Uchar32 uc)
MG_EXPORT HDC GUIAPI CreateMemDCFromMyBitmap(const MYBITMAP *my_bmp, const RGB *pal)
Creates a memory DC from a device independent MYBITMAP object.
static LanguageCode GUIAPI LanguageCodeFromISO639s1Code(const char *iso639_1)
Get MiniGUI language code from an ISO639-1 language code string.
MG_EXPORT int GUIAPI GetSysFontMaxWidth(int font_id)
Get the maximal width of a single-byte character of a system font.
struct _ACHARMAPINFO ACHARMAPINFO
Data type of struct _ACHARMAPINFO.
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 IsUCharGraph(Uchar32 uc)
MG_EXPORT BOOL GUIAPI UChar2AChar(LOGFONT *logfont, Uchar32 uc, Achar32 *ac)
Get the LOGFONT Achar32 value from a Unicode character value.
MG_EXPORT void GUIAPI DPtoLP(HDC hdc, POINT *pPt)
Converts device coordinates into logical coordinates.
MG_EXPORT int GUIAPI UChars2AChars(LOGFONT *logfont, const Uchar32 *ucs, Achar32 *acs, int n)
Convert an Uchar32 array to Unicode character array.
void(* CB_CIRCLE)(void *context, int x1, int x2, int y)
The type of circle generator callback.
MG_EXPORT gal_pixel GUIAPI GetPixelRGB(HDC hdc, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b)
Get the pixel value at the specified position on a DC in RGB triple.
static void SetRect(RECT *prc, int left, int top, int right, int bottom)
Set a rectangle.
MG_EXPORT void GUIAPI DeleteBitmapAlphaPixel(PBITMAP bmp)
Deletes the bitmap alpha pixel format information of a BITMAP object.
MG_EXPORT BOOL GUIAPI BIDILogAChars2VisACharsEx(LOGFONT *log_font, Achar32 *achars, int nr_achars, int pel, void *extra, CB_REVERSE_ARRAY cb_reverse_extra)
Reorder the specified logical glyph string in visual order and reorder an extra array to reflect the ...
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 mlsEnableSlaveScreen(HDC dc_mls, BOOL enable)
Enable or Disable a MLShadow slave screen.
MG_EXPORT int GUIAPI SubtractRect(RECT *rc, const RECT *psrc1, const RECT *psrc2)
Obtains the rectangles when substracting one rectangle from another.
static PLOGFONT GUIAPI GetSystemFont(int font_id)
Get the system logical font through an font identifier.
MG_EXPORT void GUIAPI IncludeClipRect(HDC hdc, const RECT *prc)
Includes the specified rectangle to the current visible region of a DC.
MG_EXPORT void GUIAPI GetClipRgnBoundRect(PCLIPRGN pRgn, PRECT pRect)
Get the bounding rectangle of a region.
MG_EXPORT BOOL GUIAPI IntersectClipRect(PCLIPRGN pRgn, const RECT *pRect)
Intersects a rectangle with a region.
MG_EXPORT BOOL GUIAPI InitBitmapPixelFormat(HDC hdc, PBITMAP bmp)
Initializes the bitmap pixel format information of a BITMAP object.
MG_EXPORT void GUIAPI CircleArc(HDC hdc, int sx, int sy, int r, int ang1, int ang2)
Draws an arc.
MG_EXPORT void GUIAPI RGB2Pixels(HDC hdc, const RGB *rgbs, gal_pixel *pixels, int count)
Get the pixel values from a color array in RGB triple under a DC.
MG_EXPORT BOOL GUIAPI SetBackgroundColorInTextRuns(TEXTRUNS *truns, int start_index, int length, RGBCOLOR color)
Set background color in a TEXTRUNS object.
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.
MG_EXPORT void GUIAPI Ellipse(HDC hdc, int sx, int sy, int rx, int ry)
Draws a ellipse.
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 SelectPalette(HDC hdc, HPALETTE hpal, BOOL reserved)
Selects a palette for a DC.
MG_EXPORT LanguageCode GUIAPI GetSampleLanguageForScript(ScriptType st)
MG_EXPORT HDC GUIAPI GetDCInSecondarySurface(HWND hWnd, BOOL bClient)
Get a window or client DC by using the secondary surface if possible.
LOGFONT * PLOGFONT
Data type of pointer to a LOGFONT.
MG_EXPORT void GUIAPI UBidiShapeMirroring(const BidiLevel *embedding_levels, int len, Uchar32 *ucs)
Do mirroring shaping.
MG_EXPORT gal_pixel SysPixelIndex[]
The pre-defined system pixel values.
MG_EXPORT void GUIAPI EmptyClipRgn(PCLIPRGN pRgn)
Empties a clipping region.
MG_EXPORT void GUIAPI DestroyClipRgn(PCLIPRGN pRgn)
Empties and destroys a clipping region.
BOOL(* CB_EQUAL_PIXEL)(void *context, int x, int y)
Flodd filling generator's equation 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 Uint32 GUIAPI ScriptTypeToISO15924(ScriptType script)
@ COLOR_BLEND_NS_SATURATION
MG_EXPORT void GUIAPI PolyLineTo(HDC hdc, const POINT *pts, int vertices)
Draws a polyline.
MG_EXPORT BidiLevel GUIAPI UBidiGetParagraphEmbeddingLevelsAlt(const Uchar32 *ucs, int nr_ucs, ParagraphDir *paragraph_dir, BidiLevel *embedding_levels)
An alternative of UBidiGetParagraphEmbeddingLevels().
MG_EXPORT void GUIAPI SetBrushInfo(HDC hdc, const BITMAP *tile, const STIPPLE *stipple)
Set the tile or stipple with the DC.
MG_EXPORT int GUIAPI DrawGlyph(HDC hdc, int x, int y, Glyph32 glyph_value, int *adv_x, int *adv_y)
Draw a glyph.
void(* CB_POLYGON)(void *context, int x1, int x2, int y)
The type of polygon generator callback.
struct _BLOCKHEAP BLOCKHEAP
MG_EXPORT void GUIAPI DeletePrivateDC(HDC hdc)
Deletes the DC returned by CreatePrivateDC or CreatePrivateClientDC or CreatePrivateSubDC.
MG_EXPORT void GUIAPI Pixel2RGBs(HDC hdc, const gal_pixel *pixels, RGB *rgbs, int count)
Get the colors in RGB triple from a pixel value array under a DC.
@ COLOR_BLEND_PD_SRC_OVER
MG_EXPORT BOOL GUIAPI DestroyLayout(LAYOUT *layout)
Destroy the specified layout information structure.
MG_EXPORT BOOL GUIAPI IsCovered(const RECT *prc1, const RECT *prc2)
Determine whether one rectangle is covered by another.
MG_EXPORT void GUIAPI TerminateSlaveScreen(HDC hdc)
Terminates slave screen.
MG_EXPORT int DrawLayoutLine(HDC hdc, const LAYOUTLINE *line, int x, int y)
Draw a laid out line at the specific position.
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 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 int GUIAPI GetSysFontAveWidth(int font_id)
Get the average width of a single-byte character of a system font.
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 GetLogFontInfo(HDC hdc, LOGFONT *log_font)
Get logical font information of a DC.
MG_EXPORT void GUIAPI SelectClipRect(HDC hdc, const RECT *prc)
Set the visible region of a DC to be a rectangle.
MG_EXPORT gal_pixel GUIAPI GetPixel(HDC hdc, int x, int y)
Get the pixel value at the specified position on a DC.
MG_EXPORT int GUIAPI GetGlyphsExtentFromUChars(LOGFONT *logfont_upright, const Achar32 *uchars, int nr_uchars, const BreakOppo *break_oppos, Uint32 render_flags, int x, int y, int letter_spacing, int word_spacing, int tab_size, int max_extent, SIZE *line_size, Glyph32 *glyphs, GLYPHEXTINFO *glyph_ext_info, GLYPHPOS *glyph_pos, LOGFONT **logfont_sideways)
Get the visual extent info of all glyphs fitting in the specified maximal output extent.
MG_EXPORT ScriptType GUIAPI ScriptTypeFromISO15924(Uint32 iso15924)
Get the ScriptType value from an encoded ISO15924 script code.
MG_EXPORT void GUIAPI PolyFillArcEx(HDC hdc, const ARC *arcs, int nr_arcs)
Fill a polyarc with the current brush in a DC.
@ COLOR_BLEND_SP_MULTIPLY
MG_EXPORT RGBCOLOR GUIAPI GetTextColorInTextRuns(const TEXTRUNS *truns, int index)
MG_EXPORT void GUIAPI EllipseGenerator(void *context, int sx, int sy, int rx, int ry, CB_ELLIPSE cb)
An ellipse generator.
MG_EXPORT UCharBreakType GUIAPI UCharGetBreakType(Uchar32 uc)
Get the break property of a Unicode character.
void(* CB_FLOOD_FILL)(void *context, int x1, int x2, int y)
Flodd filling generator's scan line callback.
MG_EXPORT int GUIAPI SaveMyBitmapToFile(PMYBITMAP my_bmp, RGB *pal, const char *spFileName)
Saves a MYBITMAP object to a bitmap file.
MG_EXPORT BOOL GUIAPI MonotoneVerticalPolygonGenerator(void *context, const POINT *pts, int vertices, CB_POLYGON cb)
A monotone vertical polygon generator.
MG_EXPORT void GUIAPI ReleaseDC(HDC hdc)
Releases a DC from DC pool.
MG_EXPORT PLOGFONT GUIAPI SelectFont(HDC hdc, PLOGFONT log_font)
Selects a logical font into a DC.
@ COLOR_BLEND_SP_HARD_LIGHT
const MG_EXPORT DEVFONT *GUIAPI GetNextDevFont(const DEVFONT *dev_font)
Get next devfont information.
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 int GUIAPI GetFirstMCharLen(PLOGFONT log_font, const char *mstr, int len)
Retrieve the length of the first multi-byte character in a string.
MG_EXPORT int drmGetDeviceFD(GHANDLE video)
struct _GLYPHINFO GLYPHINFO
Data type of struct _GLYPHINFO.
MG_EXPORT int GUIAPI SetBitmapScalerType(HDC hdc, int scaler_type)
Set bitmap scaler algorithm callback of DC according by scaler_type.
struct _FONTMETRICS FONTMETRICS
MG_EXPORT void GUIAPI SetDCLCS(HDC hdc, int which, const POINT *pt)
Set mapping parameters of a device context.
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.
MG_EXPORT void GUIAPI FillEllipse(HDC hdc, int sx, int sy, int rx, int ry)
Fills an ellipse.
MG_EXPORT BOOL GUIAPI UCharDecompose(Uchar32 ch, Uchar32 *a, Uchar32 *b)
MG_EXPORT void GUIAPI Rectangle(HDC hdc, int x0, int y0, int x1, int y1)
Draws a rectangle.
MG_EXPORT int GUIAPI GetPalette(HDC hdc, int start, int len, GAL_Color *cmap)
Get palette entries of a DC.
MG_EXPORT BOOL GUIAPI IsUCharPunct(Uchar32 uc)
MG_EXPORT Glyph32 GUIAPI GetGlyphValueAlt(LOGFONT *logfont, Achar32 chv)
Get the LOGFONT glyph value of an abstract character.
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 TextOutLen(HDC hdc, int x, int y, const char *spText, int len)
Outputs a string of text.
MG_EXPORT int GUIAPI GetGlyphsExtentPoint(HDC hdc, Glyph32 *glyphs, int nr_glyphs, int max_extent, SIZE *size)
Get the visual extent value of an glyph string.
@ COLOR_BLEND_NS_LUMINOSITY
MG_EXPORT Achar32 GUIAPI GetACharValue(LOGFONT *logfont, const char *mchar, int mchar_len, const char *pre_mchar, int pre_len)
Get the character value of a multi-byte character.
MG_EXPORT void GUIAPI DrawIcon(HDC hdc, int x, int y, int w, int h, HICON hicon)
Draws an icon into a box.
const MG_EXPORT RGB SysPixelColor[]
The pre-defined system RGB colors.
MG_EXPORT int GUIAPI SetBitmapKeyColor(HDC hdc, PBITMAP bmp, Uint8 r, Uint8 g, Uint8 b)
Set the bitmap color key.
MG_EXPORT int GUIAPI UStrGetBreaks(LanguageCode lang_code, Uint8 ctr, Uint8 wbr, Uint8 lbp, Uchar32 *ucs, int nr_ucs, BreakOppo **break_oppos)
Calculate the breaking opportunities of a Uchar32 string under the specified rules and line breaking ...
MG_EXPORT void GUIAPI UnlockDC(HDC hdc)
Unlocks a locked DC.
MG_EXPORT BOOL GUIAPI DestroyTextRuns(TEXTRUNS *truns)
Destroy the glyph run info object. It also frees all data allocated for shapping and layouting the gl...
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 BOOL GUIAPI RectInRegion(const PCLIPRGN region, const RECT *rect)
Determine whether a rectangle is intersected with a region.
MG_EXPORT BOOL GUIAPI GetMirrorAChar(LOGFONT *logfont, Achar32 chv, Achar32 *mirrored)
Get the mirrored abstract character if possible.
@ COLOR_BLEND_PD_DST_OVER
MG_EXPORT BOOL GUIAPI ft2SetLcdFilter(LOGFONT *logfont, FT2LCDFilter filter)
Set freetype2 smooth mode.
MG_EXPORT int GUIAPI GetACharsExtentPoint(HDC hdc, Achar32 *achars, int nr_achars, int max_extent, SIZE *size)
Get the visual extent value of an achar string.
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.
@ SCALING_FILTER_CONVOLUTION
MG_EXPORT Achar32 *GUIAPI BIDILogAChars2VisAChars(LOGFONT *log_font, Achar32 *achars, int nr_achars, ACHARMAPINFO *achars_map)
Reorder the specified logical glyph string in visual order and reorder glyph map if specified.
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.
MG_EXPORT void GUIAPI Pixel2RGBAs(HDC hdc, const gal_pixel *pixels, RGB *rgbs, int count)
Get the colors in RGBA quarter from a array of pixel values under a DC.
MG_EXPORT HDC drmCreateDCFromHandleEx(GHANDLE video, uint32_t handle, size_t size, uint32_t drm_format, off_t offset, uint32_t width, uint32_t height, uint32_t pitch)
MG_EXPORT Uchar32 GUIAPI UCharToSingleWidth(Uchar32 uc)
MG_EXPORT void GUIAPI UStrGetJoiningTypes(const Uchar32 *ucs, int nr_ucs, BidiJoiningType *joining_types)
Get joining types for a string of Unicode characters.
MG_EXPORT void GUIAPI PolyLineEx(HDC hdc, const POINT *pts, int nr_pts)
Draws a polyline with the current pen in a DC.
MG_EXPORT Uchar32 GUIAPI UCharToSmallKana(Uchar32 uc)
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 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 BOOL GUIAPI PolygonGeneratorEx(void *context, const POINT *pts, int vertices, CB_POLYGON cb, RECT *rc_output)
A general polygon generator.
MG_EXPORT BOOL GUIAPI IntersectRect(RECT *pdrc, const RECT *psrc1, const RECT *psrc2)
Calculates the intersection of two rectangles.
struct _GLYPHBITMAP GLYPHBITMAP
MG_EXPORT HPALETTE GUIAPI GetDefaultPalette(void)
Get the system default logical palette.
static void GUIAPI TermVectorialFonts(void)
Terminates vectorial font renderer.
MG_EXPORT BOOL GUIAPI EqualRect(const RECT *prc1, const RECT *prc2)
Determine whether two rectangles are equal.
MG_EXPORT int GUIAPI GetSysCharWidth(void)
Get the width of a single-byte character of the default system font.
MG_EXPORT void GUIAPI MoveTo(HDC hdc, int x, int y)
Moves the current zero pen position.
MG_EXPORT int GUIAPI GetSysCCharWidth(void)
Get the width of a multi-byte character of the default system font.
MG_EXPORT BOOL GUIAPI IsUCharTitle(Uchar32 uc)
This file includes macro definitions and typedefs that commonly used by MiniGUI.
MG_EXPORT HDC drmCreateDCFromPrimeFdEx(GHANDLE video, int prime_fd, size_t size, uint32_t drm_format, off_t offset, uint32_t width, uint32_t height, uint32_t pitch)
MG_EXPORT void GUIAPI DestroyPalette(HPALETTE hpal)
Destroy a logical palette.
MG_EXPORT BOOL GUIAPI InitComplexShapingEngine(TEXTRUNS *truns)
Initialize the complex shaping engine for a TEXTRUNS object.
MG_EXPORT PLOGFONT GUIAPI CreateLogFontByName(const char *font_name)
Creates a logical font by a font name.
MG_EXPORT BidiBracketType GUIAPI UCharGetBracketType(Uchar32 ch)
Get bracketed character.
MG_EXPORT void GUIAPI GetBoundsRect(HDC hdc, RECT *pRect)
Retrieve the bounding rectangle of the current visible region of a DC.
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...
MG_EXPORT BOOL GUIAPI RectVisible(HDC hdc, const RECT *pRect)
Check whether the specified rectangle is visible.
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 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 SetFontNameInTextRuns(TEXTRUNS *truns, int start_index, int length, const char *logfont_name)
Set logfont name of text runs.
MG_EXPORT void GUIAPI SelectClipRegion(HDC hdc, const CLIPRGN *pRgn)
Set the visible region of a DC to be a region.
MG_EXPORT BOOL GUIAPI IsUCharWideCJK(Uchar32 uc)
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.
#define GetRValue(rgba)
Get the red component from a RGBA quadruple value rgba.
MG_EXPORT int GUIAPI StretchPaintImageFromMem(HDC hdc, int x, int y, int w, int h, const void *mem, size_t size, const char *ext)
Paints an image from memory on device directly.
MG_EXPORT void * BlockDataAlloc(PBLOCKHEAP heap)
Allocates a data block from private heap.
MG_EXPORT int GUIAPI UCharCombiningClass(Uchar32 uc)
MG_EXPORT BOOL GUIAPI IsUCharLowercase(Uchar32 uc)
MG_EXPORT int GUIAPI CleanupMyBitmapSL(MYBITMAP *my_bmp, void *load_info)
Cleanups the scanline loader.
const MG_EXPORT char *GUIAPI LanguageCodeToISO639s1(LanguageCode lc)
MG_EXPORT void GUIAPI GetGlyphBitmap(LOGFONT *log_font, const char *mchar, int mchar_len, GLYPHBITMAP *glyph_bitmap)
Get the glyph bitmap information when uses a logical font to output a multi-byte character.
MG_EXPORT BidiType GUIAPI GetACharBidiType(LOGFONT *log_font, Achar32 chv)
Retrieve the BIDI type of an abstract character.
MG_EXPORT int GUIAPI GetNextUChar(LOGFONT *logfont, const char *mchar, int mchar_len, Uchar32 *uc)
Get the Uchar32 value (Unicode code point) of a multi-byte character in specified LOGFONT object.
#define GetAValue(rgba)
Get the alpha component from a RGBA quadruple value rgba.
MG_EXPORT int GUIAPI LoadBitmapEx2(HDC hdc, PBITMAP pBitmap, MG_RWops *area, const char *ext, CB_ALLOC_BITMAP_BUFF cb_alloc_buff, void *context)
Load a device-dependent bitmap from a general data source.
unsigned int Uint32
A type definition for a 32-bit unsigned integer.
MG_EXPORT BOOL GUIAPI UnionRegion(PCLIPRGN dst, const CLIPRGN *src1, const CLIPRGN *src2)
Unions two regions.
struct _STRETCH_EXTRA_INFO STRETCH_EXTRA_INFO
MG_EXPORT void GUIAPI ClipRectIntersect(HDC hdc, const RECT *prc)
Intersects the specified rectangle with the visible region of the DC.
char name[LEN_UNIDEVFONT_NAME+1]
ACHARSHAPETYPE
Achar32 shape type.
MG_EXPORT BOOL GUIAPI PolygonIsMonotoneVertical(const POINT *pts, int vertices)
Check a polygon is monotone vertical or not.
MG_EXPORT BOOL GUIAPI IsUCharDigit(Uchar32 uc)
MG_EXPORT PLOGFONT GUIAPI CreateLogFontIndirectEx(LOGFONT *logfont, int rotation)
Creates a new logical font indirectly from a LOGFONT structure with a rotation degrees.
struct _MYBITMAP * PMYBITMAP
Data type of pointer to a struct _MYBITMAP.
MG_EXPORT BOOL GUIAPI UCharIsArabicVowel(Uchar32 uc)
@ COLOR_BLEND_SP_DIFFERENCE
MG_EXPORT int GUIAPI GetTextWordInfo(PLOGFONT log_font, const char *mstr, int len, int *pos_words, WORDINFO *info_words)
Retrieve information of multi-byte words in a string.
MG_EXPORT Uint32 GUIAPI SetDCAttr(HDC hdc, int attr, Uint32 value)
Set a specified attribute value of a DC.
MG_EXPORT PLOGFONT GUIAPI CreateLogFontIndirect(LOGFONT *logfont)
Creates a logical font indirectly from a LOGFONT structure.
MG_EXPORT HICON GUIAPI LoadIconFromMem(HDC hdc, const void *area, int which)
Load an icon from a memory area.
MG_EXPORT Uchar32 GUIAPI UCharToTitle(Uchar32 uc)
const unsigned char * bits
static void InflateRectToPt(RECT *prc, int x, int y)
Inflates a rectangle to contain a point.
static BOOL PtInRect(const RECT *prc, int x, int y)
Determine whether a point lies within an rectangle.
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 BOOL GUIAPI ClipRgnCopy(PCLIPRGN pDstRgn, const CLIPRGN *pSrcRgn)
Copies one region to another.
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.
const MG_EXPORT char *GUIAPI GetFontNameInTextRuns(const TEXTRUNS *truns, int index)
MG_EXPORT gal_pixel GUIAPI GetPixelRGBA(HDC hdc, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
Get the pixel value at the specified position on a DC in RGBA quarter.
#define MAKEDWORD32(first, second, third, fourth)
Makes a WORD32 value with four bytes.
MG_EXPORT BOOL GUIAPI IsUCharPrint(Uchar32 uc)
MG_EXPORT int GUIAPI LoadMyBitmapFromFile(PMYBITMAP my_bmp, RGB *pal, const char *file_name)
Load a MYBITMAP object from a file.
MG_EXPORT gal_pixel GUIAPI SetPixelRGB(HDC hdc, int x, int y, Uint8 r, Uint8 g, Uint8 b)
Set the pixel by a RGB triple at the specified position on a DC.
MG_EXPORT RGBCOLOR GUIAPI GetNearestColor(HDC hdc, Uint8 red, Uint8 green, Uint8 blue)
Get the nearest color compliant to a DC for a spefici color.
MG_EXPORT int GUIAPI LoadBitmapFromMem(HDC hdc, PBITMAP pBitmap, const void *mem, size_t size, const char *ext)
Load a device-dependent bitmap from memory.
MG_EXPORT void GUIAPI UBidiShapeArabic(Uint32 shaping_flags, const BidiLevel *embedding_levels, int len, BidiArabicProp *ar_props, Uchar32 *ucs)
Do Arabic shaping.
static BOOL GUIAPI AreRegionsIntersected(const PCLIPRGN s1, const PCLIPRGN s2)
Determine whether two regions are intersected.
MG_EXPORT void GUIAPI GetBoundRect(PRECT pdrc, const RECT *psrc1, const RECT *psrc2)
Get the bound rectangle of two source rectangles.
MG_EXPORT int GUIAPI SaveBitmapToFile(HDC hdc, PBITMAP pBitmap, const char *spFileName)
Saves a BITMAP object to a bitmap file.
MG_EXPORT int GUIAPI TabbedTextOutLen(HDC hdc, int x, int y, const char *spText, int len)
Outputs a formatted text.
MG_EXPORT PLOGFONT GUIAPI GetCurFont(HDC hdc)
Get the pointer to the current logical font of a DC.
MG_EXPORT BOOL GUIAPI FillPolygon(HDC hdc, const POINT *pts, int vertices)
Fills an polygon.
struct _GLYPHPOS GLYPHPOS
MG_EXPORT void GUIAPI VFlipBitmap(BITMAP *bmp, unsigned char *inter_buff)
Vertical Flip the special Bitmap object.
@ COLOR_BLEND_PD_SRC_ATOP
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.
static HDC GUIAPI GetDC(HWND hWnd)
Get a window DC of a window.
#define MakeRGBA(r, g, b, a)
Makes a RGBA quadruple value from red r, green g, blue b and alpha components.
@ COLOR_BLEND_PD_MODULATE
MG_EXPORT BOOL InitBlockDataHeap(PBLOCKHEAP heap, size_t bd_size, size_t heap_size)
Initializes a private block data heap.
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.
BLOCKHEAP * PBLOCKHEAP
Data type of the pointer to a BLOCKHEAP.
MG_EXPORT HDC drmCreateDCFromNameEx(GHANDLE video, uint32_t name, uint32_t drm_format, off_t offset, uint32_t width, uint32_t height, uint32_t pitch)
static BOOL GUIAPI SetPixelInBitmap(const BITMAP *bmp, int x, int y, gal_pixel pixel)
Set pixel value in a BITMAP object.
MG_EXPORT int GUIAPI GetFirstWord(PLOGFONT log_font, const char *mstr, int len, WORDINFO *word_info)
Retrieve the length and info of the first multi-byte word in a string.
MG_EXPORT UVerticalOrient GUIAPI UCharGetVerticalOrientation(Uchar32 uc)
#define MAKEWORD16(low, high)
Makes a 16-bit word from low byte and high byte.
struct _DTFIRSTLINE DTFIRSTLINE
MG_EXPORT void GUIAPI NormalizeRect(RECT *pRect)
Normalizes a rectangle.
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 BOOL GUIAPI IsUCharUppercase(Uchar32 uc)
MG_EXPORT DEVFONT *GUIAPI LoadDevFontFromIncoreData(const char *devfont_name, const void *data)
Load device font from incore data.
unsigned char * usage_bmp
MG_EXPORT void GUIAPI RotateBitmap(HDC hdc, const BITMAP *bmp, int lx, int ty, int angle)
Rotate a bitmap object.
MG_EXPORT Uchar32 GUIAPI AChar2UChar(LOGFONT *logfont, Achar32 chv)
Get Uchar32 value (Unicode wide character value) from a LOGFONT abstract character value.
struct _TEXTRUNS TEXTRUNS
MG_EXPORT Uint32 GUIAPI GetACharType(LOGFONT *logfont, Achar32 chv)
Retrieve the basic type, the general cateory of Unicode, and the break class of Unicode of an abstrac...
MG_EXPORT BOOL GUIAPI LockDCEx(HDC hdc, const PCLIPRGN region, void *context, CB_DIRECT_DRAW_RECT cb)
directly access the pixels in a DC.
#define TRUE
TRUE value, defined as 1 by MiniGUI.
struct _LAYOUTLINE LAYOUTLINE
MG_EXPORT Achar32 GUIAPI GetShapedAChar(LOGFONT *logfont, const char *mchar, int mchar_len, ACHARSHAPETYPE shape_type)
Get the glyph shape of a character.
MG_EXPORT Uchar32 UCharToUpper(Uchar32 uc)
GHANDLE HPALETTE
Handle to a logical palette.
static DWORD Pixel2DWORD(HDC hdc, gal_pixel pixel)
An inline function to convert pixel value to DWORD color.
MG_EXPORT TEXTRUNS *GUIAPI CreateTextRuns(const Uchar32 *ucs, int nr_ucs, LanguageCode lang_code, ParagraphDir base_dir, const char *logfont_name, RGBCOLOR color, RGBCOLOR bg_color, BreakOppo *break_oppos)
Split a Uchar32 paragraph string in mixed scripts into text runs.
MG_EXPORT BOOL GUIAPI UCharGetMirror(Uchar32 uc, Uchar32 *mirrored)
Get mirrored character.
MG_EXPORT void GUIAPI SplineTo(HDC hdc, const POINT *pts)
Draws a bezier spline.
MG_EXPORT void GUIAPI DestroyDynamicDevFont(DEVFONT **devfont)
Destroy device font loaded dynamically from font file.
void(* CB_LINE)(void *context, int stepx, int stepy)
The type of line generator callback.
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.
const unsigned char * bits
MG_EXPORT int GUIAPI UCharFullyDecompose(Uchar32 ch, BOOL compat, Uchar32 *result, int result_len)
Uint32 gal_pixel
Data type of pixel value.
BITMAP * PBITMAP
Data type of pointer to a BITMAP.
MG_EXPORT BOOL GUIAPI ScaleBitmapEx(BITMAP *dst, const BITMAP *src, HDC ref_dc)
Scales a BITMAP object into another BITMAP object by specify algorithm.
const MG_EXPORT char *GUIAPI CheckBitmapType(MG_RWops *fp)
Check the type of the bitmap in a data source.
void(* CB_ONE_SCANLINE)(void *context, MYBITMAP *my_bmp, int y)
The type of scanline loaded callback.
MG_EXPORT BOOL GUIAPI PtVisible(HDC hdc, int x, int y)
Check whether a point is visible.
MG_EXPORT void GUIAPI HFlipBitmap(BITMAP *bmp, unsigned char *inter_buff)
Horizontal Flip the special Bitmap object.
MG_EXPORT void GUIAPI UnloadBitmap(PBITMAP pBitmap)
Unloads a bitmap.
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.
MG_EXPORT BOOL GUIAPI IsEmptyClipRgn(const CLIPRGN *pRgn)
Determine whether a region is an empty region.
static void SetRectEmpty(RECT *prc)
Empties a rectangle.
MG_EXPORT BOOL GUIAPI FloodFill(HDC hdc, int x, int y)
Fills an enclosed area starting at point (x,y).
MG_EXPORT void GUIAPI OffsetRegion(PCLIPRGN region, int x, int y)
Offsets the region.
MG_EXPORT BOOL GUIAPI IsUCharWide(Uchar32 uc)
MG_EXPORT BOOL GUIAPI IsUCharXDigit(Uchar32 uc)
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 int GUIAPI SetRasterOperation(HDC hdc, int rop)
Set the raster operation of a DC to a new value.
MG_EXPORT void GUIAPI BIDIGetTextRangesLog2Vis(LOGFONT *log_font, const 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.
const MG_EXPORT ScriptType *GUIAPI GetScriptsForLang(const char *lang_name, LanguageCode *lang_code, int *nr_scripts)
MG_EXPORT BOOL GUIAPI IsUCharMark(Uchar32 uc)
static HDC GUIAPI GetSecondaryClientDC(HWND hwnd)
Get a client DC of a window by using the secondary surface if possible.
static int LoadBitmapEx(HDC hdc, PBITMAP pBitmap, MG_RWops *area, const char *ext)
Load a device-dependent bitmap from a general data source.
MG_EXPORT BOOL drmGetSurfaceInfo(GHANDLE video, HDC hdc, DrmSurfaceInfo *info)
MG_EXPORT BOOL GUIAPI IsUCharZeroWidth(Uchar32 uc)
MG_EXPORT HDC GUIAPI InitSlaveScreenEx(const char *name, const char *mode, int dpi)
Initializes slave screen.
MG_EXPORT BOOL GUIAPI IsUCharDefined(Uchar32 uc)
Uint8 gal_uint8
Data type of 8-bit unsigned integer.
CLIPRGN * PCLIPRGN
Data type of the pointer to a CLIPRGN.
MG_EXPORT LanguageCode GUIAPI LanguageCodeFromISO639s1(Uint16 iso639_1)
Get MiniGUI language code from an encoded ISO639-1 language code.
MG_EXPORT void GUIAPI LPtoSP(HDC hdc, POINT *pPt)
Converts logical coordinates into screen coordinates.
MG_EXPORT void GUIAPI FillCircle(HDC hdc, int sx, int sy, int r)
Fills a circle.
MG_EXPORT HDC GUIAPI CreateSecondaryDC(HWND hwnd)
Creates a secondary DC for a main window.
MG_EXPORT int GUIAPI GetACharsExtent(HDC hdc, Achar32 *achars, int nr_achars, SIZE *size)
Get visual extent value of an achar string.
MG_EXPORT void GUIAPI DeleteMemDC(HDC mem_dc)
Deletes a memory DC.
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.
unsigned int DWORD32
A type definition for a 32-bit unsigned integer.
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 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 GetSysFontHeight(int font_id)
Get the height of a single-byte character of a system font.