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