diff options
Diffstat (limited to 'apps/gui/quickscreen.h')
-rw-r--r-- | apps/gui/quickscreen.h | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/apps/gui/quickscreen.h b/apps/gui/quickscreen.h index 179d619883..47361bd472 100644 --- a/apps/gui/quickscreen.h +++ b/apps/gui/quickscreen.h | |||
@@ -27,45 +27,28 @@ | |||
27 | #include "option_select.h" | 27 | #include "option_select.h" |
28 | #include "screen_access.h" | 28 | #include "screen_access.h" |
29 | 29 | ||
30 | struct gui_quickscreen; | 30 | enum QUICKSCREEN_ITEM { |
31 | /* | 31 | QUICKSCREEN_LEFT = 0, |
32 | * Callback function called each time the quickscreen gets modified | 32 | QUICKSCREEN_RIGHT, |
33 | * - qs : the quickscreen that did the modification | 33 | QUICKSCREEN_BOTTOM, |
34 | */ | 34 | QUICKSCREEN_ITEM_COUNT, |
35 | typedef void (quickscreen_callback)(struct gui_quickscreen * qs); | 35 | }; |
36 | 36 | ||
37 | struct gui_quickscreen | 37 | struct gui_quickscreen |
38 | { | 38 | { |
39 | struct option_select *left_option; | 39 | const struct settings_list *items[QUICKSCREEN_ITEM_COUNT]; |
40 | struct option_select *bottom_option; | 40 | void (*callback)(struct gui_quickscreen * qs); /* called after a |
41 | struct option_select *right_option; | 41 | item is changed */ |
42 | quickscreen_callback *callback; | ||
43 | }; | 42 | }; |
44 | 43 | ||
45 | /* | 44 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter); |
46 | * Initializes a quickscreen | 45 | |
47 | * - qs : the quickscreen | ||
48 | * - left_option, bottom_option, right_option : a list of choices | ||
49 | * for each option | ||
50 | * - left_right_title : the 2nd line of the title | ||
51 | * on the left and on the right | ||
52 | * - callback : a callback function called each time the quickscreen | ||
53 | * gets modified | ||
54 | */ | ||
55 | void gui_quickscreen_init(struct gui_quickscreen * qs, | ||
56 | struct option_select *left_option, | ||
57 | struct option_select *bottom_option, | ||
58 | struct option_select *right_option, | ||
59 | quickscreen_callback *callback); | ||
60 | 46 | ||
47 | #ifdef BUTTON_F3 | ||
48 | extern bool quick_screen_f3(int button_enter); | ||
49 | #endif | ||
50 | extern bool quick_screen_quick(int button_enter); | ||
61 | 51 | ||
62 | /* | ||
63 | * Runs the quickscreen on all available screens, if button_enter is released, quits | ||
64 | * - qs : the quickscreen | ||
65 | * - button_enter : button pressed at the same time the quickscreen is displayed | ||
66 | * returns : true if usb was connected, false otherwise | ||
67 | */ | ||
68 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter); | ||
69 | 52 | ||
70 | #endif /*_GUI_QUICK_SCREEN_H_*/ | 53 | #endif /*_GUI_QUICK_SCREEN_H_*/ |
71 | #endif /* HAVE_QUICKSCREEN */ | 54 | #endif /* HAVE_QUICKSCREEN */ |