summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-16 22:20:11 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-16 22:20:11 +0000
commit4c48b59be8ba41b80350d5329d0f13240229da0a (patch)
treee8cb9547c4d8d5faff39de2aef5626a5cabc689d /apps/settings_list.c
parentc0897a8002d493244efd69fca5c433dbafe8d5be (diff)
downloadrockbox-4c48b59be8ba41b80350d5329d0f13240229da0a.tar.gz
rockbox-4c48b59be8ba41b80350d5329d0f13240229da0a.zip
User definable UI viewport, to be able to restrict the UI into a viewport for all bitmap displays.
Flyspray: FS#8799 This will allow for pretty themes, for example those with nice glass effects on their backdrops (some might argue they're wasting screen space but it's upto them), as well as allowing for future background WPS updates in the main UI. Plugins are not converted yet, they simply use the full screen. Ideally, any plugin that does *not* want the UI viewport, should take care of that itself (i.e. plugins should normally use the UI viewport). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22365 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index c03731f2b7..98dd900e3c 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -180,6 +180,10 @@
180 {.custom = (void*)default}, name, NULL, \ 180 {.custom = (void*)default}, name, NULL, \
181 {.custom_setting = (struct custom_setting[]){ \ 181 {.custom_setting = (struct custom_setting[]){ \
182 {load_from_cfg, write_to_cfg, is_change, set_default}}}} 182 {load_from_cfg, write_to_cfg, is_change, set_default}}}}
183
184#define VIEWPORT_SETTING(var,name,default) \
185 TEXT_SETTING(0,var,name,default, NULL, NULL)
186
183/* some sets of values which are used more than once, to save memory */ 187/* some sets of values which are used more than once, to save memory */
184static const char off_on[] = "off,on"; 188static const char off_on[] = "off,on";
185static const char off_on_ask[] = "off,on,ask"; 189static const char off_on_ask[] = "off,on,ask";
@@ -1539,6 +1543,13 @@ const struct settings_list settings[] = {
1539#endif 1543#endif
1540#endif 1544#endif
1541 1545
1546 /* Customizable list */
1547#ifdef HAVE_LCD_BITMAP
1548 VIEWPORT_SETTING(ui_vp_config, "ui viewport", ""),
1549#ifdef HAVE_REMOTE_LCD
1550 VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport", ""),
1551#endif
1552#endif
1542}; 1553};
1543 1554
1544const int nb_settings = sizeof(settings)/sizeof(*settings); 1555const int nb_settings = sizeof(settings)/sizeof(*settings);