Reuse the backdrop buffers if 2 skins use the same backdrop (on the same screen of...
[kugel-rb.git] / apps / gui / skin_engine / skin_engine.h
blob642f15aaad6b26a2a628db790dae6ddfd25dddf0
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 Nicolas Pennequin
11 * Copyright (C) 2009 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 ****************************************************************************/
23 #ifndef _SKIN_ENGINE_H
24 #define _SKIN_ENGINE_H
26 #include "skin_buffer.h"
28 #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
30 enum skinnable_screens {
31 CUSTOM_STATUSBAR,
32 WPS,
35 SKINNABLE_SCREENS_COUNT
39 #ifdef HAVE_TOUCHSCREEN
40 int wps_get_touchaction(struct wps_data *data);
41 #endif
43 /* setup and display a WPS for the first time */
44 bool gui_wps_display(struct gui_wps *gwps);
47 /* Do a update_type update of the skinned screen */
48 bool skin_update(struct gui_wps *gwps, unsigned int update_type);
51 * setup up the skin-data from a format-buffer (isfile = false)
52 * or from a skinfile (isfile = true)
54 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
55 const char *buf, bool isfile);
58 /* initial setup of wps_data */
59 void skin_data_init(struct wps_data *wps_data);
61 /* call this in statusbar toggle handlers if needed */
62 void skin_statusbar_changed(struct gui_wps*);
65 /* load a backdrop into the skin buffer.
66 * reuse buffers if the file is already loaded */
67 char* skin_backdrop_load(char* backdrop, char *bmpdir, enum screen_type screen);
68 void skin_backdrop_init(void);
69 #endif