[Test] Added tests for CUtil::SplitParams
[xbmc.git] / xbmc / windowing / X11 / WinEventsX11.h
blobb2111dabbfc025ab840ab7be31019e07e98ac6e9
1 /*
2 * Copyright (C) 2005-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/SystemClock.h"
12 #include "windowing/WinEvents.h"
13 #include "windowing/X11/WinSystemX11.h"
15 #include <clocale>
16 #include <map>
18 #include <X11/Xlib.h>
20 namespace KODI
22 namespace WINDOWING
24 namespace X11
27 class CWinEventsX11 : public IWinEvents
29 public:
30 CWinEventsX11(CWinSystemX11& winSystem);
31 ~CWinEventsX11() override;
32 bool MessagePump() override;
33 bool Init(Display *dpy, Window win);
34 void Quit();
35 bool HasStructureChanged();
36 void PendingResize(int width, int height);
37 void SetXRRFailSafeTimer(std::chrono::milliseconds duration);
39 protected:
40 XBMCKey LookupXbmcKeySym(KeySym keysym);
41 bool ProcessKey(XBMC_Event &event);
42 Display *m_display = nullptr;
43 Window m_window = 0;
44 Atom m_wmDeleteMessage;
45 char *m_keybuf = nullptr;
46 size_t m_keybuf_len = 0;
47 XIM m_xim = nullptr;
48 XIC m_xic = nullptr;
49 std::map<uint32_t,uint32_t> m_symLookupTable;
50 int m_keymodState;
51 bool m_structureChanged;
52 int m_RREventBase;
53 XbmcThreads::EndTime<> m_xrrFailSafeTimer;
54 bool m_xrrEventPending;
55 CWinSystemX11& m_winSystem;