Fix the charcell compile error and rmeove an unused #define
[maemo-rb.git] / apps / gui / skin_engine / skin_engine.h
blob7a41063af997115a26096c45f6e4e30da716efec
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 #ifndef PLUGIN
28 #include "tag_table.h"
30 #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
32 enum skinnable_screens {
33 CUSTOM_STATUSBAR,
34 WPS,
35 #if CONFIG_TUNER
36 FM_SCREEN,
37 #endif
40 SKINNABLE_SCREENS_COUNT
43 #ifdef HAVE_TOUCHSCREEN
44 int skin_get_touchaction(struct wps_data *data, int* edge_offset,
45 struct touchregion **retregion);
46 void skin_disarm_touchregions(struct wps_data *data);
47 #endif
49 /* Do a update_type update of the skinned screen */
50 void skin_update(enum skinnable_screens skin, enum screen_type screen,
51 unsigned int update_type);
54 * setup up the skin-data from a format-buffer (isfile = false)
55 * or from a skinfile (isfile = true)
57 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
58 const char *buf, bool isfile);
60 /* call this in statusbar toggle handlers if needed */
61 void skin_statusbar_changed(struct gui_wps*);
63 bool skin_has_sbs(enum screen_type screen, struct wps_data *data);
66 /* load a backdrop into the skin buffer.
67 * reuse buffers if the file is already loaded */
68 char* skin_backdrop_load(char* backdrop, char *bmpdir, enum screen_type screen);
69 void skin_backdrop_init(void);
70 int skin_backdrop_assign(char* backdrop, char *bmpdir,
71 enum screen_type screen);
72 bool skin_backdrops_preload(void);
73 void skin_backdrop_show(int backdrop_id);
74 void skin_backdrop_load_setting(void);
75 void skin_backdrop_unload(int backdrop_id);
77 /* do the button loop as often as required for the peak meters to update
78 * with a good refresh rate.
79 * gwps is really gwps[NB_SCREENS]! don't wrap this in FOR_NB_SCREENS()
81 int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout);
83 void skin_load(enum skinnable_screens skin, enum screen_type screen,
84 const char *buf, bool isfile);
85 struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen);
86 struct wps_state *skin_get_global_state(void);
87 void gui_sync_skin_init(void);
89 void skin_unload_all(void);
91 bool skin_do_full_update(enum skinnable_screens skin, enum screen_type screen);
92 void skin_request_full_update(enum skinnable_screens skin);
94 #endif /* !PLUGIN */
95 #endif