xbmc
WinEventsAndroid.h
1 /*
2  * Copyright (C) 2010-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "threads/CriticalSection.h"
12 #include "threads/Event.h"
13 #include "threads/Thread.h"
14 #include "windowing/WinEvents.h"
15 
16 #include <list>
17 #include <queue>
18 #include <string>
19 #include <vector>
20 
21 class CWinEventsAndroid : public IWinEvents, public CThread
22 {
23 public:
25  ~CWinEventsAndroid() override;
26 
27  void MessagePush(XBMC_Event *newEvent);
28  void MessagePushRepeat(XBMC_Event *repeatEvent);
29  bool MessagePump() override;
30 
31 private:
32  size_t GetQueueSize();
33 
34  // for CThread
35  void Process() override;
36 
37  CCriticalSection m_eventsCond;
38  std::list<XBMC_Event> m_events;
39 
40  CCriticalSection m_lasteventCond;
41  std::queue<XBMC_Event> m_lastevent;
42 };
43 
Definition: Thread.h:44
Definition: XBMC_events.h:109
Definition: WinEvents.h:13
Definition: WinEventsAndroid.h:21