diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-10-28 00:00:00 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-10-28 00:00:00 +0000 |
commit | 7da9477bc3401cbd90b2984f625f96f451ecaf6b (patch) | |
tree | 8aea2c154ad0f666f57c4752fa541fa539de757c /apps/gui/buttonbar.h | |
parent | 3efa91ed03797dd533c0add6db750ade67499587 (diff) | |
download | rockbox-7da9477bc3401cbd90b2984f625f96f451ecaf6b.tar.gz rockbox-7da9477bc3401cbd90b2984f625f96f451ecaf6b.zip |
Initial multi screen support by Kévin Ferrare (Patch #1318081)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7666 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/buttonbar.h')
-rw-r--r-- | apps/gui/buttonbar.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/apps/gui/buttonbar.h b/apps/gui/buttonbar.h new file mode 100644 index 0000000000..ee7b8d02c4 --- /dev/null +++ b/apps/gui/buttonbar.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Kévin FERRARE | ||
11 | * | ||
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. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _GUI_BUTTONBAR_H_ | ||
21 | #define _GUI_BUTTONBAR_H_ | ||
22 | #include "config.h" | ||
23 | #include "button.h" | ||
24 | #if CONFIG_KEYPAD == RECORDER_PAD | ||
25 | |||
26 | #define HAS_BUTTONBAR | ||
27 | #define BUTTONBAR_HEIGHT 8 | ||
28 | #define BUTTONBAR_MAX_BUTTONS 3 | ||
29 | #define BUTTONBAR_CAPTION_LENGTH 8 | ||
30 | #include "screen_access.h" | ||
31 | |||
32 | struct gui_buttonbar | ||
33 | { | ||
34 | char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH]; | ||
35 | struct screen * display; | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * Initializes the buttonbar | ||
40 | * - buttonbar : the buttonbar | ||
41 | */ | ||
42 | extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar); | ||
43 | |||
44 | /* | ||
45 | * Attach the buttonbar to a screen | ||
46 | * - buttonbar : the buttonbar | ||
47 | * - display : the display to attach the buttonbar | ||
48 | */ | ||
49 | extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar, | ||
50 | struct screen * display); | ||
51 | |||
52 | /* | ||
53 | * Set the caption of the items of the buttonbar | ||
54 | * - buttonbar : the buttonbar | ||
55 | * - caption1,2,3 : the first, second and thirds items of the bar | ||
56 | */ | ||
57 | extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar, | ||
58 | const char *caption1, | ||
59 | const char *caption2, | ||
60 | const char *caption3); | ||
61 | |||
62 | /* | ||
63 | * Disable the buttonbar | ||
64 | * - buttonbar : the buttonbar | ||
65 | */ | ||
66 | extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar); | ||
67 | |||
68 | /* | ||
69 | * Draw the buttonbar on it's attached screen | ||
70 | * - buttonbar : the buttonbar | ||
71 | */ | ||
72 | extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar); | ||
73 | |||
74 | /* | ||
75 | * Returns true if the buttonbar has something to display, false otherwise | ||
76 | * - buttonbar : the buttonbar | ||
77 | */ | ||
78 | extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar); | ||
79 | |||
80 | #endif /* CONFIG_KEYPAD == RECORDER_PAD */ | ||
81 | #endif /* _GUI_BUTTONBAR_H_ */ | ||