diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-04 23:06:34 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-11-10 07:08:35 -0500 |
commit | 06f046515865519d01464f7ba08259cbaba441bf (patch) | |
tree | 082934777b8a3f470ff98ade7a8c1b9e88d5955c | |
parent | 56389b21b13b4f177fdb2f3cdb0ee291278355f8 (diff) | |
download | rockbox-06f0465158.tar.gz rockbox-06f0465158.zip |
skin engine: Remove touchregion argument from skin_get_touchaction
Nobody uses the argument, and it exposes internals unnecessarily.
Change-Id: I376dc75db99ed89671175f906980526a23be70f6
-rw-r--r-- | apps/gui/skin_engine/skin_engine.h | 4 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_touchsupport.c | 5 | ||||
-rw-r--r-- | apps/gui/statusbar-skinned.c | 3 | ||||
-rw-r--r-- | apps/gui/wps.c | 3 | ||||
-rw-r--r-- | apps/radio/radio_skin.c | 3 |
5 files changed, 5 insertions, 13 deletions
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h index a685f4f072..b56674112c 100644 --- a/apps/gui/skin_engine/skin_engine.h +++ b/apps/gui/skin_engine/skin_engine.h @@ -40,12 +40,10 @@ enum skinnable_screens { struct skin_stats; struct skin_viewport; -struct touchregion; struct wps_data; #ifdef HAVE_TOUCHSCREEN -int skin_get_touchaction(struct wps_data *data, int* edge_offset, - struct touchregion **retregion); +int skin_get_touchaction(struct wps_data *data, int* edge_offset); void skin_disarm_touchregions(struct wps_data *data); #endif diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c index 045bc809c8..eba6b82f5b 100644 --- a/apps/gui/skin_engine/skin_touchsupport.c +++ b/apps/gui/skin_engine/skin_touchsupport.c @@ -52,8 +52,7 @@ void skin_disarm_touchregions(struct wps_data *data) * egde_offset is a percentage value for the position of the touch * inside the bar for regions which arnt WPS_TOUCHREGION_ACTION type. */ -int skin_get_touchaction(struct wps_data *data, int* edge_offset, - struct touchregion **retregion) +int skin_get_touchaction(struct wps_data *data, int* edge_offset) { int returncode = ACTION_NONE; short x,y; @@ -163,8 +162,6 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset, /* On release, all regions are disarmed. */ if (released) skin_disarm_touchregions(data); - if (retregion && temp) - *retregion = temp; if (temp && temp->press_length == LONG_PRESS) temp->armed = false; diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c index f1b8af015e..5d2b65846d 100644 --- a/apps/gui/statusbar-skinned.c +++ b/apps/gui/statusbar-skinned.c @@ -307,7 +307,6 @@ void sb_bypass_touchregions(bool enable) int sb_touch_to_button(int context) { - struct touchregion *region; static int last_context = -1; int button, offset; if (bypass_sb_touchregions) @@ -317,7 +316,7 @@ int sb_touch_to_button(int context) skin_disarm_touchregions(skin_get_gwps(CUSTOM_STATUSBAR, SCREEN_MAIN)->data); last_context = context; button = skin_get_touchaction(skin_get_gwps(CUSTOM_STATUSBAR, SCREEN_MAIN)->data, - &offset, ®ion); + &offset); switch (button) { diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 5b973a2199..9d7a4c96f3 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -159,9 +159,8 @@ static bool update_onvol_change(enum screen_type screen) static int skintouch_to_wps(struct wps_data *data) { int offset = 0; - struct touchregion *region; struct wps_state *gstate = get_wps_state(); - int button = skin_get_touchaction(data, &offset, ®ion); + int button = skin_get_touchaction(data, &offset); switch (button) { case ACTION_STD_PREV: diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c index 388da2694c..0b8781ecd6 100644 --- a/apps/radio/radio_skin.c +++ b/apps/radio/radio_skin.c @@ -96,11 +96,10 @@ int fms_do_button_loop(bool update_screen) int button = skin_wait_for_action(FM_SCREEN, CONTEXT_FM|ALLOW_SOFTLOCK, update_screen ? TIMEOUT_NOBLOCK : HZ/5); #ifdef HAVE_TOUCHSCREEN - struct touchregion *region; int offset; if (button == ACTION_TOUCHSCREEN) button = skin_get_touchaction(skin_get_gwps(FM_SCREEN, SCREEN_MAIN)->data, - &offset, ®ion); + &offset); switch (button) { case ACTION_WPS_STOP: |