summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-04-02 23:33:47 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-04-02 23:33:47 +0000
commitb52b326d5f34b09af70e9f277a43b48c5bf3be2d (patch)
tree2593b2dffad11ac442a89514a39988d75e53701d /gtk
parent0aef43bcbcb208d7419711ffd48dd7942d538952 (diff)
downloadgtk+-b52b326d5f34b09af70e9f277a43b48c5bf3be2d.tar.gz
Add GdkEventSetting event for notification of changes to system settings,
Mon Apr 2 18:18:07 2001 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.h: Add GdkEventSetting event for notification of changes to system settings, gdk_setting_get() to retrieve a single system setting. * gdk/x11/gdkevents-x11.c: Bridge gdk_setting_get() and GdkEventSetting to the draft XSETTINGS mechanism. * gdk/x11/xsettings-{common,client}.[ch]: Sample-implementation of XSETTINGS. * gtk/gtkmain.c gtk/gtksettings.[ch]: Propagate notification of GDK settings changes to the GtkSettings object. * gdk/gdkevents.[ch] gdk/gtk/gtksettings.c: Hook up the double-click-timeout property to GDK. * gdk/gdkcolor.[ch] gdk/gdkvisual.h gdk/gdkevent.[ch] gdk/gdkfont.[ch]: Define GDK boxed types here. * gdk/Makefile.am gdk/makeenums.pl: Generate source files gdk/gdkenumtypes.[ch] for enum definitions. * gtk/gtkcompat.h: Add defines for GTK_TYPE_GDK_* * gtk/gtk-boxed.defs: Comment out GDK types * gtk/gtktypeutils.h: Remove GDK types * gtk/Makefile.am: No longer scan GDK headers for enumerataions
Diffstat (limited to 'gtk')
-rw-r--r--gtk/Makefile.am29
-rw-r--r--gtk/gtk-boxed.defs34
-rw-r--r--gtk/gtkaccelgroup.c4
-rw-r--r--gtk/gtkcellrenderertext.c4
-rw-r--r--gtk/gtkclist.c4
-rw-r--r--gtk/gtkentry.c2
-rw-r--r--gtk/gtkmain.c9
-rw-r--r--gtk/gtksettings.c27
-rw-r--r--gtk/gtksettings.h2
-rw-r--r--gtk/gtkspinbutton.c14
-rw-r--r--gtk/gtktexttag.c8
-rw-r--r--gtk/gtktipsquery.c22
-rw-r--r--gtk/gtktypeutils.c2
-rw-r--r--gtk/gtkwidget.c273
-rw-r--r--gtk/gtkwindow.c16
-rw-r--r--gtk/testgtk.c2
16 files changed, 225 insertions, 227 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 3438377f80..11c6174293 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -42,7 +42,6 @@ LDFLAGS = @STRIP_BEGIN@ \
-lm \
@STRIP_END@
-
#
# setup source file variables
#
@@ -361,26 +360,6 @@ gtk_c_sources = @STRIP_BEGIN@ \
fnmatch.c \
fnmatch.h \
@STRIP_END@
-# Extra headers that are used for enum type array/id generation
-gdk_headers = @STRIP_BEGIN@ \
- ../gdk/gdkcolor.h \
- ../gdk/gdkcursor.h \
- ../gdk/gdkdnd.h \
- ../gdk/gdkdrawable.h \
- ../gdk/gdkevents.h \
- ../gdk/gdkfont.h \
- ../gdk/gdkgc.h \
- ../gdk/gdkimage.h \
- ../gdk/gdkinput.h \
- ../gdk/gdkpixmap.h \
- ../gdk/gdkproperty.h \
- ../gdk/gdkregion.h \
- ../gdk/gdkrgb.h \
- ../gdk/gdkselection.h \
- ../gdk/gdktypes.h \
- ../gdk/gdkvisual.h \
- ../gdk/gdkwindow.h \
-@STRIP_END@
# we use our own built_sources variable rules to avoid automake's
# BUILT_SOURCES oddities
@@ -448,9 +427,9 @@ gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here
# versions in the build dir. thus a development setup requires
# srcdir to be writable, passing --disable-rebuilds to
# ../configure will supress all autogeneration rules.
-$(srcdir)/stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources) $(gdk_headers)
+$(srcdir)/stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources)
cd $(srcdir) \
- && $(PERL) makeenums.pl defs $(gtk_public_h_sources) $(gdk_headers) > xgen-gdef \
+ && $(PERL) makeenums.pl defs $(gtk_public_h_sources) > xgen-gdef \
&& cat gtk-boxed.defs >> xgen-gdef \
&& (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \
&& rm -f xgen-gdef \
@@ -482,9 +461,9 @@ $(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
&& LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
&& cp xgen-gtbic $(@F) \
&& rm -f xgen-gtbic
-$(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources) $(gdk_headers)
+$(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources)
cd $(srcdir) \
- && $(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) > xgen-gtbec \
+ && $(PERL) makeenums.pl arrays $(gtk_public_h_sources) > xgen-gtbec \
&& cp xgen-gtbec $(@F) \
&& rm -f xgen-gtbec
diff --git a/gtk/gtk-boxed.defs b/gtk/gtk-boxed.defs
index 3d22d2cd3d..9a3a34c0b1 100644
--- a/gtk/gtk-boxed.defs
+++ b/gtk/gtk-boxed.defs
@@ -33,23 +33,23 @@
; gdk_point_copy
; gdk_point_destroy)
-(define-boxed GdkVisual
- gdk_visual_ref
- gdk_visual_unref)
-
-(define-boxed GdkFont
- gdk_font_ref
- gdk_font_unref)
-
-(define-boxed GdkEvent
- gdk_event_copy
- gdk_event_free
- "sizeof(GdkEvent)")
-
-(define-boxed GdkColor
- gdk_color_copy
- gdk_color_free
- "sizeof(GdkColor)")
+;(define-boxed GdkVisual
+; gdk_visual_ref
+; gdk_visual_unref)
+
+;(define-boxed GdkFont
+; gdk_font_ref
+; gdk_font_unref)
+
+;(define-boxed GdkEvent
+; gdk_event_copy
+; gdk_event_free
+; "sizeof(GdkEvent)")
+
+;(define-boxed GdkColor
+; gdk_color_copy
+; gdk_color_free
+; "sizeof(GdkColor)")
(define-func gtk_style_get_white_interp
GdkColor
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index ac9606fb61..d1c27581d4 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -663,7 +663,7 @@ gtk_accel_group_create_add (GtkType class_type,
GTK_TYPE_UINT,
GTK_TYPE_ACCEL_GROUP,
GTK_TYPE_UINT,
- GTK_TYPE_GDK_MODIFIER_TYPE,
+ GDK_TYPE_MODIFIER_TYPE,
GTK_TYPE_ACCEL_FLAGS);
}
@@ -682,7 +682,7 @@ gtk_accel_group_create_remove (GtkType class_type,
GTK_TYPE_NONE, 3,
GTK_TYPE_ACCEL_GROUP,
GTK_TYPE_UINT,
- GTK_TYPE_GDK_MODIFIER_TYPE);
+ GDK_TYPE_MODIFIER_TYPE);
}
GSList*
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index c3a0e52cd0..50afc6b8f9 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -172,7 +172,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
g_param_spec_boxed ("background_gdk",
_("Background color"),
_("Background color as a GdkColor"),
- GTK_TYPE_GDK_COLOR,
+ GDK_TYPE_COLOR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
@@ -188,7 +188,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
g_param_spec_boxed ("foreground_gdk",
_("Foreground color"),
_("Foreground color as a GdkColor"),
- GTK_TYPE_GDK_COLOR,
+ GDK_TYPE_COLOR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index bcca0abcba..f0a88877dc 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -618,7 +618,7 @@ gtk_clist_class_init (GtkCListClass *klass)
GTK_TYPE_NONE, 3,
GTK_TYPE_INT,
GTK_TYPE_INT,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
clist_signals[UNSELECT_ROW] =
gtk_signal_new ("unselect_row",
GTK_RUN_FIRST,
@@ -626,7 +626,7 @@ gtk_clist_class_init (GtkCListClass *klass)
GTK_SIGNAL_OFFSET (GtkCListClass, unselect_row),
gtk_marshal_VOID__INT_INT_BOXED,
GTK_TYPE_NONE, 3, GTK_TYPE_INT,
- GTK_TYPE_INT, GTK_TYPE_GDK_EVENT);
+ GTK_TYPE_INT, GDK_TYPE_EVENT);
clist_signals[ROW_MOVE] =
gtk_signal_new ("row_move",
GTK_RUN_LAST,
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index d620f389df..e338bbf45d 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -430,7 +430,7 @@ gtk_entry_class_init (GtkEntryClass *class)
g_param_spec_boxed ("cursor_color",
_("Cursor color"),
_("Color with which to draw insertion cursor"),
- GTK_TYPE_GDK_COLOR,
+ GDK_TYPE_COLOR,
G_PARAM_READABLE));
signals[INSERT_TEXT] =
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 853c0ced30..1b23b7c856 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include "gdkconfig.h"
+
#ifdef GDK_WINDOWING_X11
#include <X11/Xlocale.h> /* so we get the right setlocale */
#else
@@ -43,6 +45,7 @@
#include "gtkmain.h"
#include "gtkrc.h"
#include "gtkselection.h"
+#include "gtksettings.h"
#include "gtksignal.h"
#include "gtkwidget.h"
#include "gtkwindow.h"
@@ -802,7 +805,9 @@ gtk_main_do_event (GdkEvent *event)
if (event->type == GDK_PROPERTY_NOTIFY)
gtk_selection_incr_event (event->any.window,
&event->property);
-
+ else if (event->type == GDK_SETTING)
+ _gtk_settings_handle_event (&event->setting);
+
return;
}
@@ -1352,7 +1357,7 @@ gtk_invoke_input (gpointer data,
args[0].type = GTK_TYPE_INT;
args[0].name = NULL;
GTK_VALUE_INT(args[0]) = source;
- args[1].type = GTK_TYPE_GDK_INPUT_CONDITION;
+ args[1].type = GDK_TYPE_INPUT_CONDITION;
args[1].name = NULL;
GTK_VALUE_FLAGS(args[1]) = condition;
args[2].type = GTK_TYPE_NONE;
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 1bca9bee36..0b4cbac2e7 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -130,7 +130,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
g_assert (PROP_DOUBLE_CLICK_TIMEOUT ==
settings_install_property_parser (class,
g_param_spec_int ("double-click-timeout", "Double Click Timeout", NULL,
- 1, G_MAXINT, 1,
+ 0, G_MAXINT, 1000,
G_PARAM_READWRITE),
NULL));
g_assert (PROP_BELL_PITCH ==
@@ -218,8 +218,9 @@ gtk_settings_get_property (GObject *object,
GParamSpec *pspec)
{
GtkSettings *settings = GTK_SETTINGS (object);
-
- g_value_copy (settings->property_values + property_id - 1, value);
+
+ if (!gdk_setting_get (pspec->name, value))
+ g_value_copy (settings->property_values + property_id - 1, value);
}
static void
@@ -227,7 +228,8 @@ gtk_settings_notify (GObject *object,
GParamSpec *pspec)
{
guint property_id = GPOINTER_TO_UINT (g_param_spec_get_qdata ((pspec), quark_property_id));
-
+ gint double_click_time;
+
#if 1
GValue tmp_value = { 0, };
gchar *contents;
@@ -238,7 +240,8 @@ gtk_settings_notify (GObject *object,
switch (property_id)
{
case PROP_DOUBLE_CLICK_TIMEOUT:
- g_print ("settings-notify: %s = \"%s\"\n", pspec->name, contents);
+ g_object_get (object, pspec->name, &double_click_time, NULL);
+ gdk_set_double_click_time (double_click_time);
break;
case PROP_BELL_PITCH:
g_print ("settings-notify: %s = \"%s\"\n", pspec->name, contents);
@@ -378,7 +381,7 @@ settings_install_property_parser (GtkSettingsClass *class,
GtkRcPropertyParser
_gtk_rc_property_parser_for_type (GType type)
{
- if (type == GTK_TYPE_GDK_COLOR)
+ if (type == GDK_TYPE_COLOR)
return gtk_rc_property_parse_color;
else if (type == GTK_TYPE_REQUISITION)
return gtk_rc_property_parse_requisition;
@@ -547,7 +550,7 @@ gtk_rc_property_parse_color (const GParamSpec *pspec,
gboolean success;
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);
- g_return_val_if_fail (G_VALUE_HOLDS (property_value, GTK_TYPE_GDK_COLOR), FALSE);
+ g_return_val_if_fail (G_VALUE_HOLDS (property_value, GDK_TYPE_COLOR), FALSE);
scanner = gtk_rc_scanner_new ();
g_scanner_input_text (scanner, gstring->str, gstring->len);
@@ -788,3 +791,13 @@ gtk_rc_property_parse_border (const GParamSpec *pspec,
return success;
}
+
+
+void
+_gtk_settings_handle_event (GdkEventSetting *event)
+{
+ GtkSettings *settings = gtk_settings_get_global ();
+
+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (settings), event->name))
+ g_object_notify (G_OBJECT (settings), event->name);
+}
diff --git a/gtk/gtksettings.h b/gtk/gtksettings.h
index 9a5641cd81..6a861ad322 100644
--- a/gtk/gtksettings.h
+++ b/gtk/gtksettings.h
@@ -110,6 +110,8 @@ void gtk_settings_set_double_property (GtkSettings *settings,
gdouble v_double,
const gchar *origin);
+void _gtk_settings_handle_event (GdkEventSetting *event);
+
GtkRcPropertyParser _gtk_rc_property_parser_for_type (GType type);
#ifdef __cplusplus
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 364b5a5617..1171650029 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -243,13 +243,13 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
spinbutton_signals[OUTPUT] =
- g_signal_newc("output",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkSpinButtonClass, output),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__VOID,
- G_TYPE_BOOLEAN, 0);
+ g_signal_newc ("output",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkSpinButtonClass, output),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__VOID,
+ G_TYPE_BOOLEAN, 0);
spinbutton_signals[VALUE_CHANGED] =
gtk_signal_new ("value_changed",
diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c
index 58ba7c2b44..4faf884935 100644
--- a/gtk/gtktexttag.c
+++ b/gtk/gtktexttag.c
@@ -213,7 +213,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
g_param_spec_boxed ("background_gdk",
_("Background color"),
_("Background color as a GdkColor"),
- GTK_TYPE_GDK_COLOR,
+ GDK_TYPE_COLOR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
@@ -247,7 +247,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
g_param_spec_boxed ("foreground_gdk",
_("Foreground color"),
_("Foreground color as a GdkColor"),
- GTK_TYPE_GDK_COLOR,
+ GDK_TYPE_COLOR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
@@ -609,7 +609,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
GTK_TYPE_INT,
3,
G_TYPE_OBJECT,
- GTK_TYPE_GDK_EVENT,
+ GDK_TYPE_EVENT,
GTK_TYPE_TEXT_ITER);
}
@@ -1256,7 +1256,7 @@ get_color_arg (GValue *value, GdkColor *orig)
color = g_new (GdkColor, 1);
*color = *orig;
- g_value_init (value, GTK_TYPE_GDK_COLOR);
+ g_value_init (value, GDK_TYPE_COLOR);
g_value_set_boxed (value, color);
}
diff --git a/gtk/gtktipsquery.c b/gtk/gtktipsquery.c
index 355a8b1490..d05a1fdceb 100644
--- a/gtk/gtktipsquery.c
+++ b/gtk/gtktipsquery.c
@@ -159,17 +159,17 @@ gtk_tips_query_class_init (GtkTipsQueryClass *class)
GTK_TYPE_STRING,
GTK_TYPE_STRING);
tips_query_signals[SIGNAL_WIDGET_SELECTED] =
- g_signal_newc("widget_selected",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkTipsQueryClass, widget_selected),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED,
- G_TYPE_BOOLEAN, 4,
- GTK_TYPE_WIDGET,
- G_TYPE_STRING,
- G_TYPE_STRING,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("widget_selected",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkTipsQueryClass, widget_selected),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED,
+ G_TYPE_BOOLEAN, 4,
+ GTK_TYPE_WIDGET,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ GDK_TYPE_EVENT);
}
static void
diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c
index 16e92886ca..3728c36f6d 100644
--- a/gtk/gtktypeutils.c
+++ b/gtk/gtktypeutils.c
@@ -170,7 +170,7 @@ gtk_type_init (GTypeDebugFlags debug_flags)
else if (builtin_info[i].parent == GTK_TYPE_BOXED)
{
static const gchar *copy_types[] = {
- "GtkSelectionData", "GdkEvent", "GdkColor", "GtkBorder", "GtkTextIter", "PangoTabArray",
+ "GtkSelectionData", "GtkBorder", "GtkTextIter", "PangoTabArray",
"PangoFontDescription", "GtkTreeIter", "GtkTreePath", "GtkRequisition"
};
gboolean ref_counted = TRUE;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 945f178434..84d8db2229 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -494,7 +494,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
g_param_spec_flags ("events",
_("Events"),
_("The event mask that decides what kind of GdkEvents this widget gets."),
- GTK_TYPE_GDK_EVENT_MASK,
+ GDK_TYPE_EVENT_MASK,
GDK_STRUCTURE_MASK,
G_PARAM_READWRITE));
@@ -503,7 +503,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
g_param_spec_enum ("extension_events",
_("Extension events"),
_("The mask that decides what kind of extension events this widget gets."),
- GTK_TYPE_GDK_EXTENSION_MODE,
+ GDK_TYPE_EXTENSION_MODE,
GDK_EXTENSION_EVENTS_NONE,
G_PARAM_READWRITE));
@@ -629,194 +629,194 @@ gtk_widget_class_init (GtkWidgetClass *klass)
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
widget_signals[EVENT] =
- g_signal_newc("event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[BUTTON_PRESS_EVENT] =
- g_signal_newc("button_press_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, button_press_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("button_press_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, button_press_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[BUTTON_RELEASE_EVENT] =
- g_signal_newc("button_release_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, button_release_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("button_release_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, button_release_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[SCROLL_EVENT] =
- g_signal_newc("scroll_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, scroll_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("scroll_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, scroll_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[MOTION_NOTIFY_EVENT] =
- g_signal_newc("motion_notify_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, motion_notify_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("motion_notify_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, motion_notify_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[DELETE_EVENT] =
- g_signal_newc("delete_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, delete_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("delete_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, delete_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[DESTROY_EVENT] =
- g_signal_newc("destroy_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, destroy_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("destroy_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, destroy_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[EXPOSE_EVENT] =
- g_signal_newc("expose_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, expose_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("expose_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, expose_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[KEY_PRESS_EVENT] =
- g_signal_newc("key_press_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, key_press_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("key_press_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, key_press_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[KEY_RELEASE_EVENT] =
- g_signal_newc("key_release_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, key_release_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("key_release_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, key_release_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[ENTER_NOTIFY_EVENT] =
- g_signal_newc("enter_notify_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, enter_notify_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("enter_notify_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, enter_notify_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[LEAVE_NOTIFY_EVENT] =
- g_signal_newc("leave_notify_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, leave_notify_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("leave_notify_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, leave_notify_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[CONFIGURE_EVENT] =
- g_signal_newc("configure_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWidgetClass, configure_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("configure_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWidgetClass, configure_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
widget_signals[FOCUS_IN_EVENT] =
- g_signal_newc("focus_in_event",
+ g_signal_newc ("focus_in_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, focus_in_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[FOCUS_OUT_EVENT] =
- g_signal_newc("focus_out_event",
+ g_signal_newc ("focus_out_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, focus_out_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[MAP_EVENT] =
- g_signal_newc("map_event",
+ g_signal_newc ("map_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, map_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[UNMAP_EVENT] =
- g_signal_newc("unmap_event",
+ g_signal_newc ("unmap_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, unmap_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[PROPERTY_NOTIFY_EVENT] =
- g_signal_newc("property_notify_event",
+ g_signal_newc ("property_notify_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, property_notify_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[SELECTION_CLEAR_EVENT] =
- g_signal_newc("selection_clear_event",
+ g_signal_newc ("selection_clear_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, selection_clear_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[SELECTION_REQUEST_EVENT] =
- g_signal_newc("selection_request_event",
+ g_signal_newc ("selection_request_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, selection_request_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[SELECTION_NOTIFY_EVENT] =
- g_signal_newc("selection_notify_event",
+ g_signal_newc ("selection_notify_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, selection_notify_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[SELECTION_RECEIVED] =
gtk_signal_new ("selection_received",
GTK_RUN_LAST,
@@ -837,23 +837,23 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_UINT,
GTK_TYPE_UINT);
widget_signals[PROXIMITY_IN_EVENT] =
- g_signal_newc("proximity_in_event",
+ g_signal_newc ("proximity_in_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, proximity_in_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[PROXIMITY_OUT_EVENT] =
- g_signal_newc("proximity_out_event",
+ g_signal_newc ("proximity_out_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, proximity_out_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[DRAG_LEAVE] =
gtk_signal_new ("drag_leave",
GTK_RUN_LAST,
@@ -888,7 +888,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_NONE, 1,
GDK_TYPE_DRAG_CONTEXT);
widget_signals[DRAG_MOTION] =
- g_signal_newc("drag_motion",
+ g_signal_newc ("drag_motion",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, drag_motion),
@@ -900,7 +900,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
G_TYPE_INT,
G_TYPE_UINT);
widget_signals[DRAG_DROP] =
- g_signal_newc("drag_drop",
+ g_signal_newc ("drag_drop",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, drag_drop),
@@ -936,42 +936,41 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_UINT,
GTK_TYPE_UINT);
widget_signals[VISIBILITY_NOTIFY_EVENT] =
- g_signal_newc("visibility_notify_event",
+ g_signal_newc ("visibility_notify_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, visibility_notify_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[CLIENT_EVENT] =
- g_signal_newc("client_event",
+ g_signal_newc ("client_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, client_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[NO_EXPOSE_EVENT] =
- g_signal_newc("no_expose_event",
+ g_signal_newc ("no_expose_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, no_expose_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ GDK_TYPE_EVENT);
widget_signals[WINDOW_STATE_EVENT] =
- g_signal_newc("window_state_event",
+ g_signal_newc ("window_state_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWidgetClass, window_state_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
-
+ GDK_TYPE_EVENT);
widget_signals[POPUP_MENU] =
gtk_signal_new ("popup_menu",
GTK_RUN_LAST | GTK_RUN_ACTION,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f276d85c12..7662fb9650 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -401,14 +401,14 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_WIDGET);
window_signals[FRAME_EVENT] =
- g_signal_newc("frame_event",
- G_TYPE_FROM_CLASS(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkWindowClass, frame_event),
- _gtk_boolean_handled_accumulator, NULL,
- gtk_marshal_BOOLEAN__BOXED,
- G_TYPE_BOOLEAN, 1,
- GTK_TYPE_GDK_EVENT);
+ g_signal_newc ("frame_event",
+ G_TYPE_FROM_CLASS(object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(GtkWindowClass, frame_event),
+ _gtk_boolean_handled_accumulator, NULL,
+ gtk_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT);
if (!mnemonic_hash_table)
mnemonic_hash_table = g_hash_table_new (mnemonic_hash,
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index fd49da44d1..f1cfb011a7 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -4165,7 +4165,7 @@ set_cursor (GtkWidget *spinner,
c &= 0xfe;
label = gtk_object_get_user_data (GTK_OBJECT (spinner));
- vals = gtk_type_enum_get_values (GTK_TYPE_GDK_CURSOR_TYPE);
+ vals = gtk_type_enum_get_values (GDK_TYPE_CURSOR_TYPE);
while (vals && vals->value != c)
vals++;
if (vals)