diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-01-26 23:37:27 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-01-27 09:15:05 +0100 |
commit | b8439f2aeab3920eeeabfbf2c5cf15979619410b (patch) | |
tree | 74de27c08a29bb053e512a84e217f437f3ce4df5 /apps | |
parent | f4954c4a9bda0edbdc8e93314b713c036c4ebfdd (diff) | |
download | rockbox-b8439f2aeab3920eeeabfbf2c5cf15979619410b.tar.gz rockbox-b8439f2aeab3920eeeabfbf2c5cf15979619410b.zip |
Add touchscreen_get_mode() to plugin and lua.
Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 1 | ||||
-rw-r--r-- | apps/plugin.h | 1 | ||||
-rw-r--r-- | apps/plugins/lua/rocklib.c | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 25280750ce..1ac69da1ea 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -326,6 +326,7 @@ static const struct plugin_api rockbox_api = { | |||
326 | #endif | 326 | #endif |
327 | #ifdef HAVE_TOUCHSCREEN | 327 | #ifdef HAVE_TOUCHSCREEN |
328 | touchscreen_set_mode, | 328 | touchscreen_set_mode, |
329 | touchscreen_get_mode, | ||
329 | #endif | 330 | #endif |
330 | 331 | ||
331 | #ifdef HAVE_BUTTON_LIGHT | 332 | #ifdef HAVE_BUTTON_LIGHT |
diff --git a/apps/plugin.h b/apps/plugin.h index d83f6f4845..8ce6faffb9 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -413,6 +413,7 @@ struct plugin_api { | |||
413 | #endif | 413 | #endif |
414 | #ifdef HAVE_TOUCHSCREEN | 414 | #ifdef HAVE_TOUCHSCREEN |
415 | void (*touchscreen_set_mode)(enum touchscreen_mode); | 415 | void (*touchscreen_set_mode)(enum touchscreen_mode); |
416 | enum touchscreen_mode (*touchscreen_get_mode)(void); | ||
416 | #endif | 417 | #endif |
417 | #ifdef HAVE_BUTTON_LIGHT | 418 | #ifdef HAVE_BUTTON_LIGHT |
418 | void (*buttonlight_set_timeout)(int value); | 419 | void (*buttonlight_set_timeout)(int value); |
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index ddd4081371..8e1ab19941 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -425,6 +425,11 @@ RB_WRAP(touchscreen_set_mode) | |||
425 | rb->touchscreen_set_mode(mode); | 425 | rb->touchscreen_set_mode(mode); |
426 | return 0; | 426 | return 0; |
427 | } | 427 | } |
428 | RB_WRAP(touchscreen_get_mode) | ||
429 | { | ||
430 | lua_pushinteger(L, rb->touchscreen_get_mode()); | ||
431 | return 1; | ||
432 | } | ||
428 | #endif | 433 | #endif |
429 | 434 | ||
430 | RB_WRAP(font_getstringsize) | 435 | RB_WRAP(font_getstringsize) |
@@ -638,6 +643,7 @@ static const luaL_Reg rocklib[] = | |||
638 | #ifdef HAVE_TOUCHSCREEN | 643 | #ifdef HAVE_TOUCHSCREEN |
639 | R(action_get_touchscreen_press), | 644 | R(action_get_touchscreen_press), |
640 | R(touchscreen_set_mode), | 645 | R(touchscreen_set_mode), |
646 | R(touchscreen_get_mode), | ||
641 | #endif | 647 | #endif |
642 | R(kbd_input), | 648 | R(kbd_input), |
643 | 649 | ||