diff options
Diffstat (limited to 'apps/gui/bitmap/list-skinned.c')
-rw-r--r-- | apps/gui/bitmap/list-skinned.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index 81ef6fc18f..d0803b5dc8 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c | |||
@@ -167,6 +167,20 @@ void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown) | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | bool skinlist_get_item(struct screen *display, struct gui_synclist *list, int x, int y, int *item) | ||
171 | { | ||
172 | const int screen = display->screen_type; | ||
173 | if (!skinlist_is_configured(screen, list)) | ||
174 | return false; | ||
175 | |||
176 | int row = y / listcfg[screen]->height; | ||
177 | int column = x / listcfg[screen]->width; | ||
178 | struct viewport *parent = (list->parent[screen]); | ||
179 | int cols = (parent->width / listcfg[screen]->width); | ||
180 | *item = row * cols+ column; | ||
181 | return true; | ||
182 | } | ||
183 | |||
170 | bool skinlist_draw(struct screen *display, struct gui_synclist *list) | 184 | bool skinlist_draw(struct screen *display, struct gui_synclist *list) |
171 | { | 185 | { |
172 | int cur_line, display_lines; | 186 | int cur_line, display_lines; |