diff options
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r-- | apps/gui/statusbar-skinned.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c index fcd4cfbd9e..168b17fa38 100644 --- a/apps/gui/statusbar-skinned.c +++ b/apps/gui/statusbar-skinned.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "config.h" | 22 | #include "config.h" |
23 | 23 | ||
24 | #include "action.h" | ||
24 | #include "system.h" | 25 | #include "system.h" |
25 | #include "settings.h" | 26 | #include "settings.h" |
26 | #include "appevents.h" | 27 | #include "appevents.h" |
@@ -253,3 +254,36 @@ void sb_skin_init(void) | |||
253 | sb_skin[i].sync_data = &sb_skin_sync_data; | 254 | sb_skin[i].sync_data = &sb_skin_sync_data; |
254 | } | 255 | } |
255 | } | 256 | } |
257 | |||
258 | #ifdef HAVE_TOUCHSCREEN | ||
259 | static bool bypass_sb_touchregions = true; | ||
260 | void sb_bypass_touchregions(bool enable) | ||
261 | { | ||
262 | bypass_sb_touchregions = enable; | ||
263 | } | ||
264 | |||
265 | int sb_touch_to_button(int context) | ||
266 | { | ||
267 | static int last_context = -1; | ||
268 | int button, offset; | ||
269 | if (bypass_sb_touchregions) | ||
270 | return ACTION_TOUCHSCREEN; | ||
271 | |||
272 | if (last_context != context) | ||
273 | skin_disarm_touchregions(&sb_skin_data[SCREEN_MAIN]); | ||
274 | last_context = context; | ||
275 | button = skin_get_touchaction(&sb_skin_data[SCREEN_MAIN], &offset); | ||
276 | |||
277 | switch (button) | ||
278 | { | ||
279 | #ifdef HAVE_VOLUME_IN_LIST | ||
280 | case ACTION_WPS_VOLUP: | ||
281 | return ACTION_LIST_VOLUP; | ||
282 | case ACTION_WPS_VOLDOWN: | ||
283 | return ACTION_LIST_VOLDOWN; | ||
284 | #endif | ||
285 | /* TODO */ | ||
286 | } | ||
287 | return button; | ||
288 | } | ||
289 | #endif | ||