diff options
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r-- | apps/gui/list.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h index 64ff3e3fdd..1f910577a1 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -69,6 +69,35 @@ typedef enum themable_icons list_get_icon(int selected_item, void * data); | |||
69 | typedef const char * list_get_name(int selected_item, void * data, | 69 | typedef const char * list_get_name(int selected_item, void * data, |
70 | char * buffer, size_t buffer_len); | 70 | char * buffer, size_t buffer_len); |
71 | /* | 71 | /* |
72 | * Draw callback | ||
73 | * - display : functions supplied depends on the screen call originated from (typ: MAIN) | ||
74 | * - list_info : a pointer to an internal struct containing item display information | ||
75 | */ | ||
76 | /* owner drawn lists need to know this info */ | ||
77 | struct list_putlineinfo_t { | ||
78 | int x; | ||
79 | int y; | ||
80 | int item_indent; | ||
81 | int item_offset; | ||
82 | int line; | ||
83 | |||
84 | int icon; | ||
85 | int icon_width; | ||
86 | |||
87 | struct screen *display; | ||
88 | struct viewport *vp; | ||
89 | struct line_desc *linedes; | ||
90 | struct gui_synclist * list; | ||
91 | char *dsp_text; | ||
92 | |||
93 | bool is_selected; | ||
94 | bool is_title; | ||
95 | bool show_cursor; | ||
96 | bool have_icons; | ||
97 | }; | ||
98 | |||
99 | typedef void list_draw_item(struct list_putlineinfo_t *list_info); | ||
100 | /* | ||
72 | * Voice callback | 101 | * Voice callback |
73 | * - selected_item : an integer that tells the number of the item to speak | 102 | * - selected_item : an integer that tells the number of the item to speak |
74 | * - data : a void pointer to the data you gave to the list when you | 103 | * - data : a void pointer to the data you gave to the list when you |
@@ -133,6 +162,7 @@ struct gui_synclist | |||
133 | list_get_icon *callback_get_item_icon; | 162 | list_get_icon *callback_get_item_icon; |
134 | list_get_name *callback_get_item_name; | 163 | list_get_name *callback_get_item_name; |
135 | list_speak_item *callback_speak_item; | 164 | list_speak_item *callback_speak_item; |
165 | list_draw_item *callback_draw_item; | ||
136 | 166 | ||
137 | /* The data that will be passed to the callback function YOU implement */ | 167 | /* The data that will be passed to the callback function YOU implement */ |
138 | void * data; | 168 | void * data; |