Musepack speed optimization. Speep up 64 bit precision synthesizer by another 1.5MHz...
[kugel-rb.git] / apps / gui / buttonbar.h
blob98eb83b184e6006843f8a82f7cc4791f355ce45a
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_BUTTONBAR_H_
21 #define _GUI_BUTTONBAR_H_
22 #include "config.h"
23 #include "button.h"
24 #include "screen_access.h"
27 #ifdef HAVE_BUTTONBAR
28 #define BUTTONBAR_HEIGHT 8
29 #define BUTTONBAR_MAX_BUTTONS 3
30 #define BUTTONBAR_CAPTION_LENGTH 8
33 struct gui_buttonbar
35 char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH];
36 struct screen * display;
40 * Initializes the buttonbar
41 * - buttonbar : the buttonbar
43 extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar);
46 * Attach the buttonbar to a screen
47 * - buttonbar : the buttonbar
48 * - display : the display to attach the buttonbar
50 extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
51 struct screen * display);
54 * Set the caption of the items of the buttonbar
55 * - buttonbar : the buttonbar
56 * - caption1,2,3 : the first, second and thirds items of the bar
58 extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
59 const char *caption1,
60 const char *caption2,
61 const char *caption3);
64 * Disable the buttonbar
65 * - buttonbar : the buttonbar
67 extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar);
70 * Draw the buttonbar on it's attached screen
71 * - buttonbar : the buttonbar
73 extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar);
76 * Returns true if the buttonbar has something to display, false otherwise
77 * - buttonbar : the buttonbar
79 extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar);
80 #else
81 #define BUTTONBAR_HEIGHT 0
82 #endif
83 #endif /* _GUI_BUTTONBAR_H_ */