From 8c51282770f86800ea609fda8bddb0d54a84ec62 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 5 Mar 2018 21:26:51 +0000 Subject: Android: more cleanup. Trying to solve the problem of undefined screen buffer content. Moved gradlew.bat into gradlew.zip to make some svn's happy. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12709 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Android/Fl_Android_Application.H | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/drivers/Android/Fl_Android_Application.H') diff --git a/src/drivers/Android/Fl_Android_Application.H b/src/drivers/Android/Fl_Android_Application.H index 73ff1ccdc..48573e7c1 100644 --- a/src/drivers/Android/Fl_Android_Application.H +++ b/src/drivers/Android/Fl_Android_Application.H @@ -120,11 +120,16 @@ public: static void pre_exec_cmd(int8_t cmd); static void post_exec_cmd(int8_t cmd); - static ANativeWindow *get_native_window() { return pNativeWindow; } + static inline ANativeWindow *native_window() { return pNativeWindow; } + static inline ANativeWindow_Buffer &graphics_buffer() { return pNativeWindowBuffer; } static int destroy_requested() { return pDestroyRequested; } static void set_on_app_cmd(void (*cmd)(int32_t cmd)) { pOnAppCmd = cmd; } static void set_on_input_event(int32_t (*cmd)(AInputEvent* event)) { pOnInputEvent = cmd; } + static bool lock_screen(); + static void unlock_and_post_screen(); + static bool screen_is_locked(); + protected: static void free_saved_state(); static void print_cur_config(); @@ -134,12 +139,13 @@ protected: static void* thread_entry(void* param); static ANativeActivity *pActivity; - static AConfiguration* pConfig; - static void* pSavedState; + static AConfiguration *pConfig; + static void *pSavedState; static size_t pSavedStateSize; - static ALooper* pLooper; - static AInputQueue* pInputQueue; - static ANativeWindow* pNativeWindow; + static ALooper *pLooper; + static AInputQueue *pInputQueue; + static ANativeWindow *pNativeWindow; + static ANativeWindow_Buffer pNativeWindowBuffer; static int pActivityState; static int pDestroyRequested; static void (*pOnAppCmd)(int32_t cmd); -- cgit v1.2.3