MiniGUI API Reference (MiniGUI-Threads)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Functions | |
MG_EXPORT int GUIAPI | GetPalette (HDC hdc, int start, int len, GAL_Color *cmap) |
Get palette entries of a DC. More... | |
MG_EXPORT BOOL GUIAPI | SetPalette (HDC hdc, int start, int len, GAL_Color *cmap) |
Set palette entries of a DC. More... | |
MG_EXPORT BOOL GUIAPI | SetColorfulPalette (HDC hdc) |
Set a DC with colorful palette. More... | |
MG_EXPORT HPALETTE GUIAPI | CreatePalette (GAL_Palette *pal) |
Creates a logical palette. More... | |
MG_EXPORT BOOL GUIAPI | SelectPalette (HDC hdc, HPALETTE hpal, BOOL reserved) |
Selects a palette for a DC. More... | |
MG_EXPORT BOOL GUIAPI | RealizePalette (HDC hdc) |
This function maps palette entries from the current logical palette to the system palette. More... | |
MG_EXPORT BOOL GUIAPI | ResizePalette (HPALETTE hpal, int len) |
Resizes a logical palette. More... | |
MG_EXPORT void GUIAPI | DestroyPalette (HPALETTE hpal) |
Destroy a logical palette. More... | |
MG_EXPORT HPALETTE GUIAPI | GetDefaultPalette (void) |
Get the system default logical palette. More... | |
MG_EXPORT int GUIAPI | GetPaletteEntries (HPALETTE hpal, int start, int len, GAL_Color *cmap) |
Get palette entries of a logical palette. More... | |
MG_EXPORT int GUIAPI | SetPaletteEntries (HPALETTE hpal, int start, int len, GAL_Color *cmap) |
Set palette entries of a logical palette. More... | |
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. More... | |
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. More... | |
HPALETTE GUIAPI CreatePalette | ( | GAL_Palette * | pal | ) |
Creates a logical palette.
This function creates a logical palette from a palette entry pal.
pal | The Pointer to a GAL_Palette structure that contains information about the colors in the logical palette.. |
void GUIAPI DestroyPalette | ( | HPALETTE | pal | ) |
Destroy a logical palette.
This function destroyes a logical palette pal.
pal | The handle to the logical palette. |
HPALETTE GUIAPI GetDefaultPalette | ( | void | ) |
Get the system default logical palette.
Get the nearest color compliant to a DC for a spefici color.
This function gets the nearest color compliant to the DC hdc for the specific color (red, green, blue).
hdc | The handle to the device context. |
red | The red component value of the color. |
green | The green component value of the color. |
blue | The blue component value of the color. |
Get the nearest palette index in the logical palette for a spefici color.
This function gets the nearest palette index in the logical palette hpal for the color (red, green, blue).
hpal | The logical palette. |
red | The red component value of the color. |
green | The green component value of the color. |
blue | The blue component value of the color. |
Get palette entries of a DC.
This function gets some palette entries of the DC hdc.
hdc | The device context. |
start | The start entry of palette to be retrieved. |
len | The length of entries to be retrieved. |
cmap | The buffer receives the palette entries. |
Get palette entries of a logical palette.
This function gets some palette entries of the logical palette hpal.
hpal | The logical palette. |
start | The start entry of palette to be retrieved. |
len | The length of entries to be retrieved. |
cmap | The buffer receives the palette entries. |
This function maps palette entries from the current logical palette to the system palette.
This function modifies the palette for the device associated with the specified device context.
If the device context is a display DC, the physical palette for that device is modified. This function will return FALSE if the hdc does not have a settable palette.
If the device context is a memory DC, this function will return FALSE and do nothing.
hdc | Handle to the device context into which a logical palette has been selected. |
Resizes a logical palette.
This function resizes a logical palette.
hpal | The handle to the logical palette. |
len | The new size of the logical palette. |
Selects a palette for a DC.
This function the palette hpal to be the palette of the DC hdc.
hdc | The device context. |
hpal | Handle to the palette. |
reserved | No use, reserved. |
Set a DC with colorful palette.
This function sets the DC specified by hdc with colorful palette.
hdc | The device context. |
Set palette entries of a DC.
This function sets some palette entries of the DC hdc.
hdc | The device context. |
start | The start entry of palette to be set. |
len | The length of entries to be set. |
cmap | Pointer to the palette entries. |
Set palette entries of a logical palette.
This function sets some palette entries of the logical palette hpal.
hpal | The logical palette. |
start | The start entry of palette to be set. |
len | The length of entries to be set. |
cmap | The buffer contains the palette entries. |