Commit 168b3c13 authored by Matthias Clasen's avatar Matthias Clasen Committed by Kristian Rietveld

Implement keyval vfuncs for quartz

parent 9ae2dc0d
......@@ -16,6 +16,7 @@ CLEANFILES =
EXTRA_DIST += \
keynames.txt \
keyname-table.h \
gdkkeynames.c \
gen-keyname-table.pl \
gdkconfig.h.win32 \
gdkkeysyms-update.pl \
......@@ -158,7 +159,7 @@ libgdk_3_0_la_SOURCES = $(common_sources)
libgdk_3_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS)
libgdk_3_0_la_LDFLAGS = $(LDADD)
libgdk_quartz_3_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_quartz_3_0_la_SOURCES = $(common_sources)
libgdk_quartz_3_0_la_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS)
libgdk_quartz_3_0_la_LDFLAGS = $(LDADD)
......
......@@ -45,8 +45,8 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase)
return (*(int *) pkey) - ((gdk_key *) pbase)->keyval;
}
gchar*
gdk_keyval_name (guint keyval)
static gchar*
_gdk_keyval_name (guint keyval)
{
static gchar buf[100];
gdk_key *found;
......@@ -86,8 +86,8 @@ gdk_keys_name_compare (const void *pkey, const void *pbase)
(const char *) (keynames + ((const gdk_key *) pbase)->offset));
}
guint
gdk_keyval_from_name (const gchar *keyval_name)
static guint
_gdk_keyval_from_name (const gchar *keyval_name)
{
gdk_key *found;
......
......@@ -75,6 +75,35 @@ gdk_display_manager_quartz_set_default_display (GdkDisplayManager *manager,
manager_quartz->default_display = display;
}
#include "../gdkkeynames.c"
static gchar *
gdk_quartz_display_manager_get_keyval_name (GdkDisplayManager *manager,
guint keyval)
{
return _gdk_keyval_name (keyval);
}
static guint
gdk_quartz_display_manager_lookup_keyval (GdkDisplayManager *manager,
const gchar *name)
{
return _gdk_keyval_from_name (name);
}
static void
gdk_quartz_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
/* FIXME implement this */
if (lower)
*lower = symbol;
if (upper)
*upper = symbol;
}
static void
gdk_display_manager_quartz_init (GdkDisplayManagerQuartz *manager)
{
......@@ -102,6 +131,9 @@ gdk_display_manager_quartz_class_init (GdkDisplayManagerQuartzClass *class)
manager_class->get_default_display = gdk_display_manager_quartz_get_default_display;
manager_class->atom_intern = _gdk_quartz_display_manager_atom_intern;
manager_class->get_atom_name = _gdk_quartz_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_quartz_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_quartz_display_manager_get_keyval_name;
manager_class->keyval_convert_case = gdk_quartz_display_manager_keyval_convert_case;
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment