skin tags: fix the id3 track/disc numbers in conditionals
[maemo-rb.git] / apps / gui / viewport.h
blob3da001e190f6ecf59468f3b0768293b46e7043dd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2008 by Jonathan Gordon
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 __VIEWPORT_H__
23 #define __VIEWPORT_H__
26 #include "config.h"
27 #include "lcd.h"
28 #include "system.h"
29 #include "screen_access.h"
31 /* return the number of text lines in the vp viewport */
32 int viewport_get_nb_lines(const struct viewport *vp);
34 #define THEME_STATUSBAR (BIT_N(0))
35 #define THEME_UI_VIEWPORT (BIT_N(1))
36 #define THEME_BUTTONBAR (BIT_N(2))
37 #define THEME_LANGUAGE (BIT_N(3))
38 #define THEME_LISTS (BIT_N(3))
39 #define THEME_ALL (~(0u))
41 #ifndef __PCTOOL__
43 * Initialize the viewportmanager, which in turns initializes the UI vp and
44 * statusbar stuff
46 void viewportmanager_init(void) INIT_ATTR;
48 void viewport_set_defaults(struct viewport *vp,
49 const enum screen_type screen);
50 void viewport_set_fullscreen(struct viewport *vp,
51 const enum screen_type screen);
52 int get_viewport_default_colour(enum screen_type screen, bool fgcolour);
54 #ifdef HAVE_LCD_BITMAP
55 void viewportmanager_theme_enable(enum screen_type screen, bool enable,
56 struct viewport *viewport);
57 /* Force will cause a redraw even if the theme was previously and
58 * currently enabled (i,e the undo doing nothing).
59 * Should almost always be set to false except coming out of fully skinned screens */
60 void viewportmanager_theme_undo(enum screen_type screen, bool force_redraw);
62 /* call this when a theme changed */
63 void viewportmanager_theme_changed(const int);
65 #ifdef HAVE_TOUCHSCREEN
66 bool viewport_point_within_vp(const struct viewport *vp,
67 const int x, const int y);
68 #endif
70 #else /* HAVE_LCD_CHARCELL */
71 #define viewportmanager_theme_changed(a)
72 #define viewportmanager_theme_enable(...)
73 #define viewportmanager_theme_undo(...)
74 #endif
76 #endif /* __PCTOOL__ */
78 #endif /* __VIEWPORT_H__ */