diff options
| author | Nils Wallménius <nils@rockbox.org> | 2007-09-18 19:05:35 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2007-09-18 19:05:35 +0000 |
| commit | a896f3d8b8a6fa7ab422b23701c0ea7c245cb307 (patch) | |
| tree | adef537d65e0f648e0eefa41117518ea8c332e89 /apps/screen_access.h | |
| parent | 98a39fb0579e983d559c3b64144903481d7b7a9a (diff) | |
| download | rockbox-a896f3d8b8a6fa7ab422b23701c0ea7c245cb307.zip rockbox-a896f3d8b8a6fa7ab422b23701c0ea7c245cb307.tar.gz rockbox-a896f3d8b8a6fa7ab422b23701c0ea7c245cb307.tar.bz2 rockbox-a896f3d8b8a6fa7ab422b23701c0ea7c245cb307.tar.xz | |
Simplify initing of the screens[] struct by using an initializer, also some reordering of the struct, and the required plugin api bump
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14743 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.h')
| -rw-r--r-- | apps/screen_access.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h index 822aab4..05a53d5 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -51,18 +51,20 @@ typedef void screen_bitmap_part_func(const void *src, int src_x, int src_y, typedef void screen_bitmap_func(const void *src, int x, int y, int width, int height); +/* if this struct is changed the plugin api may break so bump the api + versions in plugin.h */ struct screen { - int width, height; - int nb_lines; enum screen_type screen_type; + int width, height; int depth; - bool is_color; + int nb_lines; #ifdef HAVE_LCD_BITMAP int pixel_format; #endif int char_width; int char_height; + bool is_color; #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) bool has_disk_led; #endif @@ -72,7 +74,6 @@ struct screen void (*setmargins)(int x, int y); int (*getxmargin)(void); int (*getymargin)(void); - int (*getstringsize)(const unsigned char *str, int *w, int *h); #if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */ void (*setfont)(int newfont); @@ -124,7 +125,6 @@ struct screen void (*define_pattern)(unsigned long ucs, const char *pattern); void (*unlock_pattern)(unsigned long ucs); #endif - void (*init)(void); void (*putsxy)(int x, int y, const unsigned char *str); void (*puts)(int x, int y, const unsigned char *str); void (*puts_offset)(int x, int y, const unsigned char *str, int offset); @@ -142,13 +142,6 @@ struct screen void (*backlight_set_timeout)(int index); }; -/* - * Initializes the given screen structure for a given display - * - screen : the screen structure - * - display_type : currently 2 possibles values : MAIN or REMOTE - */ -extern void screen_init(struct screen * screen, enum screen_type screen_type); - #ifdef HAS_BUTTONBAR /* * Sets if the given screen has a buttonbar or not |