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 /* Don't #ifdef icon values, or we wont be able to use the same
34 bmp for every target. */
37 Icon_NOICON
= NOICON
, /* Dont put this in a .bmp */
56 Icon_Menu_functioncall
,
61 Icon_General_settings_menu
,
65 Icon_Remote_Display_menu
,
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)
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
);
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 */
114 int get_icon_width(enum screen_type screen_type
);
115 int get_icon_height(enum screen_type screen_type
);
119 #endif /*_GUI_ICON_H_*/