1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
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
;
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. */
36 Icon_NOICON
= -1, /* Dont put this in a .bmp */
55 Icon_Menu_functioncall
,
60 Icon_General_settings_menu
,
64 Icon_Remote_Display_menu
,
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)
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
);
105 void icons_init(void);
108 #ifdef HAVE_LCD_CHARCELLS
109 # define CURSOR_CHAR 0xe10c
110 # define get_icon_width(a) 6
112 int get_icon_width(enum screen_type screen_type
);
115 #endif /*_GUI_ICON_H_*/