summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/keyb.h2
-rw-r--r--include/mode-private.h2
-rw-r--r--include/rofi.h3
-rw-r--r--include/textbox.h3
-rw-r--r--include/view-internal.h2
-rw-r--r--include/view.h4
-rw-r--r--include/x11-helper.h2
-rw-r--r--include/xkb-internal.h15
-rw-r--r--include/xkb.h6
9 files changed, 32 insertions, 7 deletions
diff --git a/include/keyb.h b/include/keyb.h
index bd195017..37d67884 100644
--- a/include/keyb.h
+++ b/include/keyb.h
@@ -99,7 +99,7 @@ void cleanup_abe ( void );
* Check if this key has been triggered.
* @returns TRUE if key combo matches, FALSE otherwise.
*/
-int abe_test_action ( KeyBindingAction action, unsigned int mask, KeySym key );
+int abe_test_action ( KeyBindingAction action, unsigned int mask, xkb_keysym_t key );
/*@}*/
#endif // ROFI_KEYB_H
diff --git a/include/mode-private.h b/include/mode-private.h
index 511f4e61..e85ac96b 100644
--- a/include/mode-private.h
+++ b/include/mode-private.h
@@ -43,7 +43,7 @@ struct _Mode
/** Keybindings (keysym and modmask) */
char * keycfg;
char * keystr;
- KeySym keysym;
+ xkb_keysym_t keysym;
unsigned int modmask;
/**
diff --git a/include/rofi.h b/include/rofi.h
index 411acb37..252850d5 100644
--- a/include/rofi.h
+++ b/include/rofi.h
@@ -1,6 +1,7 @@
#ifndef ROFI_MAIN_H
#define ROFI_MAIN_H
#include <xcb/xcb.h>
+#include <xkbcommon/xkbcommon.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <glib.h>
@@ -45,7 +46,7 @@ const Mode * rofi_get_mode ( unsigned int index );
* @return the index of the switcher that matches the key combination
* specified by key and modstate. Returns -1 if none was found
*/
-int locate_switcher ( KeySym key, unsigned int modstate );
+int locate_switcher ( xkb_keysym_t key, unsigned int modstate );
void rofi_set_return_code ( int code );
/** Reset terminal */
diff --git a/include/textbox.h b/include/textbox.h
index c4caa7ca..b1a40670 100644
--- a/include/textbox.h
+++ b/include/textbox.h
@@ -1,6 +1,7 @@
#ifndef ROFI_TEXTBOX_H
#define ROFI_TEXTBOX_H
+#include <xkbcommon/xkbcommon.h>
#include <X11/Xutil.h>
#include <pango/pango.h>
#include <pango/pango-fontmap.h>
@@ -113,7 +114,7 @@ void textbox_draw ( textbox *tb, cairo_t *draw );
*
* @returns if the key was handled (1), unhandled(0) or handled and return was pressed (-1)
*/
-int textbox_keypress ( textbox *tb, xcb_key_press_event_t *ev, char *pad, int pad_len, KeySym key, Status stat );
+int textbox_keypress ( textbox *tb, xcb_key_press_event_t *ev, char *pad, int pad_len, xkb_keysym_t key );
/**
* @param tb Handle to the textbox
diff --git a/include/view-internal.h b/include/view-internal.h
index 6dd61ba2..b4bbd8c6 100644
--- a/include/view-internal.h
+++ b/include/view-internal.h
@@ -69,7 +69,7 @@ struct RofiViewState
MenuFlags menu_flags;
// Handlers.
- void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev );
+ void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
void ( *finalize )( struct RofiViewState *state );
};
/** @} */
diff --git a/include/view.h b/include/view.h
index d6a3aa19..79a2997b 100644
--- a/include/view.h
+++ b/include/view.h
@@ -1,6 +1,8 @@
#ifndef ROFI_VIEW_H
#define ROFI_VIEW_H
+#include "xkb.h"
+
/**
* @defgroup View View
*
@@ -47,7 +49,7 @@ void rofi_view_finalize ( RofiViewState *state );
MenuReturn rofi_view_get_return_value ( const RofiViewState *state );
unsigned int rofi_view_get_next_position ( const RofiViewState *state );
-void rofi_view_itterrate ( RofiViewState *state, xcb_generic_event_t *event );
+void rofi_view_itterrate ( RofiViewState *state, xcb_generic_event_t *event, xkb_stuff *xkb );
unsigned int rofi_view_get_completed ( const RofiViewState *state );
const char * rofi_view_get_user_input ( const RofiViewState *state );
diff --git a/include/x11-helper.h b/include/x11-helper.h
index a3647b71..1f60b0c7 100644
--- a/include/x11-helper.h
+++ b/include/x11-helper.h
@@ -124,7 +124,7 @@ void x11_ungrab_key ( Display *display, unsigned int modmask, KeySym key );
*
* Parse key from user input string.
*/
-void x11_parse_key ( char *combo, unsigned int *mod, KeySym *key );
+void x11_parse_key ( char *combo, unsigned int *mod, xkb_keysym_t *key );
/**
* @param display The connection to the X server.
diff --git a/include/xkb-internal.h b/include/xkb-internal.h
new file mode 100644
index 00000000..76606460
--- /dev/null
+++ b/include/xkb-internal.h
@@ -0,0 +1,15 @@
+#ifndef ROFI_XKB_INTERNAL_H
+#define ROFI_XKB_INTERNAL_H
+
+#include <xkbcommon/xkbcommon.h>
+
+struct xkb_stuff {
+ xcb_connection_t *xcb_connection;
+ struct xkb_context *context;
+ uint8_t first_event;
+ int32_t device_id;
+ struct xkb_keymap *keymap;
+ struct xkb_state *state;
+};
+
+#endif
diff --git a/include/xkb.h b/include/xkb.h
new file mode 100644
index 00000000..2af1ccb8
--- /dev/null
+++ b/include/xkb.h
@@ -0,0 +1,6 @@
+#ifndef ROFI_XKB_H
+#define ROFI_XKB_H
+
+typedef struct xkb_stuff xkb_stuff;
+
+#endif