1 #ifndef GUI_H
2 #define GUI_H
3
4
5
6
7
8
9
10
11 enum Gui_Mode_ {
12 GUI_MODE_STARTUP = -1,
13 GUI_MODE_NONE = 0,
14 GUI_MODE_ALT,
15 GUI_MODE_MENU,
16 GUI_MODE_SCRIPT,
17 GUI_MODE_MBOX,
18 GUI_MODE_OSD,
19 GUI_MODE_PALETTE,
20 GUI_MODE_FSELECT,
21 GUI_MODE_MPOPUP,
22 GUI_MODE_MODULE,
23 };
24
25 typedef unsigned int gui_mode_t;
26
27
28
29
30
31 enum ALT_Mode_State {
32 ALT_MODE_NORMAL = 0,
33 ALT_MODE_ENTER,
34 ALT_MODE_ENTER_SCRIPT,
35 ALT_MODE_LEAVE,
36 };
37
38 extern void gui_set_alt_mode_state(int);
39 extern void gui_activate_alt_mode();
40
41 #define GUI_MODE_MAGICNUM 0xd36c1559
42
43
44 #define GUI_MODE_FLAG_NODRAWRESTORE 1
45 #define GUI_MODE_FLAG_NORESTORE_ON_SWITCH 2
46
47
48 typedef struct
49 {
50
51 int mode;
52
53
54 void (*redraw)(int);
55
56
57
58
59
60 int (*kbd_process)(void);
61
62
63 void (*kbd_process_menu_btn)(void);
64
65 int (*touch_handler)(int x, int y);
66
67 int flags;
68 } gui_handler;
69
70 extern int script_run_on_alt_flag ;
71
72 extern gui_handler altGuiHandler;
73
74 extern int gui_kbd_process();
75 extern void gui_default_kbd_process_menu_btn();
76 extern int gui_touch_process(int x, int y);
77
78 extern void gui_redraw();
79 extern void gui_set_need_restore();
80 extern void gui_cancel_need_restore();
81
82 extern gui_handler* gui_set_mode(gui_handler *mode);
83 extern void gui_reset_alt_helper();
84
85 extern void gui_enum_value_change(int *value, int change, unsigned num_items);
86 extern const char* gui_subj_dist_override_value_enum(int change, int arg);
87 extern const char* gui_subj_dist_override_koef_enum(int change, int arg);
88 extern const char* gui_tv_override_value_enum(int change, int arg);
89 extern const char* gui_hhmss_enum(int change, int arg);
90 extern const char* gui_flash_power_modes_enum(int change, int arg);
91 extern const char* gui_flash_exp_comp_modes_enum(int change, int arg);
92
93
94
95 #endif