From 7da9477bc3401cbd90b2984f625f96f451ecaf6b Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 28 Oct 2005 00:00:00 +0000 Subject: Initial multi screen support by Kévin Ferrare (Patch #1318081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7666 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/buttonbar.h | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 apps/gui/buttonbar.h (limited to 'apps/gui/buttonbar.h') 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 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2005 by Kévin FERRARE + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _GUI_BUTTONBAR_H_ +#define _GUI_BUTTONBAR_H_ +#include "config.h" +#include "button.h" +#if CONFIG_KEYPAD == RECORDER_PAD + +#define HAS_BUTTONBAR +#define BUTTONBAR_HEIGHT 8 +#define BUTTONBAR_MAX_BUTTONS 3 +#define BUTTONBAR_CAPTION_LENGTH 8 +#include "screen_access.h" + +struct gui_buttonbar +{ + char caption[BUTTONBAR_MAX_BUTTONS][BUTTONBAR_CAPTION_LENGTH]; + struct screen * display; +}; + +/* + * Initializes the buttonbar + * - buttonbar : the buttonbar + */ +extern void gui_buttonbar_init(struct gui_buttonbar * buttonbar); + +/* + * Attach the buttonbar to a screen + * - buttonbar : the buttonbar + * - display : the display to attach the buttonbar + */ +extern void gui_buttonbar_set_display(struct gui_buttonbar * buttonbar, + struct screen * display); + +/* + * Set the caption of the items of the buttonbar + * - buttonbar : the buttonbar + * - caption1,2,3 : the first, second and thirds items of the bar + */ +extern void gui_buttonbar_set(struct gui_buttonbar * buttonbar, + const char *caption1, + const char *caption2, + const char *caption3); + +/* + * Disable the buttonbar + * - buttonbar : the buttonbar + */ +extern void gui_buttonbar_unset(struct gui_buttonbar * buttonbar); + +/* + * Draw the buttonbar on it's attached screen + * - buttonbar : the buttonbar + */ +extern void gui_buttonbar_draw(struct gui_buttonbar * buttonbar); + +/* + * Returns true if the buttonbar has something to display, false otherwise + * - buttonbar : the buttonbar + */ +extern bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar); + +#endif /* CONFIG_KEYPAD == RECORDER_PAD */ +#endif /* _GUI_BUTTONBAR_H_ */ -- cgit v1.2.3