MiniGUI API Reference (MiniGUI-Standalone)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Macros | |
#define | IS_MBC_GLYPH(glyph) ((glyph) & 0x80000000) |
to judge wether the glyph is multibyte glyph More... | |
#define | SET_MBC_GLYPH(glyph) ((glyph) | 0x80000000) |
set the glyph with multibyte mask More... | |
#define | REAL_GLYPH(glyph) ((glyph) & 0x7FFFFFFF) |
get real glyph value from a glyph More... | |
#define | SELECT_DEVFONT(plogfont, glyph) |
select a device font acording to the glyph value. More... | |
Typedefs | |
typedef struct _GLYPHMAPINFO | GLYPHMAPINFO |
Data type of struct _GLYPHMAPINFO. More... | |
typedef struct _GLYPHINFO | GLYPHINFO |
Data type of struct _GLYPHINFO. More... | |
Enumerations |
Functions | |
MG_EXPORT Glyph32 GUIAPI | GetGlyphValue (LOGFONT *logfont, const char *mchar, int mchar_len, const char *pre_mchar, int pre_len) |
Get the glyph value of a multi-byte character. More... | |
MG_EXPORT Glyph32 GUIAPI | GetGlyphShape (LOGFONT *logfont, const char *mchar, int mchar_len, SHAPETYPE shape_type) |
Get the glyph shape of a character. More... | |
MG_EXPORT int GUIAPI | DrawGlyph (HDC hdc, int x, int y, Glyph32 glyph_value, int *adv_x, int *adv_y) |
Draw a glyph. More... | |
MG_EXPORT int GUIAPI | GetGlyphInfo (LOGFONT *logfont, Glyph32 glyph_value, GLYPHINFO *glyph_info) |
Retriev the information of a glyph. More... | |
MG_EXPORT int GUIAPI | GetGlyphsExtent (HDC hdc, Glyph32 *glyphs, int nr_glyphs, SIZE *size) |
Get visual extent value of a glyph string. More... | |
MG_EXPORT int GUIAPI | GetGlyphsExtentPoint (HDC hdc, Glyph32 *glyphs, int nr_glyphs, int max_extent, SIZE *size) |
Get the visual extent value of a glyph string. More... | |
MG_EXPORT int GUIAPI | BIDIGetTextLogicalGlyphs (LOGFONT *log_font, const char *text, int text_len, Glyph32 **glyphs, GLYPHMAPINFO **glyphs_map) |
Get logical glyphs string of the text. More... | |
MG_EXPORT int GUIAPI | BIDIGetTextVisualGlyphs (LOGFONT *log_font, const char *text, int text_len, Glyph32 **glyphs, GLYPHMAPINFO **glyphs_map) |
Get visual glyphs and glyph_map info relative with logical string byte index. More... | |
MG_EXPORT Glyph32 *GUIAPI | BIDILogGlyphs2VisGlyphs (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, GLYPHMAPINFO *glyphs_map) |
Reorder the logical glyphs string to visual glyphs string. More... | |
MG_EXPORT void GUIAPI | GetTextRangesLog2Vis (LOGFONT *log_font, char *text, int text_len, int start_index, int end_index, int **ranges, int *nr_ranges) |
Get a list of visual ranges corresponding to a given logical range. More... | |
MG_EXPORT void GUIAPI | BIDIGetLogicalEmbeddLevels (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, Uint8 **embedding_level_list) |
Get the logical embedding levels for the logical glyph string and generate runs by embedding levels, the for reorder to get visual glyph string. More... | |
MG_EXPORT void GUIAPI | BIDIGetVisualEmbeddLevels (LOGFONT *log_font, Glyph32 *glyphs, int nr_glyphs, Uint8 **embedding_level_list) |
Get the visual embedding levels for the given logical glyph string, then you can get the edge for visual glyphs. More... | |
MiniGUI maintains some glyph defines and operations
#define IS_MBC_GLYPH | ( | glyph | ) | ((glyph) & 0x80000000) |
#define REAL_GLYPH | ( | glyph | ) | ((glyph) & 0x7FFFFFFF) |
#define SELECT_DEVFONT | ( | plogfont, | |
glyph | |||
) |
#define SET_MBC_GLYPH | ( | glyph | ) | ((glyph) | 0x80000000) |
typedef struct _GLYPHINFO GLYPHINFO |
Data type of struct _GLYPHINFO.
typedef struct _GLYPHMAPINFO GLYPHMAPINFO |
Data type of struct _GLYPHMAPINFO.
void GUIAPI BIDIGetLogicalEmbeddLevels | ( | LOGFONT * | log_font, |
Glyph32 * | glyphs, | ||
int | nr_glyphs, | ||
Uint8 ** | embedding_level_list | ||
) |
Get the logical embedding levels for the logical glyph string and generate runs by embedding levels, the for reorder to get visual glyph string.
log_font | The logical font. |
glyphs | The pointer to the logical glyph string. |
nr_glyphs | The length of the glyph string. |
embedding_level_list | The logical embedding level. |
int GUIAPI BIDIGetTextLogicalGlyphs | ( | LOGFONT * | log_font, |
const char * | text, | ||
int | text_len, | ||
Glyph32 ** | glyphs, | ||
GLYPHMAPINFO ** | glyphs_map | ||
) |
Get logical glyphs string of the text.
log_font | The logical font. |
text | The logical text string. |
text_len | The lenght of the logical text string in bytes. |
glyphs | The pointer to the logical glyph string. |
glyphs_map | The position map from the logical glyphs string to the logical text. |
int GUIAPI BIDIGetTextVisualGlyphs | ( | LOGFONT * | log_font, |
const char * | text, | ||
int | text_len, | ||
Glyph32 ** | glyphs, | ||
GLYPHMAPINFO ** | glyphs_map | ||
) |
Get visual glyphs and glyph_map info relative with logical string byte index.
log_font | The logical font. |
text | The logical text string. |
text_len | The length of the logical text string in bytes. |
glyphs | The pointer to the visual glyph string. |
glyphs_map | The position map from visual glyphs string to the logical text. |
void GUIAPI BIDIGetVisualEmbeddLevels | ( | LOGFONT * | log_font, |
Glyph32 * | glyphs, | ||
int | nr_glyphs, | ||
Uint8 ** | embedding_level_list | ||
) |
Get the visual embedding levels for the given logical glyph string, then you can get the edge for visual glyphs.
log_font | The logical font. |
glyphs | The pointer to the logical glyph string. |
nr_glyphs | The length of the glyph string. |
embedding_level_list | The embedding level logical to visual. |
Glyph32 *GUIAPI BIDILogGlyphs2VisGlyphs | ( | LOGFONT * | log_font, |
Glyph32 * | glyphs, | ||
int | nr_glyphs, | ||
GLYPHMAPINFO * | glyphs_map | ||
) |
Reorder the logical glyphs string to visual glyphs string.
This function reorders the logical glyphs string to visual glyphs string. If glyphs_map is not NULL, get the visual glyphs map info.
log_font | The logical font. |
glyphs | The pointer to the glyph string. |
nr_glyphs | The length of the glyph string. |
glyphs_map | The position map from the logical glyph string to the visual glyph string. |
int GUIAPI DrawGlyph | ( | HDC | hdc, |
int | x, | ||
int | y, | ||
Glyph32 | glyph_value, | ||
int * | adv_x, | ||
int * | adv_y | ||
) |
Draw a glyph.
This function draws a glyph to the specific postion of a DC.
hdc | The device context. |
x | The output start x position. |
y | The output start y position. |
glyph_value | The glyph value. |
adv_x | The pointer used to return the advance in x-coordinate of the glyph, can be NULL. |
adv_y | The pointer used to return the advance in y-coordinate of the glyph, can be NULL. |
Retriev the information of a glyph.
This function retrieves the information of a glyph.
logfont | The logical font. |
glyph_value | The glyph value. |
glyph_info | The glyph information will be returned through this struct. |
Get visual extent value of a glyph string.
This function gets the extent value of a glyph string on a DC.
hdc | The device context. |
glyphs | Input glyph string, input. |
nr_glyphs | Input glyph string len, input. |
size | Ouput the fit glyph's extent value, Output. |
int GUIAPI GetGlyphsExtentPoint | ( | HDC | hdc, |
Glyph32 * | glyphs, | ||
int | nr_glyphs, | ||
int | max_extent, | ||
SIZE * | size | ||
) |
Get the visual extent value of a glyph string.
This function gets the visual extent value of a glpyh string.
hdc | The device context. |
glyphs | The pointer to the glyph string. |
nr_glyphs | The length of the glyph string len. |
max_extent | The maximal output extent value. |
size | The real extent of all visual glyphs in the glyph string. |
Glyph32 GUIAPI GetGlyphShape | ( | LOGFONT * | logfont, |
const char * | mchar, | ||
int | mchar_len, | ||
SHAPETYPE | shape_type | ||
) |
Get the glyph shape of a character.
logfont | The logical font. |
mchar | The pointer to the multi-byte character. |
mchar_len | The length of mchar in bytes. |
shape_type | The shape type of mchar. |
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.
logfont | The logical font. |
mchar | The pointer to the multi-byte character. |
mchar_len | The length of mchar in bytes. |
pre_mchar | The pointer to the multi-byte character before mchar. |
pre_len | The length of per_mchar in bytes. |
void GUIAPI GetTextRangesLog2Vis | ( | LOGFONT * | log_font, |
char * | text, | ||
int | text_len, | ||
int | start_index, | ||
int | end_index, | ||
int ** | ranges, | ||
int * | nr_ranges | ||
) |
Get a list of visual ranges corresponding to a given logical range.
log_font | The logical font. |
text | The pointer to the logical text string. |
text_len | The length of the logical text string in bytes. |
start_index | The start index of the logical range. |
end_index | The end index of the logical range. |
ranges | The pointer to store a pointer to an array of arranges. |
nr_ranges | The number of ranges stored in ranges. |