From 4c48b59be8ba41b80350d5329d0f13240229da0a Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 16 Aug 2009 22:20:11 +0000 Subject: 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 --- apps/settings_list.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/settings_list.c') 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 @@ {.custom = (void*)default}, name, NULL, \ {.custom_setting = (struct custom_setting[]){ \ {load_from_cfg, write_to_cfg, is_change, set_default}}}} + +#define VIEWPORT_SETTING(var,name,default) \ + TEXT_SETTING(0,var,name,default, NULL, NULL) + /* some sets of values which are used more than once, to save memory */ static const char off_on[] = "off,on"; static const char off_on_ask[] = "off,on,ask"; @@ -1539,6 +1543,13 @@ const struct settings_list settings[] = { #endif #endif + /* Customizable list */ +#ifdef HAVE_LCD_BITMAP + VIEWPORT_SETTING(ui_vp_config, "ui viewport", ""), +#ifdef HAVE_REMOTE_LCD + VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport", ""), +#endif +#endif }; const int nb_settings = sizeof(settings)/sizeof(*settings); -- cgit v1.2.3