Prusa MINI Firmware overview
|
#include <inttypes.h>
#include "guitypes.h"
Go to the source code of this file.
|
window_t * | window_ptr (int16_t id) |
|
int16_t | window_id (window_t *ptr) |
|
int16_t | window_register_class (window_class_t *cls) |
|
int16_t | window_create (int16_t cls_id, int16_t id_parent, rect_ui16_t rect) |
|
int16_t | window_create_ptr (int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr) |
|
void | window_destroy (int16_t id) |
|
void | window_destroy_children (int16_t id) |
|
int16_t | window_focused (void) |
|
int16_t | window_capture (void) |
|
int16_t | window_parent (int16_t id) |
|
int16_t | window_prev (int16_t id) |
|
int16_t | window_next (int16_t id) |
|
int16_t | window_prev_enabled (int16_t id) |
|
int16_t | window_next_enabled (int16_t id) |
|
int16_t | window_first_child (int16_t id) |
|
int | window_child_count (int16_t id) |
|
int | window_enabled_child_count (int16_t id) |
|
int | window_is_visible (int16_t id) |
|
int | window_is_enabled (int16_t id) |
|
int | window_is_invalid (int16_t id) |
|
int | window_is_focused (int16_t id) |
|
int | window_is_capture (int16_t id) |
|
void | window_draw (int16_t id) |
|
void | window_draw_children (int16_t id) |
|
void | window_validate (int16_t id) |
|
void | window_invalidate (int16_t id) |
|
void | window_validate_children (int16_t id) |
|
void | window_invalidate_children (int16_t id) |
|
void | window_set_tag (int16_t id, uint8_t tag) |
|
void | _window_set_tag (window_t *wnd, uint8_t tg) |
|
uint8_t | window_get_tag (int16_t id) |
|
int | _window_get_tag (window_t *wnd) |
|
void | window_set_text (int16_t id, const char *text) |
|
char * | window_get_text (int16_t id) |
|
void | window_set_value (int16_t id, float value) |
|
float | window_get_value (int16_t id) |
|
void | window_set_format (int16_t id, const char *format) |
|
char * | window_get_format (int16_t id) |
|
void | window_set_color_back (int16_t id, color_t clr) |
|
color_t | window_get_color_back (int16_t id) |
|
void | window_set_color_text (int16_t id, color_t clr) |
|
color_t | window_get_color_text (int16_t id) |
|
void | window_set_focus (int16_t id) |
|
void | window_set_capture (int16_t id) |
|
void | window_enable (int16_t id) |
|
void | window_disable (int16_t id) |
|
void | window_show (int16_t id) |
|
void | window_hide (int16_t id) |
|
void | window_set_padding (int16_t id, padding_ui8_t padding) |
|
void | window_set_alignment (int16_t id, uint8_t alignment) |
|
void | window_set_item_count (int16_t id, int count) |
|
int | window_get_item_count (int16_t id) |
|
void | window_set_item_index (int16_t id, int index) |
|
int | window_get_item_index (int16_t id) |
|
void | window_set_top_index (int16_t id, int index) |
|
int | window_get_top_index (int16_t id) |
|
void | window_set_icon_id (int16_t id, uint16_t id_res) |
|
uint16_t | window_get_icon_id (int16_t id) |
|
void | window_set_min (int16_t id, float min) |
|
float | window_get_min (int16_t id) |
|
void | window_set_max (int16_t id, float max) |
|
float | window_get_max (int16_t id) |
|
void | window_set_step (int16_t id, float step) |
|
float | window_get_step (int16_t id) |
|
void | window_set_min_max (int16_t id, float min, float max) |
|
void | window_set_min_max_step (int16_t id, float min, float max, float step) |
|
void | window_dispatch_event (window_t *window, uint8_t event, void *param) |
|
void | window_set_item_callback (int16_t id, window_list_item_t *fnc) |
|
void | gui_invalidate (void) |
|
static void | _window_invalidate (window_t *window) |
|
◆ WINDOW_CLS_FRAME
#define WINDOW_CLS_FRAME 0 |
◆ WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT 1 |
◆ WINDOW_CLS_NUMB
#define WINDOW_CLS_NUMB 2 |
◆ WINDOW_CLS_ICON
#define WINDOW_CLS_ICON 3 |
◆ WINDOW_CLS_LIST
#define WINDOW_CLS_LIST 4 |
◆ WINDOW_CLS_EDIT
#define WINDOW_CLS_EDIT 5 |
◆ WINDOW_CLS_SPIN
#define WINDOW_CLS_SPIN 6 |
◆ WINDOW_CLS_TXIC
#define WINDOW_CLS_TXIC 7 |
◆ WINDOW_CLS_TERM
#define WINDOW_CLS_TERM 8 |
◆ WINDOW_CLS_MENU
#define WINDOW_CLS_MENU 9 |
◆ WINDOW_CLS_MSGBOX
#define WINDOW_CLS_MSGBOX 10 |
◆ WINDOW_CLS_PROGRESS
#define WINDOW_CLS_PROGRESS 11 |
◆ WINDOW_CLS_USER
#define WINDOW_CLS_USER 128 |
◆ WINDOW_FLG_VISIBLE
#define WINDOW_FLG_VISIBLE 0x00000001 |
◆ WINDOW_FLG_ENABLED
#define WINDOW_FLG_ENABLED 0x00000002 |
◆ WINDOW_FLG_INVALID
#define WINDOW_FLG_INVALID 0x00000004 |
◆ WINDOW_FLG_FOCUSED
#define WINDOW_FLG_FOCUSED 0x00000008 |
◆ WINDOW_FLG_CHECKED
#define WINDOW_FLG_CHECKED 0x00000010 |
◆ WINDOW_FLG_CAPTURE
#define WINDOW_FLG_CAPTURE 0x00000020 |
◆ WINDOW_FLG_DISABLED
#define WINDOW_FLG_DISABLED 0x00000040 |
◆ WINDOW_FLG_FREEMEM
#define WINDOW_FLG_FREEMEM 0x00004000 |
◆ WINDOW_FLG_PARENT
#define WINDOW_FLG_PARENT 0x00008000 |
◆ WINDOW_FLG_USER
#define WINDOW_FLG_USER 0x00010000 |
◆ WINDOW_EVENT_BTN_DN
#define WINDOW_EVENT_BTN_DN 0x01 |
◆ WINDOW_EVENT_BTN_UP
#define WINDOW_EVENT_BTN_UP 0x02 |
◆ WINDOW_EVENT_ENC_DN
#define WINDOW_EVENT_ENC_DN 0x03 |
◆ WINDOW_EVENT_ENC_UP
#define WINDOW_EVENT_ENC_UP 0x04 |
◆ WINDOW_EVENT_FOCUS0
#define WINDOW_EVENT_FOCUS0 0x05 |
◆ WINDOW_EVENT_FOCUS1
#define WINDOW_EVENT_FOCUS1 0x06 |
◆ WINDOW_EVENT_CAPT_0
#define WINDOW_EVENT_CAPT_0 0x07 |
◆ WINDOW_EVENT_CAPT_1
#define WINDOW_EVENT_CAPT_1 0x08 |
◆ WINDOW_EVENT_CLICK
#define WINDOW_EVENT_CLICK 0x09 |
◆ WINDOW_EVENT_CHANGE
#define WINDOW_EVENT_CHANGE 0x0a |
◆ WINDOW_EVENT_CHANGING
#define WINDOW_EVENT_CHANGING 0x0b |
◆ WINDOW_EVENT_LOOP
#define WINDOW_EVENT_LOOP 0x0c |
◆ WINDOW_EVENT_TIMER
#define WINDOW_EVENT_TIMER 0x0d |
◆ WINDOW_EVENT_MESSAGE
#define WINDOW_EVENT_MESSAGE 0x0e |
◆ window_t
◆ window_init_t
typedef void() window_init_t(void *window) |
◆ window_done_t
typedef void() window_done_t(void *window) |
◆ window_draw_t
typedef void() window_draw_t(void *window) |
◆ window_event_t
◆ window_list_t
◆ window_list_item_t
typedef void() window_list_item_t(window_list_t *pwindow_list, uint16_t index, const char **pptext, uint16_t *pid_icon) |
◆ window_class_t
◆ window_ptr()
◆ window_id()
87 return (ptr) ? ptr->
id : -1;
◆ window_register_class()
◆ window_create()
int16_t window_create |
( |
int16_t |
cls_id, |
|
|
int16_t |
id_parent, |
|
|
rect_ui16_t |
rect |
|
) |
| |
◆ window_create_ptr()
int16_t window_create_ptr |
( |
int16_t |
cls_id, |
|
|
int16_t |
id_parent, |
|
|
rect_ui16_t |
rect, |
|
|
void * |
ptr |
|
) |
| |
126 if (win && (ptr == 0))
◆ window_destroy()
void window_destroy |
( |
int16_t |
id | ) |
|
◆ window_destroy_children()
void window_destroy_children |
( |
int16_t |
id | ) |
|
◆ window_focused()
int16_t window_focused |
( |
void |
| ) |
|
◆ window_capture()
int16_t window_capture |
( |
void |
| ) |
|
◆ window_parent()
int16_t window_parent |
( |
int16_t |
id | ) |
|
◆ window_prev()
int16_t window_prev |
( |
int16_t |
id | ) |
|
◆ window_next()
int16_t window_next |
( |
int16_t |
id | ) |
|
◆ window_prev_enabled()
int16_t window_prev_enabled |
( |
int16_t |
id | ) |
|
◆ window_next_enabled()
int16_t window_next_enabled |
( |
int16_t |
id | ) |
|
◆ window_first_child()
int16_t window_first_child |
( |
int16_t |
id | ) |
|
219 int16_t id_parent = id;
◆ window_child_count()
int window_child_count |
( |
int16_t |
id | ) |
|
◆ window_enabled_child_count()
int window_enabled_child_count |
( |
int16_t |
id | ) |
|
◆ window_is_visible()
int window_is_visible |
( |
int16_t |
id | ) |
|
◆ window_is_enabled()
int window_is_enabled |
( |
int16_t |
id | ) |
|
◆ window_is_invalid()
int window_is_invalid |
( |
int16_t |
id | ) |
|
◆ window_is_focused()
int window_is_focused |
( |
int16_t |
id | ) |
|
◆ window_is_capture()
int window_is_capture |
( |
int16_t |
id | ) |
|
◆ window_draw()
void window_draw |
( |
int16_t |
id | ) |
|
◆ window_draw_children()
void window_draw_children |
( |
int16_t |
id | ) |
|
◆ window_validate()
void window_validate |
( |
int16_t |
id | ) |
|
◆ window_invalidate()
void window_invalidate |
( |
int16_t |
id | ) |
|
◆ window_validate_children()
void window_validate_children |
( |
int16_t |
id | ) |
|
◆ window_invalidate_children()
void window_invalidate_children |
( |
int16_t |
id | ) |
|
◆ window_set_tag()
◆ _window_set_tag()
◆ window_get_tag()
uint8_t window_get_tag |
( |
int16_t |
id | ) |
|
◆ _window_get_tag()
◆ window_set_text()
void window_set_text |
( |
int16_t |
id, |
|
|
const char * |
text |
|
) |
| |
◆ window_get_text()
char* window_get_text |
( |
int16_t |
id | ) |
|
◆ window_set_value()
void window_set_value |
( |
int16_t |
id, |
|
|
float |
value |
|
) |
| |
◆ window_get_value()
float window_get_value |
( |
int16_t |
id | ) |
|
◆ window_set_format()
void window_set_format |
( |
int16_t |
id, |
|
|
const char * |
format |
|
) |
| |
◆ window_get_format()
char* window_get_format |
( |
int16_t |
id | ) |
|
◆ window_set_color_back()
◆ window_get_color_back()
color_t window_get_color_back |
( |
int16_t |
id | ) |
|
◆ window_set_color_text()
◆ window_get_color_text()
color_t window_get_color_text |
( |
int16_t |
id | ) |
|
◆ window_set_focus()
void window_set_focus |
( |
int16_t |
id | ) |
|
◆ window_set_capture()
void window_set_capture |
( |
int16_t |
id | ) |
|
◆ window_enable()
void window_enable |
( |
int16_t |
id | ) |
|
◆ window_disable()
void window_disable |
( |
int16_t |
id | ) |
|
◆ window_show()
void window_show |
( |
int16_t |
id | ) |
|
◆ window_hide()
void window_hide |
( |
int16_t |
id | ) |
|
◆ window_set_padding()
◆ window_set_alignment()
void window_set_alignment |
( |
int16_t |
id, |
|
|
uint8_t |
alignment |
|
) |
| |
◆ window_set_item_count()
void window_set_item_count |
( |
int16_t |
id, |
|
|
int |
count |
|
) |
| |
◆ window_get_item_count()
int window_get_item_count |
( |
int16_t |
id | ) |
|
◆ window_set_item_index()
void window_set_item_index |
( |
int16_t |
id, |
|
|
int |
index |
|
) |
| |
◆ window_get_item_index()
int window_get_item_index |
( |
int16_t |
id | ) |
|
◆ window_set_top_index()
void window_set_top_index |
( |
int16_t |
id, |
|
|
int |
index |
|
) |
| |
◆ window_get_top_index()
int window_get_top_index |
( |
int16_t |
id | ) |
|
◆ window_set_icon_id()
void window_set_icon_id |
( |
int16_t |
id, |
|
|
uint16_t |
id_res |
|
) |
| |
◆ window_get_icon_id()
uint16_t window_get_icon_id |
( |
int16_t |
id | ) |
|
◆ window_set_min()
void window_set_min |
( |
int16_t |
id, |
|
|
float |
min |
|
) |
| |
◆ window_get_min()
float window_get_min |
( |
int16_t |
id | ) |
|
◆ window_set_max()
void window_set_max |
( |
int16_t |
id, |
|
|
float |
max |
|
) |
| |
◆ window_get_max()
float window_get_max |
( |
int16_t |
id | ) |
|
◆ window_set_step()
void window_set_step |
( |
int16_t |
id, |
|
|
float |
step |
|
) |
| |
◆ window_get_step()
float window_get_step |
( |
int16_t |
id | ) |
|
◆ window_set_min_max()
void window_set_min_max |
( |
int16_t |
id, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
◆ window_set_min_max_step()
void window_set_min_max_step |
( |
int16_t |
id, |
|
|
float |
min, |
|
|
float |
max, |
|
|
float |
step |
|
) |
| |
◆ window_dispatch_event()
798 if (window && window->
event)
799 window->
event(window, event, param);
◆ window_set_item_callback()
◆ gui_invalidate()
◆ _window_invalidate()
◆ window_focused_ptr
◆ window_capture_ptr
void gui_timers_delete_by_window_id(int16_t win_id)
Definition: gui_timer.c:91
#define WINDOW_MAX_USERCLS
Definition: window.c:8
#define WINDOW_EVENT_CAPT_0
Definition: window.h:44
window_t * window_ptr(int16_t id)
Definition: window.c:82
Definition: window_text.h:15
int window_is_enabled(int16_t id)
Definition: window.c:257
#define WINDOW_EVENT_CAPT_1
Definition: window.h:45
uint16_t size
Definition: window.h:69
int16_t id_parent
Definition: window.h:78
void gui_free(void *ptr)
Definition: gui.c:39
int16_t cls_id
Definition: window.h:68
uint32_t f_enabled
Definition: window.h:86
Definition: window_frame.h:18
Definition: window_spin.h:12
uint32_t f_timer
Definition: window.h:94
#define WINDOW_CLS_NUMB
Definition: window.h:11
void * gui_malloc(unsigned int size)
Definition: gui.c:35
window_t * window_free_id(int16_t id)
Definition: window.c:64
#define WINDOW_CLS_USER
Definition: window.h:21
#define WINDOW_FLG_VISIBLE
Definition: window.h:24
#define max(a, b)
Definition: wiring_constants.h:40
window_draw_t * draw
Definition: window.h:72
uint16_t gui_flags
Definition: gui.c:9
int32_t osSignalSet(osThreadId thread_id, int32_t signal)
Set the specified Signal Flags of an active thread.
Definition: cmsis_os.c:545
void window_destroy(int16_t id)
Definition: window.c:132
window_t * window_0
Definition: window.c:12
Definition: window_icon.h:11
void window_destroy_children(int16_t id)
Definition: window.c:157
int16_t window_first_child(int16_t id)
Definition: window.c:218
#define GUI_FLG_INVALID
Definition: gui.c:7
window_done_t * done
Definition: window.h:71
window_t * window_focused_ptr
Definition: window.c:19
int16_t id
Definition: window.h:79
uint32_t f_invalid
Definition: window.h:87
#define WINDOW_CLS_LIST
Definition: window.h:13
Definition: window_numb.h:17
uint32_t f_parent
Definition: window.h:95
void gui_invalidate(void)
Definition: gui.c:66
#define min(a, b)
Definition: wiring_constants.h:36
#define WINDOW_CLS_SPIN
Definition: window.h:15
window_class_t * window_user_classes[WINDOW_MAX_USERCLS]
Definition: window.c:40
#define WINDOW_CLS_PROGRESS
Definition: window.h:20
static int rect_empty_ui16(rect_ui16_t rc)
Definition: guitypes.h:177
rect_ui16_t rect_intersect_ui16(rect_ui16_t rc, rect_ui16_t rc1)
Definition: guitypes.c:37
#define WINDOW_EVENT_FOCUS0
Definition: window.h:42
window_event_t * event
Definition: window.h:73
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
#define WINDOW_CLS_FRAME
Definition: window.h:9
#define WINDOW_CLS_MENU
Definition: window.h:18
#define WINDOW_EVENT_FOCUS1
Definition: window.h:43
window_init_t * init
Definition: window.h:70
void gui_invalidate(void)
Definition: gui.c:66
int16_t window_prev(int16_t id)
Definition: window.c:180
uint16_t window_count
Definition: window.c:17
rect_ui16_t rect
Definition: window.h:101
uint16_t window_user_class_count
Definition: window.c:42
#define WINDOW_CLS_ICON
Definition: window.h:12
uint32_t f_capture
Definition: window.h:90
#define WINDOW_CLS_TEXT
Definition: window.h:10
uint32_t f_visible
Definition: window.h:85
int16_t window_next(int16_t id)
Definition: window.c:192
#define WINDOW_MAX_WINDOWS
Definition: window.c:6
window_event_t * event
Definition: window.h:102
#define COLOR_BLACK
Definition: guitypes.h:40
int16_t window_new_id(window_t *window)
Definition: window.c:44
window_t * window_capture_ptr
Definition: window.c:21
uint32_t f_focused
Definition: window.h:88
window_class_t * class_ptr(int16_t cls_id)
Definition: window.c:73
int
Definition: createSpeedLookupTable.py:15
window_t * window_1
Definition: window.c:14
window_t * windows[WINDOW_MAX_WINDOWS]
Definition: window.c:16
#define WINDOW_FLG_FREEMEM
Definition: window.h:31
Definition: window_list.h:15
uint32_t flg
Definition: window.h:81
Definition: window_progress.h:15
window_class_t * cls
Definition: window.h:77
#define WINDOW_FLG_INVALID
Definition: window.h:26
uint32_t f_tag
Definition: window.h:98
static void _window_invalidate(window_t *window)
Definition: window.h:257
#define GUI_SIG_REDRAW
Definition: guiconfig.h:15
uint32_t f_freemem
Definition: window.h:93