summaryrefslogtreecommitdiffstats
path: root/xbmc/windowing/X11/WinEventsX11.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /xbmc/windowing/X11/WinEventsX11.h
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/windowing/X11/WinEventsX11.h')
-rw-r--r--xbmc/windowing/X11/WinEventsX11.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/xbmc/windowing/X11/WinEventsX11.h b/xbmc/windowing/X11/WinEventsX11.h
new file mode 100644
index 0000000..b2111da
--- /dev/null
+++ b/xbmc/windowing/X11/WinEventsX11.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2005-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/SystemClock.h"
+#include "windowing/WinEvents.h"
+#include "windowing/X11/WinSystemX11.h"
+
+#include <clocale>
+#include <map>
+
+#include <X11/Xlib.h>
+
+namespace KODI
+{
+namespace WINDOWING
+{
+namespace X11
+{
+
+class CWinEventsX11 : public IWinEvents
+{
+public:
+ CWinEventsX11(CWinSystemX11& winSystem);
+ ~CWinEventsX11() override;
+ bool MessagePump() override;
+ bool Init(Display *dpy, Window win);
+ void Quit();
+ bool HasStructureChanged();
+ void PendingResize(int width, int height);
+ void SetXRRFailSafeTimer(std::chrono::milliseconds duration);
+
+protected:
+ XBMCKey LookupXbmcKeySym(KeySym keysym);
+ bool ProcessKey(XBMC_Event &event);
+ Display *m_display = nullptr;
+ Window m_window = 0;
+ Atom m_wmDeleteMessage;
+ char *m_keybuf = nullptr;
+ size_t m_keybuf_len = 0;
+ XIM m_xim = nullptr;
+ XIC m_xic = nullptr;
+ std::map<uint32_t,uint32_t> m_symLookupTable;
+ int m_keymodState;
+ bool m_structureChanged;
+ int m_RREventBase;
+ XbmcThreads::EndTime<> m_xrrFailSafeTimer;
+ bool m_xrrEventPending;
+ CWinSystemX11& m_winSystem;
+};
+
+}
+}
+}