summaryrefslogtreecommitdiff
path: root/apps/screen_access.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-06-23 13:20:35 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-06-23 13:20:35 +0000
commitbdbdb97f19655a635a2d37f81f9fe1e31f9162b2 (patch)
treeea5672478b70e550910bc179a7644afa70c0d057 /apps/screen_access.h
parentc1b8df05e1def3096ff6d2ea55f23b2e72936fce (diff)
downloadrockbox-bdbdb97f19655a635a2d37f81f9fe1e31f9162b2.tar.gz
rockbox-bdbdb97f19655a635a2d37f81f9fe1e31f9162b2.zip
FS#9051 - remove LCD margins... use viewports if you need them...
NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.h')
-rw-r--r--apps/screen_access.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 07684b0a76..e0237db3b0 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -72,11 +72,8 @@ struct screen
72 bool has_buttonbar; 72 bool has_buttonbar;
73#endif 73#endif
74 void (*set_viewport)(struct viewport* vp); 74 void (*set_viewport)(struct viewport* vp);
75 void (*setmargins)(int x, int y);
76 int (*getwidth)(void); 75 int (*getwidth)(void);
77 int (*getheight)(void); 76 int (*getheight)(void);
78 int (*getxmargin)(void);
79 int (*getymargin)(void);
80 int (*getstringsize)(const unsigned char *str, int *w, int *h); 77 int (*getstringsize)(const unsigned char *str, int *w, int *h);
81#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */ 78#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
82 void (*setfont)(int newfont); 79 void (*setfont)(int newfont);
@@ -155,32 +152,6 @@ struct screen
155 void (*backlight_set_timeout)(int index); 152 void (*backlight_set_timeout)(int index);
156}; 153};
157 154
158#ifdef HAVE_BUTTONBAR
159/*
160 * Sets if the given screen has a buttonbar or not
161 * - screen : the screen structure
162 * - has : a boolean telling wether the current screen will have a buttonbar or not
163 */
164#define screen_has_buttonbar(screen, has_btnb) \
165 (screen)->has_buttonbar=has_btnb;
166#endif
167
168/*
169 * Sets the x margin in pixels for the given screen
170 * - screen : the screen structure
171 * - xmargin : the number of pixels to the left of the screen
172 */
173#define screen_set_xmargin(screen, xmargin) \
174 (screen)->setmargins(xmargin, (screen)->getymargin());
175
176/*
177 * Sets the y margin in pixels for the given screen
178 * - screen : the screen structure
179 * - xmargin : the number of pixels to the top of the screen
180 */
181#define screen_set_ymargin(screen, ymargin) \
182 (screen)->setmargins((screen)->getxmargin(), ymargin);
183
184#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) 155#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD)
185/* 156/*
186 * Clear only a given area of the screen 157 * Clear only a given area of the screen