Merge pull request #26350 from jjd-uk/estuary_media_align
[xbmc.git] / xbmc / windowing / android / WinEventsAndroid.h
blob62b04b585846b01f049557158456548914b4f962
1 /*
2 * Copyright (C) 2010-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "threads/CriticalSection.h"
12 #include "threads/Event.h"
13 #include "threads/Thread.h"
14 #include "windowing/WinEvents.h"
16 #include <list>
17 #include <queue>
18 #include <string>
19 #include <vector>
21 class CWinEventsAndroid : public IWinEvents, public CThread
23 public:
24 CWinEventsAndroid();
25 ~CWinEventsAndroid() override;
27 void MessagePush(XBMC_Event *newEvent);
28 void MessagePushRepeat(XBMC_Event *repeatEvent);
29 bool MessagePump() override;
31 private:
32 size_t GetQueueSize();
34 // for CThread
35 void Process() override;
37 CCriticalSection m_eventsCond;
38 std::list<XBMC_Event> m_events;
40 CCriticalSection m_lasteventCond;
41 std::queue<XBMC_Event> m_lastevent;