summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/pluginlib_touchscreen.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-27 00:12:03 +0100
committerThomas Martitz <kugel@rockbox.org>2012-01-27 09:15:05 +0100
commitaba5c47dd6369a3612be4165a16054ebd6d74af3 (patch)
tree38f9340683618d117f6e7d9de5a6b5b8fd3ad798 /apps/plugins/lib/pluginlib_touchscreen.h
parent7c623d577beea6fce3eadaa697d5e6835d820bdf (diff)
downloadrockbox-aba5c47dd6369a3612be4165a16054ebd6d74af3.tar.gz
rockbox-aba5c47dd6369a3612be4165a16054ebd6d74af3.zip
pluginlib_touchscreen: Rework API to offer wait-for-button APIs.
The old touchscreen_get() needed an external button_get() call. Now two APIs are added that do this call internally. This way they behave similar to get_action. The old API is preserved (but renamed) since it's used in reversi. Change-Id: I24902c64a357f2fdd7d0c2f5371cbfd20f34f1c8
Diffstat (limited to 'apps/plugins/lib/pluginlib_touchscreen.h')
-rw-r--r--apps/plugins/lib/pluginlib_touchscreen.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/lib/pluginlib_touchscreen.h b/apps/plugins/lib/pluginlib_touchscreen.h
index f2787655ee..dbd944c040 100644
--- a/apps/plugins/lib/pluginlib_touchscreen.h
+++ b/apps/plugins/lib/pluginlib_touchscreen.h
@@ -40,8 +40,13 @@ struct touchbutton {
40 fb_data *pixmap; /* Currently unused, but will allow for a graphic */ 40 fb_data *pixmap; /* Currently unused, but will allow for a graphic */
41}; 41};
42 42
43/* Get: tests for a button press and returns action. */ 43/* Check: tests if the result of button_get() beloned to a touch button */
44int touchbutton_get(struct touchbutton *data, int button, int num_buttons); 44int touchbutton_check_button(int button, struct touchbutton *data, int num_buttons);
45/* Wait: Wait for input and return the corresponding action */
46int touchbutton_get(struct touchbutton *data, int num_buttons);
47/* Wait with timeout */
48int touchbutton_get_w_tmo(int timeout, struct touchbutton *data, int num_buttons);
49
45/* Draw: Draws all visible buttons */ 50/* Draw: Draws all visible buttons */
46void touchbutton_draw(struct touchbutton *data, int num_buttons); 51void touchbutton_draw(struct touchbutton *data, int num_buttons);
47 52