Prusa MINI Firmware overview
|
Go to the documentation of this file.
9 #define WINDOW_CLS_FRAME 0 // FRAME - basic container class
10 #define WINDOW_CLS_TEXT 1 // TEXT - aligned singlecolor text
11 #define WINDOW_CLS_NUMB 2 // NUMB - aligned singlecolor formated number
12 #define WINDOW_CLS_ICON 3 // ICON - small image with left-top offset
13 #define WINDOW_CLS_LIST 4 // LIST - vertical or horizontal list (text-icon pairs)
14 #define WINDOW_CLS_EDIT 5 // EDIT - text editor (editable 'TEXT') - minor
15 #define WINDOW_CLS_SPIN 6 // SPIN - numeric editor (editable 'NUMB')
16 #define WINDOW_CLS_TXIC 7 // TXIC - text + icon
17 #define WINDOW_CLS_TERM 8 // TERM - terminal
18 #define WINDOW_CLS_MENU 9 // MENU - menu
19 #define WINDOW_CLS_MSGBOX 10 // MSGBOX - messagebox with configurable buttons and icon
20 #define WINDOW_CLS_PROGRESS 11 // PROGRESS - progress bar with text
21 #define WINDOW_CLS_USER 128 // USER - user defined window classes (WINDOW_CLS_USER+n)
24 #define WINDOW_FLG_VISIBLE 0x00000001 // is visible
25 #define WINDOW_FLG_ENABLED 0x00000002 // is enabled (can be focused)
26 #define WINDOW_FLG_INVALID 0x00000004 // content is invalid
27 #define WINDOW_FLG_FOCUSED 0x00000008 // has focus
28 #define WINDOW_FLG_CHECKED 0x00000010 // is checked/selected
29 #define WINDOW_FLG_CAPTURE 0x00000020 // capture jog events
30 #define WINDOW_FLG_DISABLED 0x00000040 // window is disabled (shadowed)
31 #define WINDOW_FLG_FREEMEM 0x00004000 // free memory when destroy
32 #define WINDOW_FLG_PARENT 0x00008000 // is parent window
33 #define WINDOW_FLG_USER 0x00010000 // user flags (WINDOW_FLG_USER<<n)
38 #define WINDOW_EVENT_BTN_DN 0x01 //button down
39 #define WINDOW_EVENT_BTN_UP 0x02 //button up
40 #define WINDOW_EVENT_ENC_DN 0x03 //encoder minus
41 #define WINDOW_EVENT_ENC_UP 0x04 //encoder plus
42 #define WINDOW_EVENT_FOCUS0 0x05 //focus lost
43 #define WINDOW_EVENT_FOCUS1 0x06 //focus set
44 #define WINDOW_EVENT_CAPT_0 0x07 //capture lost
45 #define WINDOW_EVENT_CAPT_1 0x08 //capture set
46 #define WINDOW_EVENT_CLICK 0x09 //clicked (tag > 0)
47 #define WINDOW_EVENT_CHANGE 0x0a //value/index changed (tag > 0)
48 #define WINDOW_EVENT_CHANGING 0x0b //value/index changing (tag > 0)
49 #define WINDOW_EVENT_LOOP 0x0c //gui loop (every 50ms)
50 #define WINDOW_EVENT_TIMER 0x0d //gui timer
51 #define WINDOW_EVENT_MESSAGE 0x0e //onStatusChange() message notification
62 uint16_t
index,
const char **pptext, uint16_t *pid_icon);
void window_set_alignment(int16_t id, uint8_t alignment)
Definition: window.c:561
int16_t window_prev(int16_t id)
Definition: window.c:180
void() window_draw_t(void *window)
Definition: window.h:57
int window_get_item_index(int16_t id)
Definition: window.c:623
uint32_t f_reserv1
Definition: window.h:97
int16_t window_register_class(window_class_t *cls)
Definition: window.c:90
void window_set_max(int16_t id, float max)
Definition: window.c:704
int16_t window_capture(void)
Definition: window.c:169
uint16_t size
Definition: window.h:69
float window_get_max(int16_t id)
Definition: window.c:716
struct _window_class_t window_class_t
int16_t id_parent
Definition: window.h:78
int16_t cls_id
Definition: window.h:68
void window_set_padding(int16_t id, padding_ui8_t padding)
Definition: window.c:549
int window_is_capture(int16_t id)
Definition: window.c:272
uint32_t f_enabled
Definition: window.h:86
float window_get_min(int16_t id)
Definition: window.c:694
float window_get_step(int16_t id)
Definition: window.c:738
int16_t window_next(int16_t id)
Definition: window.c:192
float window_get_value(int16_t id)
Definition: window.c:390
char * window_get_format(int16_t id)
Definition: window.c:418
int window_get_top_index(int16_t id)
Definition: window.c:648
void window_set_color_back(int16_t id, color_t clr)
Definition: window.c:431
uint32_t f_timer
Definition: window.h:94
void window_set_top_index(int16_t id, int index)
Definition: window.c:636
void window_destroy_children(int16_t id)
Definition: window.c:157
void window_set_format(int16_t id, const char *format)
Definition: window.c:403
void window_invalidate(int16_t id)
Definition: window.c:304
void window_destroy(int16_t id)
Definition: window.c:132
uint8_t window_get_tag(int16_t id)
Definition: window.c:335
#define max(a, b)
Definition: wiring_constants.h:40
window_draw_t * draw
Definition: window.h:72
int16_t window_create(int16_t cls_id, int16_t id_parent, rect_ui16_t rect)
Definition: window.c:98
void window_set_icon_id(int16_t id, uint16_t id_res)
Definition: window.c:659
int16_t window_id(window_t *ptr)
Definition: window.c:86
uint32_t f_disabled
Definition: window.h:91
void window_show(int16_t id)
Definition: window.c:529
window_done_t * done
Definition: window.h:71
int16_t id
Definition: window.h:79
uint32_t f_reserv0
Definition: window.h:92
int window_is_invalid(int16_t id)
Definition: window.c:262
int16_t window_first_child(int16_t id)
Definition: window.c:218
uint32_t f_invalid
Definition: window.h:87
window_t * window_ptr(int16_t id)
Definition: window.c:82
void() window_done_t(void *window)
Definition: window.h:56
uint32_t f_parent
Definition: window.h:95
void window_disable(int16_t id)
Definition: window.c:523
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
#define min(a, b)
Definition: wiring_constants.h:36
uint32_t f_checked
Definition: window.h:89
int window_enabled_child_count(int16_t id)
Definition: window.c:240
window_event_t * event
Definition: window.h:73
void
Definition: png.h:1083
void window_set_value(int16_t id, float value)
Definition: window.c:363
uint32_t f_user
Definition: window.h:96
int window_is_visible(int16_t id)
Definition: window.c:252
void window_draw_children(int16_t id)
Definition: window.c:284
void window_set_focus(int16_t id)
Definition: window.c:480
struct _window_t window_t
Definition: window.h:53
void window_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: window.c:797
window_init_t * init
Definition: window.h:70
Definition: guitypes.h:86
int window_is_focused(int16_t id)
Definition: window.c:267
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
void gui_invalidate(void)
Definition: gui.c:66
void window_set_min_max(int16_t id, float min, float max)
Definition: window.c:748
window_t * window_focused_ptr
Definition: window.c:19
uint16_t window_get_icon_id(int16_t id)
Definition: window.c:671
void() window_event_t(void *window, uint8_t event, void *param)
Definition: window.h:58
Definition: guitypes.h:69
int window_child_count(int16_t id)
Definition: window.c:230
const uint8_t[]
Definition: 404_html.c:3
void window_hide(int16_t id)
Definition: window.c:539
rect_ui16_t rect
Definition: window.h:101
int _window_get_tag(window_t *wnd)
uint32_t f_capture
Definition: window.h:90
void window_invalidate_children(int16_t id)
Definition: window.c:320
uint32_t f_visible
Definition: window.h:85
void window_set_min(int16_t id, float min)
Definition: window.c:682
void window_validate_children(int16_t id)
Definition: window.c:312
window_event_t * event
Definition: window.h:102
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
void window_enable(int16_t id)
Definition: window.c:517
int16_t window_next_enabled(int16_t id)
Definition: window.c:211
int index
Definition: window_list.h:24
void _window_set_tag(window_t *wnd, uint8_t tg)
uint32_t f_focused
Definition: window.h:88
void window_set_min_max_step(int16_t id, float min, float max, float step)
Definition: window.c:767
color_t window_get_color_text(int16_t id)
Definition: window.c:469
int window_is_enabled(int16_t id)
Definition: window.c:257
void window_validate(int16_t id)
Definition: window.c:298
window_t * window_capture_ptr
Definition: window.c:21
void window_draw(int16_t id)
Definition: window.c:277
uint32_t color_t
Definition: guitypes.h:62
void() window_init_t(void *window)
Definition: window.h:55
void window_set_item_count(int16_t id, int count)
Definition: window.c:573
void() window_list_item_t(window_list_t *pwindow_list, uint16_t index, const char **pptext, uint16_t *pid_icon)
Definition: window.h:61
Definition: window_list.h:15
int16_t window_focused(void)
Definition: window.c:165
char * window_get_text(int16_t id)
Definition: window.c:352
void window_set_step(int16_t id, float step)
Definition: window.c:726
uint32_t flg
Definition: window.h:81
void window_set_item_callback(int16_t id, window_list_item_t *fnc)
Definition: window.c:787
int16_t window_parent(int16_t id)
Definition: window.c:173
void window_set_item_index(int16_t id, int index)
Definition: window.c:598
window_class_t * cls
Definition: window.h:77
color_t window_get_color_back(int16_t id)
Definition: window.c:446
#define WINDOW_FLG_INVALID
Definition: window.h:26
void window_set_color_text(int16_t id, color_t clr)
Definition: window.c:457
uint32_t f_tag
Definition: window.h:98
static void _window_invalidate(window_t *window)
Definition: window.h:257
int16_t window_prev_enabled(int16_t id)
Definition: window.c:204
int window_get_item_count(int16_t id)
Definition: window.c:585
void window_set_capture(int16_t id)
Definition: window.c:500
uint32_t f_freemem
Definition: window.h:93