autodetection: convert path to native separators before displaying it.
[Rockbox.git] / apps / gui / icon.h
blob8408ed46b006fd8fe7152d5f54d1e86c581950dc
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Kevin Ferrare
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _GUI_ICON_H_
21 #define _GUI_ICON_H_
22 #include "screen_access.h"
23 /* Defines a type for the icons since it's not the same thing on
24 * char-based displays and bitmap displays */
25 #ifdef HAVE_LCD_BITMAP
26 typedef const unsigned char * ICON;
27 #else
28 typedef long ICON;
29 #endif
31 #define NOICON Icon_NOICON
32 #define FORCE_INBUILT_ICON 0x80000000
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 Icon_NOICON = -1, /* Dont put this in a .bmp */
37 Icon_Audio,
38 Icon_Folder,
39 Icon_Playlist,
40 Icon_Cursor,
41 Icon_Wps,
42 Icon_Firmware,
43 Icon_Font,
44 Icon_Language,
45 Icon_Config,
46 Icon_Plugin,
47 Icon_Bookmark,
48 Icon_Preset,
49 Icon_Queued,
50 Icon_Moving,
51 Icon_Keyboard,
52 Icon_Reverse_Cursor,
53 Icon_Questionmark,
54 Icon_Menu_setting,
55 Icon_Menu_functioncall,
56 Icon_Submenu,
57 Icon_Submenu_Entered,
58 Icon_Recording,
59 Icon_Voice,
60 Icon_General_settings_menu,
61 Icon_System_menu,
62 Icon_Playback_menu,
63 Icon_Display_menu,
64 Icon_Remote_Display_menu,
65 Icon_Radio_screen,
66 Icon_file_view_menu,
67 Icon_EQ,
68 Icon_Rockbox,
69 Icon_Last_Themeable,
73 * Draws a cursor at a given position, if th
74 * - screen : the screen where we put the cursor
75 * - x, y : the position, in character, not in pixel !!
76 * - on : true if the cursor must be shown, false if it must be erased
78 extern void screen_put_cursorxy(struct screen * screen, int x, int y, bool on);
81 * Put an icon on a screen at a given position
82 * (the position is given in characters)
83 * If the given icon is Icon_blank, the icon
84 * at the given position will be erased
85 * - screen : the screen where we put our icon
86 * - x, y : the position, pixel value !!
87 * - icon : the icon to put
89 extern void screen_put_iconxy(struct screen * screen,
90 int x, int y, enum themable_icons icon);
91 #ifdef HAVE_LCD_CHARCELLS
92 # define screen_put_icon(s, x, y, i) screen_put_iconxy(s, x, y, i)
93 # define screen_put_icon_with_offset(s, x, y, w, h, i) screen_put_icon(s, x, y, i)
94 #else
95 /* For both of these, the icon will be placed in the center of the rectangle */
96 /* as above, but x,y are letter position, NOT PIXEL */
97 extern void screen_put_icon(struct screen * screen,
98 int x, int y, enum themable_icons icon);
99 /* as above (x,y are letter pos), but with a pxiel offset for both */
100 extern void screen_put_icon_with_offset(struct screen * display,
101 int x, int y, int off_x, int off_y,
102 enum themable_icons icon);
103 #endif
105 void icons_init(void);
108 #ifdef HAVE_LCD_CHARCELLS
109 # define CURSOR_CHAR 0xe10c
110 # define get_icon_width(a) 6
111 #else
112 int get_icon_width(enum screen_type screen_type);
113 #endif
115 #endif /*_GUI_ICON_H_*/