[Gtk-osx-devs] gdk_keymap_lookup_key patch



Hi

I implemented gdk_keymap_lookup_key because it's used by a program I'm
porting to OS x. Who do I send patches to, what form should they be
in. As far as I can see this function isn't implemented in the latest
git tree.


Joe Jones



--- gdkkeys-quartz-original.c	2009-09-15 21:52:03.000000000 +0100
+++ gdkkeys-quartz.c	2009-09-15 22:21:34.000000000 +0100
@@ -563,9 +563,10 @@
   g_return_val_if_fail (key != NULL, 0);
   g_return_val_if_fail (key->group < 4, 0);

-  /* FIXME: Implement */
+  g_return_val_if_fail(key->keycode < NUM_KEYCODES, 0);
+  g_return_val_if_fail(key->level < KEYVALS_PER_KEYCODE, 0);

-  return 0;
+  return keyval_array[KEYVALS_PER_KEYCODE * key->keycode + key->level];
 }

 #define GET_KEYVAL(keycode, group, level) (keyval_array[(keycode *
KEYVALS_PER_KEYCODE + group * 2 + level)])




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]