[Xcb-commit] keysyms

Julien Danjou jdanjou at kemper.freedesktop.org
Mon Dec 8 05:29:12 PST 2008


 keysyms/keysyms.c     |   16 ++++++++--------
 keysyms/xcb_keysyms.h |   37 +++++++++++++++++--------------------
 2 files changed, 25 insertions(+), 28 deletions(-)

New commits:
commit 24da2934459c7811f77713a3c7aaa6691ad203f2
Author: Julien Danjou <julien at danjou.info>
Date:   Mon Dec 8 14:25:18 2008 +0100

    keysyms: use xcb_key_lookup_t type for col paramter
    
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/keysyms/keysyms.c b/keysyms/keysyms.c
index d1f1d52..b6f6ab8 100644
--- a/keysyms/keysyms.c
+++ b/keysyms/keysyms.c
@@ -185,8 +185,8 @@ rule that is satisfied from the following list:
 */
 
 xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
-				  xcb_keycode_t     keycode,
-				  int            col)
+                                         xcb_keycode_t     keycode,
+                                         xcb_key_lookup_t col)
 {
   xcb_keysym_t *keysyms;
   xcb_keysym_t  keysym_null = { XCB_NO_SYMBOL };
@@ -266,17 +266,17 @@ xcb_key_symbols_get_keycode (xcb_key_symbols_t *syms,
 }
 
 xcb_keysym_t
-xcb_key_press_lookup_keysym (xcb_key_symbols_t    *syms,
-			 xcb_key_press_event_t *event,
-			 int               col)
+xcb_key_press_lookup_keysym (xcb_key_symbols_t     *syms,
+                             xcb_key_press_event_t *event,
+                             xcb_key_lookup_t col)
 {
   return xcb_key_symbols_get_keysym (syms, event->detail, col);
 }
 
 xcb_keysym_t
-xcb_key_release_lookup_keysym (xcb_key_symbols_t      *syms,
-			   xcb_key_release_event_t *event,
-			   int                 col)
+xcb_key_release_lookup_keysym (xcb_key_symbols_t       *syms,
+                               xcb_key_release_event_t *event,
+                               xcb_key_lookup_t col)
 {
   return xcb_key_symbols_get_keysym (syms, event->detail, col);
 }
diff --git a/keysyms/xcb_keysyms.h b/keysyms/xcb_keysyms.h
index 2b46239..3b408e4 100644
--- a/keysyms/xcb_keysyms.h
+++ b/keysyms/xcb_keysyms.h
@@ -3,43 +3,41 @@
 
 #include <xcb/xcb.h>
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-
 typedef struct _XCBKeySymbols xcb_key_symbols_t;
 
 /* enumeration for col parameter? */
-enum {
-	xcb_lookup_none_t   = 1,
-	xcb_lookup_chars_t  = 2,
-	xcb_lookup_key_sym_t = 3,
-	xcb_lookup_both_t   = 4
-} xcb_lookup_t;
+typedef enum {
+        xcb_key_lookup_none_t    = 1,
+        xcb_key_lookup_chars_t   = 2,
+        xcb_key_lookup_key_sym_t = 3,
+        xcb_key_lookup_both_t    = 4
+} xcb_key_lookup_t;
 
 xcb_key_symbols_t *xcb_key_symbols_alloc        (xcb_connection_t         *c);
 
 void           xcb_key_symbols_free         (xcb_key_symbols_t         *syms);
 
-xcb_keysym_t      xcb_key_symbols_get_keysym    (xcb_key_symbols_t         *syms,
-					  xcb_keycode_t             keycode,
-					  int                    col);
+xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
+                                         xcb_keycode_t     keycode,
+                                         xcb_key_lookup_t  col);
 
 xcb_keycode_t     xcb_key_symbols_get_keycode   (xcb_key_symbols_t         *syms,
-					  xcb_keysym_t              keysym);
+                                          xcb_keysym_t              keysym);
 
-xcb_keysym_t      xcb_key_press_lookup_keysym   (xcb_key_symbols_t         *syms,
-					  xcb_key_press_event_t      *event,
-					  int                    col);
+xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t      *syms,
+                                          xcb_key_press_event_t  *event,
+                                          xcb_key_lookup_t       col);
 
-xcb_keysym_t      xcb_key_release_lookup_keysym (xcb_key_symbols_t         *syms,
-					  xcb_key_release_event_t    *event,
-					  int                    col);
+xcb_keysym_t xcb_key_release_lookup_keysym (xcb_key_symbols_t       *syms,
+                                            xcb_key_release_event_t *event,
+                                            xcb_key_lookup_t        col);
 
 int            xcb_refresh_keyboard_mapping (xcb_key_symbols_t         *syms,
-					  xcb_mapping_notify_event_t *event);
+                                          xcb_mapping_notify_event_t *event);
 
 /* TODO:  need XLookupString equivalent */
 
@@ -64,5 +62,4 @@ int xcb_is_modifier_key      (xcb_keysym_t keysym);
 }
 #endif
 
-
 #endif /* __XCB_KEYSYMS_H__ */


More information about the xcb-commit mailing list