]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/android/display_platform.h
32c1bed43e1a5712af38462906daebaa5bd6d6ad
[libs/gui.git] / source / graphics / android / display_platform.h
1 #ifndef MSP_GRAPHICS_DISPLAY_PLATFORM_H_
2 #define MSP_GRAPHICS_DISPLAY_PLATFORM_H_
3
4 #include <android/input.h>
5 #include <android/native_window.h>
6 #include <sigc++/trackable.h>
7 #include <msp/core/mutex.h>
8 #include "window_private.h"
9
10 namespace Msp {
11 namespace Graphics {
12
13 typedef void *DisplayHandle;
14
15 struct PlatformDisplayPrivate: public sigc::trackable
16 {
17         AInputQueue *input_queue;
18         std::list<Window::Event> events;
19         Mutex event_mutex;
20         WindowHandle native_window;
21         Mutex window_mutex;
22
23         void push_event(AndroidEventType);
24         void native_window_created(ANativeWindow *);
25         void native_window_resized(ANativeWindow *);
26         void native_window_destroyed(ANativeWindow *);
27         void input_queue_created(AInputQueue *);
28         void input_queue_destroyed(AInputQueue *);
29 };
30
31 } // namespace Graphics
32 } // namespace Msp
33
34 #endif