1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
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
;
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. */
38 Icon_NOICON
= -1, /* Dont put this in a .bmp */
57 Icon_Menu_functioncall
,
62 Icon_General_settings_menu
,
66 Icon_Remote_Display_menu
,
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)
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
);
107 void icons_init(void);
110 #ifdef HAVE_LCD_CHARCELLS
111 # define CURSOR_CHAR 0xe10c
112 # define get_icon_width(a) 6
114 int get_icon_width(enum screen_type screen_type
);
117 #endif /*_GUI_ICON_H_*/