Implement get_keymap vfunc for quartz

This commit is contained in:
Matthias Clasen 2010-12-17 12:46:46 -05:00 committed by Kristian Rietveld
parent 46352afa6f
commit 51f149df5e
3 changed files with 10 additions and 1 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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);