Prusa MINI Firmware overview
screen_menu.h
Go to the documentation of this file.
1 /*
2  * screen_menu.h
3  *
4  * Created on: 19. 7. 2019
5  * Author: mcbig
6  */
7 
8 #ifndef SCREEN_MENU_H_
9 #define SCREEN_MENU_H_
10 
11 #include "gui.h"
12 #include "window_header.h"
13 #include "status_footer.h"
14 #include "window_menu.h"
15 
16 #pragma pack(push)
17 #pragma pack(1)
18 
19 typedef struct _menu_item_t {
22 } menu_item_t;
23 
24 typedef struct
25 {
30 
33 
35 
36 #pragma pack(pop)
37 
38 #define SCREEN_MENU_RETURN (screen_t *)SIZE_MAX
39 #define SCREEN_MENU_NO_SCREEN NULL
40 #define psmd ((screen_menu_data_t *)screen->pdata)
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif //__cplusplus
45 
46 extern const menu_item_t menu_item_return;
47 
48 void screen_menu_init(screen_t *screen,
49  const char *label, int count, uint8_t footer, uint8_t help);
50 
51 void screen_menu_done(screen_t *screen);
52 
53 int screen_menu_event(screen_t *screen, window_t *window,
54  uint8_t event, void *param);
55 
56 void screen_menu_draw(screen_t *screen);
57 
58 #ifdef __cplusplus
59 }
60 #endif //__cplusplus
61 
62 #endif /* SCREEN_MENU_H_ */
lcdsim.h
_window_text_t
Definition: window_text.h:15
window_register_class
int16_t window_register_class(window_class_t *cls)
Definition: window.c:90
screen_marlin
screen_marlin_t screen_marlin
Definition: screen_marlin.c:32
_menu_item_t
Definition: screen_menu.h:19
screen_marlin_init
void screen_marlin_init(screen_marlin_t *screen)
Definition: screen_marlin.c:37
screen_menu_draw
void screen_menu_draw(screen_t *screen)
Definition: screen_menu.c:90
displayTaskHandle
osThreadId displayTaskHandle
Definition: main.c:98
screen_marlin_data_t::lcdsim
window_lcdsim_t lcdsim
Definition: screen_marlin.c:20
_window_frame_t
Definition: window_frame.h:18
WINDOW_CLS_LCDSIM
int16_t WINDOW_CLS_LCDSIM
Definition: window_lcdsim.c:6
osThreadId
TaskHandle_t osThreadId
Definition: cmsis_os.h:283
window_header_events
#define window_header_events(window)
Definition: window_header.h:72
_menu_item_t::screen
screen_t * screen
Definition: screen_menu.h:21
screen_menu_event
int screen_menu_event(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_menu.c:92
_screen_marlin_t::lcdsim_initialized
int lcdsim_initialized
Definition: screen_marlin.c:25
window_menu.h
window_invalidate
void window_invalidate(int16_t id)
Definition: window.c:304
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
_screen_marlin_t::scr
screen_t scr
Definition: screen_marlin.c:24
gui_malloc
void * gui_malloc(unsigned int size)
Definition: gui.c:35
screen_menu_done
void screen_menu_done(screen_t *screen)
Definition: screen_menu.c:78
data
uint8_t data[8]
Definition: masstorage.h:49
window_destroy
void window_destroy(int16_t id)
Definition: window.c:132
padding_ui8
static padding_ui8_t padding_ui8(uint8_t l, uint8_t t, uint8_t r, uint8_t b)
Definition: guitypes.h:164
screen_menu_data_t::header
window_header_t header
Definition: screen_menu.h:27
createSpeedLookupTable.help
help
Definition: createSpeedLookupTable.py:15
IDR_FNT_SPECIAL
#define IDR_FNT_SPECIAL
Definition: resource.h:13
SCREEN_MENU_NO_SCREEN
#define SCREEN_MENU_NO_SCREEN
Definition: screen_menu.h:39
hwio_jogwheel_disable
void hwio_jogwheel_disable(void)
Definition: hwio_a3ides_2209_02.c:472
screen_marlin_data_t::frame
window_frame_t frame
Definition: screen_marlin.c:18
screen_open
void screen_open(int16_t screen_id)
Definition: screen.c:62
screen_event_t
int() screen_event_t(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen.h:13
window_header.h
screen_marlin_draw
void screen_marlin_draw(screen_marlin_t *screen)
Definition: screen_marlin.c:71
NULL
#define NULL
Definition: usbd_def.h:53
screen_marlin_t
struct _screen_marlin_t screen_marlin_t
WINDOW_CLS_LOGO
int16_t WINDOW_CLS_LOGO
Definition: window_logo.c:11
pscreen_marlin
const screen_t * pscreen_marlin
Definition: screen_marlin.c:33
screen_menu.h
menu_item_t
struct _menu_item_t menu_item_t
screen_marlin_event
int screen_marlin_event(screen_marlin_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_marlin.c:74
screen_close
void screen_close(void)
Definition: screen.c:80
lcdsim_invalidate
void lcdsim_invalidate(void)
Definition: lcdsim.c:79
menu_item_return
const menu_item_t menu_item_return
Definition: screen_menu.c:14
window_disable
void window_disable(int16_t id)
Definition: window.c:523
screen_menu_init
void screen_menu_init(screen_t *screen, const char *label, int count, uint8_t footer, uint8_t help)
Definition: screen_menu.c:25
WI_DISABLED
Definition: window_menu.h:20
_menu_item_t::item
window_menu_item_t item
Definition: screen_menu.h:20
SCREEN_MENU_RETURN
#define SCREEN_MENU_RETURN
Definition: screen_menu.h:38
_window_t
Definition: window.h:76
_window_header_t
Definition: window_header.h:36
_screen_marlin_t
Definition: screen_marlin.c:23
window_lcdsim.h
WINDOW_CLS_FRAME
#define WINDOW_CLS_FRAME
Definition: window.h:9
screen_menu_data_t::items
menu_item_t * items
Definition: screen_menu.h:29
_psd
#define _psd
Definition: screen_marlin.c:35
screen_init_t
void() screen_init_t(screen_t *screen)
Definition: screen.h:10
WINDOW_CLS_MENU
#define WINDOW_CLS_MENU
Definition: window.h:18
window_set_focus
void window_set_focus(int16_t id)
Definition: window.c:480
pngview
void pngview(void)
Definition: pngview.c:58
window_set_capture
void window_set_capture(int16_t id)
Definition: window.c:500
psmd
#define psmd
Definition: screen_menu.h:40
IDR_PNG_filescreen_icon_up_folder
#define IDR_PNG_filescreen_icon_up_folder
Definition: resource.h:42
_window_logo_t
Definition: window_logo.h:20
window_set_tag
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
_rect_ui16_t
Definition: guitypes.h:69
WI_LABEL
Definition: window_menu.h:14
screen_marlin_data_t::logo_prusa_mini
window_logo_t logo_prusa_mini
Definition: screen_marlin.c:19
_window_menu_item_t
Definition: window_menu.h:58
screen_marlin_data_t
Definition: screen_marlin.c:16
screen_marlin_done
void screen_marlin_done(screen_marlin_t *screen)
Definition: screen_marlin.c:64
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_window_class_t
Definition: window.h:67
_rect_ui16_t::h
uint16_t h
Definition: guitypes.h:73
_screen_t
Definition: screen.h:18
menu_item_return
const menu_item_t menu_item_return
Definition: screen_menu.c:14
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
window_logo.h
resource_font
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
_window_menu_item_t::type
uint16_t type
Definition: window_menu.h:65
WINDOW_EVENT_CLICK
#define WINDOW_EVENT_CLICK
Definition: window.h:46
screen_menu_data_t::root
window_frame_t root
Definition: screen_menu.h:26
screen_menu_data_t::pfooter
status_footer_t * pfooter
Definition: screen_menu.h:32
window_create_ptr
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
screen_menu_data_t::menu
window_menu_t menu
Definition: screen_menu.h:28
screen_menu_data_t
Definition: screen_menu.h:24
screen_menu_data_t::phelp
window_text_t * phelp
Definition: screen_menu.h:31
screen_menu_event
int screen_menu_event(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_menu.c:92
_screen_t::id
int16_t id
Definition: screen.h:19
_window_lcdsim_t
Definition: window_lcdsim.h:15
WINDOW_EVENT_LOOP
#define WINDOW_EVENT_LOOP
Definition: window.h:49
screen_draw_t
void() screen_draw_t(screen_t *screen)
Definition: screen.h:12
createSpeedLookupTable.int
int
Definition: createSpeedLookupTable.py:15
lcdsim_init
void lcdsim_init(void)
Definition: lcdsim.c:71
config.h
_window_menu_t
Definition: window_menu.h:83
WINDOW_CLS_HEADER
int16_t WINDOW_CLS_HEADER
Definition: window_header.c:24
hwio_a3ides.h
gui.h
screen_menu_draw
void screen_menu_draw(screen_t *screen)
Definition: screen_menu.c:90
screen_done_t
void() screen_done_t(screen_t *screen)
Definition: screen.h:11
screen_menu_init
void screen_menu_init(screen_t *screen, const char *label, int count, uint8_t footer, uint8_t help)
Definition: screen_menu.c:25
screen_menu_item
void screen_menu_item(window_menu_t *pwindow_menu, uint16_t index, window_menu_item_t **ppitem, void *data)
Definition: screen_menu.c:19
hwio_jogwheel_enable
void hwio_jogwheel_enable(void)
Definition: hwio_a3ides_2209_02.c:468
cmsis_os.h
Header of cmsis_os.c A new set of APIs are added in addition to existing ones, these APIs are specifi...
p_window_header_set_text
void p_window_header_set_text(window_header_t *window, const char *text)
Definition: window_header.c:152
window_class_lcdsim
const window_class_lcdsim_t window_class_lcdsim
Definition: window_lcdsim.c:58
screen_menu_done
void screen_menu_done(screen_t *screen)
Definition: screen_menu.c:78