diff -Naur a/x11.vapi b/x11.vapi
--- a/x11.vapi	2011-04-07 12:36:42.403108945 +0200
+++ b/x11.vapi	2011-04-07 12:52:11.020463176 +0200
@@ -90,7 +90,7 @@
 		public void force_screensaver (int mode);
 
 		[CCode (cname = "XGetKeyboardMapping", array_length = false)]
-		public ulong[] get_keyboard_mapping (uchar first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
+		public KeySym[] get_keyboard_mapping (KeyCode first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
 
 		[CCode (cname = "XGetModifierMapping")]
 		public ModifierKeymap get_modifier_mapping ();
@@ -108,13 +108,13 @@
 		public int get_window_property (Window w, Atom property, long long_offset, long long_length, bool delete, Atom req_type, out Atom actual_type_return, out int actual_format_return, out ulong nitems_return, out ulong bytes_after_return, [CCode (type = "unsigned char **")] out void* prop_return);
 
 		[CCode (cname = "XGrabButton")]
-		public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor);
+		public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);
 
 		[CCode (cname = "XGrabKey")]
 		public int grab_key (int keycode, uint modifiers, Window grab_window, bool owner_events, int pointer_mode, int keyboard_mode);
 
 		[CCode (cname = "XGrabPointer")]
-		public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor, int time);
+		public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, int time);
 
 		[CCode (cname = "XGrabServer")]
 		public int grab_server ();
@@ -135,10 +135,10 @@
 		public int keycodes (ref int min_keycodes_return, ref int max_keycodes_return);
 
 		[CCode (cname = "XKeysymToKeycode")]
-		public uchar keysym_to_keycode (ulong keysym);
+		public KeyCode keysym_to_keycode (KeySym keysym);
 
 		[CCode (cname = "XKeycodeToKeysym")]
-		public ulong keycode_to_keysym (uchar keycode, int index);
+		public KeySym keycode_to_keysym (KeyCode keycode, int index);
 
 		[CCode (cname = "XLastKnownRequestProcessed")]
 		public ulong last_known_request_processed ();
@@ -997,12 +997,12 @@
 	public const uint XK_Super_R;
 
 	[CCode (cname = "XStringToKeysym")]
-	public ulong string_to_keysym (string key);
+	public KeySym string_to_keysym (string key);
 
 	[CCode (cname = "XKeysymToString")]
-	public unowned string keysym_to_string (ulong keysym);
+	public unowned string keysym_to_string (KeySym keysym);
 
 	[CCode (cname = "XConvertCase")]
-	public void convert_case (ulong keysym, out ulong lower_return, out ulong upper_return);
+	public void convert_case (KeySym keysym, out KeySym lower_return, out KeySym upper_return);
 }
 
