summaryrefslogtreecommitdiffstats
path: root/apps/screen_access.h
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-10-29 02:33:19 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-10-29 02:33:19 +0000
commite75cbdd2a84904e9294091c0ae599762b067077a (patch)
tree96ebdd8d8a9cbe2495c896e489a9f413bc0ffd1f /apps/screen_access.h
parentdff9352430cfbcb8f3be5e26ccd752c7cdddf1e2 (diff)
downloadrockbox-e75cbdd2a84904e9294091c0ae599762b067077a.tar.gz
rockbox-e75cbdd2a84904e9294091c0ae599762b067077a.tar.bz2
rockbox-e75cbdd2a84904e9294091c0ae599762b067077a.zip
Some changes to the remote code : some one lines function turned into macros ; changed pre-increment to post-increment since it's clearer that way ; added a data pointer to the list callback (global variables are baaaad) ; some more documentation of the API and minor cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7681 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.h')
-rw-r--r--apps/screen_access.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h
index b04cabff46..2113a38757 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by KÚvin FERRARE
+ * Copyright (C) 2005 by K´┐Żin FERRARE
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -34,7 +34,7 @@ enum screen_type {
#define NB_SCREENS 1
#endif
-#ifndef HAVE_LCD_BITMAP
+#ifdef HAVE_LCD_CHARCELLS
#define MAX_LINES_ON_SCREEN 2
#endif
@@ -113,15 +113,23 @@ extern void screen_update_nblines(struct screen * screen);
* - screen : the screen structure
* Returns the number of pixels
*/
-extern int screen_get_text_y_start(struct screen * screen);
+#define screen_get_text_y_start(screen) \
+ (global_settings.statusbar?STATUSBAR_HEIGHT:0)
/*
* Compute the number of pixels below which text can't be displayed
* - screen : the screen structure
* Returns the number of pixels
*/
-extern int screen_get_text_y_end(struct screen * screen);
-#endif
+#ifdef HAS_BUTTONBAR
+#define screen_get_text_y_end(screen) \
+ ( (screen)->height - (global_settings.buttonbar?BUTTONBAR_HEIGHT:0) )
+#else
+#define screen_get_text_y_end(screen) \
+ ( (screen)->height )
+#endif /* HAS_BUTTONBAR */
+
+#endif /* HAVE_LCD_BITMAP */
/*
* Initializes the whole screen_access api