Revert hotkey bitmaps
[kugel-rb.git] / apps / gui / icon.h
blob9a58076509561ec6409a5e367ef4cd4636cc4d45
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 #define NOICON Icon_NOICON
34 #define FORCE_INBUILT_ICON 0x80000000
35 /* Don't #ifdef icon values, or we wont be able to use the same
36 bmp for every target. */
37 enum themable_icons {
38 Icon_NOICON = -1, /* Dont put this in a .bmp */
39 Icon_Audio,
40 Icon_Folder,
41 Icon_Playlist,
42 Icon_Cursor,
43 Icon_Wps,
44 Icon_Firmware,
45 Icon_Font,
46 Icon_Language,
47 Icon_Config,
48 Icon_Plugin,
49 Icon_Bookmark,
50 Icon_Preset,
51 Icon_Queued,
52 Icon_Moving,
53 Icon_Keyboard,
54 Icon_Reverse_Cursor,
55 Icon_Questionmark,
56 Icon_Menu_setting,
57 Icon_Menu_functioncall,
58 Icon_Submenu,
59 Icon_Submenu_Entered,
60 Icon_Recording,
61 Icon_Voice,
62 Icon_General_settings_menu,
63 Icon_System_menu,
64 Icon_Playback_menu,
65 Icon_Display_menu,
66 Icon_Remote_Display_menu,
67 Icon_Radio_screen,
68 Icon_file_view_menu,
69 Icon_EQ,
70 Icon_Rockbox,
71 Icon_Last_Themeable,
75 * Draws a cursor at a given position, if th
76 * - screen : the screen where we put the cursor
77 * - x, y : the position, in character, not in pixel !!
78 * - on : true if the cursor must be shown, false if it must be erased
80 extern void screen_put_cursorxy(struct screen * screen, int x, int y, bool on);
83 * Put an icon on a screen at a given position
84 * (the position is given in characters)
85 * If the given icon is Icon_blank, the icon
86 * at the given position will be erased
87 * - screen : the screen where we put our icon
88 * - x, y : the position, pixel value !!
89 * - icon : the icon to put
91 extern void screen_put_iconxy(struct screen * screen,
92 int x, int y, enum themable_icons icon);
93 #ifdef HAVE_LCD_CHARCELLS
94 # define screen_put_icon(s, x, y, i) screen_put_iconxy(s, x, y, i)
95 # define screen_put_icon_with_offset(s, x, y, w, h, i) screen_put_icon(s, x, y, i)
96 #else
97 /* For both of these, the icon will be placed in the center of the rectangle */
98 /* as above, but x,y are letter position, NOT PIXEL */
99 extern void screen_put_icon(struct screen * screen,
100 int x, int y, enum themable_icons icon);
101 /* as above (x,y are letter pos), but with a pxiel offset for both */
102 extern void screen_put_icon_with_offset(struct screen * display,
103 int x, int y, int off_x, int off_y,
104 enum themable_icons icon);
105 #endif
107 void icons_init(void);
110 #ifdef HAVE_LCD_CHARCELLS
111 # define CURSOR_CHAR 0xe10c
112 # define get_icon_width(a) 6
113 #else
114 int get_icon_width(enum screen_type screen_type);
115 #endif
117 #endif /*_GUI_ICON_H_*/