summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini/x11-keymap.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-30 20:08:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-30 20:08:49 +0200
commitf018bf4beeb15f346177dcee2b9e1a023627e7c4 (patch)
tree94aa371f97ff9e6a5b5db9c3804103aa782fe1ae /qxt-mini/x11-keymap.hpp
parentc52b5ad0a8340012fab7982f0c670a46c3e5d93d (diff)
qxt-mini: finish up X11 shortcuts
It didn't work without XLookupString.
Diffstat (limited to 'qxt-mini/x11-keymap.hpp')
-rw-r--r--qxt-mini/x11-keymap.hpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/qxt-mini/x11-keymap.hpp b/qxt-mini/x11-keymap.hpp
index b35097bc..2c737c77 100644
--- a/qxt-mini/x11-keymap.hpp
+++ b/qxt-mini/x11-keymap.hpp
@@ -1,15 +1,33 @@
#pragma once
-#ifndef BUILD_QXT_MINI
-# error "internal header"
-#endif
+#if !defined __APPLE__ && !defined _WIN32
-#ifndef __APPLE__
+#undef QXT_X11_INCLUDED
+#define QXT_X11_INCLUDED
#include <Qt>
#include <QDebug>
+#include <QHash>
+#include <QPair>
+
+#include <vector>
+#include <tuple>
+
+#include <xcb/xcb.h>
#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+QXT_GUI_EXPORT
+std::vector<quint32> qt_key_to_x11(Display* disp, Qt::Key k, Qt::KeyboardModifiers m);
+
+QXT_GUI_EXPORT
+std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp, quint32 keycode, quint32 mods);
+
+QXT_GUI_EXPORT
+QPair<KeySym, KeySym> keycode_to_keysym(Display* disp, quint32 keycode, quint32 keystate,
+ xcb_key_press_event_t const* kev);
-unsigned qt_key_to_x11(Display* disp, Qt::Key k);
+QXT_GUI_EXPORT
+quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers);
#endif