Add touchscreen_get_mode() to plugin and lua.
Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
diff --git a/apps/plugin.c b/apps/plugin.c
index 2528075..1ac69da 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -326,6 +326,7 @@
#endif
#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode,
+ touchscreen_get_mode,
#endif
#ifdef HAVE_BUTTON_LIGHT
diff --git a/apps/plugin.h b/apps/plugin.h
index d83f6f4..8ce6faf 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -413,6 +413,7 @@
#endif
#ifdef HAVE_TOUCHSCREEN
void (*touchscreen_set_mode)(enum touchscreen_mode);
+ enum touchscreen_mode (*touchscreen_get_mode)(void);
#endif
#ifdef HAVE_BUTTON_LIGHT
void (*buttonlight_set_timeout)(int value);
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index ddd4081..8e1ab19 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -425,6 +425,11 @@
rb->touchscreen_set_mode(mode);
return 0;
}
+RB_WRAP(touchscreen_get_mode)
+{
+ lua_pushinteger(L, rb->touchscreen_get_mode());
+ return 1;
+}
#endif
RB_WRAP(font_getstringsize)
@@ -638,6 +643,7 @@
#ifdef HAVE_TOUCHSCREEN
R(action_get_touchscreen_press),
R(touchscreen_set_mode),
+ R(touchscreen_get_mode),
#endif
R(kbd_input),