diff options
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r-- | apps/gui/statusbar-skinned.c | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c deleted file mode 100644 index bb77a5088c..0000000000 --- a/apps/gui/statusbar-skinned.c +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 Thomas Martitz | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include <stdio.h> | ||
22 | #include <string.h> | ||
23 | #include <stdlib.h> | ||
24 | #include "config.h" | ||
25 | |||
26 | #include "system.h" | ||
27 | #include "settings.h" | ||
28 | #include "appevents.h" | ||
29 | #include "screens.h" | ||
30 | #include "screen_access.h" | ||
31 | #include "skin_engine/skin_engine.h" | ||
32 | #include "skin_engine/wps_internals.h" | ||
33 | #include "debug.h" | ||
34 | |||
35 | |||
36 | /* currently only one wps_state is needed */ | ||
37 | extern struct wps_state wps_state; | ||
38 | static struct gui_wps sb_skin[NB_SCREENS]; | ||
39 | static struct wps_data sb_skin_data[NB_SCREENS]; | ||
40 | |||
41 | /* initial setup of wps_data */ | ||
42 | static void sb_skin_update(void*); | ||
43 | static bool loaded_ok = false; | ||
44 | |||
45 | void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile) | ||
46 | { | ||
47 | |||
48 | loaded_ok = buf && skin_data_load(sb_skin[screen].data, | ||
49 | &screens[screen], buf, isfile); | ||
50 | |||
51 | |||
52 | if (loaded_ok) | ||
53 | add_event(GUI_EVENT_ACTIONUPDATE, false, sb_skin_update); | ||
54 | else | ||
55 | remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update); | ||
56 | |||
57 | #ifdef HAVE_REMOVE_LCD | ||
58 | sb_skin[screen].data->remote_wps = !(screen == SCREEN_MAIN); | ||
59 | #endif | ||
60 | } | ||
61 | |||
62 | void sb_skin_data_init(enum screen_type screen) | ||
63 | { | ||
64 | skin_data_init(sb_skin[screen].data); | ||
65 | } | ||
66 | |||
67 | bool sb_skin_active(void) | ||
68 | { | ||
69 | return loaded_ok; | ||
70 | } | ||
71 | |||
72 | void sb_skin_update(void* param) | ||
73 | { | ||
74 | int i; | ||
75 | (void)param; | ||
76 | FOR_NB_SCREENS(i) | ||
77 | { | ||
78 | skin_update(&sb_skin[i], wps_state.do_full_update? | ||
79 | WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | void sb_skin_init(void) | ||
84 | { | ||
85 | int i; | ||
86 | FOR_NB_SCREENS(i) | ||
87 | { | ||
88 | skin_data_init(&sb_skin_data[i]); | ||
89 | #ifdef HAVE_ALBUMART | ||
90 | sb_skin_data[i].wps_uses_albumart = 0; | ||
91 | #endif | ||
92 | #ifdef HAVE_REMOTE_LCD | ||
93 | sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE); | ||
94 | #endif | ||
95 | sb_skin[i].data = &sb_skin_data[i]; | ||
96 | sb_skin[i].display = &screens[i]; | ||
97 | sb_skin[i].data->debug = true; | ||
98 | DEBUGF("data in init: %p, debug: %d\n", &sb_skin_data[i], sb_skin_data[i].debug); | ||
99 | /* Currently no seperate wps_state needed/possible | ||
100 | so use the only available ( "global" ) one */ | ||
101 | sb_skin[i].state = &wps_state; | ||
102 | } | ||
103 | #ifdef HAVE_LCD_BITMAP | ||
104 | /* | ||
105 | add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler); | ||
106 | */ | ||
107 | #endif | ||
108 | } | ||
109 | |||
110 | #ifdef HAVE_ALBUMART | ||
111 | bool sb_skin_uses_statusbar(int *width, int *height) | ||
112 | { | ||
113 | int i; | ||
114 | FOR_NB_SCREENS(i) { | ||
115 | struct gui_wps *gwps = &sb_skin[i]; | ||
116 | if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE)) | ||
117 | { | ||
118 | if (width) | ||
119 | *width = sb_skin[0].data->albumart_max_width; | ||
120 | if (height) | ||
121 | *height = sb_skin[0].data->albumart_max_height; | ||
122 | return true; | ||
123 | } | ||
124 | } | ||
125 | return false; | ||
126 | } | ||
127 | #endif | ||