summaryrefslogtreecommitdiffstats
path: root/apps/gui/list.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-04-10 17:15:22 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-04-10 22:24:28 -0400
commitddcab156f7b7675560d4e5bf4fdfab3ca59a6173 (patch)
tree98ab2634e31d7b26548e5cdbd39eeada9c65b717 /apps/gui/list.h
parent8dbc0914f6a09bea395f801f948b7a993d379493 (diff)
downloadrockbox-ddcab156f7b7675560d4e5bf4fdfab3ca59a6173.tar.gz
rockbox-ddcab156f7b7675560d4e5bf4fdfab3ca59a6173.zip
gui_synclist move global display settings to list struct
its really painful needing to override global settings in order to change some aspects of lists this patch moves: [scrollbar position, cursor type, talk_menus, keyclick, wrap around, scroll paginated] to variables within the synclist, it also makes updating after settings changes a necessity I think I have the static synclists in core covered (I think the one in gui/list-skinned can be left as is) this patch allows easy modification these flags on the fly Change-Id: Id0dcb8b05eb9ecd78929c0aff7678bf2ab4c70a7
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 1f910577a1..4dc83a1b27 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -36,6 +36,14 @@ enum list_wrap {
LIST_WRAP_UNLESS_HELD,
};
+enum synclist_cursor
+{
+ SYNCLIST_CURSOR_NOSTYLE = 0,
+ SYNCLIST_CURSOR_INVERT,
+ SYNCLIST_CURSOR_COLOR,
+ SYNCLIST_CURSOR_GRADIENT,
+};
+
/*
* The gui_list is based on callback functions, if you want the list
* to display something you have to provide it a function that
@@ -139,14 +147,24 @@ struct list_selection_color
struct gui_synclist
{
+ /*flags to hold settings show: icons, scrollbar etc..*/
+ int scrollbar;
+ int cursor_style;
+ bool show_icons;
+ bool keyclick;
+ bool talk_menu;
+ bool wraparound;
+ bool scroll_paginated;
/* defines wether the list should stop when reaching the top/bottom
* or should continue (by going to bottom/top) */
bool limit_scroll;
- /* wether the text of the whole items of the list have to be
+ /* whether the text of the whole items of the list have to be
* scrolled or only for the selected item */
bool scroll_all;
+ bool show_selection_marker; /* set to true by default */
int nb_items;
int selected_item;
+
#ifdef HAVE_TOUCHSCREEN
/* absolute Y coordinate, used for smooth scrolling */
int y_pos;
@@ -170,7 +188,6 @@ struct gui_synclist
char * title;
/* Optional title icon */
enum themable_icons title_icon;
- bool show_selection_marker; /* set to true by default */
#ifdef HAVE_LCD_COLOR
int title_color;
@@ -187,7 +204,7 @@ extern void gui_list_screen_scroll_step(int ofs);
/* parse global setting to static bool */
extern void gui_list_screen_scroll_out_of_view(bool enable);
-
+extern void gui_synclist_init_display_settings(struct gui_synclist * list);
extern void gui_synclist_init(
struct gui_synclist * lists,
list_get_name callback_get_item_name,