[gtk+] Implement get_keymap vfunc for quartz



commit 51f149df5ebdfadc1e91d9d866a0e91ed8cac922
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 17 12:46:46 2010 -0500

    Implement get_keymap vfunc for quartz

 gdk/quartz/gdkdisplay-quartz.c |    1 +
 gdk/quartz/gdkkeys-quartz.c    |    8 ++++++++
 gdk/quartz/gdkprivate-quartz.h |    2 +-
 3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index e01e2d9..c3edb04 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -253,4 +253,5 @@ _gdk_display_quartz_class_init (GdkDisplayQuartz *class)
   display_class->event_data_copy = _gdk_quartz_display_event_data_copy;
   display_class->event_data_free = _gdk_quartz_display_event_data_free;
   display_class->create_window_impl = _gdk_quartz_display_create_window_impl;
+  display_class->get_keymap = _gdk_quartz_display_get_keymap;
 }
diff --git a/gdk/quartz/gdkkeys-quartz.c b/gdk/quartz/gdkkeys-quartz.c
index aa2f36a..c35eccb 100644
--- a/gdk/quartz/gdkkeys-quartz.c
+++ b/gdk/quartz/gdkkeys-quartz.c
@@ -66,6 +66,14 @@ typedef struct _GdkKeymapQuartzClass GdkKeymapQuartzClass;
 
 G_DEFINE_TYPE (GdkKeyMapQuartz, _gdk_keymap_quartz, GDK_TYPE_KEYMAP)
 
+GdkKeymap *
+_gdk_quartz_display_get_keymap (GdkDisplay *display)
+{
+  if (default_keymap == NULL)
+    default_keymap = g_object_new (_gdk_keymap_quartz_get_type (), NULL);
+
+  return default_keymap;
+}
 
 /* Note: we could check only if building against the 10.5 SDK instead, but
  * that would make non-xml layouts not work in 32-bit which would be a quite
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 92f2dce..cd83030 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -187,7 +187,7 @@ void       _gdk_quartz_display_create_window_impl (GdkDisplay    *display,
                                                    GdkEventMask   event_mask,
                                                    GdkWindowAttr *attributes,
                                                    gint           attributes_mask);
-
+GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
 
 
 GdkDisplay *    _gdk_quartz_display_open (const gchar *name);



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