Commit b5c6904c authored by Matthias Clasen's avatar Matthias Clasen

Drop explicit includes of gdkkeysyms.h

These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
parent 16877b4d
......@@ -253,7 +253,7 @@ def process_gdkkeysymsh():
for line in gdkkeysymsh.readlines():
linenum_gdkkeysymsh += 1
line = line.strip()
if line == "" or not match('^#define GDK_', line):
if line == "" or not match('^#define GDK_KEY_', line):
continue
components = split('\s+', line)
if len(components) < 3:
......@@ -261,10 +261,10 @@ def process_gdkkeysymsh():
% {'linenum': linenum_gdkkeysymsh, 'filename': filename_gdkkeysymsh, 'line': line}
print "Was expecting 3 items in the line"
sys.exit(-1)
if not match('^GDK_', components[1]):
if not match('^GDK_KEY_', components[1]):
print "Invalid line %(linenum)d in %(filename)s: %(line)s"\
% {'linenum': linenum_gdkkeysymsh, 'filename': filename_gdkkeysymsh, 'line': line}
print "Was expecting a keysym starting with GDK_"
print "Was expecting a keysym starting with GDK_KEY_"
sys.exit(-1)
if match('^0x[0-9a-fA-F]+$', components[2]):
unival = long(components[2][2:], 16)
......@@ -772,9 +772,9 @@ def convert_UnotationToHex(arg):
def addprefix_GDK(arg):
if match('^0x', arg):
return '%(arg)s, ' % { 'arg': arg }
return '%(arg)s, ' % { 'arg': arg }
else:
return 'GDK_%(arg)s, ' % { 'arg': arg }
return 'GDK_KEY_%(arg)s, ' % { 'arg': arg }
if opt_gtk:
first_keysym = ""
......@@ -818,7 +818,7 @@ if opt_gtk:
print "0x%(ks)04X," % { "ks": keysymvalue(i[0]) },
print '%(str)s' % { 'str': "".join(map(lambda x : str(x) + ", ", i[1:])) }
elif not match('^0x', i[0]):
print 'GDK_%(str)s' % { 'str': "".join(map(lambda x : str(x) + ", ", i)) }
print 'GDK_KEY_%(str)s' % { 'str': "".join(map(lambda x : str(x) + ", ", i)) }
else:
print '%(str)s' % { 'str': "".join(map(lambda x : str(x) + ", ", i)) }
for i in ct_second_part:
......
......@@ -32,8 +32,6 @@
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include "gtkaboutdialog.h"
#include "gtkalignment.h"
#include "gtkbutton.h"
......
......@@ -33,8 +33,7 @@
#include "gtkaccellabel.h" /* For _gtk_accel_label_class_get_accelerator_label */
#include "gtkaccelmap.h"
#include "gtkintl.h"
#include "gtkmain.h" /* For _gtk_boolean_handled_accumulator */
#include "gdk/gdkkeysyms.h"
#include "gtkmain.h" /* For _gtk_boolean_handled_accumulator */
#include "gtkmarshalers.h"
......
......@@ -37,8 +37,6 @@
#include "gtkprivate.h"
#include "gtkintl.h"
#include <gdk/gdkkeysyms.h>
/**
* SECTION:gtkaccellabel
* @Short_description: A label which displays an accelerator key on the right of the text
......
......@@ -30,7 +30,6 @@
#include "config.h"
#include <string.h>
#include <stdarg.h>
#include <gdkkeysyms.h>
#include "gtkbindings.h"
#include "gtktypeutils.h"
......
......@@ -81,7 +81,6 @@
#include "gtkmarshalers.h"
#include "gtktooltip.h"
#include "gtkprivate.h"
#include "gdk/gdkkeysyms.h"
/***************************************************************************/
/* The following date routines are taken from the lib_date package.
......
......@@ -21,8 +21,6 @@
#include "gtkcellrendereraccel.h"
#include "gdk/gdkkeysyms.h"
#include "gtkintl.h"
#include "gtkaccelgroup.h"
#include "gtkmarshalers.h"
......
......@@ -21,7 +21,7 @@
*/
#include "config.h"
#include <gdk/gdkkeysyms.h>
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkspinbutton.h"
......
......@@ -31,8 +31,7 @@
#include "config.h"
#include "gtkcolorbutton.h"
#include "gdk/gdkkeysyms.h"
#include "gdk-pixbuf/gdk-pixbuf.h"
#include "gtkbutton.h"
#include "gtkmain.h"
#include "gtkalignment.h"
......
......@@ -42,8 +42,6 @@
#include "gtkwindow.h"
#include "gtkprivate.h"
#include <gdk/gdkkeysyms.h>
#include <gobject/gvaluecollector.h>
#include <string.h>
......
......@@ -24,16 +24,17 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "gtkbutton.h"
#include "gtkdialog.h"
#include "gtkhbbox.h"
#include "gtklabel.h"
#include "gtkmarshalers.h"
#include "gtkvbox.h"
#include "gdkkeysyms.h"
#include "gtkmain.h"
#include "gtkintl.h"
#include "gtkbindings.h"
......
......@@ -33,7 +33,6 @@
#include <math.h>
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include "gtkalignment.h"
#include "gtkbindings.h"
#include "gtkcelleditable.h"
......
......@@ -22,7 +22,9 @@
*/
#include "config.h"
#include <string.h>
#include "gtkexpander.h"
#include "gtklabel.h"
......@@ -32,7 +34,6 @@
#include "gtkmain.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include <gdk/gdkkeysyms.h>
#include "gtkdnd.h"
......
......@@ -23,7 +23,6 @@
#include "gtkfilechooserdefault.h"
#include "gdk/gdkkeysyms.h"
#include "gtkalignment.h"
#include "gtkbindings.h"
#include "gtkcelllayout.h"
......
......@@ -34,8 +34,6 @@
#include "gtkwindow.h"
#include "gtkintl.h"
#include "gdkkeysyms.h"
typedef struct _GtkFileChooserEntryClass GtkFileChooserEntryClass;
#define GTK_FILE_CHOOSER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_CHOOSER_ENTRY, GtkFileChooserEntryClass))
......
......@@ -30,17 +30,14 @@
*/
#include "config.h"
#include <stdlib.h>
#include <glib/gprintf.h>
#include <string.h>
#include <atk/atk.h>
#include "gdk/gdk.h"
#include "gdk/gdkkeysyms.h"
#include "gtkfontsel.h"
#include "gtkbutton.h"
#include "gtkcellrenderertext.h"
#include "gtkentry.h"
......
......@@ -34,8 +34,6 @@
#include <math.h>
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include "gtkhsv.h"
#include "gtkbindings.h"
#include "gtkmarshalers.h"
......
......@@ -18,12 +18,11 @@
*/
#include "config.h"
#include <string.h>
#include <atk/atk.h>
#include <gdk/gdkkeysyms.h>
#include "gtkiconview.h"
#include "gtkcelllayout.h"
#include "gtkcellrenderer.h"
......
......@@ -18,10 +18,10 @@
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <gdk/gdkkeysyms-compat.h>
#include "gtkprivate.h"
#include "gtkaccelgroup.h"
#include "gtkimcontextsimple.h"
......@@ -87,22 +87,22 @@ static const GtkComposeTableCompact gtk_compose_table_compact = {
};
static const guint16 gtk_compose_ignore[] = {
GDK_Shift_L,
GDK_Shift_R,
GDK_Control_L,
GDK_Control_R,
GDK_Caps_Lock,
GDK_Shift_Lock,
GDK_Meta_L,
GDK_Meta_R,
GDK_Alt_L,
GDK_Alt_R,
GDK_Super_L,
GDK_Super_R,
GDK_Hyper_L,
GDK_Hyper_R,
GDK_Mode_switch,
GDK_ISO_Level3_Shift
GDK_KEY_Shift_L,
GDK_KEY_Shift_R,
GDK_KEY_Control_L,
GDK_KEY_Control_R,
GDK_KEY_Caps_Lock,
GDK_KEY_Shift_Lock,
GDK_KEY_Meta_L,
GDK_KEY_Meta_R,
GDK_KEY_Alt_L,
GDK_KEY_Alt_R,
GDK_KEY_Super_L,
GDK_KEY_Super_R,
GDK_KEY_Hyper_L,
GDK_KEY_Hyper_R,
GDK_KEY_Mode_switch,
GDK_KEY_ISO_Level3_Shift
};
static void gtk_im_context_simple_finalize (GObject *obj);
......@@ -299,14 +299,14 @@ check_table (GtkIMContextSimple *context_simple,
}
/* Checks if a keysym is a dead key. Dead key keysym values are defined in
* ../gdk/gdkkeysyms.h and the first is GDK_dead_grave. As X.Org is updated,
* ../gdk/gdkkeysyms.h and the first is GDK_KEY_dead_grave. As X.Org is updated,
* more dead keys are added and we need to update the upper limit.
* Currently, the upper limit is GDK_dead_dasia+1. The +1 has to do with
* a temporary issue in the X.Org header files.
* Currently, the upper limit is GDK_KEY_dead_dasia+1. The +1 has to do with
* a temporary issue in the X.Org header files.
* In future versions it will be just the keysym (no +1).
*/
#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))
#ifdef GDK_WINDOWING_WIN32
......@@ -323,15 +323,15 @@ check_win32_special_cases (GtkIMContextSimple *context_simple,
{
GtkIMContextSimplePrivate *priv = context_simple->priv;
if (n_compose == 2 &&
priv->compose_buffer[1] == GDK_space)
priv->compose_buffer[1] == GDK_KEY_space)
{
gunichar value = 0;
switch (priv->compose_buffer[0])
{
case GDK_dead_acute:
case GDK_KEY_dead_acute:
value = 0x00B4; break;
case GDK_dead_diaeresis:
case GDK_KEY_dead_diaeresis:
value = 0x00A8; break;
}
if (value > 0)
......@@ -523,8 +523,8 @@ check_normalize_nfc (gunichar* combination_buffer, gint n_compose)
}
static gboolean
check_algorithmically (GtkIMContextSimple *context_simple,
gint n_compose)
check_algorithmically (GtkIMContextSimple *context_simple,
gint n_compose)
{
GtkIMContextSimplePrivate *priv = context_simple->priv;
......@@ -550,7 +550,7 @@ check_algorithmically (GtkIMContextSimple *context_simple,
switch (priv->compose_buffer[i])
{
#define CASE(keysym, unicode) \
case GDK_dead_##keysym: combination_buffer[i+1] = unicode; break
case GDK_KEY_dead_##keysym: combination_buffer[i+1] = unicode; break
CASE (grave, 0x0300);
CASE (acute, 0x0301);
......@@ -830,8 +830,8 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
if (event->type == GDK_KEY_RELEASE)
{
if (priv->in_hex_sequence &&
(event->keyval == GDK_Control_L || event->keyval == GDK_Control_R ||
event->keyval == GDK_Shift_L || event->keyval == GDK_Shift_R))
(event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ||
event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R))
{
if (priv->tentative_match &&
g_unichar_validate (priv->tentative_match))
......@@ -872,14 +872,14 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
have_hex_mods = TRUE;
else
have_hex_mods = (event->state & (HEX_MOD_MASK)) == HEX_MOD_MASK;
is_hex_start = event->keyval == GDK_U;
is_hex_end = (event->keyval == GDK_space ||
event->keyval == GDK_KP_Space ||
event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter);
is_backspace = event->keyval == GDK_BackSpace;
is_escape = event->keyval == GDK_Escape;
is_hex_start = event->keyval == GDK_KEY_U;
is_hex_end = (event->keyval == GDK_KEY_space ||
event->keyval == GDK_KEY_KP_Space ||
event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter);
is_backspace = event->keyval == GDK_KEY_BackSpace;
is_escape = event->keyval == GDK_KEY_Escape;
hex_keyval = canonical_hex_keyval (event);
/* If we are already in a non-hex sequence, or
......@@ -897,9 +897,9 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
{
if (event->state & (GDK_MOD1_MASK | GDK_CONTROL_MASK) ||
(priv->in_hex_sequence && priv->modifiers_dropped &&
(event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter)))
(event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_ISO_Enter ||
event->keyval == GDK_KEY_KP_Enter)))
{
return FALSE;
}
......
This diff is collapsed.
......@@ -46,7 +46,6 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkstock.h"
#include "gdkkeysyms.h"
/**
* SECTION:gtkinfobar
......
......@@ -35,7 +35,6 @@
#include "gtkmarshalers.h"
#include "gtkpango.h"
#include "gtkwindow.h"
#include "gdk/gdkkeysyms.h"
#include "gtkclipboard.h"
#include "gtkimagemenuitem.h"
#include "gtkintl.h"
......
......@@ -25,13 +25,15 @@
*/
#include "config.h"
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include <gobject/gvaluecollector.h>
#include "gtkaccellabel.h"
#include "gtkaccelmap.h"
#include "gtkbindings.h"
#include "gtkcheckmenuitem.h"
#include <gobject/gvaluecollector.h>
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenuprivate.h"
......
......@@ -28,7 +28,6 @@
#include "gtkmenubar.h"
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
......
......@@ -25,7 +25,7 @@
*/
#include "config.h"
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkkeyhash.h"
#include "gtklabel.h"
......
......@@ -27,12 +27,10 @@
#include "config.h"
#include "gtknotebook.h"
#include <stdio.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include "gtknotebook.h"
#include "gtkmain.h"
#include "gtkmenu.h"
......
......@@ -28,7 +28,6 @@
#include "gtkpaned.h"
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
......
......@@ -30,7 +30,6 @@
#include <stdio.h>
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkorientable.h"
......
......@@ -30,7 +30,6 @@
#include <math.h>
#include <stdlib.h>
#include "gdk/gdkkeysyms.h"
#include "gtkscale.h"
#include "gtkiconfactory.h"
#include "gtkicontheme.h"
......
......@@ -42,9 +42,6 @@
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdkkeysyms.h>
#include "gtkbindings.h"
#include "gtkframe.h"
#include "gtkmain.h"
......
......@@ -25,8 +25,9 @@
*/
#include "config.h"
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include "gtkbindings.h"
#include "gtkmarshalers.h"
#include "gtkscrollable.h"
......
......@@ -26,9 +26,9 @@
*/
#include "config.h"
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkwindowprivate.h"
......
......@@ -31,7 +31,6 @@
#include <string.h>
#include "gdk/gdkkeysyms.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksizerequest.h"
......
......@@ -28,12 +28,13 @@
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <locale.h>
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkspinbutton.h"
#include "gtkentryprivate.h"
......
......@@ -29,17 +29,16 @@
#include "config.h"
#include "gtkstatusicon.h"
#include <string.h>
#include "gtkstatusicon.h"
#include "gtkintl.h"
#include "gtkiconfactory.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksizerequest.h"
#include "gtktrayicon.h"
#include "gtkprivate.h"
#include "gtkwidget.h"
#include "gtktooltip.h"
......@@ -62,9 +61,7 @@
#ifdef GDK_WINDOWING_QUARTZ
#include "gtkicontheme.h"
#include "gtklabel.h"
#endif
#include "gdkkeysyms.h"
#endif
#define BLINK_TIMEOUT 500
......
......@@ -25,13 +25,13 @@
*/
#include "config.h"
#include <string.h>
#include "gtkprivate.h"
#include "gtkstock.h"
#include "gtkiconfactory.h"
#include "gtkintl.h"
#include <gdk/gdkkeysyms.h>
/**
* SECTION:gtkstock
......
......@@ -40,8 +40,6 @@
#include "gtkswitch.h"
#include <gdk/gdkkeysyms.h>
#include "gtkaccessible.h"
#include "gtkactivatable.h"
#include "gtkintl.h"
......
......@@ -26,6 +26,7 @@
*/
#include "config.h"
#include <string.h>
#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
......@@ -44,7 +45,6 @@
#include "gtktextdisplay.h"
#include "gtktextview.h"
#include "gtkimmulticontext.h"
#include "gdk/gdkkeysyms.h"
#include "gtkprivate.h"
#include "gtktextutil.h"
#include "gtkwidgetprivate.h"
......
......@@ -32,12 +32,10 @@
#include "config.h"
#include "gtktoolbar.h"
#include <math.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include "gtktoolbar.h"
#include "gtkarrow.h"
#include "gtkbindings.h"
......
......@@ -19,9 +19,9 @@
#include "config.h"
#include <math.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include "gtktreeview.h"
#include "gtkrbtree.h"
......
......@@ -25,9 +25,15 @@
*/
#include "config.h"
#include <stdarg.h>
#include <string.h>
#include <locale.h>
#include <gobject/gvaluecollector.h>
#include <gobject/gobjectnotifyqueue.c>
#include <cairo-gobject.h>
#include "gtkcontainer.h"
#include "gtkaccelmap.h"
#include "gtkclipboard.h"
......@@ -44,11 +50,6 @@
#include "gtkwindowprivate.h"
#include "gtkbindings.h"
#include "gtkprivate.h"
#include "gdk/gdk.h"
#include <gobject/gvaluecollector.h>
#include <gobject/gobjectnotifyqueue.c>
#include <cairo-gobject.h>
#include "gdk/gdkkeysyms.h"
#include "gtkaccessible.h"
#include "gtktooltip.h"
#include "gtkinvisible.h"
......
......@@ -32,8 +32,6 @@
#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include "gdk/gdk.h"
#include "gdk/gdkkeysyms.h"
#include "gtkprivate.h"
#include "gtkrc.h"
......
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