]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/android/window_platform.h
Android support
[libs/gui.git] / source / graphics / android / window_platform.h
diff --git a/source/graphics/android/window_platform.h b/source/graphics/android/window_platform.h
new file mode 100644 (file)
index 0000000..3ed8f84
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef MSP_GRAPHICS_WINDOW_PLATFORM_H_
+#define MSP_GRAPHICS_WINDOW_PLATFORM_H_
+
+#include <android/input.h>
+#include <android/native_window.h>
+
+namespace Msp {
+namespace Graphics {
+
+typedef ANativeWindow *WindowHandle;
+
+enum AndroidEventType
+{
+       INPUT_EVENT,
+       WINDOW_CREATED,
+       WINDOW_RESIZED,
+       WINDOW_DESTROYED
+};
+
+struct PlatformWindowPrivate
+{
+       mutable sigc::signal<void, WindowHandle> signal_window_acquired;
+       mutable sigc::signal<void> signal_window_lost;
+};
+
+struct PlatformEvent
+{
+       AndroidEventType type;
+       AInputEvent *aevent;
+};
+
+} // namespace Graphics
+} // namespace Msp
+
+#endif