add Packard Bell Vibe 500 to RBUtil.
[kugel-rb.git] / apps / gui / buttonbar.h
blob884e3132bfb2e8660ee20696a24e694bd5e529dd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
22 #ifndef _GUI_BUTTONBAR_H_
23 #define _GUI_BUTTONBAR_H_
24 #include "config.h"
25 #include "button.h"
26 #include "screen_access.h"
29 #ifdef HAVE_BUTTONBAR
30 #define BUTTONBAR_HEIGHT 8
31 #define BUTTONBAR_MAX_BUTTONS 3
32 #define BUTTONBAR_CAPTION_LENGTH 8
35 struct gui_buttonbar
37 char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH];
38 struct screen * display;
42 * Initializes the buttonbar
43 * - buttonbar : the buttonbar
45 extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar);
48 * Attach the buttonbar to a screen
49 * - buttonbar : the buttonbar
50 * - display : the display to attach the buttonbar
52 extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar,
53 struct screen * display);
56 * Set the caption of the items of the buttonbar
57 * - buttonbar : the buttonbar
58 * - caption1,2,3 : the first, second and thirds items of the bar
60 extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
61 const char *caption1,
62 const char *caption2,
63 const char *caption3);
66 * Disable the buttonbar
67 * - buttonbar : the buttonbar
69 extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar);
72 * Draw the buttonbar on it's attached screen
73 * - buttonbar : the buttonbar
75 extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar);
78 * Returns true if the buttonbar has something to display, false otherwise
79 * - buttonbar : the buttonbar
81 extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar);
82 #else
83 #define BUTTONBAR_HEIGHT 0
84 #endif
85 #endif /* _GUI_BUTTONBAR_H_ */