blob: 62b04b585846b01f049557158456548914b4f962 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;
};
|