MiniGUI API Reference (MiniGUI-Standalone)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Macros | |
#define | MGUI_NR_KEYS 255 |
Number of MiniGUI keys. More... | |
#define | NR_KEYS 128 |
The number of keys defined by Linux operating system. More... | |
#define | SCANCODE_USER (NR_KEYS + 1) |
The first key scan code different from OS defined ones. More... | |
#define | KS_REPEATED 0x00000800 |
This status indicate that the key down message is an auto-repeated one. More... | |
#define | KS_CAPTURED 0x00000400 |
This status indicate that the mouse is captured by a window when the mouse message posted. More... | |
#define | KS_IMEPOST 0x00000200 |
This status indicate that the key message is posted by the IME window. More... | |
#define | KS_CAPSLOCK 0x00000100 |
This status indicate that the CapsLock key was locked when the key or mouse message posted to the window. More... | |
#define | KS_NUMLOCK 0x00000080 |
This status indicate that the NumLock key was locked when the key or mouse message posted to the window. More... | |
#define | KS_SCROLLLOCK 0x00000040 |
This status indicate that the ScrollLock key was locked when the key or mouse message posted to the window. More... | |
#define | KS_LEFTCTRL 0x00000020 |
This status indicate that the left-Ctrl key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_RIGHTCTRL 0x00000010 |
This status indicate that the right-Ctrl key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_CTRL 0x00000030 |
This status indicate that either the left-Ctrl key or the right-Ctrl key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_LEFTALT 0x00000008 |
This status indicate that left-Alt key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_RIGHTALT 0x00000004 |
This status indicate that right-Alt key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_ALT 0x0000000C |
This status indicate that either the left-Alt key or the right-Alt key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_LEFTSHIFT 0x00000002 |
This status indicate that left-Shift key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_RIGHTSHIFT 0x00000001 |
This status indicate that right-Shift key was pressed when the key or mouse message posted to the window. More... | |
#define | KS_SHIFT 0x00000003 |
This status indicate that either the left-Shift key or the right-Shift key was pressed when the key or mouse message posted to the window. More... | |
#define | MASK_KS_SHIFTKEYS 0x00000FFF |
The mask of key status. More... | |
#define | KS_LEFTBUTTON 0x00001000 |
This status indicate that left button was pressed when the key or mouse message posted to the window. More... | |
#define | KS_RIGHTBUTTON 0x00002000 |
This status indicate that right button was pressed when the key or mouse message posted to the window. More... | |
#define | KS_MIDDLBUTTON 0x00004000 |
This status indicate that middle button was pressed when the key or mouse message posted to the window. More... | |
#define | MASK_KS_BUTTONS 0x0000F000 |
The mask of mouse button status. More... | |
#define KS_ALT 0x0000000C |
This status indicate that either the left-Alt key or the right-Alt key was pressed when the key or mouse message posted to the window.
#define KS_CAPSLOCK 0x00000100 |
This status indicate that the CapsLock key was locked when the key or mouse message posted to the window.
You can test the status by AND'ed with lParam of the message, like below
#define KS_CAPTURED 0x00000400 |
This status indicate that the mouse is captured by a window when the mouse message posted.
You can test the status by AND'ed with wParam of the message, like below:
#define KS_CTRL 0x00000030 |
This status indicate that either the left-Ctrl key or the right-Ctrl key was pressed when the key or mouse message posted to the window.
#define KS_IMEPOST 0x00000200 |
This status indicate that the key message is posted by the IME window.
#define KS_LEFTALT 0x00000008 |
This status indicate that left-Alt key was pressed when the key or mouse message posted to the window.
#define KS_LEFTBUTTON 0x00001000 |
This status indicate that left button was pressed when the key or mouse message posted to the window.
#define KS_LEFTCTRL 0x00000020 |
This status indicate that the left-Ctrl key was pressed when the key or mouse message posted to the window.
#define KS_LEFTSHIFT 0x00000002 |
This status indicate that left-Shift key was pressed when the key or mouse message posted to the window.
#define KS_MIDDLBUTTON 0x00004000 |
This status indicate that middle button was pressed when the key or mouse message posted to the window.
#define KS_NUMLOCK 0x00000080 |
This status indicate that the NumLock key was locked when the key or mouse message posted to the window.
#define KS_REPEATED 0x00000800 |
This status indicate that the key down message is an auto-repeated one.
You can test the status by AND'ed with lParam of the message, like below:
#define KS_RIGHTALT 0x00000004 |
This status indicate that right-Alt key was pressed when the key or mouse message posted to the window.
#define KS_RIGHTBUTTON 0x00002000 |
This status indicate that right button was pressed when the key or mouse message posted to the window.
#define KS_RIGHTCTRL 0x00000010 |
This status indicate that the right-Ctrl key was pressed when the key or mouse message posted to the window.
#define KS_RIGHTSHIFT 0x00000001 |
This status indicate that right-Shift key was pressed when the key or mouse message posted to the window.
#define KS_SCROLLLOCK 0x00000040 |
This status indicate that the ScrollLock key was locked when the key or mouse message posted to the window.
#define KS_SHIFT 0x00000003 |
This status indicate that either the left-Shift key or the right-Shift key was pressed when the key or mouse message posted to the window.
#define MASK_KS_BUTTONS 0x0000F000 |
#define MASK_KS_SHIFTKEYS 0x00000FFF |
#define MGUI_NR_KEYS 255 |
Number of MiniGUI keys.
The number of MiniGUI keys is defined to 255 by default. This means that MiniGUI can destinguish 255 different keys with each has an unique scan code. The scan codes below 129 are defined for PC keyboard by default. If your system has a large amount of keys, you can define the scan code of keys ranged from 1 to 255 in your IAL engine. And your application will receive a MSG_KEYDOWN and MSG_KEYUP messages when a key pressed and released, and the wParam of the messages will be defined to be equal to the scan code of the key.
#define NR_KEYS 128 |
The number of keys defined by Linux operating system.
For a PC box, NR_KEYS is defined to 128 by default. You can define some input events from an input device other than keyboard, e.g. your remote controller, as key events with different scan codes from those of PC's. MiniGUI can support 255 keys, and the constant is defined by MGUI_NR_KEYS.
#define SCANCODE_USER (NR_KEYS + 1) |
The first key scan code different from OS defined ones.
You can define your special key scan codes like below
to distinguish the keys on your remote controller.