2 /***************************************************************************
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 * Copyright (C) 2008 by Jonathan Gordon
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
25 #include "screen_access.h"
27 /* return the number of text lines in the vp viewport */
28 int viewport_get_nb_lines(struct viewport
*vp
);
31 #define VP_DIMENSIONS 0x1
33 #define VP_SELECTIONCOLORS 0x4
34 /* load a viewport struct from a config string.
35 returns a combination of the above to say which were loaded ok from the string */
36 int viewport_load_config(const char *config
, struct viewport
*vp
);
38 void viewport_set_defaults(struct viewport
*vp
, enum screen_type screen
);
40 /* Used to specify which screens the statusbar (SB) should be displayed on.
42 * The parameter is a bit OR'ed combination of the following (screen is
43 * SCREEN_MAIN or SCREEN_REMOTE from screen_access.h):
45 * VP_SB_HIDE_ALL means "hide the SB on all screens"
46 * VP_SB_ONSCREEN(screen) means "display the SB on the given screen
47 * as specified by the SB setting for that screen"
48 * VP_SB_IGNORE_SETTING(screen) means "ignore the SB setting for that screen"
49 * VP_SB_ALLSCREENS means "VP_SB_ONSCREEN for all screens"
51 * In most cases, VP_SB_ALLSCREENS should be used which means display the SB
52 * as specified by the settings.
53 * For the WPS (and other possible exceptions) use VP_SB_IGNORE_SETTING() to
54 * FORCE the statusbar on for the given screen (i.e it will show regardless
57 * Returns the status before the call. This value can be used to restore the
58 * SB "displaying rules".
60 #define VP_SB_HIDE_ALL 0
61 #define VP_SB_ONSCREEN(screen) (1u<<screen)
62 #define VP_SB_IGNORE_SETTING(screen) (1u<<(4+screen))
63 #define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1))
64 int viewportmanager_set_statusbar(int enabled
);
66 /* callbacks for GUI_EVENT_* events */
67 void viewportmanager_draw_statusbars(void*data
);
68 void viewportmanager_statusbar_changed(void* data
);