MiniGUI API Reference (MiniGUI-Standalone)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Data Structures | |
struct | _WINDOW_ELEMENT_ATTR |
struct | _LFSCROLLBARINFO |
struct | _SCROLLBARDATA |
struct | _LFRDR_WINSTYLEINFO |
struct | _LFRDR_TRACKBARINFO |
struct | _WINDOW_ELEMENT_RENDERER |
struct | _WINDOWINFO |
Macros | |
#define | WE_FONTS_NUMBER 4 |
The number of window element font attributes. More... | |
#define | WE_METRICS_NUMBER 6 |
The number of window element metric attributes. More... | |
#define | WE_COLORS_NUMBER 14 |
The number of window element color attributes. More... | |
#define | WE_ATTR_TYPE_RDR 0x5000 |
The specific type for LF renderer. More... | |
#define | SBS_DISABLED_LTUP 0x0100 |
#define | SBS_DISABLED_BTDN 0x0200 |
#define | SBS_HILITE_LTUP 0x0400 |
#define | SBS_HILITE_BTDN 0x0800 |
#define | SBS_HILITE_THUMB 0x0010 |
#define | SBS_PRESSED_LTUP 0x0020 |
#define | SBS_PRESSED_BTDN 0x0040 |
#define | SBS_PRESSED_THUMB 0x0080 |
#define | LEN_RENDERER_NAME 15 |
The maximum length of a renderer name. More... | |
Typedefs | |
typedef struct _WINDOW_ELEMENT_ATTR | WINDOW_ELEMENT_ATTR |
typedef struct _LFSCROLLBARINFO | LFSCROLLBARINFO |
typedef struct _SCROLLBARDATA | SCROLLBARDATA |
typedef struct _LFRDR_WINSTYLEINFO | LFRDR_WINSTYLEINFO |
typedef struct _LFRDR_TRACKBARINFO | LFRDR_TRACKBARINFO |
typedef struct _WINDOW_ELEMENT_RENDERER | WINDOW_ELEMENT_RENDERER |
typedef struct _WINDOWINFO | WINDOWINFO |
Functions | |
static const WINDOWINFO *GUIAPI | GetWindowInfo (HWND hWnd) |
Get the handle of window information. More... | |
MG_EXPORT BOOL GUIAPI | InitWindowElementAttrs (PWERENDERER rdr) |
MG_EXPORT DWORD GUIAPI | GetWindowElementAttr (HWND hwnd, int we_attr_id) |
Get a window element data. More... | |
MG_EXPORT DWORD GUIAPI | SetWindowElementAttr (HWND hwnd, int we_attr_id, DWORD we_attr) |
Set a new window element data specified by we_attr_id. More... | |
MG_EXPORT gal_pixel GUIAPI | GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id) |
Get a window element gal_pixel color. More... | |
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI | GetWindowRendererFromName (const char *name) |
Get window renderer from name. More... | |
MG_EXPORT BOOL GUIAPI | AddWindowElementRenderer (const char *name, const WINDOW_ELEMENT_RENDERER *we_rdr) |
Add a window element renderer to the system. More... | |
MG_EXPORT BOOL GUIAPI | RemoveWindowElementRenderer (const char *name) |
Remove a window renderer from MiniGUI. More... | |
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI | GetDefaultWindowElementRenderer (void) |
Get the default window renderer. More... | |
MG_EXPORT const char *GUIAPI | SetDefaultWindowElementRenderer (const char *name) |
Set a window element renderer as the default system renderer. More... | |
MG_EXPORT BOOL GUIAPI | SetWindowElementRenderer (HWND hWnd, const char *werdr_name, const WINDOW_ELEMENT_ATTR *we_attrs) |
Set a window element renderer and window element attributes for window specified by hwnd. More... | |
MG_EXPORT BOOL | InitRendererSystemIcon (const char *rdr_name, HICON *small_icon, HICON *large_icon) |
Initialize large and small system icons in the specified renderer rdr_name. More... | |
MG_EXPORT void | TermRendererSystemIcon (HICON *small_icon, HICON *large_icon) |
Release large and small system icon resources. More... | |
#define LEN_RENDERER_NAME 15 |
#define SBS_DISABLED_BTDN 0x0200 |
#define SBS_DISABLED_LTUP 0x0100 |
#define SBS_HILITE_BTDN 0x0800 |
#define SBS_HILITE_LTUP 0x0400 |
#define SBS_HILITE_THUMB 0x0010 |
#define SBS_PRESSED_BTDN 0x0040 |
#define SBS_PRESSED_LTUP 0x0020 |
#define SBS_PRESSED_THUMB 0x0080 |
#define WE_ATTR_TYPE_RDR 0x5000 |
#define WE_COLORS_NUMBER 14 |
#define WE_FONTS_NUMBER 4 |
#define WE_METRICS_NUMBER 6 |
typedef struct _LFRDR_TRACKBARINFO LFRDR_TRACKBARINFO |
The scrollbar information structure. Used by draw_scrollbar and get_scrollbar_rect renderer function.
typedef struct _LFRDR_WINSTYLEINFO LFRDR_WINSTYLEINFO |
The window style information structure. Used by calc_we_metrics renderer function.
typedef struct _LFSCROLLBARINFO LFSCROLLBARINFO |
The scrollbar information structure in look and feel.
typedef struct _SCROLLBARDATA SCROLLBARDATA |
The scrollbar data construction for scrollbar control.
typedef struct _WINDOW_ELEMENT_ATTR WINDOW_ELEMENT_ATTR |
The window element attributes structure.
typedef struct _WINDOW_ELEMENT_RENDERER WINDOW_ELEMENT_RENDERER |
The window element renderer structure.
typedef struct _WINDOWINFO WINDOWINFO |
The window information structure.
BOOL GUIAPI AddWindowElementRenderer | ( | const char * | name, |
const WINDOW_ELEMENT_RENDERER * | we_rdr | ||
) |
Add a window element renderer to the system.
This function adds a new window renderer to MiniGUI system.
name | The renderer name. |
we_rdr | The pointer to a new renderer. |
Referenced by GetWindowInfo().
WINDOW_ELEMENT_RENDERER *GUIAPI GetDefaultWindowElementRenderer | ( | void | ) |
Get the default window renderer.
This function gets the default window renderer in MiniGUI.
Referenced by GetWindowInfo().
Get a window element data.
This function gets a window element data which is identified by we_attr_id.
hwnd | The handle to the window. |
we_attr_id | The window element id number, can be one of the following values: |
Referenced by GetWindowInfo().
Get a window element gal_pixel color.
This function gets a window element gal_pixel color which is identified by we_attr_id and hdc.
hwnd | The handle to the window. |
hdc | The device context. If -1, it will return pixel value according to window handle hwnd; otherwise return pixel value according to pixel format in hdc. |
we_attr_id | The window element id number. |
Referenced by GetWindowInfo().
|
inlinestatic |
Get the handle of window information.
This function gets the handle to the window information \ from the specified window handle hWnd.
hWnd | The handle to the window. |
Definition at line 4183 of file window.h.
References AddInnerRes(), AddResRef(), AddWindowElementRenderer(), GetDefaultWindowElementRenderer(), GetResource(), GetResPath(), GetWindowElementAttr(), GetWindowElementPixelEx(), GetWindowRendererFromName(), InitRendererSystemIcon(), InitWindowElementAttrs(), LoadResource(), RegisterResFromBitmap(), RegisterResFromFile(), RegisterResFromMem(), RegisterResType(), RegisterSystemBitmap(), ReleaseRes(), RemoveWindowElementRenderer(), RetrieveRes(), SetDefaultWindowElementRenderer(), SetResPath(), SetWindowElementAttr(), SetWindowElementRenderer(), Str2Key(), TermRendererSystemIcon(), UnregisterRes(), UnregisterResType(), and UnregisterSystemBitmap().
WINDOW_ELEMENT_RENDERER *GUIAPI GetWindowRendererFromName | ( | const char * | name | ) |
Get window renderer from name.
name | The renderer name. |
This function gets window renderer from the specified name name, which is case-insensitive.
Referenced by GetWindowInfo().
BOOL GUIAPI InitRendererSystemIcon | ( | const char * | rdr_name, |
HICON * | large_icon, | ||
HICON * | small_icon | ||
) |
Initialize large and small system icons in the specified renderer rdr_name.
rdr_name | The renderer name. |
large_icon | The pointer to large system icons. |
small_icon | The pointer to small system icons. |
Referenced by GetWindowInfo().
BOOL GUIAPI InitWindowElementAttrs | ( | PWERENDERER | rdr | ) |
This function initializes window element attributes of the specified renderer rdr according to the appropriate section in configuration file.
rdr | The pointer to the specified renderer. |
Referenced by GetWindowInfo().
Remove a window renderer from MiniGUI.
This function only removes a window renderer named by name.
name | The renderer name. |
Referenced by GetWindowInfo().
const char *GUIAPI SetDefaultWindowElementRenderer | ( | const char * | name | ) |
Set a window element renderer as the default system renderer.
This function sets a window element renderer as the default system renderer.
name | The renderer name. |
Referenced by GetWindowInfo().
Set a new window element data specified by we_attr_id.
This function sets a new window element data we_attr to MiniGUI, which is identified by we_attr_id.
hwnd | The handle to the window. |
we_attr_id | The window element id. |
we_attr | The new window element data. |
Referenced by GetWindowInfo().
BOOL GUIAPI SetWindowElementRenderer | ( | HWND | hwnd, |
const char * | werdr_name, | ||
const WINDOW_ELEMENT_ATTR * | we_attrs | ||
) |
Set a window element renderer and window element attributes for window specified by hwnd.
This function sets the window handled by hWnd to use a different window element renderer OR'ed window element attributes and updates window in time.
hwnd | The handle to the window. |
werdr_name | The renderer name. |
we_attrs | The pointer to new window element attributes. |
Referenced by GetWindowInfo().
Release large and small system icon resources.
large_icon | The pointer to large system icons. |
small_icon | The pointer to small system icons. |
Referenced by GetWindowInfo().