Prepare new maemo release
[maemo-rb.git] / apps / gui / skin_engine / skin_engine.h
blob59e00b517643a3ea4542bbc8a8352341cfac4277
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 #ifdef HAVE_LCD_BITMAP
34 CUSTOM_STATUSBAR,
35 #endif
36 WPS,
37 #if CONFIG_TUNER
38 FM_SCREEN,
39 #endif
42 SKINNABLE_SCREENS_COUNT
45 #ifdef HAVE_TOUCHSCREEN
46 int skin_get_touchaction(struct wps_data *data, int* edge_offset,
47 struct touchregion **retregion);
48 void skin_disarm_touchregions(struct wps_data *data);
49 #endif
51 /* Do a update_type update of the skinned screen */
52 void skin_update(enum skinnable_screens skin, enum screen_type screen,
53 unsigned int update_type);
56 * setup up the skin-data from a format-buffer (isfile = false)
57 * or from a skinfile (isfile = true)
59 bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
60 const char *buf, bool isfile, struct skin_stats *stats);
62 bool skin_has_sbs(enum screen_type screen, struct wps_data *data);
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 int skin_backdrop_assign(char* backdrop, char *bmpdir,
70 enum screen_type screen);
71 bool skin_backdrops_preload(void);
72 void skin_backdrop_show(int backdrop_id);
73 void skin_backdrop_load_setting(void);
74 void skin_backdrop_unload(int backdrop_id);
75 #define BACKDROP_BUFFERNAME "#backdrop_buffer#"
76 void* skin_backdrop_get_buffer(int backdrop_id);
78 /* do the button loop as often as required for the peak meters to update
79 * with a good refresh rate.
80 * gwps is really gwps[NB_SCREENS]! don't wrap this in FOR_NB_SCREENS()
82 int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout);
84 void skin_load(enum skinnable_screens skin, enum screen_type screen,
85 const char *buf, bool isfile);
86 struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen);
87 struct wps_state *skin_get_global_state(void);
88 void gui_sync_skin_init(void);
90 void skin_unload_all(void);
92 bool skin_do_full_update(enum skinnable_screens skin, enum screen_type screen);
93 void skin_request_full_update(enum skinnable_screens skin);
95 #endif /* !PLUGIN */
96 #endif