forked from AuroraMiddleware/gtk
Remove gdkkeysyms-compat.h
The compatibility header was needed after GTK+ 3.0 renamed the key symbols from `GDK_*` to `GDK_KEY_*` to avoid collisions.
This commit is contained in:
parent
a9fdf49ed4
commit
71ad17cae1
@ -74,7 +74,6 @@ gdk_public_h_sources = \
|
||||
gdkglcontext.h \
|
||||
gdkkeys.h \
|
||||
gdkkeysyms.h \
|
||||
gdkkeysyms-compat.h \
|
||||
gdkmain.h \
|
||||
gdkmonitor.h \
|
||||
gdkpango.h \
|
||||
@ -223,11 +222,12 @@ endif
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
introspection_files = \
|
||||
$(filter-out gdkkeysyms-compat.h, $(gdk_h_sources)) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkenumtypes.h
|
||||
introspection_files = \
|
||||
$(gdk_h_sources) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkenumtypes.h \
|
||||
$()
|
||||
|
||||
Gdk-noinst-4.0.gir: libgdk-4.la Makefile
|
||||
Gdk_noinst_4_0_gir_SCANNERFLAGS = \
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,9 +56,6 @@ die "Could not open file keysymdef.h: $!\n" unless open(IN_KEYSYMDEF, "<:utf8",
|
||||
# Output: gtk+/gdk/gdkkeysyms.h
|
||||
die "Could not open file gdkkeysyms.h: $!\n" unless open(OUT_GDKKEYSYMS, ">:utf8", "gdkkeysyms.h");
|
||||
|
||||
# Output: gtk+/gdk/gdkkeysyms-compat.h
|
||||
die "Could not open file gdkkeysyms-compat.h: $!\n" unless open(OUT_GDKKEYSYMS_COMPAT, ">:utf8", "gdkkeysyms-compat.h");
|
||||
|
||||
my $LICENSE_HEADER= <<EOF;
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
@ -81,7 +78,6 @@ my $LICENSE_HEADER= <<EOF;
|
||||
EOF
|
||||
|
||||
print OUT_GDKKEYSYMS $LICENSE_HEADER;
|
||||
print OUT_GDKKEYSYMS_COMPAT $LICENSE_HEADER;
|
||||
|
||||
print OUT_GDKKEYSYMS<<EOF;
|
||||
|
||||
@ -104,20 +100,6 @@ print OUT_GDKKEYSYMS<<EOF;
|
||||
#define __GDK_KEYSYMS_H__
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
print OUT_GDKKEYSYMS_COMPAT<<EOF;
|
||||
/*
|
||||
* Compatibility version of gdkkeysyms.h.
|
||||
*
|
||||
* In GTK3, keysyms changed to have a KEY_ prefix. This is a compatibility header
|
||||
* your application can include to gain access to the old names as well. Consider
|
||||
* porting to the new names instead.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_KEYSYMS_COMPAT_H__
|
||||
#define __GDK_KEYSYMS_COMPAT_H__
|
||||
|
||||
EOF
|
||||
|
||||
while (<IN_KEYSYMDEF>)
|
||||
@ -136,11 +118,8 @@ while (<IN_KEYSYMDEF>)
|
||||
my $element = $keysymelements[1];
|
||||
my $binding = $element;
|
||||
$binding =~ s/^XK_/GDK_KEY_/g;
|
||||
my $compat_binding = $element;
|
||||
$compat_binding =~ s/^XK_/GDK_/g;
|
||||
|
||||
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
|
||||
printf OUT_GDKKEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]);
|
||||
}
|
||||
|
||||
close IN_KEYSYMDEF;
|
||||
@ -178,11 +157,8 @@ while (<IN_XF86KEYSYM>)
|
||||
my $element = $keysymelements[1];
|
||||
my $binding = $element;
|
||||
$binding =~ s/^XF86XK_/GDK_KEY_/g;
|
||||
my $compat_binding = $element;
|
||||
$compat_binding =~ s/^XF86XK_/GDK_/g;
|
||||
|
||||
printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]);
|
||||
printf OUT_GDKKEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]);
|
||||
}
|
||||
|
||||
close IN_XF86KEYSYM;
|
||||
@ -193,9 +169,4 @@ print OUT_GDKKEYSYMS<<EOF;
|
||||
#endif /* __GDK_KEYSYMS_H__ */
|
||||
EOF
|
||||
|
||||
print OUT_GDKKEYSYMS_COMPAT<<EOF;
|
||||
|
||||
#endif /* __GDK_KEYSYMS_COMPAT_H__ */
|
||||
EOF
|
||||
|
||||
printf "We just finished converting keysymdef.h to gdkkeysyms.h and gdkkeysyms-compat.h\nThank you\n";
|
||||
printf "We just finished converting keysymdef.h to gdkkeysyms.h\nThank you\n";
|
||||
|
@ -101,7 +101,6 @@ gdk_public_h_sources = \
|
||||
gdkevents.h \
|
||||
gdkkeys.h \
|
||||
gdkkeysyms.h \
|
||||
gdkkeysyms-compat.h \
|
||||
gdkmain.h \
|
||||
gdkpango.h \
|
||||
gdkpixbuf.h \
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "imm-extra.h"
|
||||
|
||||
#include "gdk/gdkkeysyms-compat.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gdk/win32/gdkwin32.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
/* #define BUFSIZE 4096 */
|
||||
|
||||
#define IS_DEAD_KEY(k) \
|
||||
((k) >= GDK_dead_grave && (k) <= (GDK_dead_dasia+1))
|
||||
((k) >= GDK_KEY_dead_grave && (k) <= (GDK_KEY_dead_dasia+1))
|
||||
|
||||
#define FREE_PREEDIT_BUFFER(ctx) \
|
||||
{ \
|
||||
@ -311,7 +311,7 @@ _gtk_im_context_ime_dead_key_unichar (guint keyval,
|
||||
switch (keyval)
|
||||
{
|
||||
#define CASE(keysym, unicode, spacing_unicode) \
|
||||
case GDK_dead_##keysym: return (spacing) ? spacing_unicode : unicode;
|
||||
case GDK_KEY_dead_##keysym: return (spacing) ? spacing_unicode : unicode;
|
||||
|
||||
CASE (grave, 0x0300, 0x0060);
|
||||
CASE (acute, 0x0301, 0x00b4);
|
||||
@ -388,7 +388,7 @@ gtk_im_context_ime_filter_keypress (GtkIMContext *context,
|
||||
if (!GDK_IS_WINDOW (context_ime->client_window))
|
||||
return FALSE;
|
||||
|
||||
if (event->keyval == GDK_space &&
|
||||
if (event->keyval == GDK_KEY_space &&
|
||||
context_ime->priv->dead_key_keyval != 0)
|
||||
{
|
||||
c = _gtk_im_context_ime_dead_key_unichar (context_ime->priv->dead_key_keyval, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user