Debian Codegraph @

xbmc/windowing/wayland/WinEventsWayland.h

raw
1 /*
2 * Copyright (C) 2017-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 "../WinEvents.h"
12 #include "threads/CriticalSection.h"
13
14 #include <queue>
15
16 namespace wayland
17 {
18 class event_queue_t;
19 class display_t;
20 }
21
22 namespace KODI
23 {
24 namespace WINDOWING
25 {
26 namespace WAYLAND
27 {
28
29 class CWinEventsWayland : public IWinEvents
30 {
31 public:
32 bool MessagePump() override;
33 void MessagePush(XBMC_Event* ev);
34 /// Write buffered messages to the compositor
35 static void Flush();
36 /// Do a roundtrip on the specified queue from the event processing thread
37 static void RoundtripQueue(wayland::event_queue_t const& queue);
38
39 private:
40 friend class CWinSystemWayland;
41 static void SetDisplay(wayland::display_t* display);
42
43 CCriticalSection m_queueMutex;
44 std::queue<XBMC_Event> m_queue;
45 };
46
47 }
48 }
49 }