Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
button.h
Go to the documentation of this file.
1/*
2 * Copyright 2024-present dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
10
11#ifndef __MUTEKI_UI_WIDGETS_BUTTON_H__
12#define __MUTEKI_UI_WIDGETS_BUTTON_H__
13
14#include "../types/button.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
28extern void RelatedKeyButton(ui_button_t *button, int keycode);
29
40extern void RelatedKeyButtonEx(ui_button_t *button, int keycode);
41
48extern void UnRelatedKeyButton(ui_button_t *button);
49
66 unsigned short tag,
67 short x0,
68 short y0,
69 short x1,
70 short y1,
71 const UTF16 *label,
72 unsigned int event,
73 unsigned short flags
74);
75
84extern void ChangeButton(ui_button_t *button, const UTF16 *label, unsigned int event);
85
91extern void PBUTTON_draw(ui_button_t *self);
92
93#ifdef __cplusplus
94} // extern "C"
95#endif
96
97#endif // __MUTEKI_UI_WIDGETS_BUTTON_H__
#define UTF16
"Portable" Besta UTF-16 type used by other headers.
Definition common.h:54
Button widget type definition.
struct ui_button_s ui_button_t
Button widget type.
Definition button.h:51
void RelatedKeyButton(ui_button_t *button, int keycode)
Bind a button to a keyboard key.
void RelatedKeyButtonEx(ui_button_t *button, int keycode)
Bind a button to a keyboard key and attach the prompt string for that key.
void UnRelatedKeyButton(ui_button_t *button)
Remove existing key binding on a button.
void ChangeButton(ui_button_t *button, const UTF16 *label, unsigned int event)
Modify and redraw the button.
void PBUTTON_draw(ui_button_t *self)
Default draw callback of the button widget.
ui_button_t * CreateButton(unsigned short tag, short x0, short y0, short x1, short y1, const UTF16 *label, unsigned int event, unsigned short flags)
Create a button widget object.