Bump version numbers for 3.13
[maemo-rb.git] / apps / gui / icon.h
blobca7f04841d1cd913c7aeb321ec6d3693c2e17a33
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Kevin Ferrare
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _GUI_ICON_H_
23 #define _GUI_ICON_H_
24 #include "screen_access.h"
25 /* Defines a type for the icons since it's not the same thing on
26 * char-based displays and bitmap displays */
27 #ifdef HAVE_LCD_BITMAP
28 typedef const unsigned char * ICON;
29 #else
30 typedef long ICON;
31 #endif
33 /* Don't #ifdef icon values, or we wont be able to use the same
34 bmp for every target. */
35 enum themable_icons {
36 NOICON = -1,
37 Icon_NOICON = NOICON, /* Dont put this in a .bmp */
38 Icon_Audio,
39 Icon_Folder,
40 Icon_Playlist,
41 Icon_Cursor,
42 Icon_Wps,
43 Icon_Firmware,
44 Icon_Font,
45 Icon_Language,
46 Icon_Config,
47 Icon_Plugin,
48 Icon_Bookmark,
49 Icon_Preset,
50 Icon_Queued,
51 Icon_Moving,
52 Icon_Keyboard,
53 Icon_Reverse_Cursor,
54 Icon_Questionmark,
55 Icon_Menu_setting,
56 Icon_Menu_functioncall,
57 Icon_Submenu,
58 Icon_Submenu_Entered,
59 Icon_Recording,
60 Icon_Voice,
61 Icon_General_settings_menu,
62 Icon_System_menu,
63 Icon_Playback_menu,
64 Icon_Display_menu,
65 Icon_Remote_Display_menu,
66 Icon_Radio_screen,
67 Icon_file_view_menu,
68 Icon_EQ,
69 Icon_Rockbox,
70 Icon_Last_Themeable,
74 * Draws a cursor at a given position, if th
75 * - screen : the screen where we put the cursor
76 * - x, y : the position, in character, not in pixel !!
77 * - on : true if the cursor must be shown, false if it must be erased
79 extern void screen_put_cursorxy(struct screen * screen, int x, int y, bool on);
82 * Put an icon on a screen at a given position
83 * (the position is given in characters)
84 * If the given icon is Icon_blank, the icon
85 * at the given position will be erased
86 * - screen : the screen where we put our icon
87 * - x, y : the position, pixel value !!
88 * - icon : the icon to put
90 extern void screen_put_iconxy(struct screen * screen,
91 int x, int y, enum themable_icons icon);
92 #ifdef HAVE_LCD_CHARCELLS
93 # define screen_put_icon(s, x, y, i) screen_put_iconxy(s, x, y, i)
94 # define screen_put_icon_with_offset(s, x, y, w, h, i) screen_put_icon(s, x, y, i)
95 #else
96 /* For both of these, the icon will be placed in the center of the rectangle */
97 /* as above, but x,y are letter position, NOT PIXEL */
98 extern void screen_put_icon(struct screen * screen,
99 int x, int y, enum themable_icons icon);
100 /* as above (x,y are letter pos), but with a pxiel offset for both */
101 extern void screen_put_icon_with_offset(struct screen * display,
102 int x, int y, int off_x, int off_y,
103 enum themable_icons icon);
104 #endif
106 void icons_init(void);
109 #ifdef HAVE_LCD_CHARCELLS
110 # define CURSOR_CHAR 0xe10c
111 # define get_icon_width(a) 6
112 # define get_icon_height(a) 1 /* needs to be verified */
113 #else
114 int get_icon_width(enum screen_type screen_type);
115 int get_icon_height(enum screen_type screen_type);
116 #endif
119 #endif /*_GUI_ICON_H_*/