mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Implement keyval vfuncs for quartz
This commit is contained in:
parent
9ae2dc0deb
commit
168b3c13b7
@ -16,6 +16,7 @@ CLEANFILES =
|
|||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
keynames.txt \
|
keynames.txt \
|
||||||
keyname-table.h \
|
keyname-table.h \
|
||||||
|
gdkkeynames.c \
|
||||||
gen-keyname-table.pl \
|
gen-keyname-table.pl \
|
||||||
gdkconfig.h.win32 \
|
gdkconfig.h.win32 \
|
||||||
gdkkeysyms-update.pl \
|
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_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS)
|
||||||
libgdk_3_0_la_LDFLAGS = $(LDADD)
|
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_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS)
|
||||||
libgdk_quartz_3_0_la_LDFLAGS = $(LDADD)
|
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;
|
return (*(int *) pkey) - ((gdk_key *) pbase)->keyval;
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar*
|
static gchar*
|
||||||
gdk_keyval_name (guint keyval)
|
_gdk_keyval_name (guint keyval)
|
||||||
{
|
{
|
||||||
static gchar buf[100];
|
static gchar buf[100];
|
||||||
gdk_key *found;
|
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));
|
(const char *) (keynames + ((const gdk_key *) pbase)->offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
static guint
|
||||||
gdk_keyval_from_name (const gchar *keyval_name)
|
_gdk_keyval_from_name (const gchar *keyval_name)
|
||||||
{
|
{
|
||||||
gdk_key *found;
|
gdk_key *found;
|
||||||
|
|
||||||
|
@ -75,6 +75,35 @@ gdk_display_manager_quartz_set_default_display (GdkDisplayManager *manager,
|
|||||||
manager_quartz->default_display = display;
|
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
|
static void
|
||||||
gdk_display_manager_quartz_init (GdkDisplayManagerQuartz *manager)
|
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->get_default_display = gdk_display_manager_quartz_get_default_display;
|
||||||
manager_class->atom_intern = _gdk_quartz_display_manager_atom_intern;
|
manager_class->atom_intern = _gdk_quartz_display_manager_atom_intern;
|
||||||
manager_class->get_atom_name = _gdk_quartz_display_manager_get_atom_name;
|
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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user