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 ****************************************************************************/
20 #ifndef _GUI_TEXTAREA_H_
21 #define _GUI_TEXTAREA_H_
22 #include "screen_access.h"
24 #include "statusbar.h"
33 * Clears the area in the screen in which text can be displayed
34 * and sets the y margin properly
35 * - display : the screen structure
37 extern void gui_textarea_clear(struct screen
* display
);
40 * Updates the area in the screen in which text can be displayed
41 * - display : the screen structure
43 extern void gui_textarea_update(struct screen
* display
);
46 * Displays message lines on the given screen
47 * - display : the screen structure
48 * - message : the lines to display
49 * - ystart : the lineon which we start displaying
50 * returns : the number of lines effectively displayed
52 extern int gui_textarea_put_message(struct screen
* display
,
53 struct text_message
* message
,
56 * Compute the number of text lines the display can draw with the current font
57 * Also updates the char height and width
58 * - display : the screen structure
60 extern void gui_textarea_update_nblines(struct screen
* display
);
62 #ifdef HAVE_LCD_BITMAP
64 * Compute the number of pixels from which text can be displayed
65 * - display : the screen structure
66 * Returns the number of pixels
68 #define gui_textarea_get_ystart(display) \
69 ( (global_settings.statusbar)? STATUSBAR_HEIGHT : 0)
72 * Compute the number of pixels below which text can't be displayed
73 * - display : the screen structure
74 * Returns the number of pixels
77 #define gui_textarea_get_yend(display) \
78 ( (display)->height - ( (global_settings.buttonbar && \
79 (display)->has_buttonbar)? \
80 BUTTONBAR_HEIGHT : 0) )
82 #define gui_textarea_get_yend(display) \
84 #endif /* HAS_BUTTONBAR */
86 #endif /* HAVE_LCD_BITMAP */
88 #endif /* _GUI_TEXTAREA_H_ */