|
muteki
|
Button widget API. More...
#include <muteki/ui/common.h>Go to the source code of this file.
Data Structures | |
| struct | ui_widget_button_s |
Typedefs | |
| typedef struct ui_widget_button_s | ui_widget_button_t |
Functions | |
| ui_widget_button_t * | CreateButton (unsigned short tag, short x0, short y0, short x1, short y1, UTF16 *label, unsigned int event, unsigned short flags) |
| Create a button widget object. | |
Button widget API.
| ui_widget_button_t * CreateButton | ( | unsigned short | tag, |
| short | x0, | ||
| short | y0, | ||
| short | x1, | ||
| short | y1, | ||
| UTF16 * | label, | ||
| unsigned int | event, | ||
| unsigned short | flags | ||
| ) |
Create a button widget object.
Test the event behavior. This needs more reverse engineering on the view event handling process.
Figure out the flags.
| tag | Component tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated. |
| x0 | X coordinate of the top-left corner, in pixels (inclusive). |
| y0 | Y coordinate of the top-left corner, in pixels (inclusive). |
| x1 | X coordinate of the bottom-right corner, in pixels (inclusive), or 0 to let the function automatically decide the size. |
| y1 | Y coordinate of the bottom-right corner, in pixels (inclusive), or 0 to let the function automatically decide the size. |
| label | UTF-16 encoded string to be used as a label. |
| event | Custom event to be sent on button press. |
| flags | Flags. Valid options seem to be 2, 4, 0x40. |