summaryrefslogtreecommitdiffstats
path: root/xbmc/windowing/android/WinEventsAndroid.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/windowing/android/WinEventsAndroid.h')
-rw-r--r--xbmc/windowing/android/WinEventsAndroid.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/xbmc/windowing/android/WinEventsAndroid.h b/xbmc/windowing/android/WinEventsAndroid.h
new file mode 100644
index 0000000..62b04b5
--- /dev/null
+++ b/xbmc/windowing/android/WinEventsAndroid.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010-2018 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#pragma once
+
+#include "threads/CriticalSection.h"
+#include "threads/Event.h"
+#include "threads/Thread.h"
+#include "windowing/WinEvents.h"
+
+#include <list>
+#include <queue>
+#include <string>
+#include <vector>
+
+class CWinEventsAndroid : public IWinEvents, public CThread
+{
+public:
+ CWinEventsAndroid();
+ ~CWinEventsAndroid() override;
+
+ void MessagePush(XBMC_Event *newEvent);
+ void MessagePushRepeat(XBMC_Event *repeatEvent);
+ bool MessagePump() override;
+
+private:
+ size_t GetQueueSize();
+
+ // for CThread
+ void Process() override;
+
+ CCriticalSection m_eventsCond;
+ std::list<XBMC_Event> m_events;
+
+ CCriticalSection m_lasteventCond;
+ std::queue<XBMC_Event> m_lastevent;
+};
+