summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog59
-rw-r--r--ChangeLog.pre-2-059
-rw-r--r--ChangeLog.pre-2-1059
-rw-r--r--ChangeLog.pre-2-259
-rw-r--r--ChangeLog.pre-2-459
-rw-r--r--ChangeLog.pre-2-659
-rw-r--r--ChangeLog.pre-2-859
-rw-r--r--docs/reference/Makefile.am2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/animation.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/creating.sgml15
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/file-loading.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/file-saving.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml852
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/initialization_versions.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/module_interface.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/refcounting.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/scaling.sgml2
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/util.sgml2
-rw-r--r--docs/reference/gdk/tmpl/colors.sgml2
-rw-r--r--docs/reference/gdk/tmpl/drawing.sgml2
-rw-r--r--docs/reference/gdk/tmpl/event_structs.sgml2
-rw-r--r--docs/reference/gdk/tmpl/fonts.sgml2
-rw-r--r--docs/reference/gdk/tmpl/gcs.sgml2
-rw-r--r--docs/reference/gdk/tmpl/gdk-unused.sgml221
-rw-r--r--docs/reference/gdk/tmpl/images.sgml2
-rw-r--r--docs/reference/gdk/tmpl/pixbufs.sgml2
-rw-r--r--docs/reference/gdk/tmpl/regions.sgml33
-rw-r--r--docs/reference/gdk/tmpl/rgb.sgml2
-rw-r--r--docs/reference/gdk/tmpl/visuals.sgml2
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c8
-rw-r--r--gtk/gdk-pixbuf-loader.c8
-rw-r--r--gtk/gtkadjustment.c8
-rw-r--r--gtk/gtkarg.h2
-rw-r--r--gtk/gtkbox.c16
-rw-r--r--gtk/gtkbutton.c57
-rw-r--r--gtk/gtkcalendar.c21
-rw-r--r--gtk/gtkcellrenderertoggle.c2
-rw-r--r--gtk/gtkcheckmenuitem.c1
-rw-r--r--gtk/gtkclist.c206
-rw-r--r--gtk/gtkclist.h5
-rw-r--r--gtk/gtkcolorsel.c7
-rw-r--r--gtk/gtkcontainer.c46
-rw-r--r--gtk/gtkctree.c173
-rw-r--r--gtk/gtkctree.h4
-rw-r--r--gtk/gtkcurve.c1
-rw-r--r--gtk/gtkdata.c2
-rw-r--r--gtk/gtkdialog.c6
-rw-r--r--gtk/gtkentry.c62
-rw-r--r--gtk/gtkhandlebox.c34
-rw-r--r--gtk/gtkhsv.c16
-rw-r--r--gtk/gtkimcontext.c8
-rw-r--r--gtk/gtkinputdialog.c10
-rw-r--r--gtk/gtkitem.c23
-rw-r--r--gtk/gtklist.c49
-rw-r--r--gtk/gtklistitem.c53
-rw-r--r--gtk/gtkliststore.c3
-rw-r--r--gtk/gtkmenuitem.c45
-rw-r--r--gtk/gtkmenushell.c46
-rw-r--r--gtk/gtkmodelsimple.c2
-rw-r--r--gtk/gtknotebook.c55
-rw-r--r--gtk/gtkobject.c867
-rw-r--r--gtk/gtkobject.h150
-rw-r--r--gtk/gtkoldeditable.c66
-rw-r--r--gtk/gtkpacker.c10
-rw-r--r--gtk/gtkprogressbar.c2
-rw-r--r--gtk/gtkspinbutton.c2
-rw-r--r--gtk/gtkstatusbar.c1
-rw-r--r--gtk/gtktextbuffer.c18
-rw-r--r--gtk/gtktextlayout.c16
-rw-r--r--gtk/gtktexttag.c14
-rw-r--r--gtk/gtktexttagtable.c15
-rw-r--r--gtk/gtktextview.c104
-rw-r--r--gtk/gtktipsquery.c24
-rw-r--r--gtk/gtktogglebutton.c23
-rw-r--r--gtk/gtktoolbar.c36
-rw-r--r--gtk/gtktree.c47
-rw-r--r--gtk/gtktreeitem.c36
-rw-r--r--gtk/gtktreemodelsort.c6
-rw-r--r--gtk/gtktreeselection.c6
-rw-r--r--gtk/gtktreestore.c2
-rw-r--r--gtk/gtktreeviewcolumn.c6
-rw-r--r--gtk/gtktypeutils.c2
-rw-r--r--gtk/gtkwidget.c177
-rw-r--r--gtk/gtkwidget.h16
-rw-r--r--gtk/gtkwindow.c42
-rw-r--r--gtk/stock-icons/Makefile.am41
88 files changed, 1978 insertions, 2304 deletions
diff --git a/ChangeLog b/ChangeLog
index be1f2536d..0a6f80798 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index be1f2536d..0a6f80798 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,62 @@
+Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
+
+ * gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
+
+ * gtk/gtkbox.c: change property types from (u)long to (u)int for
+ ::position and ::padding.
+
+ * gtk/gtkcontainer.c: make ::border_width an INT property.
+
+ * gtk/gtkpacker.c: make ::position an INT property.
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
+ guard against NULL h/v scrollbars, since this is used at construction
+ time.
+
+ * gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
+ internal gtk_clist_constructor().
+
+ * gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
+ gtk_ctree_constructor().
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
+ ::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
+
+ * docs/reference/Makefile.am: fun stuff, disabled docs generation
+ again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
+
+ * gtk/gtkwidget.[hc]:
+ removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
+ and gtk_widget_get().
+ (gtk_widget_new): use g_object_new_valist().
+ (gtk_widget_set): use g_object_set_valist().
+
+ * gtk/gtkobject.[hc]:
+ removed gtk_object_arg_get_info(), gtk_object_getv(),
+ gtk_object_query_args(), gtk_object_newv(),
+ gtk_object_class_add_signals(),
+ gtk_object_class_user_signal_new(),
+ gtk_object_class_user_signal_newv(),
+ gtk_object_arg_set(), gtk_object_arg_get(),
+ gtk_object_args_collect(),
+ gtk_object_default_construct(),
+ gtk_object_constructed(),
+ GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
+ removed nsignals, signals and n_args members from GtkObjectClass.
+ (gtk_object_new): use g_object_new_valist().
+ (gtk_object_set): use g_object_set_valist().
+ (gtk_object_get): use g_object_get_valist().
+
+ * gtk/gtkcompat.h: define gtk_object_default_construct().
+
+ * gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
+ g_object_new().
+
+ * gtk/*.c: removed gtk_object_class_add_signals() from class_init()
+ fucntions, cleaned up method assignments (make sure your structures
+ are setup properly before calling out). removed all GTK_CONSTRUCTED
+ hacks ;)
+
Tue Dec 12 11:52:16 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 26da15420..c581de296 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -1,4 +1,4 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = gdk-pixbuf gdk gtk
+# SUBDIRS = gdk-pixbuf gdk gtk
diff --git a/docs/reference/gdk-pixbuf/tmpl/animation.sgml b/docs/reference/gdk-pixbuf/tmpl/animation.sgml
index ebd58679e..8253cb491 100644
--- a/docs/reference/gdk-pixbuf/tmpl/animation.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/animation.sgml
@@ -9,13 +9,11 @@ animation
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### ENUM GdkPixbufFrameAction ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/creating.sgml b/docs/reference/gdk-pixbuf/tmpl/creating.sgml
index b07609040..fe52df5bb 100644
--- a/docs/reference/gdk-pixbuf/tmpl/creating.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/creating.sgml
@@ -9,13 +9,11 @@ creating
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_new ##### -->
<para>
@@ -67,6 +65,19 @@ creating
@Returns:
+<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
+<para>
+
+</para>
+
+@src_pixbuf:
+@src_x:
+@src_y:
+@width:
+@height:
+@Returns:
+
+
<!-- ##### FUNCTION gdk_pixbuf_copy ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml b/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
index 21d19f0ca..125cf84c4 100644
--- a/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
@@ -9,13 +9,11 @@ file-loading
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_new_from_file ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/file-saving.sgml b/docs/reference/gdk-pixbuf/tmpl/file-saving.sgml
index f886ba1de..b3abab0ba 100644
--- a/docs/reference/gdk-pixbuf/tmpl/file-saving.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/file-saving.sgml
@@ -9,13 +9,11 @@ file-saving
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_savev ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
index e26790a56..f403bf522 100644
--- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
@@ -1,207 +1,32 @@
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
-Drawables to Pixbufs
-
-
-<!-- ##### USER_FUNCTION GdkPixbufLastUnref ##### -->
+<!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
<para>
- A function of this type can be used to override the default
- operation when a pixbuf loses its last reference, i.e. when
- gdk_pixbuf_unref() is called on a #GdkPixbuf structure that has a
- reference count of 1. This function should determine whether to
- finalize the pixbuf by calling gdk_pixbuf_finalize(), or whether
- to just resume normal execution. The last unref handler for a
- #GdkPixbuf can be set using the
- gdk_pixbuf_set_last_unref_handler() function. By default, pixbufs
- will be finalized automatically if no last unref handler has been
- defined.
+ If this argument is %TRUE, then the width of the pixbuf will be
+ considered to be in pixels, that is, it will not be visually
+ scaled even if the item's affine transformation changes. If this
+ is %FALSE, then the width of the pixbuf will be considered to be
+ in canvas units, and so will be scaled normally by affine
+ transformations. The default is %FALSE.
</para>
-@pixbuf: The pixbuf that is losing its last reference.
-@data: User closure data.
-
-<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION ./tmpl/rendering.sgml:See_Also ##### -->
+<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:See_Also ##### -->
<para>
GdkRGB
</para>
-<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Title ##### -->
-X Drawables to Pixbufs
-
-
-<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
-<para>
-
-</para>
-
-@pixbuf:
-@pixmap_return:
-@mask_return:
-@alpha_threshold: <!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
-<!-- ##### ARG GnomeCanvasPixbuf:width ##### -->
- <para>
- Indicates the width the pixbuf will be scaled to. This argument
- will only be used if the <link
- linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument
- is %TRUE. If the <link
- linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
- argument is %FALSE, the width will be taken to be in canvas units,
- and thus will be scaled along with the canvas item's affine
- transformation. If width_in_pixels is %TRUE, the width will be
- taken to be in pixels, and will visually remain a constant size
- even if the item's affine transformation changes.
- </para>
-
-
-<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
-<para>
-
-</para>
-
-@pixbuf:
-@drawable:
-@gc:
-@src_x:
-@src_y:
-@dest_x:
-@dest_y:
-@width:
-@height:
-@dither:
-@x_dither:
-@y_dither:
-
-<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
-<para>
-
-</para>
-
-@dest:
-@src:
-@cmap:
-@src_x:
-@src_y:
-@dest_x:
-@dest_y:
-@width:
-@height:
-@Returns: <!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
-<!-- ##### ARG GnomeCanvasPixbuf:x ##### -->
- <para>
- Indicates the horizontal translation offset of the pixbuf item's
- image. This offset may not actually appear horizontal, since it
- will be affected by the item's affine transformation. The default
- is 0.0.
- </para>
-
-
-<!-- ##### ARG GnomeCanvasPixbuf:y ##### -->
- <para>
- Indicates the vertical translation offset of the pixbuf item's
- image. Works in the same way as the <link
- linkend="GnomeCanvasPixbuf--x">x</link> argument. The default is
- 0.0.
- </para>
-
-
-<!-- ##### SECTION ./tmpl/xlib-init.sgml:Short_Description ##### -->
-Initializing the &gdk-pixbuf; Xlib library.
-
-
-<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Long_Description ##### -->
- <para>
- The functions in this section allow you to take the image data
- from an X drawable and dump it into a #GdkPixbuf. This can be
- used for screenshots and other special effects. Note that these
- operations can be expensive, since the image data has to be
- transferred from the X server to the client program and converted.
- </para>
-
- <para>
- These functions are analogous to those for the Gdk version of
- &gdk-pixbuf;.
- </para>
-
-
-<!-- ##### FUNCTION gdk_pixbuf_new_from_art_pixbuf ##### -->
-<para>
-
-</para>
-
-@art_pixbuf:
-@Returns:
-
-<!-- ##### SECTION ./tmpl/xlib-init.sgml:See_Also ##### -->
- <para>
- XlibRGB
- </para>
-
-
-<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
- <para>
- Works in the same way as the <link
- linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
- argument, but controls whether the <link
- linkend="GnomeCanvasPixbuf--y">y</link> translation offset is
- scaled or not. The default is %FALSE.
- </para>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
-
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:See_Also ##### -->
<para>
#GnomeCanvas, #GdkPixbuf
</para>
-<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
-<para>
+<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Short_Description ##### -->
-</para>
-<!-- ##### ARG GnomeCanvasPixbuf:pixbuf ##### -->
- <para>
- Contains a pointer to a #GdkPixbuf structure that will be used by
- the pixbuf canvas item as an image source. When a pixbuf is set
- its reference count is incremented; if the pixbuf item kept a
- pointer to another #GdkPixbuf structure, the reference count of
- this structure will be decremented. Also, the GdkPixbuf's
- reference count will automatically be decremented when the
- #GnomeCanvasPixbuf item is destroyed. When a pixbuf is queried, a
- reference count will not be added to the return value; you must do
- this yourself if you intend to keep the pixbuf structure around.
- </para>
-
-
-<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:See_Also ##### -->
- <para>
- GdkRGB
- </para>
+<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Short_Description ##### -->
+Canvas item to display #GdkPixbuf images.
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Long_Description ##### -->
@@ -217,155 +42,110 @@ End:
</para>
-<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Short_Description ##### -->
-
-
+<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
+<para>
-<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Short_Description ##### -->
-Canvas item to display #GdkPixbuf images.
+</para>
+@pixbuf:
+@bitmap:
+@src_x:
+@src_y:
+@dest_x:
+@dest_y:
+@width:
+@height:
+@alpha_threshold:
-<!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
+<!-- ##### SECTION ./tmpl/rendering.sgml:Long_Description ##### -->
<para>
- If this argument is %TRUE, the pixbuf's translation with respect
- to its logical origin in item-relative coordinates will be in
- pixels, that is, the visible offset will not change even if the
- item's affine transformation changes. If it is %FALSE, the
- pixbuf's translation will be taken to be in canvas units, and thus
- will change along with the item's affine transformation. The
- default is %FALSE.
+ The &gdk-pixbuf; library provides several convenience functions to
+ render pixbufs to GDK drawables. It uses the GdkRGB to render the
+ image data.
</para>
-
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:Long_Description ##### -->
<para>
- The functions in this section allow you to take the image data
- from a GDK drawable and dump it into a #GdkPixbuf. This can be
- used for screenshots and other special effects. Note that these
- operations can be expensive, since the image data has to be
- transferred from the X server to the client program and converted.
+ At this point there is not a standard alpha channel extension for
+ the X Window System, so it is not possible to use full opacity
+ information when painting images to arbitrary drawables. The
+ &gdk-pixbuf; convenience functions will threshold the opacity
+ information to create a bi-level clipping mask (black and white),
+ and use that to draw the image onto a drawable.
</para>
-
-<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Long_Description ##### -->
- <para>
- The XlibRGB set of functions is a port of the GdkRGB library to
- use plain Xlib and X drawables. You can use these functions to
- render RGB buffers into drawables very quickly with high-quality
- dithering.
- </para>
+ <important>
+ <para>
+ Since these functions use GdkRGB for rendering, you must
+ initialize GdkRGB before using any of them. You can do this by
+ calling gdk_rgb_init() near the beginning of your program.
+ </para>
+ </important>
-<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Short_Description ##### -->
-Functions for rendering RGB buffers to X drawables.
+<!-- ##### SECTION ./tmpl/xlib-init.sgml:Title ##### -->
+&gdk-pixbuf; Xlib initialization
-<!-- ##### MACRO GNOME_CANVAS_PIXBUF ##### -->
+<!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
<para>
- Casts a #GtkOjbect to a #GnomeCanvasPixbuf.
+ Works in the same way as the <link
+ linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
+ argument. The default is %FALSE.
</para>
-@obj: A GTK+ object.
-
-<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:See_Also ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Short_Description ##### -->
-Rendering a pixbuf to an X drawable.
-
-<!-- ##### FUNCTION gdk_pixbuf_finalize ##### -->
+<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:See_Also ##### -->
<para>
</para>
-@pixbuf: <!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
-<!-- ##### SECTION ./tmpl/rendering.sgml:Short_Description ##### -->
-Rendering a pixbuf to a GDK drawable.
-
-<!-- ##### FUNCTION gdk_pixbuf_set_last_unref_handler ##### -->
-<para>
-
-</para>
-
-@pixbuf:
-@last_unref_fn:
-@last_unref_fn_data:
-
-<!-- ##### ARG GnomeCanvasPixbuf:x_set ##### -->
- <para>
- Determines whether the <link
- linkend="GnomeCanvasPixbuf--x">x</link> argument is used to
- translate the pixbuf from its logical origin in item-relative
- coordinates.
- </para>
+<!-- ##### SECTION ./tmpl/rendering.sgml:Title ##### -->
+Rendering
-<!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
- <para>
- If this argument is %TRUE, then the width of the pixbuf will be
- considered to be in pixels, that is, it will not be visually
- scaled even if the item's affine transformation changes. If this
- is %FALSE, then the width of the pixbuf will be considered to be
- in canvas units, and so will be scaled normally by affine
- transformations. The default is %FALSE.
- </para>
+<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Short_Description ##### -->
+Getting parts of an X drawable's image data into a pixbuf.
-<!-- ##### SECTION ./tmpl/xlib-init.sgml:Long_Description ##### -->
- <para>
- In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
- package provides a small library that lets Xlib-only applications
- use #GdkPixbuf structures and render them to X drawables. The
- functions in this section are used to initialize the &gdk-pixbuf;
- Xlib library. This library must be initialized near the beginning
- or the program or before calling any of the other &gdk-pixbuf;
- Xlib functions; it cannot be initialized automatically since
- Xlib-only applications do not call gdk_rgb_init() like GNOME
- applications do.
- </para>
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:Short_Description ##### -->
+Getting parts of a drawable's image data into a pixbuf.
-<!-- ##### FUNCTION gdk_pixbuf_get_format ##### -->
+<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
<para>
</para>
@pixbuf:
-@Returns:
+@pixmap_return:
+@mask_return:
+@alpha_threshold: <!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
-<!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
+<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
<para>
Works in the same way as the <link
- linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
- argument. The default is %FALSE.
+ linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
+ argument, but controls whether the <link
+ linkend="GnomeCanvasPixbuf--y">y</link> translation offset is
+ scaled or not. The default is %FALSE.
</para>
-
-<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:See_Also ##### -->
-<para>
-
-</para>
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
-<!-- ##### ARG GnomeCanvasPixbuf:width_set ##### -->
- <para>
- Determines whether the <link
- linkend="GnomeCanvasPixbuf--width">width</link> argument is taken
- into account when scaling the pixbuf item. If this argument is
- %FALSE, then the width value of the pixbuf will be used instead.
- This argument is %FALSE by default.
- </para>
+<!-- ##### SECTION ./tmpl/xlib-init.sgml:Short_Description ##### -->
+Initializing the &gdk-pixbuf; Xlib library.
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable_alpha ##### -->
@@ -387,145 +167,14 @@ Rendering a pixbuf to a GDK drawable.
@x_dither:
@y_dither:
-<!-- ##### SECTION ./tmpl/xlib-init.sgml:Title ##### -->
-&gdk-pixbuf; Xlib initialization
-
-
-<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Short_Description ##### -->
-Getting parts of an X drawable's image data into a pixbuf.
-
-
-<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
-<para>
-
-</para>
-
-@src_pixbuf:
-@src_x:
-@src_y:
-@width:
-@height:
-@Returns:
-
-<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Title ##### -->
-XlibRGB
-
-
-<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GnomeCanvasPixbuf:height ##### -->
- <para>
- Indicates the height the pixbuf will be scaled to. This argument
- will only be used if the <link
- linkend="GnomeCanvasPixbuf--height-set">height_set</link> argument
- is %TRUE. Works in the same way as the <link
- linkend="GnomeCanvasPixbuf--width">width</link> argument.
- </para>
-
-
-<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:See_Also ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
- <para>
- gdk_image_get().
- </para>
-
-
-<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SECTION ./tmpl/rendering.sgml:Title ##### -->
-Rendering
-
-
-<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Title ##### -->
-GnomeCanvasPixbuf
-
-
-<!-- ##### MACRO GDK_PIXBUF_LOADER ##### -->
- <para>
- Casts a #GtkObject to a #GdkPixbufLoader.
- </para>
-
-@obj: A GTK+ object.
-
-<!-- ##### ARG GnomeCanvasPixbuf:y_set ##### -->
- <para>
- Determines whether the <link
- linkend="GnomeCanvasPixbuf--y">y</link> argument is used to
- translate the pixbuf from its logical origin in item-relative
- coordinates. Works in the same way as the <link
- linkend="GnomeCanvasPixbuf--x-set">x_set</link> argument. The
- default is %FALSE.
- </para>
-
-
-<!-- ##### SECTION ./tmpl/rendering.sgml:Long_Description ##### -->
- <para>
- The &gdk-pixbuf; library provides several convenience functions to
- render pixbufs to GDK drawables. It uses the GdkRGB to render the
- image data.
- </para>
-
+<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Long_Description ##### -->
<para>
- At this point there is not a standard alpha channel extension for
- the X Window System, so it is not possible to use full opacity
- information when painting images to arbitrary drawables. The
- &gdk-pixbuf; convenience functions will threshold the opacity
- information to create a bi-level clipping mask (black and white),
- and use that to draw the image onto a drawable.
+ The XlibRGB set of functions is a port of the GdkRGB library to
+ use plain Xlib and X drawables. You can use these functions to
+ render RGB buffers into drawables very quickly with high-quality
+ dithering.
</para>
- <important>
- <para>
- Since these functions use GdkRGB for rendering, you must
- initialize GdkRGB before using any of them. You can do this by
- calling gdk_rgb_init() near the beginning of your program.
- </para>
- </important>
-
-
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:Short_Description ##### -->
-Getting parts of a drawable's image data into a pixbuf.
-
-
-<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
-<para>
-
-</para>
-
-@pixbuf:
-@bitmap:
-@src_x:
-@src_y:
-@dest_x:
-@dest_y:
-@width:
-@height:
-@alpha_threshold:
-
-<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### STRUCT GdkPixbufClass ##### -->
-<para>
-
-</para>
-
<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Long_Description ##### -->
<para>
@@ -696,16 +345,187 @@ Getting parts of a drawable's image data into a pixbuf.
</refsect2>
-<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Long_Description ##### -->
+<!-- ##### SECTION ./tmpl/rendering.sgml:Short_Description ##### -->
+Rendering a pixbuf to a GDK drawable.
+
+
+<!-- ##### MACRO GDK_PIXBUF_LOADER ##### -->
+ <para>
+ Casts a #GtkObject to a #GdkPixbufLoader.
+ </para>
+
+@obj: A GTK+ object.
+
+<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
<para>
</para>
+<!-- ##### ARG GnomeCanvasPixbuf:x_set ##### -->
+ <para>
+ Determines whether the <link
+ linkend="GnomeCanvasPixbuf--x">x</link> argument is used to
+ translate the pixbuf from its logical origin in item-relative
+ coordinates.
+ </para>
+
+
+<!-- ##### MACRO GNOME_CANVAS_PIXBUF ##### -->
+ <para>
+ Casts a #GtkOjbect to a #GnomeCanvasPixbuf.
+ </para>
+
+@obj: A GTK+ object.
+
+<!-- ##### ARG GnomeCanvasPixbuf:width_set ##### -->
+ <para>
+ Determines whether the <link
+ linkend="GnomeCanvasPixbuf--width">width</link> argument is taken
+ into account when scaling the pixbuf item. If this argument is
+ %FALSE, then the width value of the pixbuf will be used instead.
+ This argument is %FALSE by default.
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Long_Description ##### -->
+ <para>
+ The functions in this section allow you to take the image data
+ from an X drawable and dump it into a #GdkPixbuf. This can be
+ used for screenshots and other special effects. Note that these
+ operations can be expensive, since the image data has to be
+ transferred from the X server to the client program and converted.
+ </para>
+
+ <para>
+ These functions are analogous to those for the Gdk version of
+ &gdk-pixbuf;.
+ </para>
+
+
+<!-- ##### USER_FUNCTION GdkPixbufLastUnref ##### -->
+ <para>
+ A function of this type can be used to override the default
+ operation when a pixbuf loses its last reference, i.e. when
+ gdk_pixbuf_unref() is called on a #GdkPixbuf structure that has a
+ reference count of 1. This function should determine whether to
+ finalize the pixbuf by calling gdk_pixbuf_finalize(), or whether
+ to just resume normal execution. The last unref handler for a
+ #GdkPixbuf can be set using the
+ gdk_pixbuf_set_last_unref_handler() function. By default, pixbufs
+ will be finalized automatically if no last unref handler has been
+ defined.
+ </para>
+
+@pixbuf: The pixbuf that is losing its last reference.
+@data: User closure data.
+
+<!-- ##### SECTION ./tmpl/xlib-init.sgml:See_Also ##### -->
+ <para>
+ XlibRGB
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gdk_pixbuf_new_from_art_pixbuf ##### -->
+<para>
+
+</para>
+
+@art_pixbuf:
+@Returns:
+
+<!-- ##### ARG GnomeCanvasPixbuf:height ##### -->
+ <para>
+ Indicates the height the pixbuf will be scaled to. This argument
+ will only be used if the <link
+ linkend="GnomeCanvasPixbuf--height-set">height_set</link> argument
+ is %TRUE. Works in the same way as the <link
+ linkend="GnomeCanvasPixbuf--width">width</link> argument.
+ </para>
+
+
<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Title ##### -->
Xlib Rendering
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
+ <para>
+ gdk_image_get().
+ </para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:pixbuf ##### -->
+ <para>
+ Contains a pointer to a #GdkPixbuf structure that will be used by
+ the pixbuf canvas item as an image source. When a pixbuf is set
+ its reference count is incremented; if the pixbuf item kept a
+ pointer to another #GdkPixbuf structure, the reference count of
+ this structure will be decremented. Also, the GdkPixbuf's
+ reference count will automatically be decremented when the
+ #GnomeCanvasPixbuf item is destroyed. When a pixbuf is queried, a
+ reference count will not be added to the return value; you must do
+ this yourself if you intend to keep the pixbuf structure around.
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Short_Description ##### -->
+Functions for rendering RGB buffers to X drawables.
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:x ##### -->
+ <para>
+ Indicates the horizontal translation offset of the pixbuf item's
+ image. This offset may not actually appear horizontal, since it
+ will be affected by the item's affine transformation. The default
+ is 0.0.
+ </para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:y ##### -->
+ <para>
+ Indicates the vertical translation offset of the pixbuf item's
+ image. Works in the same way as the <link
+ linkend="GnomeCanvasPixbuf--x">x</link> argument. The default is
+ 0.0.
+ </para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:width ##### -->
+ <para>
+ Indicates the width the pixbuf will be scaled to. This argument
+ will only be used if the <link
+ linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument
+ is %TRUE. If the <link
+ linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
+ argument is %FALSE, the width will be taken to be in canvas units,
+ and thus will be scaled along with the canvas item's affine
+ transformation. If width_in_pixels is %TRUE, the width will be
+ taken to be in pixels, and will visually remain a constant size
+ even if the item's affine transformation changes.
+ </para>
+
+
+<!-- ##### FUNCTION gdk_pixbuf_set_last_unref_handler ##### -->
+<para>
+
+</para>
+
+@pixbuf:
+@last_unref_fn:
+@last_unref_fn_data:
+
<!-- ##### ARG GnomeCanvasPixbuf:height_set ##### -->
<para>
Determines whether the <link
@@ -717,7 +537,175 @@ Xlib Rendering
</para>
+<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
+<para>
+
+</para>
+
+@pixbuf:
+@drawable:
+@gc:
+@src_x:
+@src_y:
+@dest_x:
+@dest_y:
+@width:
+@height:
+@dither:
+@x_dither:
+@y_dither:
+
+<!-- ##### SECTION ./tmpl/xlib-init.sgml:Long_Description ##### -->
+ <para>
+ In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
+ package provides a small library that lets Xlib-only applications
+ use #GdkPixbuf structures and render them to X drawables. The
+ functions in this section are used to initialize the &gdk-pixbuf;
+ Xlib library. This library must be initialized near the beginning
+ or the program or before calling any of the other &gdk-pixbuf;
+ Xlib functions; it cannot be initialized automatically since
+ Xlib-only applications do not call gdk_rgb_init() like GNOME
+ applications do.
+ </para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/rendering.sgml:See_Also ##### -->
+ <para>
+ GdkRGB
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-rendering.sgml:Short_Description ##### -->
+Rendering a pixbuf to an X drawable.
+
+
+<!-- ##### FUNCTION gdk_pixbuf_finalize ##### -->
+<para>
+
+</para>
+
+@pixbuf: <!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
+
+<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
+<para>
+
+</para>
+
+@dest:
+@src:
+@cmap:
+@src_x:
+@src_y:
+@dest_x:
+@dest_y:
+@width:
+@height:
+@Returns: <!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
+
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Title ##### -->
gdk-pixbuf-io
+<!-- ##### ARG GnomeCanvasPixbuf:y_set ##### -->
+ <para>
+ Determines whether the <link
+ linkend="GnomeCanvasPixbuf--y">y</link> argument is used to
+ translate the pixbuf from its logical origin in item-relative
+ coordinates. Works in the same way as the <link
+ linkend="GnomeCanvasPixbuf--x-set">x_set</link> argument. The
+ default is %FALSE.
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/gnome-canvas-pixbuf.sgml:Title ##### -->
+GnomeCanvasPixbuf
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gdk_pixbuf_get_format ##### -->
+<para>
+
+</para>
+
+@pixbuf:
+@Returns:
+
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:Long_Description ##### -->
+ <para>
+ The functions in this section allow you to take the image data
+ from a GDK drawable and dump it into a #GdkPixbuf. This can be
+ used for screenshots and other special effects. Note that these
+ operations can be expensive, since the image data has to be
+ transferred from the X server to the client program and converted.
+ </para>
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:Title ##### -->
+X Drawables to Pixbufs
+
+
+<!-- ##### STRUCT GdkPixbufClass ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
+Drawables to Pixbufs
+
+
+<!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
+ <para>
+ If this argument is %TRUE, the pixbuf's translation with respect
+ to its logical origin in item-relative coordinates will be in
+ pixels, that is, the visible offset will not change even if the
+ item's affine transformation changes. If it is %FALSE, the
+ pixbuf's translation will be taken to be in canvas units, and thus
+ will change along with the item's affine transformation. The
+ default is %FALSE.
+ </para>
+
+
+<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Title ##### -->
+XlibRGB
+
+
diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml
index ba271336f..c35a9ef47 100644
--- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml
@@ -9,13 +9,11 @@ gdk-pixbuf-xlib-init
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_xlib_init ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
index 3b04c3fb9..5fc249f25 100644
--- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
@@ -9,13 +9,11 @@ gdk-pixbuf
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### ENUM GdkPixbufError ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/initialization_versions.sgml b/docs/reference/gdk-pixbuf/tmpl/initialization_versions.sgml
index d62ca150c..41302c27c 100644
--- a/docs/reference/gdk-pixbuf/tmpl/initialization_versions.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/initialization_versions.sgml
@@ -9,13 +9,11 @@ Initialization and Versions
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_init ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml b/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
index c0b84ec33..734ee8034 100644
--- a/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml
@@ -9,13 +9,11 @@ Module Interface
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
index 511a2a1af..9ae00cfe5 100644
--- a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
@@ -9,13 +9,11 @@ refcounting
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### USER_FUNCTION GdkPixbufDestroyNotify ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/scaling.sgml b/docs/reference/gdk-pixbuf/tmpl/scaling.sgml
index d18ba3fda..bcdbee832 100644
--- a/docs/reference/gdk-pixbuf/tmpl/scaling.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/scaling.sgml
@@ -9,13 +9,11 @@ scaling
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### ENUM GdkInterpType ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/util.sgml b/docs/reference/gdk-pixbuf/tmpl/util.sgml
index 14d25640b..a119a3f31 100644
--- a/docs/reference/gdk-pixbuf/tmpl/util.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/util.sgml
@@ -9,13 +9,11 @@ util
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_add_alpha ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/colors.sgml b/docs/reference/gdk/tmpl/colors.sgml
index f968a7b9b..e307e1a4d 100644
--- a/docs/reference/gdk/tmpl/colors.sgml
+++ b/docs/reference/gdk/tmpl/colors.sgml
@@ -9,13 +9,11 @@ Colormaps and Colors
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkColor ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/drawing.sgml b/docs/reference/gdk/tmpl/drawing.sgml
index 62552344b..55adf506c 100644
--- a/docs/reference/gdk/tmpl/drawing.sgml
+++ b/docs/reference/gdk/tmpl/drawing.sgml
@@ -9,13 +9,11 @@ Drawing Primitives
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkDrawable ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/event_structs.sgml b/docs/reference/gdk/tmpl/event_structs.sgml
index a5741da40..a6d41967c 100644
--- a/docs/reference/gdk/tmpl/event_structs.sgml
+++ b/docs/reference/gdk/tmpl/event_structs.sgml
@@ -95,6 +95,8 @@ example, it is these characters which should be added to the input buffer.
When using <link linkend="gdk-Input-Methods"> Input Methods</link> to support
internationalized text input, the composed characters appear here after the
pre-editing has been completed.
+@hardware_keycode:
+@group:
<!-- ##### STRUCT GdkEventButton ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/fonts.sgml b/docs/reference/gdk/tmpl/fonts.sgml
index a72026ec6..438d12490 100644
--- a/docs/reference/gdk/tmpl/fonts.sgml
+++ b/docs/reference/gdk/tmpl/fonts.sgml
@@ -9,13 +9,11 @@ Fonts
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkFont ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/gcs.sgml b/docs/reference/gdk/tmpl/gcs.sgml
index 3c622e398..6f85c1df5 100644
--- a/docs/reference/gdk/tmpl/gcs.sgml
+++ b/docs/reference/gdk/tmpl/gcs.sgml
@@ -9,13 +9,11 @@ Graphics Contexts
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkGC ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/gdk-unused.sgml b/docs/reference/gdk/tmpl/gdk-unused.sgml
index f3f6612db..184224fc3 100644
--- a/docs/reference/gdk/tmpl/gdk-unused.sgml
+++ b/docs/reference/gdk/tmpl/gdk-unused.sgml
@@ -1,8 +1,34 @@
-<!-- ##### SECTION ./tmpl/gdkregion.sgml:See_Also ##### -->
+<!-- ##### FUNCTION gdk_input_set_mode ##### -->
<para>
+Enables or disables a device, and determines how the
+device maps onto the screen.
+</para>
+@deviceid: the device to configure.
+@mode: the new mode.
+@Returns: %TRUE if the device supports the given mode, otherwise
+ %FALSE and the device's mode is unchanged.
+
+<!-- ##### FUNCTION gdk_input_set_key ##### -->
+<para>
+Sets the key event generated when a macro button is pressed.
</para>
+@deviceid: the device to configure.
+@index: the index of the macro button.
+@keyval: the key value for the #GdkKeypressEvent to generate.
+ (a value of 0 means no event will be generated.)
+@modifiers: the modifier field for the generated
+ #GdkKeyPressEvent.
+
+<!-- ##### FUNCTION gdk_regions_intersect ##### -->
+<para>
+Returns the intersection of two regions.
+</para>
+
+@source1: a #GdkRegion.
+@source2: a #GdkRegion.
+@Returns: the intersection of @source1 and @source2.
<!-- ##### FUNCTION gdk_regions_xor ##### -->
<para>
@@ -16,21 +42,32 @@ but which are not in both.
@Returns: the difference between the union and the intersection of @source1
and @source2.
-<!-- ##### FUNCTION gdk_input_motion_events ##### -->
+<!-- ##### FUNCTION gdk_regions_subtract ##### -->
<para>
-Retrieves the motion history for a given device/window pair.
+Subtracts one region from another.
+The result is a region containing all the pixels which are in @source1, but
+which are not in @source2.
</para>
-@window: a #GdkWindow.
-@deviceid: the device for which to retrieve motion history.
-@start: the start time.
-@stop: the stop time.
-@nevents_return: location to store the number of events returned.
-@Returns: a newly allocated array containing all the events
- from @start to @stop. This array should be freed
- with g_free() when you are finished using it.
+@source1: a #GdkRegion.
+@source2: a #GdkRegion to subtract from @source1.
+@Returns: @source1 - @source2.
-<!-- ##### SECTION ./tmpl/gdkregion.sgml:Long_Description ##### -->
+<!-- ##### FUNCTION gdk_input_list_devices ##### -->
+<para>
+Lists all available input devices, along with their
+configuration information.
+</para>
+
+@Returns: A #GList of #GdkDeviceInfo structures. This list
+ is internal data of GTK+ and should not be modified
+ or freed.
+
+<!-- ##### SECTION ./tmpl/gdkregion.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:See_Also ##### -->
<para>
</para>
@@ -40,6 +77,23 @@ Retrieves the motion history for a given device/window pair.
+<!-- ##### MACRO GDK_CORE_POINTER ##### -->
+<para>
+This macro contains an integer value representing
+the device ID for the core pointer device.
+</para>
+
+
+<!-- ##### FUNCTION gdk_input_set_axes ##### -->
+<para>
+Sets the mapping of the axes (valuators) of a device
+onto the predefined valuator types that GTK+ understands.
+</para>
+
+@deviceid: the device to configure.
+@axes: an array of GdkAxisUse. This length of this array
+ must match the number of axes for the device.
+
<!-- ##### STRUCT GdkDeviceInfo ##### -->
<para>
The #GdkDeviceInfo structure contains information about a
@@ -64,70 +118,63 @@ device. It has the following fields:
which describe what key press events are generated
for each macro button.
-<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:Title ##### -->
-Pango Interaction
+<!-- ##### SECTION ./tmpl/gdkregion.sgml:Title ##### -->
+Points, Rectangles and Regions
-<!-- ##### FUNCTION gdk_regions_union ##### -->
+<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:Long_Description ##### -->
<para>
-Returns the union of two regions.
-This is all pixels in either of @source1 or @source2.
-</para>
-
-@source1: a #GdkRegion.
-@source2: a #GdkRegion.
-@Returns: the union of @source1 and @source2.
-
-<!-- ##### SECTION ./tmpl/gdkregion.sgml:Short_Description ##### -->
+</para>
-<!-- ##### FUNCTION gdk_input_set_key ##### -->
+<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
<para>
-Sets the key event generated when a macro button is pressed.
+
</para>
-@deviceid: the device to configure.
-@index: the index of the macro button.
-@keyval: the key value for the #GdkKeypressEvent to generate.
- (a value of 0 means no event will be generated.)
-@modifiers: the modifier field for the generated
- #GdkKeyPressEvent.
+@GDK_PIXBUF_ALPHA_BILEVEL:
+@GDK_PIXBUF_ALPHA_FULL:
-<!-- ##### FUNCTION gdk_input_list_devices ##### -->
+<!-- ##### FUNCTION gdk_input_motion_events ##### -->
<para>
-Lists all available input devices, along with their
-configuration information.
+Retrieves the motion history for a given device/window pair.
</para>
-@Returns: A #GList of #GdkDeviceInfo structures. This list
- is internal data of GTK+ and should not be modified
- or freed.
+@window: a #GdkWindow.
+@deviceid: the device for which to retrieve motion history.
+@start: the start time.
+@stop: the stop time.
+@nevents_return: location to store the number of events returned.
+@Returns: a newly allocated array containing all the events
+ from @start to @stop. This array should be freed
+ with g_free() when you are finished using it.
-<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:See_Also ##### -->
+<!-- ##### SECTION ./tmpl/gdkregion.sgml:See_Also ##### -->
<para>
</para>
-<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
+<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:Title ##### -->
+Pango Interaction
+
+
+<!-- ##### SECTION ./tmpl/gdkregion.sgml:Long_Description ##### -->
<para>
</para>
-@GDK_PIXBUF_ALPHA_BILEVEL:
-@GDK_PIXBUF_ALPHA_FULL:
-<!-- ##### FUNCTION gdk_regions_subtract ##### -->
+<!-- ##### FUNCTION gdk_regions_union ##### -->
<para>
-Subtracts one region from another.
-The result is a region containing all the pixels which are in @source1, but
-which are not in @source2.
+Returns the union of two regions.
+This is all pixels in either of @source1 or @source2.
</para>
@source1: a #GdkRegion.
-@source2: a #GdkRegion to subtract from @source1.
-@Returns: @source1 - @source2.
+@source2: a #GdkRegion.
+@Returns: the union of @source1 and @source2.
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
<para>
@@ -146,32 +193,6 @@ they will be ignored.
@ytilt: location to store current tilt in the y direction.
@mask: location to store the current modifier state.
-<!-- ##### MACRO GDK_CORE_POINTER ##### -->
-<para>
-This macro contains an integer value representing
-the device ID for the core pointer device.
-</para>
-
-
-<!-- ##### FUNCTION gdk_input_set_axes ##### -->
-<para>
-Sets the mapping of the axes (valuators) of a device
-onto the predefined valuator types that GTK+ understands.
-</para>
-
-@deviceid: the device to configure.
-@axes: an array of GdkAxisUse. This length of this array
- must match the number of axes for the device.
-
-<!-- ##### STRUCT GdkSpan ##### -->
-<para>
-
-</para>
-
-@x:
-@y:
-@width:
-
<!-- ##### FUNCTION gdk_input_set_source ##### -->
<para>
Sets the source type for a device.
@@ -180,55 +201,3 @@ Sets the source type for a device.
@deviceid: the device to configure
@source: the new source type.
-<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
-<para>
-Intersects a set of spans with a region and call a user specified
-function for each resulting spanline. This function is a lot more effective
-if the spans are sorted.
-</para>
-
-@region: The region to intersect against.
-@spans: Array of spans to intersect.
-@n_spans: Number of spans.
-@sorted: True if the spans are sorted in increasing y order.
-@function: The function to call for each intersected spanline.
-@data: Opaque user data passed to function.
-
-<!-- ##### SECTION ./tmpl/gdkregion.sgml:Title ##### -->
-Points, Rectangles and Regions
-
-
-<!-- ##### FUNCTION gdk_regions_intersect ##### -->
-<para>
-Returns the intersection of two regions.
-</para>
-
-@source1: a #GdkRegion.
-@source2: a #GdkRegion.
-@Returns: the intersection of @source1 and @source2.
-
-<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
-<para>
-
-</para>
-
-@span: The intersected part of the span.
-@data: Opaque data passed by user.
-
-<!-- ##### FUNCTION gdk_input_set_mode ##### -->
-<para>
-Enables or disables a device, and determines how the
-device maps onto the screen.
-</para>
-
-@deviceid: the device to configure.
-@mode: the new mode.
-@Returns: %TRUE if the device supports the given mode, otherwise
- %FALSE and the device's mode is unchanged.
-
-<!-- ##### SECTION ./tmpl/input_methods.sgml.sgml:Long_Description ##### -->
-<para>
-
-</para>
-
-
diff --git a/docs/reference/gdk/tmpl/images.sgml b/docs/reference/gdk/tmpl/images.sgml
index 81ae19eb9..f3ef9f1a2 100644
--- a/docs/reference/gdk/tmpl/images.sgml
+++ b/docs/reference/gdk/tmpl/images.sgml
@@ -9,13 +9,11 @@ Images
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkImage ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/pixbufs.sgml b/docs/reference/gdk/tmpl/pixbufs.sgml
index 90febb741..a0a8e3e91 100644
--- a/docs/reference/gdk/tmpl/pixbufs.sgml
+++ b/docs/reference/gdk/tmpl/pixbufs.sgml
@@ -9,13 +9,11 @@ Pixbufs
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/regions.sgml b/docs/reference/gdk/tmpl/regions.sgml
index 387544c82..88e3e2d62 100644
--- a/docs/reference/gdk/tmpl/regions.sgml
+++ b/docs/reference/gdk/tmpl/regions.sgml
@@ -266,3 +266,36 @@ Returns the union of a region and a rectangle.
@source2:
+<!-- ##### STRUCT GdkSpan ##### -->
+<para>
+
+</para>
+
+@x:
+@y:
+@width:
+
+<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
+<para>
+
+</para>
+
+@span: The intersected part of the span.
+@data: Opaque data passed by user.
+
+
+<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
+<para>
+Intersects a set of spans with a region and call a user specified
+function for each resulting spanline. This function is a lot more effective
+if the spans are sorted.
+</para>
+
+@region: The region to intersect against.
+@spans: Array of spans to intersect.
+@n_spans: Number of spans.
+@sorted: True if the spans are sorted in increasing y order.
+@function: The function to call for each intersected spanline.
+@data: Opaque user data passed to function.
+
+
diff --git a/docs/reference/gdk/tmpl/rgb.sgml b/docs/reference/gdk/tmpl/rgb.sgml
index ab3189414..03920b93c 100644
--- a/docs/reference/gdk/tmpl/rgb.sgml
+++ b/docs/reference/gdk/tmpl/rgb.sgml
@@ -9,13 +9,11 @@ GdkRGB
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### FUNCTION gdk_rgb_init ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/visuals.sgml b/docs/reference/gdk/tmpl/visuals.sgml
index ad5276f57..a256eba6a 100644
--- a/docs/reference/gdk/tmpl/visuals.sgml
+++ b/docs/reference/gdk/tmpl/visuals.sgml
@@ -9,13 +9,11 @@ Visuals
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### STRUCT GdkVisual ##### -->
<para>
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 22d7ba107..06f2e1df3 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -110,6 +110,9 @@ gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ object_class->destroy = gdk_pixbuf_loader_destroy;
+ gobject_class->finalize = gdk_pixbuf_loader_finalize;
+
pixbuf_loader_signals[AREA_PREPARED] =
gtk_signal_new ("area_prepared",
GTK_RUN_LAST,
@@ -154,11 +157,6 @@ gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class)
GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, closed),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, pixbuf_loader_signals, LAST_SIGNAL);
-
- object_class->destroy = gdk_pixbuf_loader_destroy;
- gobject_class->finalize = gdk_pixbuf_loader_finalize;
}
static void
diff --git a/gtk/gdk-pixbuf-loader.c b/gtk/gdk-pixbuf-loader.c
index 22d7ba107..06f2e1df3 100644
--- a/gtk/gdk-pixbuf-loader.c
+++ b/gtk/gdk-pixbuf-loader.c
@@ -110,6 +110,9 @@ gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ object_class->destroy = gdk_pixbuf_loader_destroy;
+ gobject_class->finalize = gdk_pixbuf_loader_finalize;
+
pixbuf_loader_signals[AREA_PREPARED] =
gtk_signal_new ("area_prepared",
GTK_RUN_LAST,
@@ -154,11 +157,6 @@ gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class)
GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, closed),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, pixbuf_loader_signals, LAST_SIGNAL);
-
- object_class->destroy = gdk_pixbuf_loader_destroy;
- gobject_class->finalize = gdk_pixbuf_loader_finalize;
}
static void
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index 084a5ef50..a23aa3e80 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -74,6 +74,9 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
object_class = (GtkObjectClass*) class;
+ class->changed = NULL;
+ class->value_changed = NULL;
+
adjustment_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_FIRST | GTK_RUN_NO_RECURSE,
@@ -88,11 +91,6 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
GTK_SIGNAL_OFFSET (GtkAdjustmentClass, value_changed),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, adjustment_signals, LAST_SIGNAL);
-
- class->changed = NULL;
- class->value_changed = NULL;
}
static void
diff --git a/gtk/gtkarg.h b/gtk/gtkarg.h
index 621cc71b9..b3aacc2c9 100644
--- a/gtk/gtkarg.h
+++ b/gtk/gtkarg.h
@@ -58,6 +58,8 @@ struct _GtkArgInfo
/* Non-public methods */
+#define GTK_ARG_MASK 0x1f
+
GtkArg* gtk_arg_new (GtkType arg_type);
GtkArg* gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg);
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 32ab748c1..96fad211c 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -117,9 +117,9 @@ gtk_box_class_init (GtkBoxClass *class)
gtk_object_add_arg_type ("GtkBox::homogeneous", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
gtk_container_add_child_arg_type ("GtkBox::expand", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_EXPAND);
gtk_container_add_child_arg_type ("GtkBox::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_FILL);
- gtk_container_add_child_arg_type ("GtkBox::padding", GTK_TYPE_ULONG, GTK_ARG_READWRITE, CHILD_ARG_PADDING);
+ gtk_container_add_child_arg_type ("GtkBox::padding", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_PADDING);
gtk_container_add_child_arg_type ("GtkBox::pack_type", GTK_TYPE_PACK_TYPE, GTK_ARG_READWRITE, CHILD_ARG_PACK_TYPE);
- gtk_container_add_child_arg_type ("GtkBox::position", GTK_TYPE_LONG, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
+ gtk_container_add_child_arg_type ("GtkBox::position", GTK_TYPE_INT, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
object_class->set_arg = gtk_box_set_arg;
object_class->get_arg = gtk_box_get_arg;
@@ -239,7 +239,7 @@ gtk_box_set_child_arg (GtkContainer *container,
child,
expand,
fill,
- GTK_VALUE_ULONG (*arg),
+ GTK_VALUE_UINT (*arg),
pack_type);
break;
case CHILD_ARG_PACK_TYPE:
@@ -253,7 +253,7 @@ gtk_box_set_child_arg (GtkContainer *container,
case CHILD_ARG_POSITION:
gtk_box_reorder_child (GTK_BOX (container),
child,
- GTK_VALUE_LONG (*arg));
+ GTK_VALUE_INT (*arg));
break;
default:
break;
@@ -289,13 +289,13 @@ gtk_box_get_child_arg (GtkContainer *container,
GTK_VALUE_BOOL (*arg) = fill;
break;
case CHILD_ARG_PADDING:
- GTK_VALUE_ULONG (*arg) = padding;
+ GTK_VALUE_UINT (*arg) = padding;
break;
case CHILD_ARG_PACK_TYPE:
GTK_VALUE_ENUM (*arg) = pack_type;
break;
case CHILD_ARG_POSITION:
- GTK_VALUE_LONG (*arg) = 0;
+ GTK_VALUE_INT (*arg) = 0;
for (list = GTK_BOX (container)->children; list; list = list->next)
{
GtkBoxChild *child_entry;
@@ -303,10 +303,10 @@ gtk_box_get_child_arg (GtkContainer *container,
child_entry = list->data;
if (child_entry->widget == child)
break;
- GTK_VALUE_LONG (*arg)++;
+ GTK_VALUE_INT (*arg)++;
}
if (!list)
- GTK_VALUE_LONG (*arg) = -1;
+ GTK_VALUE_INT (*arg) = -1;
break;
default:
arg->type = GTK_TYPE_INVALID;
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 639edbca1..a66403269 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -142,6 +142,33 @@ gtk_button_class_init (GtkButtonClass *klass)
parent_class = gtk_type_class (GTK_TYPE_BIN);
+
+ object_class->set_arg = gtk_button_set_arg;
+ object_class->get_arg = gtk_button_get_arg;
+
+ widget_class->realize = gtk_button_realize;
+ widget_class->draw_focus = gtk_button_draw_focus;
+ widget_class->draw_default = gtk_button_draw_default;
+ widget_class->size_request = gtk_button_size_request;
+ widget_class->size_allocate = gtk_button_size_allocate;
+ widget_class->expose_event = gtk_button_expose;
+ widget_class->button_press_event = gtk_button_button_press;
+ widget_class->button_release_event = gtk_button_button_release;
+ widget_class->enter_notify_event = gtk_button_enter_notify;
+ widget_class->leave_notify_event = gtk_button_leave_notify;
+ widget_class->focus_in_event = gtk_button_focus_in;
+ widget_class->focus_out_event = gtk_button_focus_out;
+
+ container_class->add = gtk_button_add;
+ container_class->remove = gtk_button_remove;
+ container_class->child_type = gtk_button_child_type;
+
+ klass->pressed = gtk_real_button_pressed;
+ klass->released = gtk_real_button_released;
+ klass->clicked = NULL;
+ klass->enter = gtk_real_button_enter;
+ klass->leave = gtk_real_button_leave;
+
gtk_object_add_arg_type ("GtkButton::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkButton::relief", GTK_TYPE_RELIEF_STYLE, GTK_ARG_READWRITE, ARG_RELIEF);
@@ -166,6 +193,7 @@ gtk_button_class_init (GtkButtonClass *klass)
GTK_SIGNAL_OFFSET (GtkButtonClass, clicked),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
+ widget_class->activate_signal = button_signals[CLICKED];
button_signals[ENTER] =
gtk_signal_new ("enter",
GTK_RUN_FIRST,
@@ -180,35 +208,6 @@ gtk_button_class_init (GtkButtonClass *klass)
GTK_SIGNAL_OFFSET (GtkButtonClass, leave),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, button_signals, LAST_SIGNAL);
-
- object_class->set_arg = gtk_button_set_arg;
- object_class->get_arg = gtk_button_get_arg;
-
- widget_class->activate_signal = button_signals[CLICKED];
- widget_class->realize = gtk_button_realize;
- widget_class->draw_focus = gtk_button_draw_focus;
- widget_class->draw_default = gtk_button_draw_default;
- widget_class->size_request = gtk_button_size_request;
- widget_class->size_allocate = gtk_button_size_allocate;
- widget_class->expose_event = gtk_button_expose;
- widget_class->button_press_event = gtk_button_button_press;
- widget_class->button_release_event = gtk_button_button_release;
- widget_class->enter_notify_event = gtk_button_enter_notify;
- widget_class->leave_notify_event = gtk_button_leave_notify;
- widget_class->focus_in_event = gtk_button_focus_in;
- widget_class->focus_out_event = gtk_button_focus_out;
-
- container_class->add = gtk_button_add;
- container_class->remove = gtk_button_remove;
- container_class->child_type = gtk_button_child_type;
-
- klass->pressed = gtk_real_button_pressed;
- klass->released = gtk_real_button_released;
- klass->clicked = NULL;
- klass->enter = gtk_real_button_enter;
- klass->leave = gtk_real_button_leave;
}
static void
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index cde5e8cf6..499ff582d 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -353,6 +353,8 @@ gtk_calendar_class_init (GtkCalendarClass *class)
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+ object_class->destroy = gtk_calendar_destroy;
+
widget_class->realize = gtk_calendar_realize;
widget_class->unrealize = gtk_calendar_unrealize;
widget_class->expose_event = gtk_calendar_expose;
@@ -368,8 +370,15 @@ gtk_calendar_class_init (GtkCalendarClass *class)
widget_class->focus_out_event = gtk_calendar_focus_out;
widget_class->style_set = gtk_calendar_style_set;
widget_class->state_changed = gtk_calendar_state_changed;
- object_class->destroy = gtk_calendar_destroy;
+ class->month_changed = NULL;
+ class->day_selected = NULL;
+ class->day_selected_double_click = NULL;
+ class->prev_month = NULL;
+ class->next_month = NULL;
+ class->prev_year = NULL;
+ class->next_year = NULL;
+
gtk_calendar_signals[MONTH_CHANGED_SIGNAL] =
gtk_signal_new ("month_changed",
GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class),
@@ -405,16 +414,6 @@ gtk_calendar_class_init (GtkCalendarClass *class)
GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkCalendarClass, next_year),
gtk_signal_default_marshaller, GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, gtk_calendar_signals, LAST_SIGNAL);
-
- class->month_changed = NULL;
- class->day_selected = NULL;
- class->day_selected_double_click = NULL;
- class->prev_month = NULL;
- class->next_month = NULL;
- class->prev_year = NULL;
- class->next_year = NULL;
}
static void
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 6007a304c..c17a1170e 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -150,8 +150,6 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (GTK_OBJECT_CLASS (object_class), toggle_cell_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 728b63443..f0ad209b1 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -107,7 +107,6 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
GTK_SIGNAL_OFFSET (GtkCheckMenuItemClass, toggled),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, check_menu_item_signals, LAST_SIGNAL);
}
GtkWidget*
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index f79eac7c9..0ab00b0ab 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -175,8 +175,11 @@ enum {
};
/* GtkCList Methods */
-static void gtk_clist_class_init (GtkCListClass *klass);
-static void gtk_clist_init (GtkCList *clist);
+static void gtk_clist_class_init (GtkCListClass *klass);
+static void gtk_clist_init (GtkCList *clist);
+static GObject* gtk_clist_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
/* GtkObject Methods */
static void gtk_clist_destroy (GtkObject *object);
@@ -493,6 +496,8 @@ gtk_clist_class_init (GtkCListClass *klass)
GtkContainerClass *container_class;
GtkBindingSet *binding_set;
+ gobject_class->constructor = gtk_clist_constructor;
+
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
@@ -505,6 +510,66 @@ gtk_clist_class_init (GtkCListClass *klass)
object_class->get_arg = gtk_clist_get_arg;
object_class->destroy = gtk_clist_destroy;
+
+ widget_class->realize = gtk_clist_realize;
+ widget_class->unrealize = gtk_clist_unrealize;
+ widget_class->map = gtk_clist_map;
+ widget_class->unmap = gtk_clist_unmap;
+ widget_class->button_press_event = gtk_clist_button_press;
+ widget_class->button_release_event = gtk_clist_button_release;
+ widget_class->motion_notify_event = gtk_clist_motion;
+ widget_class->expose_event = gtk_clist_expose;
+ widget_class->size_request = gtk_clist_size_request;
+ widget_class->size_allocate = gtk_clist_size_allocate;
+ widget_class->focus_in_event = gtk_clist_focus_in;
+ widget_class->focus_out_event = gtk_clist_focus_out;
+ widget_class->draw_focus = gtk_clist_draw_focus;
+ widget_class->style_set = gtk_clist_style_set;
+ widget_class->drag_begin = gtk_clist_drag_begin;
+ widget_class->drag_end = gtk_clist_drag_end;
+ widget_class->drag_motion = gtk_clist_drag_motion;
+ widget_class->drag_leave = gtk_clist_drag_leave;
+ widget_class->drag_drop = gtk_clist_drag_drop;
+ widget_class->drag_data_get = gtk_clist_drag_data_get;
+ widget_class->drag_data_received = gtk_clist_drag_data_received;
+
+ /* container_class->add = NULL; use the default GtkContainerClass warning */
+ /* container_class->remove=NULL; use the default GtkContainerClass warning */
+
+ container_class->forall = gtk_clist_forall;
+ container_class->focus = gtk_clist_focus;
+ container_class->set_focus_child = gtk_clist_set_focus_child;
+
+ klass->set_scroll_adjustments = gtk_clist_set_scroll_adjustments;
+ klass->refresh = clist_refresh;
+ klass->select_row = real_select_row;
+ klass->unselect_row = real_unselect_row;
+ klass->row_move = real_row_move;
+ klass->undo_selection = real_undo_selection;
+ klass->resync_selection = resync_selection;
+ klass->selection_find = selection_find;
+ klass->click_column = NULL;
+ klass->resize_column = real_resize_column;
+ klass->draw_row = draw_row;
+ klass->draw_drag_highlight = draw_drag_highlight;
+ klass->insert_row = real_insert_row;
+ klass->remove_row = real_remove_row;
+ klass->clear = real_clear;
+ klass->sort_list = real_sort_list;
+ klass->select_all = real_select_all;
+ klass->unselect_all = real_unselect_all;
+ klass->fake_unselect_all = fake_unselect_all;
+ klass->scroll_horizontal = scroll_horizontal;
+ klass->scroll_vertical = scroll_vertical;
+ klass->extend_selection = extend_selection;
+ klass->toggle_focus_row = toggle_focus_row;
+ klass->toggle_add_mode = toggle_add_mode;
+ klass->start_selection = start_selection;
+ klass->end_selection = end_selection;
+ klass->abort_column_resize = abort_column_resize;
+ klass->set_cell_contents = set_cell_contents;
+ klass->cell_size_request = cell_size_request;
+
gtk_object_add_arg_type ("GtkCList::n_columns",
GTK_TYPE_UINT,
GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
@@ -664,66 +729,6 @@ gtk_clist_class_init (GtkCListClass *klass)
GTK_SIGNAL_OFFSET (GtkCListClass, abort_column_resize),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, clist_signals, LAST_SIGNAL);
-
- widget_class->realize = gtk_clist_realize;
- widget_class->unrealize = gtk_clist_unrealize;
- widget_class->map = gtk_clist_map;
- widget_class->unmap = gtk_clist_unmap;
- widget_class->button_press_event = gtk_clist_button_press;
- widget_class->button_release_event = gtk_clist_button_release;
- widget_class->motion_notify_event = gtk_clist_motion;
- widget_class->expose_event = gtk_clist_expose;
- widget_class->size_request = gtk_clist_size_request;
- widget_class->size_allocate = gtk_clist_size_allocate;
- widget_class->focus_in_event = gtk_clist_focus_in;
- widget_class->focus_out_event = gtk_clist_focus_out;
- widget_class->draw_focus = gtk_clist_draw_focus;
- widget_class->style_set = gtk_clist_style_set;
- widget_class->drag_begin = gtk_clist_drag_begin;
- widget_class->drag_end = gtk_clist_drag_end;
- widget_class->drag_motion = gtk_clist_drag_motion;
- widget_class->drag_leave = gtk_clist_drag_leave;
- widget_class->drag_drop = gtk_clist_drag_drop;
- widget_class->drag_data_get = gtk_clist_drag_data_get;
- widget_class->drag_data_received = gtk_clist_drag_data_received;
-
- /* container_class->add = NULL; use the default GtkContainerClass warning */
- /* container_class->remove=NULL; use the default GtkContainerClass warning */
-
- container_class->forall = gtk_clist_forall;
- container_class->focus = gtk_clist_focus;
- container_class->set_focus_child = gtk_clist_set_focus_child;
-
- klass->set_scroll_adjustments = gtk_clist_set_scroll_adjustments;
- klass->refresh = clist_refresh;
- klass->select_row = real_select_row;
- klass->unselect_row = real_unselect_row;
- klass->row_move = real_row_move;
- klass->undo_selection = real_undo_selection;
- klass->resync_selection = resync_selection;
- klass->selection_find = selection_find;
- klass->click_column = NULL;
- klass->resize_column = real_resize_column;
- klass->draw_row = draw_row;
- klass->draw_drag_highlight = draw_drag_highlight;
- klass->insert_row = real_insert_row;
- klass->remove_row = real_remove_row;
- klass->clear = real_clear;
- klass->sort_list = real_sort_list;
- klass->select_all = real_select_all;
- klass->unselect_all = real_unselect_all;
- klass->fake_unselect_all = fake_unselect_all;
- klass->scroll_horizontal = scroll_horizontal;
- klass->scroll_vertical = scroll_vertical;
- klass->extend_selection = extend_selection;
- klass->toggle_focus_row = toggle_focus_row;
- klass->toggle_add_mode = toggle_add_mode;
- klass->start_selection = start_selection;
- klass->end_selection = end_selection;
- klass->abort_column_resize = abort_column_resize;
- klass->set_cell_contents = set_cell_contents;
- klass->cell_size_request = cell_size_request;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
@@ -834,8 +839,8 @@ gtk_clist_set_arg (GtkObject *object,
switch (arg_id)
{
- case ARG_N_COLUMNS: /* construct-only arg, only set when !GTK_CONSTRUCTED */
- gtk_clist_construct (clist, MAX (1, GTK_VALUE_UINT (*arg)), NULL);
+ case ARG_N_COLUMNS: /* only set at construction time */
+ clist->columns = MAX (1, GTK_VALUE_UINT (*arg));
break;
case ARG_SHADOW_TYPE:
gtk_clist_set_shadow_type (clist, GTK_VALUE_ENUM (*arg));
@@ -989,20 +994,17 @@ gtk_clist_init (GtkCList *clist)
clist->sort_column = 0;
}
-/* Constructors */
-void
-gtk_clist_construct (GtkCList *clist,
- gint columns,
- gchar *titles[])
+/* Constructor */
+static GObject*
+gtk_clist_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
- g_return_if_fail (clist != NULL);
- g_return_if_fail (GTK_IS_CLIST (clist));
- g_return_if_fail (columns > 0);
- g_return_if_fail (GTK_OBJECT_CONSTRUCTED (clist) == FALSE);
-
- /* mark the object as constructed */
- gtk_object_constructed (GTK_OBJECT (clist));
-
+ GObject *object = G_OBJECT_CLASS (parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties);
+ GtkCList *clist = GTK_CLIST (object);
+
/* initalize memory chunks, if this has not been done by any
* possibly derived widget
*/
@@ -1012,35 +1014,24 @@ gtk_clist_construct (GtkCList *clist,
sizeof (GtkCListRow) *
CLIST_OPTIMUM_SIZE,
G_ALLOC_AND_FREE);
-
+
if (!clist->cell_mem_chunk)
clist->cell_mem_chunk = g_mem_chunk_new ("clist cell mem chunk",
- sizeof (GtkCell) * columns,
- sizeof (GtkCell) * columns *
+ sizeof (GtkCell) * clist->columns,
+ sizeof (GtkCell) * clist->columns *
CLIST_OPTIMUM_SIZE,
G_ALLOC_AND_FREE);
-
- /* set number of columns, allocate memory */
- clist->columns = columns;
+
+ /* allocate memory for columns */
clist->column = columns_new (clist);
-
+
/* there needs to be at least one column button
* because there is alot of code that will break if it
- * isn't there*/
+ * isn't there
+ */
column_button_create (clist, 0);
-
- if (titles)
- {
- guint i;
-
- GTK_CLIST_SET_FLAG (clist, CLIST_SHOW_TITLES);
- for (i = 0; i < columns; i++)
- gtk_clist_set_column_title (clist, i, titles[i]);
- }
- else
- {
- GTK_CLIST_UNSET_FLAG (clist, CLIST_SHOW_TITLES);
- }
+
+ return object;
}
/* GTKCLIST PUBLIC INTERFACE
@@ -1065,12 +1056,23 @@ GtkWidget*
gtk_clist_new_with_titles (gint columns,
gchar *titles[])
{
- GtkWidget *widget;
+ GtkCList *clist;
- widget = gtk_type_new (GTK_TYPE_CLIST);
- gtk_clist_construct (GTK_CLIST (widget), columns, titles);
+ clist = g_object_new (GTK_TYPE_CLIST,
+ "n_columns", columns,
+ NULL);
+ if (titles)
+ {
+ guint i;
- return widget;
+ for (i = 0; i < clist->columns; i++)
+ gtk_clist_set_column_title (clist, i, titles[i]);
+ gtk_clist_column_titles_show (clist);
+ }
+ else
+ gtk_clist_column_titles_hide (clist);
+
+ return GTK_WIDGET (clist);
}
void
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index 8de30f692..3c41ed98e 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -439,11 +439,6 @@ struct _GtkCell
GtkType gtk_clist_get_type (void) G_GNUC_CONST;
-/* constructors useful for gtk-- wrappers */
-void gtk_clist_construct (GtkCList *clist,
- gint columns,
- gchar *titles[]);
-
/* create a new GtkCList */
GtkWidget* gtk_clist_new (gint columns);
GtkWidget* gtk_clist_new_with_titles (gint columns,
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 4bcce9934..f8893ca93 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -1337,6 +1337,8 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
parent_class = gtk_type_class (GTK_TYPE_VBOX);
+ object_class->destroy = gtk_color_selection_destroy;
+
color_selection_signals[COLOR_CHANGED] =
gtk_signal_new ("color_changed",
GTK_RUN_FIRST,
@@ -1344,11 +1346,6 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
GTK_SIGNAL_OFFSET (GtkColorSelectionClass, color_changed),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
-
- gtk_object_class_add_signals (object_class, color_selection_signals, LAST_SIGNAL);
-
- object_class->destroy = gtk_color_selection_destroy;
}
/* widget functions */
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index d3ee4fbff..5f04910f9 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -165,7 +165,24 @@ gtk_container_class_init (GtkContainerClass *class)
vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
hadjustment_key_id = g_quark_from_static_string (hadjustment_key);
- gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_ULONG, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
+
+ object_class->get_arg = gtk_container_get_arg;
+ object_class->set_arg = gtk_container_set_arg;
+ object_class->destroy = gtk_container_destroy;
+
+ widget_class->show_all = gtk_container_show_all;
+ widget_class->hide_all = gtk_container_hide_all;
+
+ class->add = gtk_container_add_unimplemented;
+ class->remove = gtk_container_remove_unimplemented;
+ class->check_resize = gtk_container_real_check_resize;
+ class->forall = NULL;
+ class->focus = gtk_container_real_focus;
+ class->set_focus_child = gtk_container_real_set_focus_child;
+ class->child_type = NULL;
+ class->composite_name = gtk_container_child_default_composite_name;
+
+ gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
gtk_object_add_arg_type ("GtkContainer::resize_mode", GTK_TYPE_RESIZE_MODE, GTK_ARG_READWRITE, ARG_RESIZE_MODE);
gtk_object_add_arg_type ("GtkContainer::child", GTK_TYPE_WIDGET, GTK_ARG_WRITABLE, ARG_CHILD);
gtk_object_add_arg_type ("GtkContainer::reallocate_redraws", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_REALLOCATE_REDRAWS);
@@ -209,23 +226,6 @@ gtk_container_class_init (GtkContainerClass *class)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
- gtk_object_class_add_signals (object_class, container_signals, LAST_SIGNAL);
-
- object_class->get_arg = gtk_container_get_arg;
- object_class->set_arg = gtk_container_set_arg;
- object_class->destroy = gtk_container_destroy;
-
- widget_class->show_all = gtk_container_show_all;
- widget_class->hide_all = gtk_container_hide_all;
-
- class->add = gtk_container_add_unimplemented;
- class->remove = gtk_container_remove_unimplemented;
- class->check_resize = gtk_container_real_check_resize;
- class->forall = NULL;
- class->focus = gtk_container_real_focus;
- class->set_focus_child = gtk_container_real_set_focus_child;
- class->child_type = NULL;
- class->composite_name = gtk_container_child_default_composite_name;
}
GtkType
@@ -266,8 +266,6 @@ gtk_container_add_with_args (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -326,8 +324,6 @@ gtk_container_addv (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -646,7 +642,7 @@ gtk_container_set_arg (GtkObject *object,
switch (arg_id)
{
case ARG_BORDER_WIDTH:
- gtk_container_set_border_width (container, GTK_VALUE_ULONG (*arg));
+ gtk_container_set_border_width (container, GTK_VALUE_UINT (*arg));
break;
case ARG_RESIZE_MODE:
gtk_container_set_resize_mode (container, GTK_VALUE_ENUM (*arg));
@@ -674,7 +670,7 @@ gtk_container_get_arg (GtkObject *object,
switch (arg_id)
{
case ARG_BORDER_WIDTH:
- GTK_VALUE_ULONG (*arg) = container->border_width;
+ GTK_VALUE_UINT (*arg) = container->border_width;
break;
case ARG_RESIZE_MODE:
GTK_VALUE_ENUM (*arg) = container->resize_mode;
@@ -714,8 +710,6 @@ gtk_container_add (GtkContainer *container,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (widget->parent == NULL);
- if (!GTK_OBJECT_CONSTRUCTED (widget))
- gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
}
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index a928959c0..3ead47c46 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -90,8 +90,11 @@ enum {
};
-static void gtk_ctree_class_init (GtkCTreeClass *klass);
-static void gtk_ctree_init (GtkCTree *ctree);
+static void gtk_ctree_class_init (GtkCTreeClass *klass);
+static void gtk_ctree_init (GtkCTree *ctree);
+static GObject* gtk_ctree_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
static void gtk_ctree_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
@@ -342,11 +345,14 @@ gtk_ctree_get_type (void)
static void
gtk_ctree_class_init (GtkCTreeClass *klass)
{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkCListClass *clist_class;
GtkBindingSet *binding_set;
+ gobject_class->constructor = gtk_ctree_constructor;
+
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
@@ -355,7 +361,44 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
parent_class = gtk_type_class (GTK_TYPE_CLIST);
container_class = gtk_type_class (GTK_TYPE_CONTAINER);
- gtk_object_add_arg_type ("GtkCTree::n_columns",
+ object_class->set_arg = gtk_ctree_set_arg;
+ object_class->get_arg = gtk_ctree_get_arg;
+
+ widget_class->realize = gtk_ctree_realize;
+ widget_class->unrealize = gtk_ctree_unrealize;
+ widget_class->button_press_event = gtk_ctree_button_press;
+
+ widget_class->drag_begin = gtk_ctree_drag_begin;
+ widget_class->drag_motion = gtk_ctree_drag_motion;
+ widget_class->drag_data_received = gtk_ctree_drag_data_received;
+
+ clist_class->select_row = real_select_row;
+ clist_class->unselect_row = real_unselect_row;
+ clist_class->row_move = real_row_move;
+ clist_class->undo_selection = real_undo_selection;
+ clist_class->resync_selection = resync_selection;
+ clist_class->selection_find = selection_find;
+ clist_class->click_column = NULL;
+ clist_class->draw_row = draw_row;
+ clist_class->draw_drag_highlight = draw_drag_highlight;
+ clist_class->clear = real_clear;
+ clist_class->select_all = real_select_all;
+ clist_class->unselect_all = real_unselect_all;
+ clist_class->fake_unselect_all = fake_unselect_all;
+ clist_class->insert_row = real_insert_row;
+ clist_class->remove_row = real_remove_row;
+ clist_class->sort_list = real_sort_list;
+ clist_class->set_cell_contents = set_cell_contents;
+ clist_class->cell_size_request = cell_size_request;
+
+ klass->tree_select_row = real_tree_select;
+ klass->tree_unselect_row = real_tree_unselect;
+ klass->tree_expand = real_tree_expand;
+ klass->tree_collapse = real_tree_collapse;
+ klass->tree_move = real_tree_move;
+ klass->change_focus_row_expansion = change_focus_row_expansion;
+
+ gtk_object_add_arg_type ("GtkCTree::n_columns", /* overrides GtkCList::n_columns!! */
GTK_TYPE_UINT,
GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
ARG_N_COLUMNS);
@@ -383,8 +426,6 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
GTK_TYPE_CTREE_EXPANDER_STYLE,
GTK_ARG_READWRITE,
ARG_EXPANDER_STYLE);
- object_class->set_arg = gtk_ctree_set_arg;
- object_class->get_arg = gtk_ctree_get_arg;
ctree_signals[TREE_SELECT_ROW] =
gtk_signal_new ("tree_select_row",
@@ -430,41 +471,6 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
change_focus_row_expansion),
gtk_marshal_VOID__ENUM,
GTK_TYPE_NONE, 1, GTK_TYPE_CTREE_EXPANSION_TYPE);
- gtk_object_class_add_signals (object_class, ctree_signals, LAST_SIGNAL);
-
- widget_class->realize = gtk_ctree_realize;
- widget_class->unrealize = gtk_ctree_unrealize;
- widget_class->button_press_event = gtk_ctree_button_press;
-
- widget_class->drag_begin = gtk_ctree_drag_begin;
- widget_class->drag_motion = gtk_ctree_drag_motion;
- widget_class->drag_data_received = gtk_ctree_drag_data_received;
-
- clist_class->select_row = real_select_row;
- clist_class->unselect_row = real_unselect_row;
- clist_class->row_move = real_row_move;
- clist_class->undo_selection = real_undo_selection;
- clist_class->resync_selection = resync_selection;
- clist_class->selection_find = selection_find;
- clist_class->click_column = NULL;
- clist_class->draw_row = draw_row;
- clist_class->draw_drag_highlight = draw_drag_highlight;
- clist_class->clear = real_clear;
- clist_class->select_all = real_select_all;
- clist_class->unselect_all = real_unselect_all;
- clist_class->fake_unselect_all = fake_unselect_all;
- clist_class->insert_row = real_insert_row;
- clist_class->remove_row = real_remove_row;
- clist_class->sort_list = real_sort_list;
- clist_class->set_cell_contents = set_cell_contents;
- clist_class->cell_size_request = cell_size_request;
-
- klass->tree_select_row = real_tree_select;
- klass->tree_unselect_row = real_tree_unselect;
- klass->tree_expand = real_tree_expand;
- klass->tree_collapse = real_tree_collapse;
- klass->tree_move = real_tree_move;
- klass->change_focus_row_expansion = change_focus_row_expansion;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
@@ -514,27 +520,32 @@ gtk_ctree_set_arg (GtkObject *object,
guint arg_id)
{
GtkCTree *ctree;
+ GtkCList *clist;
ctree = GTK_CTREE (object);
+ clist = GTK_CLIST (ctree);
switch (arg_id)
{
- case ARG_N_COLUMNS: /* construct-only arg, only set when !GTK_CONSTRUCTED */
- if (ctree->tree_column)
- gtk_ctree_construct (ctree,
- MAX (1, GTK_VALUE_UINT (*arg)),
- ctree->tree_column, NULL);
- else
- GTK_CLIST (ctree)->columns = MAX (1, GTK_VALUE_UINT (*arg));
+ case ARG_N_COLUMNS: /* construct-only arg, only set at construction time */
+ g_return_if_fail (clist->row_mem_chunk == NULL);
+ clist->columns = MAX (1, GTK_VALUE_UINT (*arg));
+ clist->row_mem_chunk = g_mem_chunk_new ("ctree row mem chunk",
+ sizeof (GtkCTreeRow),
+ sizeof (GtkCTreeRow)
+ * CLIST_OPTIMUM_SIZE,
+ G_ALLOC_AND_FREE);
+ clist->cell_mem_chunk = g_mem_chunk_new ("ctree cell mem chunk",
+ sizeof (GtkCell) * clist->columns,
+ sizeof (GtkCell) * clist->columns
+ * CLIST_OPTIMUM_SIZE,
+ G_ALLOC_AND_FREE);
+ ctree->tree_column = CLAMP (ctree->tree_column, 0, clist->columns);
break;
- case ARG_TREE_COLUMN: /* construct-only arg, only set when !GTK_CONSTRUCTED */
- if (GTK_CLIST (ctree)->columns)
- gtk_ctree_construct (ctree,
- GTK_CLIST (ctree)->columns,
- MAX (1, GTK_VALUE_UINT (*arg)),
- NULL);
- else
- ctree->tree_column = MAX (1, GTK_VALUE_UINT (*arg));
+ case ARG_TREE_COLUMN: /* construct-only arg, only set at construction time */
+ ctree->tree_column = GTK_VALUE_UINT (*arg);
+ if (clist->row_mem_chunk)
+ ctree->tree_column = CLAMP (ctree->tree_column, 0, clist->columns);
break;
case ARG_INDENT:
gtk_ctree_set_indent (ctree, GTK_VALUE_UINT (*arg));
@@ -3539,38 +3550,19 @@ ctree_is_hot_spot (GtkCTree *ctree,
* Creation, insertion, deletion *
***********************************************************/
-void
-gtk_ctree_construct (GtkCTree *ctree,
- gint columns,
- gint tree_column,
- gchar *titles[])
+static GObject*
+gtk_ctree_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
- GtkCList *clist;
+ GObject *object = G_OBJECT_CLASS (parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties);
- g_return_if_fail (ctree != NULL);
- g_return_if_fail (GTK_IS_CTREE (ctree));
- g_return_if_fail (GTK_OBJECT_CONSTRUCTED (ctree) == FALSE);
-
- clist = GTK_CLIST (ctree);
-
- clist->row_mem_chunk = g_mem_chunk_new ("ctree row mem chunk",
- sizeof (GtkCTreeRow),
- sizeof (GtkCTreeRow)
- * CLIST_OPTIMUM_SIZE,
- G_ALLOC_AND_FREE);
-
- clist->cell_mem_chunk = g_mem_chunk_new ("ctree cell mem chunk",
- sizeof (GtkCell) * columns,
- sizeof (GtkCell) * columns
- * CLIST_OPTIMUM_SIZE,
- G_ALLOC_AND_FREE);
-
- ctree->tree_column = tree_column;
-
- gtk_clist_construct (clist, columns, titles);
+ return object;
}
-GtkWidget *
+GtkWidget*
gtk_ctree_new_with_titles (gint columns,
gint tree_column,
gchar *titles[])
@@ -3580,8 +3572,19 @@ gtk_ctree_new_with_titles (gint columns,
g_return_val_if_fail (columns > 0, NULL);
g_return_val_if_fail (tree_column >= 0 && tree_column < columns, NULL);
- widget = gtk_type_new (GTK_TYPE_CTREE);
- gtk_ctree_construct (GTK_CTREE (widget), columns, tree_column, titles);
+ widget = gtk_widget_new (GTK_TYPE_CTREE,
+ "n_columns", columns,
+ "tree_column", tree_column,
+ NULL);
+ if (titles)
+ {
+ GtkCList *clist = GTK_CLIST (widget);
+ guint i;
+
+ for (i = 0; i < columns; i++)
+ gtk_clist_set_column_title (clist, i, titles[i]);
+ gtk_clist_column_titles_show (clist);
+ }
return widget;
}
diff --git a/gtk/gtkctree.h b/gtk/gtkctree.h
index 96ada2997..b2dd4f39a 100644
--- a/gtk/gtkctree.h
+++ b/gtk/gtkctree.h
@@ -171,10 +171,6 @@ struct _GtkCTreeNode {
***********************************************************/
GtkType gtk_ctree_get_type (void) G_GNUC_CONST;
-void gtk_ctree_construct (GtkCTree *ctree,
- gint columns,
- gint tree_column,
- gchar *titles[]);
GtkWidget * gtk_ctree_new_with_titles (gint columns,
gint tree_column,
gchar *titles[]);
diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c
index 76e5c3091..26d7864e1 100644
--- a/gtk/gtkcurve.c
+++ b/gtk/gtkcurve.c
@@ -115,7 +115,6 @@ gtk_curve_class_init (GtkCurveClass *class)
gtk_signal_new ("curve_type_changed", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkCurveClass, curve_type_changed),
gtk_marshal_VOID__VOID, GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, &curve_type_changed_signal, 1);
gtk_object_add_arg_type ("GtkCurve::curve_type", GTK_TYPE_CURVE_TYPE,
GTK_ARG_READWRITE, ARG_CURVE_TYPE);
diff --git a/gtk/gtkdata.c b/gtk/gtkdata.c
index 752017802..1b7d67799 100644
--- a/gtk/gtkdata.c
+++ b/gtk/gtkdata.c
@@ -79,7 +79,5 @@ gtk_data_class_init (GtkDataClass *class)
GTK_SIGNAL_OFFSET (GtkDataClass, disconnect),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, data_signals, LAST_SIGNAL);
}
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 2c5488111..491e3ae17 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -91,6 +91,8 @@ gtk_dialog_class_init (GtkDialogClass *class)
parent_class = g_type_class_peek_parent (class);
+ widget_class->key_press_event = gtk_dialog_key_press;
+
dialog_signals[RESPONSE] =
gtk_signal_new ("response",
GTK_RUN_LAST,
@@ -99,10 +101,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1,
GTK_TYPE_INT);
-
- gtk_object_class_add_signals (object_class, dialog_signals, LAST_SIGNAL);
-
- widget_class->key_press_event = gtk_dialog_key_press;
}
static void
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 766b99973..59c15cf05 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -271,7 +271,6 @@ gtk_entry_class_init (GtkEntryClass *class)
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
-
GtkBindingSet *binding_set;
object_class = (GtkObjectClass*) class;
@@ -279,6 +278,35 @@ gtk_entry_class_init (GtkEntryClass *class)
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
gobject_class->finalize = gtk_entry_finalize;
+
+ object_class->set_arg = gtk_entry_set_arg;
+ object_class->get_arg = gtk_entry_get_arg;
+
+ widget_class->realize = gtk_entry_realize;
+ widget_class->unrealize = gtk_entry_unrealize;
+ widget_class->draw_focus = gtk_entry_draw_focus;
+ widget_class->size_request = gtk_entry_size_request;
+ widget_class->size_allocate = gtk_entry_size_allocate;
+ widget_class->expose_event = gtk_entry_expose;
+ widget_class->button_press_event = gtk_entry_button_press;
+ widget_class->button_release_event = gtk_entry_button_release;
+ widget_class->motion_notify_event = gtk_entry_motion_notify;
+ widget_class->key_press_event = gtk_entry_key_press;
+ widget_class->focus_in_event = gtk_entry_focus_in;
+ widget_class->focus_out_event = gtk_entry_focus_out;
+ widget_class->style_set = gtk_entry_style_set;
+ widget_class->direction_changed = gtk_entry_direction_changed;
+ widget_class->state_changed = gtk_entry_state_changed;
+
+ class->insert_text = gtk_entry_real_insert_text;
+ class->delete_text = gtk_entry_real_delete_text;
+ class->move_cursor = gtk_entry_move_cursor;
+ class->insert_at_cursor = gtk_entry_insert_at_cursor;
+ class->delete_from_cursor = gtk_entry_delete_from_cursor;
+ class->cut_clipboard = gtk_entry_cut_clipboard;
+ class->copy_clipboard = gtk_entry_copy_clipboard;
+ class->paste_clipboard = gtk_entry_paste_clipboard;
+ class->toggle_overwrite = gtk_entry_toggle_overwrite;
gtk_object_add_arg_type ("GtkEntry::text_position", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TEXT_POSITION);
gtk_object_add_arg_type ("GtkEntry::editable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EDITABLE);
@@ -326,7 +354,6 @@ gtk_entry_class_init (GtkEntryClass *class)
GTK_SIGNAL_OFFSET (GtkEntryClass, activate),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
widget_class->activate_signal = signals[ACTIVATE];
signals[MOVE_CURSOR] =
@@ -385,8 +412,6 @@ gtk_entry_class_init (GtkEntryClass *class)
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
/*
* Key bindings
*/
@@ -510,35 +535,6 @@ gtk_entry_class_init (GtkEntryClass *class)
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
"toggle_overwrite", 0);
-
- object_class->set_arg = gtk_entry_set_arg;
- object_class->get_arg = gtk_entry_get_arg;
-
- widget_class->realize = gtk_entry_realize;
- widget_class->unrealize = gtk_entry_unrealize;
- widget_class->draw_focus = gtk_entry_draw_focus;
- widget_class->size_request = gtk_entry_size_request;
- widget_class->size_allocate = gtk_entry_size_allocate;
- widget_class->expose_event = gtk_entry_expose;
- widget_class->button_press_event = gtk_entry_button_press;
- widget_class->button_release_event = gtk_entry_button_release;
- widget_class->motion_notify_event = gtk_entry_motion_notify;
- widget_class->key_press_event = gtk_entry_key_press;
- widget_class->focus_in_event = gtk_entry_focus_in;
- widget_class->focus_out_event = gtk_entry_focus_out;
- widget_class->style_set = gtk_entry_style_set;
- widget_class->direction_changed = gtk_entry_direction_changed;
- widget_class->state_changed = gtk_entry_state_changed;
-
- class->insert_text = gtk_entry_real_insert_text;
- class->delete_text = gtk_entry_real_delete_text;
- class->move_cursor = gtk_entry_move_cursor;
- class->insert_at_cursor = gtk_entry_insert_at_cursor;
- class->delete_from_cursor = gtk_entry_delete_from_cursor;
- class->cut_clipboard = gtk_entry_cut_clipboard;
- class->copy_clipboard = gtk_entry_copy_clipboard;
- class->paste_clipboard = gtk_entry_paste_clipboard;
- class->toggle_overwrite = gtk_entry_toggle_overwrite;
}
static void
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index a7ef0415d..c834ef459 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -176,23 +176,6 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
object_class->set_arg = gtk_handle_box_set_arg;
object_class->get_arg = gtk_handle_box_get_arg;
- handle_box_signals[SIGNAL_CHILD_ATTACHED] =
- gtk_signal_new ("child_attached",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_attached),
- gtk_marshal_VOID__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
- handle_box_signals[SIGNAL_CHILD_DETACHED] =
- gtk_signal_new ("child_detached",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_detached),
- gtk_marshal_VOID__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
- gtk_object_class_add_signals (object_class, handle_box_signals, SIGNAL_LAST);
object_class->destroy = gtk_handle_box_destroy;
@@ -214,6 +197,23 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
class->child_attached = NULL;
class->child_detached = NULL;
+
+ handle_box_signals[SIGNAL_CHILD_ATTACHED] =
+ gtk_signal_new ("child_attached",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_attached),
+ gtk_marshal_VOID__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
+ handle_box_signals[SIGNAL_CHILD_DETACHED] =
+ gtk_signal_new ("child_detached",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_detached),
+ gtk_marshal_VOID__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
}
static void
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index 7b1af385e..e4d0bcc85 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -145,14 +145,6 @@ gtk_hsv_class_init (GtkHSVClass *class)
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
- hsv_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkHSVClass, changed),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, hsv_signals, LAST_SIGNAL);
object_class->destroy = gtk_hsv_destroy;
@@ -166,6 +158,14 @@ gtk_hsv_class_init (GtkHSVClass *class)
widget_class->button_release_event = gtk_hsv_button_release;
widget_class->motion_notify_event = gtk_hsv_motion;
widget_class->expose_event = gtk_hsv_expose;
+
+ hsv_signals[CHANGED] =
+ gtk_signal_new ("changed",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkHSVClass, changed),
+ gtk_marshal_VOID__VOID,
+ GTK_TYPE_NONE, 0);
}
/* Object initialization function for the HSV color selector */
diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c
index 6d619470c..9475d0505 100644
--- a/gtk/gtkimcontext.c
+++ b/gtk/gtkimcontext.c
@@ -72,6 +72,9 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
object_class = (GtkObjectClass*) klass;
+ klass->get_preedit_string = gtk_im_context_real_get_preedit_string;
+ klass->filter_keypress = gtk_im_context_real_filter_keypress;
+
im_context_signals[PREEDIT_START] =
gtk_signal_new ("preedit_start",
GTK_RUN_LAST,
@@ -104,11 +107,6 @@ gtk_im_context_class_init (GtkIMContextClass *klass)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_STRING);
-
- klass->get_preedit_string = gtk_im_context_real_get_preedit_string;
- klass->filter_keypress = gtk_im_context_real_filter_keypress;
-
- gtk_object_class_add_signals (object_class, im_context_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c
index 873292189..e150f66d7 100644
--- a/gtk/gtkinputdialog.c
+++ b/gtk/gtkinputdialog.c
@@ -138,6 +138,9 @@ gtk_input_dialog_class_init (GtkInputDialogClass *klass)
parent_class = gtk_type_class (GTK_TYPE_DIALOG);
+ klass->enable_device = NULL;
+ klass->disable_device = NULL;
+
input_dialog_signals[ENABLE_DEVICE] =
gtk_signal_new ("enable_device",
GTK_RUN_LAST,
@@ -153,13 +156,6 @@ gtk_input_dialog_class_init (GtkInputDialogClass *klass)
GTK_SIGNAL_OFFSET (GtkInputDialogClass, disable_device),
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, input_dialog_signals,
- LAST_SIGNAL);
-
-
- klass->enable_device = NULL;
- klass->disable_device = NULL;
}
static void
diff --git a/gtk/gtkitem.c b/gtk/gtkitem.c
index b3b7e0a5e..b8d6c7f3c 100644
--- a/gtk/gtkitem.c
+++ b/gtk/gtkitem.c
@@ -84,6 +84,17 @@ gtk_item_class_init (GtkItemClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
+
+ widget_class->map = gtk_item_map;
+ widget_class->unmap = gtk_item_unmap;
+ widget_class->realize = gtk_item_realize;
+ widget_class->enter_notify_event = gtk_item_enter;
+ widget_class->leave_notify_event = gtk_item_leave;
+
+ class->select = NULL;
+ class->deselect = NULL;
+ class->toggle = NULL;
+
item_signals[SELECT] =
gtk_signal_new ("select",
GTK_RUN_FIRST,
@@ -105,19 +116,7 @@ gtk_item_class_init (GtkItemClass *class)
GTK_SIGNAL_OFFSET (GtkItemClass, toggle),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, item_signals, LAST_SIGNAL);
-
widget_class->activate_signal = item_signals[TOGGLE];
- widget_class->map = gtk_item_map;
- widget_class->unmap = gtk_item_unmap;
- widget_class->realize = gtk_item_realize;
- widget_class->enter_notify_event = gtk_item_enter;
- widget_class->leave_notify_event = gtk_item_leave;
-
- class->select = NULL;
- class->deselect = NULL;
- class->toggle = NULL;
}
static void
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index ced05ccda..8698b1303 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -214,31 +214,6 @@ gtk_list_class_init (GtkListClass *class)
gobject_class->shutdown = gtk_list_shutdown;
- list_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkListClass, selection_changed),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
- list_signals[SELECT_CHILD] =
- gtk_signal_new ("select_child",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkListClass, select_child),
- gtk_marshal_VOID__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
- list_signals[UNSELECT_CHILD] =
- gtk_signal_new ("unselect_child",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkListClass, unselect_child),
- gtk_marshal_VOID__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
-
- gtk_object_class_add_signals (object_class, list_signals, LAST_SIGNAL);
object_class->set_arg = gtk_list_set_arg;
object_class->get_arg = gtk_list_get_arg;
@@ -265,6 +240,30 @@ gtk_list_class_init (GtkListClass *class)
class->selection_changed = NULL;
class->select_child = gtk_real_list_select_child;
class->unselect_child = gtk_real_list_unselect_child;
+
+ list_signals[SELECTION_CHANGED] =
+ gtk_signal_new ("selection_changed",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkListClass, selection_changed),
+ gtk_marshal_VOID__VOID,
+ GTK_TYPE_NONE, 0);
+ list_signals[SELECT_CHILD] =
+ gtk_signal_new ("select_child",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkListClass, select_child),
+ gtk_marshal_VOID__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
+ list_signals[UNSELECT_CHILD] =
+ gtk_signal_new ("unselect_child",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkListClass, unselect_child),
+ gtk_marshal_VOID__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
gtk_object_add_arg_type ("GtkList::selection_mode",
GTK_TYPE_SELECTION_MODE, GTK_ARG_READWRITE,
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index 9ca79f538..2deb15d2b 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -113,6 +113,31 @@ gtk_list_item_class_init (GtkListItemClass *class)
parent_class = gtk_type_class (gtk_item_get_type ());
+ widget_class->realize = gtk_list_item_realize;
+ widget_class->size_request = gtk_list_item_size_request;
+ widget_class->size_allocate = gtk_list_item_size_allocate;
+ widget_class->style_set = gtk_list_item_style_set;
+ widget_class->draw_focus = gtk_list_item_draw_focus;
+ widget_class->button_press_event = gtk_list_item_button_press;
+ widget_class->expose_event = gtk_list_item_expose;
+ widget_class->focus_in_event = gtk_list_item_focus_in;
+ widget_class->focus_out_event = gtk_list_item_focus_out;
+
+ item_class->select = gtk_real_list_item_select;
+ item_class->deselect = gtk_real_list_item_deselect;
+ item_class->toggle = gtk_real_list_item_toggle;
+
+ class->toggle_focus_row = NULL;
+ class->select_all = NULL;
+ class->unselect_all = NULL;
+ class->undo_selection = NULL;
+ class->start_selection = NULL;
+ class->end_selection = NULL;
+ class->extend_selection = NULL;
+ class->scroll_horizontal = NULL;
+ class->scroll_vertical = NULL;
+ class->toggle_add_mode = NULL;
+
list_item_signals[TOGGLE_FOCUS_ROW] =
gtk_signal_new ("toggle_focus_row",
GTK_RUN_LAST | GTK_RUN_ACTION,
@@ -185,34 +210,6 @@ gtk_list_item_class_init (GtkListItemClass *class)
gtk_marshal_VOID__ENUM_FLOAT,
GTK_TYPE_NONE, 2, GTK_TYPE_SCROLL_TYPE, GTK_TYPE_FLOAT);
- gtk_object_class_add_signals (object_class, list_item_signals, LAST_SIGNAL);
-
- widget_class->realize = gtk_list_item_realize;
- widget_class->size_request = gtk_list_item_size_request;
- widget_class->size_allocate = gtk_list_item_size_allocate;
- widget_class->style_set = gtk_list_item_style_set;
- widget_class->draw_focus = gtk_list_item_draw_focus;
- widget_class->button_press_event = gtk_list_item_button_press;
- widget_class->expose_event = gtk_list_item_expose;
- widget_class->focus_in_event = gtk_list_item_focus_in;
- widget_class->focus_out_event = gtk_list_item_focus_out;
-
- item_class->select = gtk_real_list_item_select;
- item_class->deselect = gtk_real_list_item_deselect;
- item_class->toggle = gtk_real_list_item_toggle;
-
- class->toggle_focus_row = NULL;
- class->select_all = NULL;
- class->unselect_all = NULL;
- class->undo_selection = NULL;
- class->start_selection = NULL;
- class->end_selection = NULL;
- class->extend_selection = NULL;
- class->scroll_horizontal = NULL;
- class->scroll_vertical = NULL;
- class->toggle_add_mode = NULL;
-
-
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"scroll_vertical", 2,
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index 063a844b5..8a90656a7 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -147,9 +147,6 @@ gtk_list_store_class_init (GtkListStoreClass *class)
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GTK_TYPE_TREE_PATH);
-
-
- gtk_object_class_add_signals (object_class, list_store_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 7069af9c3..5f2458528 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -129,6 +129,27 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
parent_class = gtk_type_class (gtk_item_get_type ());
+
+ object_class->destroy = gtk_menu_item_destroy;
+
+ widget_class->size_request = gtk_menu_item_size_request;
+ widget_class->size_allocate = gtk_menu_item_size_allocate;
+ widget_class->expose_event = gtk_menu_item_expose;
+ widget_class->show_all = gtk_menu_item_show_all;
+ widget_class->hide_all = gtk_menu_item_hide_all;
+
+ container_class->forall = gtk_menu_item_forall;
+
+ item_class->select = gtk_real_menu_item_select;
+ item_class->deselect = gtk_real_menu_item_deselect;
+
+ klass->activate = NULL;
+ klass->activate_item = gtk_real_menu_item_activate_item;
+ klass->toggle_size_request = gtk_real_menu_item_toggle_size_request;
+ klass->toggle_size_allocate = gtk_real_menu_item_toggle_size_allocate;
+
+ klass->hide_on_activate = TRUE;
+
menu_item_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_FIRST | GTK_RUN_ACTION,
@@ -136,6 +157,7 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
GTK_SIGNAL_OFFSET (GtkMenuItemClass, activate),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
+ widget_class->activate_signal = menu_item_signals[ACTIVATE];
menu_item_signals[ACTIVATE_ITEM] =
gtk_signal_new ("activate_item",
@@ -162,29 +184,6 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
gtk_marshal_NONE__UINT,
GTK_TYPE_NONE, 1,
GTK_TYPE_UINT);
-
- gtk_object_class_add_signals (object_class, menu_item_signals, LAST_SIGNAL);
-
- object_class->destroy = gtk_menu_item_destroy;
-
- widget_class->activate_signal = menu_item_signals[ACTIVATE];
- widget_class->size_request = gtk_menu_item_size_request;
- widget_class->size_allocate = gtk_menu_item_size_allocate;
- widget_class->expose_event = gtk_menu_item_expose;
- widget_class->show_all = gtk_menu_item_show_all;
- widget_class->hide_all = gtk_menu_item_hide_all;
-
- container_class->forall = gtk_menu_item_forall;
-
- item_class->select = gtk_real_menu_item_select;
- item_class->deselect = gtk_real_menu_item_deselect;
-
- klass->activate = NULL;
- klass->activate_item = gtk_real_menu_item_activate_item;
- klass->toggle_size_request = gtk_real_menu_item_toggle_size_request;
- klass->toggle_size_allocate = gtk_real_menu_item_toggle_size_allocate;
-
- klass->hide_on_activate = TRUE;
}
static void
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index bb3e7f789..145b7b752 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -192,6 +192,28 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
parent_class = gtk_type_class (gtk_container_get_type ());
+ widget_class->map = gtk_menu_shell_map;
+ widget_class->realize = gtk_menu_shell_realize;
+ widget_class->button_press_event = gtk_menu_shell_button_press;
+ widget_class->button_release_event = gtk_menu_shell_button_release;
+ widget_class->key_press_event = gtk_menu_shell_key_press;
+ widget_class->enter_notify_event = gtk_menu_shell_enter_notify;
+ widget_class->leave_notify_event = gtk_menu_shell_leave_notify;
+
+ container_class->add = gtk_menu_shell_add;
+ container_class->remove = gtk_menu_shell_remove;
+ container_class->forall = gtk_menu_shell_forall;
+ container_class->child_type = gtk_menu_shell_child_type;
+
+ klass->submenu_placement = GTK_TOP_BOTTOM;
+ klass->deactivate = gtk_real_menu_shell_deactivate;
+ klass->selection_done = NULL;
+ klass->move_current = gtk_real_menu_shell_move_current;
+ klass->activate_current = gtk_real_menu_shell_activate_current;
+ klass->cancel = gtk_real_menu_shell_cancel;
+ klass->select_item = gtk_menu_shell_real_select_item;
+ klass->insert = gtk_menu_shell_real_insert;
+
menu_shell_signals[DEACTIVATE] =
gtk_signal_new ("deactivate",
GTK_RUN_FIRST,
@@ -229,30 +251,6 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
GTK_SIGNAL_OFFSET (GtkMenuShellClass, cancel),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, menu_shell_signals, LAST_SIGNAL);
-
- widget_class->map = gtk_menu_shell_map;
- widget_class->realize = gtk_menu_shell_realize;
- widget_class->button_press_event = gtk_menu_shell_button_press;
- widget_class->button_release_event = gtk_menu_shell_button_release;
- widget_class->key_press_event = gtk_menu_shell_key_press;
- widget_class->enter_notify_event = gtk_menu_shell_enter_notify;
- widget_class->leave_notify_event = gtk_menu_shell_leave_notify;
-
- container_class->add = gtk_menu_shell_add;
- container_class->remove = gtk_menu_shell_remove;
- container_class->forall = gtk_menu_shell_forall;
- container_class->child_type = gtk_menu_shell_child_type;
-
- klass->submenu_placement = GTK_TOP_BOTTOM;
- klass->deactivate = gtk_real_menu_shell_deactivate;
- klass->selection_done = NULL;
- klass->move_current = gtk_real_menu_shell_move_current;
- klass->activate_current = gtk_real_menu_shell_activate_current;
- klass->cancel = gtk_real_menu_shell_cancel;
- klass->select_item = gtk_menu_shell_real_select_item;
- klass->insert = gtk_menu_shell_real_insert;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
diff --git a/gtk/gtkmodelsimple.c b/gtk/gtkmodelsimple.c
index 13ab8f232..c69ece96f 100644
--- a/gtk/gtkmodelsimple.c
+++ b/gtk/gtkmodelsimple.c
@@ -260,8 +260,6 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
G_TYPE_BOOLEAN, 2,
GTK_TYPE_TREE_ITER,
GTK_TYPE_TREE_ITER);
-
- gtk_object_class_add_signals (object_class, model_simple_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 424fd869d..fecef3b6b 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -280,34 +280,6 @@ gtk_notebook_class_init (GtkNotebookClass *class)
container_class = (GtkContainerClass*) class;
parent_class = gtk_type_class (gtk_container_get_type ());
- gtk_object_add_arg_type ("GtkNotebook::page", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_PAGE);
- gtk_object_add_arg_type ("GtkNotebook::tab_pos", GTK_TYPE_POSITION_TYPE, GTK_ARG_READWRITE, ARG_TAB_POS);
- gtk_object_add_arg_type ("GtkNotebook::tab_border", GTK_TYPE_UINT, GTK_ARG_WRITABLE, ARG_TAB_BORDER);
- gtk_object_add_arg_type ("GtkNotebook::tab_hborder", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_TAB_HBORDER);
- gtk_object_add_arg_type ("GtkNotebook::tab_vborder", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_TAB_VBORDER);
- gtk_object_add_arg_type ("GtkNotebook::show_tabs", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SHOW_TABS);
- gtk_object_add_arg_type ("GtkNotebook::show_border", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SHOW_BORDER);
- gtk_object_add_arg_type ("GtkNotebook::scrollable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SCROLLABLE);
- gtk_object_add_arg_type ("GtkNotebook::enable_popup", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ENABLE_POPUP);
- gtk_object_add_arg_type ("GtkNotebook::homogeneous", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
-
- gtk_container_add_child_arg_type ("GtkNotebook::tab_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_TAB_LABEL);
- gtk_container_add_child_arg_type ("GtkNotebook::menu_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_MENU_LABEL);
- gtk_container_add_child_arg_type ("GtkNotebook::position", GTK_TYPE_INT, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
- gtk_container_add_child_arg_type ("GtkNotebook::tab_fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_TAB_FILL);
- gtk_container_add_child_arg_type ("GtkNotebook::tab_pack", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_TAB_PACK);
-
- notebook_signals[SWITCH_PAGE] =
- gtk_signal_new ("switch_page",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkNotebookClass, switch_page),
- gtk_marshal_VOID__POINTER_UINT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_UINT);
-
- gtk_object_class_add_signals (object_class, notebook_signals, LAST_SIGNAL);
object_class->set_arg = gtk_notebook_set_arg;
object_class->get_arg = gtk_notebook_get_arg;
@@ -341,6 +313,33 @@ gtk_notebook_class_init (GtkNotebookClass *class)
container_class->child_type = gtk_notebook_child_type;
class->switch_page = gtk_notebook_real_switch_page;
+
+ gtk_object_add_arg_type ("GtkNotebook::page", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_PAGE);
+ gtk_object_add_arg_type ("GtkNotebook::tab_pos", GTK_TYPE_POSITION_TYPE, GTK_ARG_READWRITE, ARG_TAB_POS);
+ gtk_object_add_arg_type ("GtkNotebook::tab_border", GTK_TYPE_UINT, GTK_ARG_WRITABLE, ARG_TAB_BORDER);
+ gtk_object_add_arg_type ("GtkNotebook::tab_hborder", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_TAB_HBORDER);
+ gtk_object_add_arg_type ("GtkNotebook::tab_vborder", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_TAB_VBORDER);
+ gtk_object_add_arg_type ("GtkNotebook::show_tabs", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SHOW_TABS);
+ gtk_object_add_arg_type ("GtkNotebook::show_border", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SHOW_BORDER);
+ gtk_object_add_arg_type ("GtkNotebook::scrollable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SCROLLABLE);
+ gtk_object_add_arg_type ("GtkNotebook::enable_popup", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ENABLE_POPUP);
+ gtk_object_add_arg_type ("GtkNotebook::homogeneous", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
+
+ gtk_container_add_child_arg_type ("GtkNotebook::tab_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_TAB_LABEL);
+ gtk_container_add_child_arg_type ("GtkNotebook::menu_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_MENU_LABEL);
+ gtk_container_add_child_arg_type ("GtkNotebook::position", GTK_TYPE_INT, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
+ gtk_container_add_child_arg_type ("GtkNotebook::tab_fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_TAB_FILL);
+ gtk_container_add_child_arg_type ("GtkNotebook::tab_pack", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_TAB_PACK);
+
+ notebook_signals[SWITCH_PAGE] =
+ gtk_signal_new ("switch_page",
+ GTK_RUN_LAST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkNotebookClass, switch_page),
+ gtk_marshal_VOID__POINTER_UINT,
+ GTK_TYPE_NONE, 2,
+ GTK_TYPE_POINTER,
+ GTK_TYPE_UINT);
}
static void
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index c1df707cb..ff9c08173 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -36,12 +36,8 @@ enum {
LAST_SIGNAL
};
enum {
- ARG_0,
- ARG_USER_DATA,
- ARG_SIGNAL,
- ARG_SIGNAL_AFTER,
- ARG_OBJECT_SIGNAL,
- ARG_OBJECT_SIGNAL_AFTER
+ PROP_0,
+ PROP_USER_DATA,
};
@@ -51,12 +47,16 @@ static void gtk_object_base_class_finalize (GtkObjectClass *class);
static void gtk_object_class_init (GtkObjectClass *klass);
static void gtk_object_init (GtkObject *object,
GtkObjectClass *klass);
-static void gtk_object_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_object_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
+static void gtk_object_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer);
+static void gtk_object_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer);
static void gtk_object_shutdown (GObject *object);
static void gtk_object_real_destroy (GtkObject *object);
static void gtk_object_finalize (GObject *object);
@@ -64,10 +64,8 @@ static void gtk_object_notify_weaks (GtkObject *object);
static gpointer parent_class = NULL;
static guint object_signals[LAST_SIGNAL] = { 0 };
-static GHashTable *object_arg_info_ht = NULL;
static GQuark quark_user_data = 0;
static GQuark quark_weakrefs = 0;
-static GQuark quark_carg_history = 0;
/****************************************************
@@ -104,12 +102,6 @@ gtk_object_get_type (void)
static void
gtk_object_base_class_init (GtkObjectClass *class)
{
- /* reset instance specific fields that don't get inherited */
- class->signals = NULL;
- class->nsignals = 0;
- class->n_args = 0;
- class->construct_args = NULL;
-
/* reset instance specifc methods that don't get inherited */
class->get_arg = NULL;
class->set_arg = NULL;
@@ -118,8 +110,201 @@ gtk_object_base_class_init (GtkObjectClass *class)
static void
gtk_object_base_class_finalize (GtkObjectClass *class)
{
- g_free (class->signals);
- g_return_if_fail (class->construct_args == NULL);
+}
+
+static inline gboolean
+gtk_arg_set_from_value (GtkArg *arg,
+ const GValue *value,
+ gboolean copy_string)
+{
+ switch (G_TYPE_FUNDAMENTAL (arg->type))
+ {
+ case G_TYPE_CHAR: GTK_VALUE_CHAR (*arg) = g_value_get_char (value); break;
+ case G_TYPE_UCHAR: GTK_VALUE_UCHAR (*arg) = g_value_get_uchar (value); break;
+ case G_TYPE_BOOLEAN: GTK_VALUE_BOOL (*arg) = g_value_get_boolean (value); break;
+ case G_TYPE_INT: GTK_VALUE_INT (*arg) = g_value_get_int (value); break;
+ case G_TYPE_UINT: GTK_VALUE_UINT (*arg) = g_value_get_uint (value); break;
+ case G_TYPE_LONG: GTK_VALUE_LONG (*arg) = g_value_get_long (value); break;
+ case G_TYPE_ULONG: GTK_VALUE_ULONG (*arg) = g_value_get_ulong (value); break;
+ case G_TYPE_ENUM: GTK_VALUE_ENUM (*arg) = g_value_get_enum (value); break;
+ case G_TYPE_FLAGS: GTK_VALUE_FLAGS (*arg) = g_value_get_flags (value); break;
+ case G_TYPE_FLOAT: GTK_VALUE_FLOAT (*arg) = g_value_get_float (value); break;
+ case G_TYPE_DOUBLE: GTK_VALUE_DOUBLE (*arg) = g_value_get_double (value); break;
+ case G_TYPE_BOXED: GTK_VALUE_BOXED (*arg) = g_value_get_boxed (value); break;
+ case G_TYPE_POINTER: GTK_VALUE_POINTER (*arg) = g_value_get_pointer (value); break;
+ case G_TYPE_OBJECT: GTK_VALUE_POINTER (*arg) = g_value_get_object (value); break;
+ case G_TYPE_STRING: if (copy_string)
+ GTK_VALUE_STRING (*arg) = g_value_dup_string (value);
+ else
+ GTK_VALUE_STRING (*arg) = g_value_get_string (value);
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static inline gboolean
+gtk_arg_to_value (GtkArg *arg,
+ GValue *value)
+{
+ switch (G_TYPE_FUNDAMENTAL (arg->type))
+ {
+ case G_TYPE_CHAR: g_value_set_char (value, GTK_VALUE_CHAR (*arg)); break;
+ case G_TYPE_UCHAR: g_value_set_uchar (value, GTK_VALUE_UCHAR (*arg)); break;
+ case G_TYPE_BOOLEAN: g_value_set_boolean (value, GTK_VALUE_BOOL (*arg)); break;
+ case G_TYPE_INT: g_value_set_int (value, GTK_VALUE_INT (*arg)); break;
+ case G_TYPE_UINT: g_value_set_uint (value, GTK_VALUE_UINT (*arg)); break;
+ case G_TYPE_LONG: g_value_set_long (value, GTK_VALUE_LONG (*arg)); break;
+ case G_TYPE_ULONG: g_value_set_ulong (value, GTK_VALUE_ULONG (*arg)); break;
+ case G_TYPE_ENUM: g_value_set_enum (value, GTK_VALUE_ENUM (*arg)); break;
+ case G_TYPE_FLAGS: g_value_set_flags (value, GTK_VALUE_FLAGS (*arg)); break;
+ case G_TYPE_FLOAT: g_value_set_float (value, GTK_VALUE_FLOAT (*arg)); break;
+ case G_TYPE_DOUBLE: g_value_set_double (value, GTK_VALUE_DOUBLE (*arg)); break;
+ case G_TYPE_STRING: g_value_set_string (value, GTK_VALUE_STRING (*arg)); break;
+ case G_TYPE_BOXED: g_value_set_boxed (value, GTK_VALUE_BOXED (*arg)); break;
+ case G_TYPE_POINTER: g_value_set_pointer (value, GTK_VALUE_POINTER (*arg)); break;
+ case G_TYPE_OBJECT: g_value_set_object (value, GTK_VALUE_POINTER (*arg)); break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void
+gtk_arg_proxy_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer)
+{
+ GtkObjectClass *class = g_type_class_peek (pspec->owner_type);
+ GtkArg arg = { 0, };
+
+ g_return_if_fail (class->set_arg != NULL);
+
+ arg.type = G_VALUE_TYPE (value);
+ gtk_arg_set_from_value (&arg, value, FALSE);
+ arg.name = pspec->name;
+ class->set_arg (GTK_OBJECT (object), &arg, property_id);
+}
+
+static void
+gtk_arg_proxy_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer)
+{
+ GtkObjectClass *class = g_type_class_peek (pspec->owner_type);
+ GtkArg arg = { 0, };
+
+ g_return_if_fail (class->get_arg != NULL);
+
+ arg.type = G_VALUE_TYPE (value);
+ arg.name = pspec->name;
+ class->get_arg (GTK_OBJECT (object), &arg, property_id);
+ gtk_arg_to_value (&arg, value);
+}
+
+void
+gtk_object_add_arg_type (const gchar *arg_name,
+ GtkType arg_type,
+ guint arg_flags,
+ guint arg_id)
+{
+ GObjectClass *oclass;
+ GParamSpec *pspec;
+ gchar *type_name, *pname;
+ GType type;
+
+ g_return_if_fail (arg_name != NULL);
+ g_return_if_fail (arg_type > G_TYPE_NONE);
+ g_return_if_fail (arg_id > 0);
+ g_return_if_fail (arg_flags & GTK_ARG_READWRITE);
+ if (arg_flags & G_PARAM_CONSTRUCT)
+ g_return_if_fail ((arg_flags & G_PARAM_CONSTRUCT_ONLY) == 0);
+ if (arg_flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY))
+ g_return_if_fail (arg_flags & G_PARAM_WRITABLE);
+ g_return_if_fail ((arg_flags & ~(GTK_ARG_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)) == 0);
+
+ pname = strchr (arg_name, ':');
+ g_return_if_fail (pname && pname[1] == ':');
+
+ type_name = g_strndup (arg_name, pname - arg_name);
+ pname += 2;
+ type = g_type_from_name (type_name);
+ g_free (type_name);
+ g_return_if_fail (G_TYPE_IS_OBJECT (type));
+
+ oclass = gtk_type_class (type);
+ if (arg_flags & GTK_ARG_READABLE)
+ {
+ if (oclass->get_property && oclass->get_property != gtk_arg_proxy_get_property)
+ {
+ g_warning (G_STRLOC ": GtkArg compatibility code can't be mixed with customized %s.get_property() implementation",
+ g_type_name (type));
+ return;
+ }
+ oclass->get_property = gtk_arg_proxy_get_property;
+ }
+ if (arg_flags & GTK_ARG_WRITABLE)
+ {
+ if (oclass->set_property && oclass->set_property != gtk_arg_proxy_set_property)
+ {
+ g_warning (G_STRLOC ": GtkArg compatibility code can't be mixed with customized %s.set_property() implementation",
+ g_type_name (type));
+ return;
+ }
+ oclass->set_property = gtk_arg_proxy_set_property;
+ }
+ switch (G_TYPE_FUNDAMENTAL (arg_type))
+ {
+ case G_TYPE_ENUM:
+ pspec = g_param_spec_enum (pname, NULL, NULL, arg_type, 0, arg_flags);
+ break;
+ case G_TYPE_FLAGS:
+ pspec = g_param_spec_flags (pname, NULL, NULL, arg_type, 0, arg_flags);
+ break;
+ case G_TYPE_CHAR:
+ pspec = g_param_spec_char (pname, NULL, NULL, -128, 127, 0, arg_flags);
+ break;
+ case G_TYPE_UCHAR:
+ pspec = g_param_spec_uchar (pname, NULL, NULL, 0, 255, 0, arg_flags);
+ break;
+ case G_TYPE_BOOLEAN:
+ pspec = g_param_spec_boolean (pname, NULL, NULL, FALSE, arg_flags);
+ break;
+ case G_TYPE_INT:
+ pspec = g_param_spec_int (pname, NULL, NULL, -2147483647, 2147483647, 0, arg_flags);
+ break;
+ case G_TYPE_UINT:
+ pspec = g_param_spec_uint (pname, NULL, NULL, 0, 4294967295U, 0, arg_flags);
+ break;
+ case G_TYPE_FLOAT:
+ pspec = g_param_spec_float (pname, NULL, NULL, -1E+37, 1E+37, 0, arg_flags);
+ break;
+ case G_TYPE_DOUBLE:
+ pspec = g_param_spec_double (pname, NULL, NULL, -1E+307, 1E+307, 0, arg_flags);
+ break;
+ case G_TYPE_STRING:
+ pspec = g_param_spec_string (pname, NULL, NULL, NULL, arg_flags);
+ break;
+ case G_TYPE_OBJECT:
+ pspec = g_param_spec_object (pname, NULL, NULL, arg_type, arg_flags);
+ break;
+ case G_TYPE_BOXED:
+ if (!G_TYPE_IS_FUNDAMENTAL (arg_type))
+ {
+ pspec = g_param_spec_boxed (pname, NULL, NULL, arg_type, arg_flags);
+ break;
+ }
+ default:
+ g_warning (G_STRLOC ": Property type `%s' is not supported by the GtkArg compatibility code",
+ g_type_name (arg_type));
+ return;
+ }
+ g_object_class_install_property (oclass, arg_id, pspec);
}
static void
@@ -129,36 +314,18 @@ gtk_object_class_init (GtkObjectClass *class)
parent_class = g_type_class_ref (G_TYPE_OBJECT);
+ gobject_class->set_property = gtk_object_set_property;
+ gobject_class->get_property = gtk_object_get_property;
gobject_class->shutdown = gtk_object_shutdown;
gobject_class->finalize = gtk_object_finalize;
- class->get_arg = gtk_object_get_arg;
- class->set_arg = gtk_object_set_arg;
class->destroy = gtk_object_real_destroy;
- quark_carg_history = g_quark_from_static_string ("gtk-construct-arg-history");
-
- gtk_object_add_arg_type ("GtkObject::user_data",
- GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,
- ARG_USER_DATA);
- gtk_object_add_arg_type ("GtkObject::signal",
- GTK_TYPE_SIGNAL,
- GTK_ARG_WRITABLE,
- ARG_SIGNAL);
- gtk_object_add_arg_type ("GtkObject::signal_after",
- GTK_TYPE_SIGNAL,
- GTK_ARG_WRITABLE,
- ARG_SIGNAL_AFTER);
- gtk_object_add_arg_type ("GtkObject::object_signal",
- GTK_TYPE_SIGNAL,
- GTK_ARG_WRITABLE,
- ARG_OBJECT_SIGNAL);
- gtk_object_add_arg_type ("GtkObject::object_signal_after",
- GTK_TYPE_SIGNAL,
- GTK_ARG_WRITABLE,
- ARG_OBJECT_SIGNAL_AFTER);
-
+ g_object_class_install_property (gobject_class,
+ PROP_USER_DATA,
+ g_param_spec_pointer ("user_data", "User Data",
+ "Anonymous User Data Pointer",
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
object_signals[DESTROY] =
gtk_signal_new ("destroy",
G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | GTK_RUN_NO_HOOKS,
@@ -166,25 +333,13 @@ gtk_object_class_init (GtkObjectClass *class)
GTK_SIGNAL_OFFSET (GtkObjectClass, destroy),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (class, object_signals, LAST_SIGNAL);
}
static void
gtk_object_init (GtkObject *object,
GtkObjectClass *klass)
{
- gboolean needs_construction = FALSE;
-
GTK_OBJECT_FLAGS (object) = GTK_FLOATING;
- do
- {
- needs_construction |= klass->construct_args != NULL;
- klass = g_type_class_peek_parent (klass);
- }
- while (klass && GTK_IS_OBJECT_CLASS (klass) && !needs_construction);
- if (!needs_construction)
- GTK_OBJECT_FLAGS (object) |= GTK_CONSTRUCTED;
}
/********************************************
@@ -196,7 +351,6 @@ gtk_object_destroy (GtkObject *object)
{
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
- g_return_if_fail (GTK_OBJECT_CONSTRUCTED (object));
if (!GTK_OBJECT_DESTROYED (object))
{
@@ -251,171 +405,44 @@ gtk_object_finalize (GObject *gobject)
*****************************************/
static void
-gtk_object_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+gtk_object_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer)
{
- guint n = 0;
-
- switch (arg_id)
+ switch (property_id)
{
- gchar *arg_name;
-
- case ARG_USER_DATA:
- gtk_object_set_user_data (object, GTK_VALUE_POINTER (*arg));
- break;
- case ARG_OBJECT_SIGNAL_AFTER:
- n += 6;
- case ARG_OBJECT_SIGNAL:
- n += 1;
- case ARG_SIGNAL_AFTER:
- n += 6;
- case ARG_SIGNAL:
- n += 6;
- arg_name = gtk_arg_name_strip_type (arg->name);
- if (arg_name &&
- arg_name[n] == ':' &&
- arg_name[n + 1] == ':' &&
- arg_name[n + 2] != 0)
- {
- gtk_signal_connect_full (object,
- arg_name + n + 2,
- GTK_VALUE_SIGNAL (*arg).f, NULL,
- GTK_VALUE_SIGNAL (*arg).d,
- NULL,
- (arg_id == ARG_OBJECT_SIGNAL ||
- arg_id == ARG_OBJECT_SIGNAL_AFTER),
- (arg_id == ARG_OBJECT_SIGNAL_AFTER ||
- arg_id == ARG_SIGNAL_AFTER));
- }
- else
- g_warning ("gtk_object_set_arg(): invalid signal argument: \"%s\"\n", arg->name);
+ case PROP_USER_DATA:
+ gtk_object_set_user_data (GTK_OBJECT (object), g_value_get_pointer (value));
break;
default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
-gtk_object_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+gtk_object_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec,
+ const gchar *trailer)
{
- switch (arg_id)
+ switch (property_id)
{
- case ARG_USER_DATA:
- GTK_VALUE_POINTER (*arg) = gtk_object_get_user_data (object);
+ case PROP_USER_DATA:
+ g_return_if_fail (trailer != NULL);
+
+ g_value_set_pointer (value, gtk_object_get_user_data (GTK_OBJECT (object)));
break;
- case ARG_SIGNAL:
- case ARG_OBJECT_SIGNAL:
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
/*****************************************
- * gtk_object_class_add_signals:
- *
- * arguments:
- *
- * results:
- *****************************************/
-
-void
-gtk_object_class_add_signals (GtkObjectClass *class,
- guint *signals,
- guint nsignals)
-{
- g_return_if_fail (GTK_IS_OBJECT_CLASS (class));
- if (!nsignals)
- return;
- g_return_if_fail (signals != NULL);
-
- class->signals = g_renew (guint, class->signals, class->nsignals + nsignals);
- memcpy (class->signals + class->nsignals, signals, nsignals * sizeof (guint));
- class->nsignals += nsignals;
-}
-
-guint
-gtk_object_class_user_signal_new (GtkObjectClass *class,
- const gchar *name,
- GtkSignalRunType signal_flags,
- GtkSignalMarshaller marshaller,
- GtkType return_val,
- guint nparams,
- ...)
-{
- GtkType *params;
- guint i;
- va_list args;
- guint signal_id;
-
- g_return_val_if_fail (class != NULL, 0);
-
- if (nparams > 0)
- {
- params = g_new (GtkType, nparams);
-
- va_start (args, nparams);
-
- for (i = 0; i < nparams; i++)
- params[i] = va_arg (args, GtkType);
-
- va_end (args);
- }
- else
- params = NULL;
-
- signal_id = gtk_signal_newv (name,
- signal_flags,
- GTK_CLASS_TYPE (class),
- 0,
- marshaller,
- return_val,
- nparams,
- params);
-
- g_free (params);
-
- if (signal_id)
- gtk_object_class_add_signals (class, &signal_id, 1);
-
- return signal_id;
-}
-
-guint
-gtk_object_class_user_signal_newv (GtkObjectClass *class,
- const gchar *name,
- GtkSignalRunType signal_flags,
- GtkSignalMarshaller marshaller,
- GtkType return_val,
- guint nparams,
- GtkType *params)
-{
- guint signal_id;
-
- g_return_val_if_fail (class != NULL, 0);
-
- if (nparams > 0)
- g_return_val_if_fail (params != NULL, 0);
-
- signal_id = gtk_signal_newv (name,
- signal_flags,
- GTK_CLASS_TYPE (class),
- 0,
- marshaller,
- return_val,
- nparams,
- params);
-
- if (signal_id)
- gtk_object_class_add_signals (class, &signal_id, 1);
-
- return signal_id;
-}
-
-/*****************************************
* gtk_object_sink:
*
* arguments:
@@ -533,453 +560,49 @@ gtk_object_notify_weaks (GtkObject *object)
}
}
-/****************************************************
- * GtkObject argument mechanism and object creation
- *
- ****************************************************/
-
GtkObject*
gtk_object_new (GtkType object_type,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...)
{
GtkObject *object;
va_list var_args;
- GSList *arg_list = NULL;
- GSList *info_list = NULL;
- gchar *error;
g_return_val_if_fail (GTK_TYPE_IS_OBJECT (object_type), NULL);
- object = gtk_type_new (object_type);
-
- va_start (var_args, first_arg_name);
- error = gtk_object_args_collect (GTK_OBJECT_TYPE (object),
- &arg_list,
- &info_list,
- first_arg_name,
- var_args);
+ va_start (var_args, first_property_name);
+ object = g_object_new_valist (object_type, first_property_name, var_args);
va_end (var_args);
-
- if (error)
- {
- g_warning ("gtk_object_new(): %s", error);
- g_free (error);
- }
- else
- {
- GSList *slist_arg;
- GSList *slist_info;
-
- slist_arg = arg_list;
- slist_info = info_list;
- while (slist_arg)
- {
- gtk_object_arg_set (object, slist_arg->data, slist_info->data);
- slist_arg = slist_arg->next;
- slist_info = slist_info->next;
- }
- gtk_args_collect_cleanup (arg_list, info_list);
- }
-
- if (!GTK_OBJECT_CONSTRUCTED (object))
- gtk_object_default_construct (object);
-
- return object;
-}
-
-GtkObject*
-gtk_object_newv (GtkType object_type,
- guint n_args,
- GtkArg *args)
-{
- GtkObject *object;
- GtkArg *max_args;
-
- g_return_val_if_fail (GTK_TYPE_IS_OBJECT (object_type), NULL);
- if (n_args)
- g_return_val_if_fail (args != NULL, NULL);
-
- object = gtk_type_new (object_type);
-
- for (max_args = args + n_args; args < max_args; args++)
- gtk_object_arg_set (object, args, NULL);
-
- if (!GTK_OBJECT_CONSTRUCTED (object))
- gtk_object_default_construct (object);
return object;
}
void
-gtk_object_setv (GtkObject *object,
- guint n_args,
- GtkArg *args)
-{
- GtkArg *max_args;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
- if (n_args)
- g_return_if_fail (args != NULL);
-
- for (max_args = args + n_args; args < max_args; args++)
- gtk_object_arg_set (object, args, NULL);
-}
-
-void
-gtk_object_getv (GtkObject *object,
- guint n_args,
- GtkArg *args)
-{
- GtkArg *max_args;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
- if (n_args)
- g_return_if_fail (args != NULL);
-
- for (max_args = args + n_args; args < max_args; args++)
- gtk_object_arg_get (object, args, NULL);
-}
-
-void
gtk_object_get (GtkObject *object,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...)
{
va_list var_args;
- gchar *name;
g_return_if_fail (GTK_IS_OBJECT (object));
- va_start (var_args, first_arg_name);
-
- name = (gchar*) first_arg_name;
- while (name)
- {
- gpointer value_pointer = va_arg (var_args, gpointer);
-
- if (value_pointer)
- {
- GtkArgInfo *info;
- gchar *error;
- GtkArg arg;
-
- error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
- object_arg_info_ht,
- name,
- &info);
- if (error)
- {
- g_warning ("gtk_object_get(): %s", error);
- g_free (error);
- return;
- }
-
- arg.name = name;
- gtk_object_arg_get (object, &arg, info);
- gtk_arg_to_valueloc (&arg, value_pointer);
- }
-
- name = va_arg (var_args, gchar*);
- }
+ va_start (var_args, first_property_name);
+ g_object_get_valist (G_OBJECT (object), first_property_name, var_args);
+ va_end (var_args);
}
void
-gtk_object_set (GtkObject *object,
- const gchar *first_arg_name,
+gtk_object_set (GtkObject *object,
+ const gchar *first_property_name,
...)
{
va_list var_args;
- GSList *arg_list = NULL;
- GSList *info_list = NULL;
- gchar *error;
- g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
- va_start (var_args, first_arg_name);
- error = gtk_object_args_collect (GTK_OBJECT_TYPE (object),
- &arg_list,
- &info_list,
- first_arg_name,
- var_args);
+ va_start (var_args, first_property_name);
+ g_object_set_valist (G_OBJECT (object), first_property_name, var_args);
va_end (var_args);
-
- if (error)
- {
- g_warning ("gtk_object_set(): %s", error);
- g_free (error);
- }
- else
- {
- GSList *slist_arg;
- GSList *slist_info;
-
- slist_arg = arg_list;
- slist_info = info_list;
- while (slist_arg)
- {
- gtk_object_arg_set (object, slist_arg->data, slist_info->data);
- slist_arg = slist_arg->next;
- slist_info = slist_info->next;
- }
- gtk_args_collect_cleanup (arg_list, info_list);
- }
-}
-
-void
-gtk_object_arg_set (GtkObject *object,
- GtkArg *arg,
- GtkArgInfo *info)
-{
- GtkObjectClass *oclass;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
- g_return_if_fail (arg != NULL);
-
- if (!info)
- {
- gchar *error;
-
- error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
- object_arg_info_ht,
- arg->name,
- &info);
- if (error)
- {
- g_warning ("gtk_object_arg_set(): %s", error);
- g_free (error);
- return;
- }
- }
-
- if (info->arg_flags & GTK_ARG_CONSTRUCT_ONLY &&
- GTK_OBJECT_CONSTRUCTED (object))
- {
- g_warning ("gtk_object_arg_set(): cannot set argument \"%s\" for constructed object",
- info->full_name);
- return;
- }
- if (!(info->arg_flags & GTK_ARG_WRITABLE))
- {
- g_warning ("gtk_object_arg_set(): argument \"%s\" is not writable",
- info->full_name);
- return;
- }
- if (info->type != arg->type)
- {
- g_warning ("gtk_object_arg_set(): argument \"%s\" has invalid type `%s'",
- info->full_name,
- gtk_type_name (arg->type));
- return;
- }
-
- oclass = gtk_type_class (info->class_type);
- g_assert (oclass->set_arg != NULL);
- oclass->set_arg (object, arg, info->arg_id);
- if (!GTK_OBJECT_CONSTRUCTED (object) &&
- (info->arg_flags & GTK_ARG_CONSTRUCT_ONLY ||
- info->arg_flags & GTK_ARG_CONSTRUCT))
- {
- GSList *slist;
-
- slist = gtk_object_get_data_by_id (object, quark_carg_history);
- gtk_object_set_data_by_id (object,
- quark_carg_history,
- g_slist_prepend (slist, info));
- }
-}
-
-void
-gtk_object_arg_get (GtkObject *object,
- GtkArg *arg,
- GtkArgInfo *info)
-{
- GtkObjectClass *oclass;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
- g_return_if_fail (arg != NULL);
-
- if (!info)
- {
- gchar *error;
-
- error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
- object_arg_info_ht,
- arg->name,
- &info);
- if (error)
- {
- g_warning ("gtk_object_arg_get(): %s", error);
- g_free (error);
- arg->type = GTK_TYPE_INVALID;
- return;
- }
- }
-
- if (! (info->arg_flags & GTK_ARG_READABLE))
- {
- g_warning ("gtk_object_arg_get(): argument \"%s\" is not readable",
- info->full_name);
- arg->type = GTK_TYPE_INVALID;
- return;
- }
-
- oclass = gtk_type_class (info->class_type);
- g_assert (oclass->get_arg != NULL);
- arg->type = info->type;
- oclass->get_arg (object, arg, info->arg_id);
-}
-
-void
-gtk_object_default_construct (GtkObject *object)
-{
- GSList *slist;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
-
- if (!GTK_OBJECT_CONSTRUCTED (object))
- {
- for (slist = GTK_OBJECT_GET_CLASS (object)->construct_args;
- slist && !GTK_OBJECT_CONSTRUCTED (object);
- slist = slist->next)
- {
- GSList *history;
- GtkArgInfo *info;
-
- info = slist->data;
- history = gtk_object_get_data_by_id (object, quark_carg_history);
- if (!g_slist_find (history, info))
- {
- GtkArg arg;
-
- /* default application */
- arg.type = info->type;
- arg.name = info->name;
- switch (G_TYPE_FUNDAMENTAL (arg.type))
- {
- case GTK_TYPE_FLOAT:
- GTK_VALUE_FLOAT (arg) = 0.0;
- break;
- case GTK_TYPE_DOUBLE:
- GTK_VALUE_DOUBLE (arg) = 0.0;
- break;
- case GTK_TYPE_BOXED:
- case GTK_TYPE_STRING:
- case GTK_TYPE_POINTER:
- case G_TYPE_OBJECT:
- GTK_VALUE_POINTER (arg) = NULL;
- break;
- default:
- memset (&arg.d, 0, sizeof (arg.d));
- break;
- }
- gtk_object_arg_set (object, &arg, info);
- }
- }
-
- if (!GTK_OBJECT_CONSTRUCTED (object))
- gtk_object_constructed (object);
- }
-}
-
-void
-gtk_object_constructed (GtkObject *object)
-{
- g_return_if_fail (object != NULL);
- g_return_if_fail (GTK_IS_OBJECT (object));
- g_return_if_fail (GTK_OBJECT_CONSTRUCTED (object) == FALSE);
-
- g_slist_free (gtk_object_get_data_by_id (object, quark_carg_history));
- gtk_object_set_data_by_id (object, quark_carg_history, NULL);
- GTK_OBJECT_FLAGS (object) |= GTK_CONSTRUCTED;
-}
-
-void
-gtk_object_add_arg_type (const char *arg_name,
- GtkType arg_type,
- guint arg_flags,
- guint arg_id)
-{
- GtkArgInfo *info;
-
- g_return_if_fail (arg_name != NULL);
- g_return_if_fail (arg_type > GTK_TYPE_NONE);
- g_return_if_fail (arg_id > 0);
- g_return_if_fail ((arg_flags & GTK_ARG_CHILD_ARG) == 0);
- if (arg_flags & GTK_ARG_CONSTRUCT)
- g_return_if_fail ((arg_flags & GTK_ARG_READWRITE) == GTK_ARG_READWRITE);
- else
- g_return_if_fail ((arg_flags & GTK_ARG_READWRITE) != 0);
- if (arg_flags & GTK_ARG_CONSTRUCT_ONLY)
- g_return_if_fail ((arg_flags & GTK_ARG_WRITABLE) == GTK_ARG_WRITABLE);
-
- if (!object_arg_info_ht)
- object_arg_info_ht = g_hash_table_new (gtk_arg_info_hash,
- gtk_arg_info_equal);
-
- info = gtk_arg_type_new_static (GTK_TYPE_OBJECT,
- arg_name,
- GTK_STRUCT_OFFSET (GtkObjectClass, n_args),
- object_arg_info_ht,
- arg_type,
- arg_flags,
- arg_id);
- if (info &&
- (info->arg_flags & GTK_ARG_CONSTRUCT ||
- info->arg_flags & GTK_ARG_CONSTRUCT_ONLY))
- {
- GtkObjectClass *class;
-
- class = gtk_type_class (info->class_type);
- if (info->arg_flags & GTK_ARG_CONSTRUCT_ONLY)
- class->construct_args = g_slist_prepend (class->construct_args, info);
- else
- class->construct_args = g_slist_append (class->construct_args, info);
- }
-}
-
-gchar*
-gtk_object_args_collect (GtkType object_type,
- GSList **arg_list_p,
- GSList **info_list_p,
- const gchar *first_arg_name,
- va_list var_args)
-{
- return gtk_args_collect (object_type,
- object_arg_info_ht,
- arg_list_p,
- info_list_p,
- first_arg_name,
- var_args);
-}
-
-gchar*
-gtk_object_arg_get_info (GtkType object_type,
- const gchar *arg_name,
- GtkArgInfo **info_p)
-{
- return gtk_arg_get_info (object_type,
- object_arg_info_ht,
- arg_name,
- info_p);
-}
-
-GtkArg*
-gtk_object_query_args (GtkType class_type,
- guint32 **arg_flags,
- guint *n_args)
-{
- g_return_val_if_fail (n_args != NULL, NULL);
- *n_args = 0;
- g_return_val_if_fail (GTK_TYPE_IS_OBJECT (class_type), NULL);
-
- return gtk_args_query (class_type, object_arg_info_ht, arg_flags, n_args);
}
/*****************************************
diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h
index 7c819d3a4..239c21d07 100644
--- a/gtk/gtkobject.h
+++ b/gtk/gtkobject.h
@@ -64,8 +64,8 @@ typedef enum
{
GTK_DESTROYED = 1 << 0,
GTK_FLOATING = 1 << 1,
- GTK_RESERVED = 1 << 2,
- GTK_CONSTRUCTED = 1 << 3
+ GTK_RESERVED_1 = 1 << 2,
+ GTK_RESERVED_2 = 1 << 3
} GtkObjectFlags;
/* Macros for extracting the object_flags from GtkObject.
@@ -74,29 +74,12 @@ typedef enum
#define GTK_OBJECT_DESTROYED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_DESTROYED) != 0)
#define GTK_OBJECT_FLOATING(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_FLOATING) != 0)
#define GTK_OBJECT_CONNECTED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_CONNECTED) != 0)
-#define GTK_OBJECT_CONSTRUCTED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_CONSTRUCTED) != 0)
/* Macros for setting and clearing bits in the object_flags field of GtkObject.
*/
#define GTK_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (GTK_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END
#define GTK_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (GTK_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END
-/* GtkArg flag bits for gtk_object_add_arg_type
- */
-typedef enum
-{
- GTK_ARG_READABLE = 1 << 0,
- GTK_ARG_WRITABLE = 1 << 1,
- GTK_ARG_CONSTRUCT = 1 << 2,
- GTK_ARG_CONSTRUCT_ONLY = 1 << 3,
- GTK_ARG_CHILD_ARG = 1 << 4,
- GTK_ARG_MASK = 0x1f,
-
- /* aliases
- */
- GTK_ARG_READWRITE = GTK_ARG_READABLE | GTK_ARG_WRITABLE
-} GtkArgFlags;
-
typedef struct _GtkObjectClass GtkObjectClass;
@@ -121,27 +104,11 @@ struct _GtkObject
* it ``inherits'' from the GtkTypeClass by mirroring its fields, which
* must always be kept in sync completely. The GtkObjectClass defines
* the basic necessities for the object inheritance mechanism to work.
- * Namely, the `signals' and `nsignals' fields as well as the function
- * pointers, required to end an object's lifetime.
*/
struct _GtkObjectClass
{
GObjectClass parent_class;
- /* The signals this object class handles. "signals" is an
- * array of signal ID's.
- */
- guint *signals;
-
- /* The number of signals listed in "signals".
- */
- guint nsignals;
-
- /* The number of arguments per class.
- */
- guint n_args;
- GSList *construct_args;
-
/* Non overridable class methods to set and get per class arguments */
void (*set_arg) (GtkObject *object,
GtkArg *arg,
@@ -158,7 +125,7 @@ struct _GtkObjectClass
* own cleanup. (See the destroy function for GtkWidget for
* an example of how to do this).
*/
- void (* destroy) (GtkObject *object);
+ void (*destroy) (GtkObject *object);
};
@@ -167,31 +134,11 @@ struct _GtkObjectClass
GtkType gtk_object_get_type (void) G_GNUC_CONST;
-/* Append a user defined signal without default handler to a class. */
-guint gtk_object_class_user_signal_new (GtkObjectClass *klass,
- const gchar *name,
- GtkSignalRunType signal_flags,
- GtkSignalMarshaller marshaller,
- GtkType return_val,
- guint nparams,
- ...);
-guint gtk_object_class_user_signal_newv (GtkObjectClass *klass,
- const gchar *name,
- GtkSignalRunType signal_flags,
- GtkSignalMarshaller marshaller,
- GtkType return_val,
- guint nparams,
- GtkType *params);
GtkObject* gtk_object_new (GtkType type,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...);
-GtkObject* gtk_object_newv (GtkType object_type,
- guint n_args,
- GtkArg *args);
GtkObject* gtk_object_ref (GtkObject *object);
void gtk_object_unref (GtkObject *object);
-void gtk_object_default_construct (GtkObject *object);
-void gtk_object_constructed (GtkObject *object);
void gtk_object_sink (GtkObject *object);
void gtk_object_weakref (GtkObject *object,
GtkDestroyNotify notify,
@@ -201,46 +148,6 @@ void gtk_object_weakunref (GtkObject *object,
gpointer data);
void gtk_object_destroy (GtkObject *object);
-/* gtk_object_getv() sets an arguments type and value, or just
- * its type to GTK_TYPE_INVALID.
- * if GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING, it's
- * the callers response to do a g_free (GTK_VALUE_STRING (arg));
- */
-void gtk_object_getv (GtkObject *object,
- guint n_args,
- GtkArg *args);
-/* gtk_object_get() sets the variable values pointed to by the adresses
- * passed after the argument names according to the arguments value.
- * if GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING, it's
- * the callers response to do a g_free (retrived_value);
- */
-void gtk_object_get (GtkObject *object,
- const gchar *first_arg_name,
- ...);
-
-/* gtk_object_set() takes a variable argument list of the form:
- * (..., gchar *arg_name, ARG_VALUES, [repeatedly name/value pairs,] NULL)
- * where ARG_VALUES type depend on the argument and can consist of
- * more than one c-function argument.
- */
-void gtk_object_set (GtkObject *object,
- const gchar *first_arg_name,
- ...);
-void gtk_object_setv (GtkObject *object,
- guint n_args,
- GtkArg *args);
-
-/* Allocate a GtkArg array of size nargs that hold the
- * names and types of the args that can be used with
- * gtk_object_set/gtk_object_get. if (arg_flags!=NULL),
- * (*arg_flags) will be set to point to a newly allocated
- * guint array that holds the flags of the args.
- * It is the callers response to do a
- * g_free (returned_args); g_free (*arg_flags).
- */
-GtkArg* gtk_object_query_args (GtkType class_type,
- guint32 **arg_flags,
- guint *n_args);
/* Set 'data' to the "object_data" field of the object. The
* data is indexed by the "key". If there is already data
@@ -280,16 +187,6 @@ gpointer gtk_object_get_user_data (GtkObject *object);
/* Object-level methods */
-/* Append "signals" to those already defined in "class". */
-void gtk_object_class_add_signals (GtkObjectClass *klass,
- guint *signals,
- guint nsignals);
-/* the `arg_name' argument needs to be a const static string */
-void gtk_object_add_arg_type (const gchar *arg_name,
- GtkType arg_type,
- guint arg_flags,
- guint arg_id);
-
/* Object data method variants that operate on key ids. */
void gtk_object_set_data_by_id (GtkObject *object,
GQuark data_id,
@@ -310,25 +207,28 @@ void gtk_object_remove_no_notify_by_id (GtkObject *object,
/* Non-public methods */
-void gtk_object_arg_set (GtkObject *object,
- GtkArg *arg,
- GtkArgInfo *info);
-void gtk_object_arg_get (GtkObject *object,
- GtkArg *arg,
- GtkArgInfo *info);
-gchar* gtk_object_args_collect (GtkType object_type,
- GSList **arg_list_p,
- GSList **info_list_p,
- const gchar *first_arg_name,
- va_list var_args);
-gchar* gtk_object_arg_get_info (GtkType object_type,
- const gchar *arg_name,
- GtkArgInfo **info_p);
-
-
-
-
+/* GtkArg flag bits for gtk_object_add_arg_type
+ */
+typedef enum
+{
+ GTK_ARG_READABLE = G_PARAM_READABLE,
+ GTK_ARG_WRITABLE = G_PARAM_WRITABLE,
+ GTK_ARG_CONSTRUCT = G_PARAM_CONSTRUCT,
+ GTK_ARG_CONSTRUCT_ONLY = G_PARAM_CONSTRUCT_ONLY,
+ GTK_ARG_CHILD_ARG = 1 << 4,
+} GtkArgFlags;
+#define GTK_ARG_READWRITE (GTK_ARG_READABLE | GTK_ARG_WRITABLE)
+void gtk_object_get (GtkObject *object,
+ const gchar *first_property_name,
+ ...);
+void gtk_object_set (GtkObject *object,
+ const gchar *first_property_name,
+ ...);
+void gtk_object_add_arg_type (const gchar *arg_name,
+ GtkType arg_type,
+ guint arg_flags,
+ guint arg_id);
#ifdef __cplusplus
diff --git a/gtk/gtkoldeditable.c b/gtk/gtkoldeditable.c
index a085d0639..ee3bdbb79 100644
--- a/gtk/gtkoldeditable.c
+++ b/gtk/gtkoldeditable.c
@@ -174,6 +174,38 @@ gtk_old_editable_class_init (GtkOldEditableClass *class)
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+
+ object_class->set_arg = gtk_old_editable_set_arg;
+ object_class->get_arg = gtk_old_editable_get_arg;
+
+ widget_class->selection_clear_event = gtk_old_editable_selection_clear;
+ widget_class->selection_received = gtk_old_editable_selection_received;
+ widget_class->selection_get = gtk_old_editable_selection_get;
+
+ class->insert_text = NULL;
+ class->delete_text = NULL;
+
+ class->activate = NULL;
+ class->set_editable = gtk_old_editable_real_set_editable;
+
+ class->move_cursor = NULL;
+ class->move_word = NULL;
+ class->move_page = NULL;
+ class->move_to_row = NULL;
+ class->move_to_column = NULL;
+
+ class->kill_char = NULL;
+ class->kill_word = NULL;
+ class->kill_line = NULL;
+
+ class->cut_clipboard = gtk_old_editable_real_cut_clipboard;
+ class->copy_clipboard = gtk_old_editable_real_copy_clipboard;
+ class->paste_clipboard = gtk_old_editable_real_paste_clipboard;
+
+ class->update_text = NULL;
+ class->get_chars = NULL;
+ class->set_selection = NULL;
+ class->set_position = NULL;
editable_signals[CHANGED] =
gtk_signal_new ("changed",
@@ -322,42 +354,8 @@ gtk_old_editable_class_init (GtkOldEditableClass *class)
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, editable_signals, LAST_SIGNAL);
-
gtk_object_add_arg_type ("GtkOldEditable::text_position", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TEXT_POSITION);
gtk_object_add_arg_type ("GtkOldEditable::editable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EDITABLE);
-
- object_class->set_arg = gtk_old_editable_set_arg;
- object_class->get_arg = gtk_old_editable_get_arg;
-
- widget_class->selection_clear_event = gtk_old_editable_selection_clear;
- widget_class->selection_received = gtk_old_editable_selection_received;
- widget_class->selection_get = gtk_old_editable_selection_get;
-
- class->insert_text = NULL;
- class->delete_text = NULL;
-
- class->activate = NULL;
- class->set_editable = gtk_old_editable_real_set_editable;
-
- class->move_cursor = NULL;
- class->move_word = NULL;
- class->move_page = NULL;
- class->move_to_row = NULL;
- class->move_to_column = NULL;
-
- class->kill_char = NULL;
- class->kill_word = NULL;
- class->kill_line = NULL;
-
- class->cut_clipboard = gtk_old_editable_real_cut_clipboard;
- class->copy_clipboard = gtk_old_editable_real_copy_clipboard;
- class->paste_clipboard = gtk_old_editable_real_paste_clipboard;
-
- class->update_text = NULL;
- class->get_chars = NULL;
- class->set_selection = NULL;
- class->set_position = NULL;
}
static void
diff --git a/gtk/gtkpacker.c b/gtk/gtkpacker.c
index 3609bfeb4..243ef092e 100644
--- a/gtk/gtkpacker.c
+++ b/gtk/gtkpacker.c
@@ -215,7 +215,7 @@ gtk_packer_class_init (GtkPackerClass *klass)
gtk_container_add_child_arg_type ("GtkPacker::pad_y", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_PAD_Y);
gtk_container_add_child_arg_type ("GtkPacker::ipad_x", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_I_PAD_X);
gtk_container_add_child_arg_type ("GtkPacker::ipad_y", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_I_PAD_Y);
- gtk_container_add_child_arg_type ("GtkPacker::position", GTK_TYPE_LONG, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
+ gtk_container_add_child_arg_type ("GtkPacker::position", GTK_TYPE_INT, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
object_class->set_arg = gtk_packer_set_arg;
object_class->get_arg = gtk_packer_get_arg;
@@ -398,7 +398,7 @@ gtk_packer_set_child_arg (GtkContainer *container,
case CHILD_ARG_POSITION:
gtk_packer_reorder_child (packer,
child,
- GTK_VALUE_LONG (*arg));
+ GTK_VALUE_INT (*arg));
break;
default:
break;
@@ -476,16 +476,16 @@ gtk_packer_get_child_arg (GtkContainer *container,
GTK_VALUE_UINT (*arg) = child_info->i_pad_y;
break;
case CHILD_ARG_POSITION:
- GTK_VALUE_LONG (*arg) = 0;
+ GTK_VALUE_INT (*arg) = 0;
for (list = packer->children; list; list = list->next)
{
child_info = list->data;
if (child_info->widget == child)
break;
- GTK_VALUE_LONG (*arg)++;
+ GTK_VALUE_INT (*arg)++;
}
if (!list)
- GTK_VALUE_LONG (*arg) = -1;
+ GTK_VALUE_INT (*arg) = -1;
break;
default:
arg->type = GTK_TYPE_INVALID;
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 2c9d113ed..d8f6f3265 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -139,7 +139,7 @@ gtk_progress_bar_class_init (GtkProgressBarClass *class)
gtk_object_add_arg_type ("GtkProgressBar::pulse_step",
GTK_TYPE_FLOAT,
GTK_ARG_READWRITE,
- ARG_FRACTION);
+ ARG_PULSE_STEP);
object_class->set_arg = gtk_progress_bar_set_arg;
object_class->get_arg = gtk_progress_bar_get_arg;
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 2c5d6abf0..5e35c9574 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -245,8 +245,6 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
GTK_SIGNAL_OFFSET (GtkSpinButtonClass, output),
gtk_marshal_BOOLEAN__VOID,
GTK_TYPE_BOOL, 0);
-
- gtk_object_class_add_signals (object_class, spinbutton_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index c5bb68b9d..1c0d34377 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -114,7 +114,6 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
GTK_TYPE_NONE, 2,
GTK_TYPE_UINT,
GTK_TYPE_STRING);
- gtk_object_class_add_signals (object_class, statusbar_signals, SIGNAL_LAST);
}
static void
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index e6ff89e3c..d3f7f2cca 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -135,6 +135,14 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ gobject_class->finalize = gtk_text_buffer_finalize;
+
+ klass->insert_text = gtk_text_buffer_real_insert_text;
+ klass->delete_text = gtk_text_buffer_real_delete_text;
+ klass->apply_tag = gtk_text_buffer_real_apply_tag;
+ klass->remove_tag = gtk_text_buffer_real_remove_tag;
+ klass->changed = gtk_text_buffer_real_changed;
+
signals[INSERT_TEXT] =
gtk_signal_new ("insert_text",
GTK_RUN_LAST,
@@ -222,16 +230,6 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_TYPE_OBJECT,
GTK_TYPE_TEXT_ITER,
GTK_TYPE_TEXT_ITER);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- gobject_class->finalize = gtk_text_buffer_finalize;
-
- klass->insert_text = gtk_text_buffer_real_insert_text;
- klass->delete_text = gtk_text_buffer_real_delete_text;
- klass->apply_tag = gtk_text_buffer_real_apply_tag;
- klass->remove_tag = gtk_text_buffer_real_remove_tag;
- klass->changed = gtk_text_buffer_real_changed;
}
void
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index ba758f99d..25d4b16c2 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -163,6 +163,13 @@ gtk_text_layout_class_init (GtkTextLayoutClass *klass)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ object_class->destroy = gtk_text_layout_destroy;
+ gobject_class->finalize = gtk_text_layout_finalize;
+
+ klass->wrap = gtk_text_layout_real_wrap;
+ klass->invalidate = gtk_text_layout_real_invalidate;
+ klass->free_line_data = gtk_text_layout_real_free_line_data;
+
signals[INVALIDATED] =
gtk_signal_new ("invalidated",
GTK_RUN_LAST,
@@ -195,15 +202,6 @@ gtk_text_layout_class_init (GtkTextLayoutClass *klass)
GTK_TYPE_OBJECT,
GTK_TYPE_INT,
GTK_TYPE_INT);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- object_class->destroy = gtk_text_layout_destroy;
- gobject_class->finalize = gtk_text_layout_finalize;
-
- klass->wrap = gtk_text_layout_real_wrap;
- klass->invalidate = gtk_text_layout_real_invalidate;
- klass->free_line_data = gtk_text_layout_real_free_line_data;
}
void
diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c
index e812b1477..f0a54326c 100644
--- a/gtk/gtktexttag.c
+++ b/gtk/gtktexttag.c
@@ -181,6 +181,12 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ object_class->set_arg = gtk_text_tag_set_arg;
+ object_class->get_arg = gtk_text_tag_get_arg;
+
+ object_class->destroy = gtk_text_tag_destroy;
+ gobject_class->finalize = gtk_text_tag_finalize;
+
/* Construct */
gtk_object_add_arg_type ("GtkTextTag::name", GTK_TYPE_STRING,
GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
@@ -324,14 +330,6 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
G_TYPE_OBJECT,
GTK_TYPE_GDK_EVENT,
GTK_TYPE_TEXT_ITER);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- object_class->set_arg = gtk_text_tag_set_arg;
- object_class->get_arg = gtk_text_tag_get_arg;
-
- object_class->destroy = gtk_text_tag_destroy;
- gobject_class->finalize = gtk_text_tag_finalize;
}
void
diff --git a/gtk/gtktexttagtable.c b/gtk/gtktexttagtable.c
index 9386fd157..bf6fc6c99 100644
--- a/gtk/gtktexttagtable.c
+++ b/gtk/gtktexttagtable.c
@@ -58,6 +58,12 @@ gtk_text_tag_table_class_init (GtkTextTagTableClass *klass)
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+ object_class->set_arg = gtk_text_tag_table_set_arg;
+ object_class->get_arg = gtk_text_tag_table_get_arg;
+
+ object_class->destroy = gtk_text_tag_table_destroy;
+ gobject_class->finalize = gtk_text_tag_table_finalize;
+
signals[TAG_CHANGED] =
gtk_signal_new ("tag_changed",
GTK_RUN_LAST,
@@ -88,15 +94,6 @@ gtk_text_tag_table_class_init (GtkTextTagTableClass *klass)
GTK_TYPE_NONE,
1,
G_TYPE_OBJECT);
-
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- object_class->set_arg = gtk_text_tag_table_set_arg;
- object_class->get_arg = gtk_text_tag_table_get_arg;
-
- object_class->destroy = gtk_text_tag_table_destroy;
- gobject_class->finalize = gtk_text_tag_table_finalize;
}
void
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 3bb70459b..35a4747bb 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -376,6 +376,55 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+ /* Default handlers and virtual methods
+ */
+ object_class->set_arg = gtk_text_view_set_arg;
+ object_class->get_arg = gtk_text_view_get_arg;
+
+ object_class->destroy = gtk_text_view_destroy;
+ gobject_class->finalize = gtk_text_view_finalize;
+
+ widget_class->realize = gtk_text_view_realize;
+ widget_class->unrealize = gtk_text_view_unrealize;
+ widget_class->style_set = gtk_text_view_style_set;
+ widget_class->direction_changed = gtk_text_view_direction_changed;
+ widget_class->size_request = gtk_text_view_size_request;
+ widget_class->size_allocate = gtk_text_view_size_allocate;
+ widget_class->event = gtk_text_view_event;
+ widget_class->key_press_event = gtk_text_view_key_press_event;
+ widget_class->key_release_event = gtk_text_view_key_release_event;
+ widget_class->button_press_event = gtk_text_view_button_press_event;
+ widget_class->button_release_event = gtk_text_view_button_release_event;
+ widget_class->focus_in_event = gtk_text_view_focus_in_event;
+ widget_class->focus_out_event = gtk_text_view_focus_out_event;
+ widget_class->motion_notify_event = gtk_text_view_motion_event;
+ widget_class->expose_event = gtk_text_view_expose_event;
+ widget_class->draw_focus = gtk_text_view_draw_focus;
+
+ widget_class->drag_begin = gtk_text_view_drag_begin;
+ widget_class->drag_end = gtk_text_view_drag_end;
+ widget_class->drag_data_get = gtk_text_view_drag_data_get;
+ widget_class->drag_data_delete = gtk_text_view_drag_data_delete;
+
+ widget_class->drag_leave = gtk_text_view_drag_leave;
+ widget_class->drag_motion = gtk_text_view_drag_motion;
+ widget_class->drag_drop = gtk_text_view_drag_drop;
+ widget_class->drag_data_received = gtk_text_view_drag_data_received;
+
+ container_class->add = gtk_text_view_add;
+ container_class->remove = gtk_text_view_remove;
+ container_class->forall = gtk_text_view_forall;
+
+ klass->move_cursor = gtk_text_view_move_cursor;
+ klass->set_anchor = gtk_text_view_set_anchor;
+ klass->insert_at_cursor = gtk_text_view_insert_at_cursor;
+ klass->delete_from_cursor = gtk_text_view_delete_from_cursor;
+ klass->cut_clipboard = gtk_text_view_cut_clipboard;
+ klass->copy_clipboard = gtk_text_view_copy_clipboard;
+ klass->paste_clipboard = gtk_text_view_paste_clipboard;
+ klass->toggle_overwrite = gtk_text_view_toggle_overwrite;
+ klass->set_scroll_adjustments = gtk_text_view_set_scroll_adjustments;
+
/*
* Arguments
*/
@@ -472,15 +521,14 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
- signals[SET_SCROLL_ADJUSTMENTS] = widget_class->set_scroll_adjustments_signal =
+ signals[SET_SCROLL_ADJUSTMENTS] =
gtk_signal_new ("set_scroll_adjustments",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTextViewClass, set_scroll_adjustments),
gtk_marshal_VOID__POINTER_POINTER,
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
+ widget_class->set_scroll_adjustments_signal = signals[SET_SCROLL_ADJUSTMENTS];
/*
* Key bindings
@@ -629,56 +677,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
"toggle_overwrite", 0);
-
- /*
- * Default handlers and virtual methods
- */
- object_class->set_arg = gtk_text_view_set_arg;
- object_class->get_arg = gtk_text_view_get_arg;
-
- object_class->destroy = gtk_text_view_destroy;
- gobject_class->finalize = gtk_text_view_finalize;
-
- widget_class->realize = gtk_text_view_realize;
- widget_class->unrealize = gtk_text_view_unrealize;
- widget_class->style_set = gtk_text_view_style_set;
- widget_class->direction_changed = gtk_text_view_direction_changed;
- widget_class->size_request = gtk_text_view_size_request;
- widget_class->size_allocate = gtk_text_view_size_allocate;
- widget_class->event = gtk_text_view_event;
- widget_class->key_press_event = gtk_text_view_key_press_event;
- widget_class->key_release_event = gtk_text_view_key_release_event;
- widget_class->button_press_event = gtk_text_view_button_press_event;
- widget_class->button_release_event = gtk_text_view_button_release_event;
- widget_class->focus_in_event = gtk_text_view_focus_in_event;
- widget_class->focus_out_event = gtk_text_view_focus_out_event;
- widget_class->motion_notify_event = gtk_text_view_motion_event;
- widget_class->expose_event = gtk_text_view_expose_event;
- widget_class->draw_focus = gtk_text_view_draw_focus;
-
- widget_class->drag_begin = gtk_text_view_drag_begin;
- widget_class->drag_end = gtk_text_view_drag_end;
- widget_class->drag_data_get = gtk_text_view_drag_data_get;
- widget_class->drag_data_delete = gtk_text_view_drag_data_delete;
-
- widget_class->drag_leave = gtk_text_view_drag_leave;
- widget_class->drag_motion = gtk_text_view_drag_motion;
- widget_class->drag_drop = gtk_text_view_drag_drop;
- widget_class->drag_data_received = gtk_text_view_drag_data_received;
-
- container_class->add = gtk_text_view_add;
- container_class->remove = gtk_text_view_remove;
- container_class->forall = gtk_text_view_forall;
-
- klass->move_cursor = gtk_text_view_move_cursor;
- klass->set_anchor = gtk_text_view_set_anchor;
- klass->insert_at_cursor = gtk_text_view_insert_at_cursor;
- klass->delete_from_cursor = gtk_text_view_delete_from_cursor;
- klass->cut_clipboard = gtk_text_view_cut_clipboard;
- klass->copy_clipboard = gtk_text_view_copy_clipboard;
- klass->paste_clipboard = gtk_text_view_paste_clipboard;
- klass->toggle_overwrite = gtk_text_view_toggle_overwrite;
- klass->set_scroll_adjustments = gtk_text_view_set_scroll_adjustments;
}
void
diff --git a/gtk/gtktipsquery.c b/gtk/gtktipsquery.c
index a07328745..92d05166f 100644
--- a/gtk/gtktipsquery.c
+++ b/gtk/gtktipsquery.c
@@ -117,6 +117,18 @@ gtk_tips_query_class_init (GtkTipsQueryClass *class)
parent_class = gtk_type_class (gtk_label_get_type ());
+
+ object_class->set_arg = gtk_tips_query_set_arg;
+ object_class->get_arg = gtk_tips_query_get_arg;
+ object_class->destroy = gtk_tips_query_destroy;
+
+ widget_class->event = gtk_tips_query_event;
+
+ class->start_query = gtk_tips_query_real_start_query;
+ class->stop_query = gtk_tips_query_real_stop_query;
+ class->widget_entered = gtk_tips_query_widget_entered;
+ class->widget_selected = NULL;
+
gtk_object_add_arg_type ("GtkTipsQuery::emit_always", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EMIT_ALWAYS);
gtk_object_add_arg_type ("GtkTipsQuery::caller", GTK_TYPE_WIDGET, GTK_ARG_READWRITE, ARG_CALLER);
gtk_object_add_arg_type ("GtkTipsQuery::label_inactive", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL_INACTIVE);
@@ -157,18 +169,6 @@ gtk_tips_query_class_init (GtkTipsQueryClass *class)
GTK_TYPE_STRING,
GTK_TYPE_STRING,
GTK_TYPE_GDK_EVENT);
- gtk_object_class_add_signals (object_class, tips_query_signals, SIGNAL_LAST);
-
- object_class->set_arg = gtk_tips_query_set_arg;
- object_class->get_arg = gtk_tips_query_get_arg;
- object_class->destroy = gtk_tips_query_destroy;
-
- widget_class->event = gtk_tips_query_event;
-
- class->start_query = gtk_tips_query_real_start_query;
- class->stop_query = gtk_tips_query_real_stop_query;
- class->widget_entered = gtk_tips_query_widget_entered;
- class->widget_selected = NULL;
}
static void
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index d9fbee2b0..c1bb46856 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -114,18 +114,6 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
parent_class = gtk_type_class (GTK_TYPE_BUTTON);
- gtk_object_add_arg_type ("GtkToggleButton::active", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ACTIVE);
- gtk_object_add_arg_type ("GtkToggleButton::draw_indicator", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW_INDICATOR);
-
- toggle_button_signals[TOGGLED] =
- gtk_signal_new ("toggled",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkToggleButtonClass, toggled),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, toggle_button_signals, LAST_SIGNAL);
object_class->set_arg = gtk_toggle_button_set_arg;
object_class->get_arg = gtk_toggle_button_get_arg;
@@ -144,6 +132,17 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
button_class->leave = gtk_toggle_button_leave;
class->toggled = NULL;
+
+ gtk_object_add_arg_type ("GtkToggleButton::active", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ACTIVE);
+ gtk_object_add_arg_type ("GtkToggleButton::draw_indicator", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW_INDICATOR);
+
+ toggle_button_signals[TOGGLED] =
+ gtk_signal_new ("toggled",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkToggleButtonClass, toggled),
+ gtk_marshal_VOID__VOID,
+ GTK_TYPE_NONE, 0);
}
static void
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index de2dad801..d23eba5a6 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -138,25 +138,6 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
parent_class = gtk_type_class (gtk_container_get_type ());
- toolbar_signals[ORIENTATION_CHANGED] =
- gtk_signal_new ("orientation_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkToolbarClass, orientation_changed),
- gtk_marshal_VOID__INT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_INT);
- toolbar_signals[STYLE_CHANGED] =
- gtk_signal_new ("style_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkToolbarClass, style_changed),
- gtk_marshal_VOID__INT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_INT);
-
- gtk_object_class_add_signals (object_class, toolbar_signals, LAST_SIGNAL);
-
object_class->destroy = gtk_toolbar_destroy;
object_class->set_arg = gtk_toolbar_set_arg;
object_class->get_arg = gtk_toolbar_get_arg;
@@ -174,6 +155,23 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
class->orientation_changed = gtk_real_toolbar_orientation_changed;
class->style_changed = gtk_real_toolbar_style_changed;
+
+ toolbar_signals[ORIENTATION_CHANGED] =
+ gtk_signal_new ("orientation_changed",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkToolbarClass, orientation_changed),
+ gtk_marshal_VOID__INT,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_INT);
+ toolbar_signals[STYLE_CHANGED] =
+ gtk_signal_new ("style_changed",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkToolbarClass, style_changed),
+ gtk_marshal_VOID__INT,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_INT);
gtk_object_add_arg_type ("GtkToolbar::orientation", GTK_TYPE_ORIENTATION,
GTK_ARG_READWRITE, ARG_ORIENTATION);
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index c76d9da3e..2c845874f 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -110,6 +110,29 @@ gtk_tree_class_init (GtkTreeClass *class)
parent_class = gtk_type_class (gtk_container_get_type ());
+
+ object_class->destroy = gtk_tree_destroy;
+
+ widget_class->map = gtk_tree_map;
+ widget_class->unmap = gtk_tree_unmap;
+ widget_class->realize = gtk_tree_realize;
+ widget_class->expose_event = gtk_tree_expose;
+ widget_class->motion_notify_event = gtk_tree_motion_notify;
+ widget_class->button_press_event = gtk_tree_button_press;
+ widget_class->button_release_event = gtk_tree_button_release;
+ widget_class->size_request = gtk_tree_size_request;
+ widget_class->size_allocate = gtk_tree_size_allocate;
+
+ container_class->add = gtk_tree_add;
+ container_class->remove =
+ (void (*)(GtkContainer *, GtkWidget *)) gtk_tree_remove_item;
+ container_class->forall = gtk_tree_forall;
+ container_class->child_type = gtk_tree_child_type;
+
+ class->selection_changed = NULL;
+ class->select_child = gtk_real_tree_select_child;
+ class->unselect_child = gtk_real_tree_unselect_child;
+
tree_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_FIRST,
@@ -133,30 +156,6 @@ gtk_tree_class_init (GtkTreeClass *class)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
-
- gtk_object_class_add_signals (object_class, tree_signals, LAST_SIGNAL);
-
- object_class->destroy = gtk_tree_destroy;
-
- widget_class->map = gtk_tree_map;
- widget_class->unmap = gtk_tree_unmap;
- widget_class->realize = gtk_tree_realize;
- widget_class->expose_event = gtk_tree_expose;
- widget_class->motion_notify_event = gtk_tree_motion_notify;
- widget_class->button_press_event = gtk_tree_button_press;
- widget_class->button_release_event = gtk_tree_button_release;
- widget_class->size_request = gtk_tree_size_request;
- widget_class->size_allocate = gtk_tree_size_allocate;
-
- container_class->add = gtk_tree_add;
- container_class->remove =
- (void (*)(GtkContainer *, GtkWidget *)) gtk_tree_remove_item;
- container_class->forall = gtk_tree_forall;
- container_class->child_type = gtk_tree_child_type;
-
- class->selection_changed = NULL;
- class->select_child = gtk_real_tree_select_child;
- class->unselect_child = gtk_real_tree_unselect_child;
}
static GtkType
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 6f62870e6..dc4cb886e 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -133,30 +133,13 @@ gtk_tree_item_class_init (GtkTreeItemClass *class)
GtkContainerClass *container_class;
GtkItemClass *item_class;
+ parent_class = gtk_type_class (GTK_TYPE_ITEM);
+
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
item_class = (GtkItemClass*) class;
container_class = (GtkContainerClass*) class;
- parent_class = gtk_type_class (gtk_item_get_type ());
-
- tree_item_signals[EXPAND_TREE] =
- gtk_signal_new ("expand",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkTreeItemClass, expand),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
- tree_item_signals[COLLAPSE_TREE] =
- gtk_signal_new ("collapse",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkTreeItemClass, collapse),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, tree_item_signals, LAST_SIGNAL);
-
object_class->destroy = gtk_tree_item_destroy;
widget_class->realize = gtk_tree_item_realize;
@@ -178,6 +161,21 @@ gtk_tree_item_class_init (GtkTreeItemClass *class)
class->expand = gtk_real_tree_item_expand;
class->collapse = gtk_real_tree_item_collapse;
+
+ tree_item_signals[EXPAND_TREE] =
+ gtk_signal_new ("expand",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkTreeItemClass, expand),
+ gtk_marshal_VOID__VOID,
+ GTK_TYPE_NONE, 0);
+ tree_item_signals[COLLAPSE_TREE] =
+ gtk_signal_new ("collapse",
+ GTK_RUN_FIRST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkTreeItemClass, collapse),
+ gtk_marshal_VOID__VOID,
+ GTK_TYPE_NONE, 0);
}
/* callback for event box mouse event */
diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c
index ca7c30526..66d122124 100644
--- a/gtk/gtktreemodelsort.c
+++ b/gtk/gtktreemodelsort.c
@@ -173,6 +173,8 @@ gtk_tree_model_sort_class_init (GtkTreeModelSortClass *tree_model_sort_class)
object_class = (GObjectClass *) tree_model_sort_class;
+ object_class->finalize = gtk_tree_model_sort_finalize;
+
tree_model_sort_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_FIRST,
@@ -208,10 +210,6 @@ gtk_tree_model_sort_class_init (GtkTreeModelSortClass *tree_model_sort_class)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
-
- object_class->finalize = gtk_tree_model_sort_finalize;
-
- gtk_object_class_add_signals (GTK_OBJECT_CLASS (object_class), tree_model_sort_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c
index 4654a7de2..4487f3dc0 100644
--- a/gtk/gtktreeselection.c
+++ b/gtk/gtktreeselection.c
@@ -73,6 +73,8 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class)
object_class = (GtkObjectClass*) class;
parent_class = g_type_class_peek_parent (class);
+ class->selection_changed = NULL;
+
tree_selection_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_FIRST,
@@ -80,10 +82,6 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class)
GTK_SIGNAL_OFFSET (GtkTreeSelectionClass, selection_changed),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, tree_selection_signals, LAST_SIGNAL);
-
- class->selection_changed = NULL;
}
static void
diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c
index b57de7082..272464f42 100644
--- a/gtk/gtktreestore.c
+++ b/gtk/gtktreestore.c
@@ -146,8 +146,6 @@ gtk_tree_store_class_init (GtkTreeStoreClass *tree_store_class)
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GTK_TYPE_TREE_PATH);
-
- gtk_object_class_add_signals (object_class, tree_store_signals, LAST_SIGNAL);
}
static void
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index ca6e06f85..be5b21374 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -76,6 +76,8 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
parent_class = g_type_class_peek_parent (class);
+ class->clicked = gtk_real_tree_column_clicked;
+
tree_column_signals[CLICKED] =
gtk_signal_new ("clicked",
GTK_RUN_FIRST,
@@ -83,10 +85,6 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
GTK_SIGNAL_OFFSET (GtkTreeViewColumnClass, clicked),
gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, tree_column_signals, LAST_SIGNAL);
-
- class->clicked = gtk_real_tree_column_clicked;
}
static void
diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c
index 235b461d9..eae0e3f18 100644
--- a/gtk/gtktypeutils.c
+++ b/gtk/gtktypeutils.c
@@ -94,7 +94,7 @@ gtk_type_new (GtkType type)
g_return_val_if_fail (GTK_TYPE_IS_OBJECT (type), NULL);
- object = g_type_create_instance (type);
+ object = g_object_new (type, NULL);
return object;
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 315b256d4..c0d48baed 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -783,8 +783,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, widget_signals, LAST_SIGNAL);
}
static void
@@ -1038,7 +1036,7 @@ gtk_widget_init (GtkWidget *widget)
/**
* gtk_widget_new:
* @type: type ID of the widget to create
- * @first_arg_name: name of first property to set
+ * @first_property_name: name of first property to set
* @Varargs: value of first property, followed by more properties, NULL-terminated
*
* This is a convenience function for creating a widget and setting
@@ -1052,192 +1050,42 @@ gtk_widget_init (GtkWidget *widget)
**/
GtkWidget*
gtk_widget_new (GtkType type,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...)
{
- GtkObject *object;
+ GtkWidget *widget;
va_list var_args;
- GSList *arg_list = NULL;
- GSList *info_list = NULL;
- gchar *error;
g_return_val_if_fail (gtk_type_is_a (type, GTK_TYPE_WIDGET), NULL);
- object = gtk_type_new (type);
-
- va_start (var_args, first_arg_name);
- error = gtk_object_args_collect (GTK_OBJECT_TYPE (object),
- &arg_list,
- &info_list,
- first_arg_name,
- var_args);
+ va_start (var_args, first_property_name);
+ widget = g_object_new_valist (type, first_property_name, var_args);
va_end (var_args);
-
- if (error)
- {
- g_warning ("gtk_widget_new(): %s", error);
- g_free (error);
- }
- else
- {
- GSList *slist_arg;
- GSList *slist_info;
-
- slist_arg = arg_list;
- slist_info = info_list;
- while (slist_arg)
- {
- gtk_object_arg_set (object, slist_arg->data, slist_info->data);
- slist_arg = slist_arg->next;
- slist_info = slist_info->next;
- }
- gtk_args_collect_cleanup (arg_list, info_list);
- }
-
- if (!GTK_OBJECT_CONSTRUCTED (object))
- gtk_object_default_construct (object);
-
- return GTK_WIDGET (object);
-}
-
-/**
- * gtk_widget_newv:
- * @type: a #GtkType for the widget to create
- * @nargs: number of args in @args
- * @args: array of args specifying widget properties
- *
- * Same as gtk_widget_new(), but takes an array instead of using
- * varargs. This version is only useful if you need to construct
- * the args programmatically. Equivalent to gtk_object_newv(), but
- * returns a #GtkWidget so you don't have to case the object yourself.
- *
- * Return value: a #GtkWidget
- **/
-GtkWidget*
-gtk_widget_newv (GtkType type,
- guint nargs,
- GtkArg *args)
-{
- g_return_val_if_fail (gtk_type_is_a (type, GTK_TYPE_WIDGET), NULL);
-
- return GTK_WIDGET (gtk_object_newv (type, nargs, args));
-}
-
-/**
- * gtk_widget_get:
- * @widget: a #GtkWidget
- * @arg: single #GtkArg with the argument name filled in
- *
- * Queries the value of @arg, storing it in @arg.
- **/
-void
-gtk_widget_get (GtkWidget *widget,
- GtkArg *arg)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (arg != NULL);
-
- gtk_object_getv (GTK_OBJECT (widget), 1, arg);
-}
-/**
- * gtk_widget_getv:
- * @widget: a #GtkWidget
- * @nargs: number of args in @args
- * @args: array of #GtkArg
- *
- * Like calling gtk_widget_get() on each arg in @args.
- **/
-void
-gtk_widget_getv (GtkWidget *widget,
- guint nargs,
- GtkArg *args)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_object_getv (GTK_OBJECT (widget), nargs, args);
+ return widget;
}
/**
* gtk_widget_set:
* @widget: a #GtkWidget
- * @first_arg_name: name of first arg to set
- * @Varargs: value of first arg, then more name-value pairs, and %NULL-terminated
+ * @first_property_name: name of first property to set
+ * @Varargs: value of first property, followed by more properties, NULL-terminated
*
* Like gtk_object_set() - there's no reason to use this instead of
* gtk_object_set().
**/
void
gtk_widget_set (GtkWidget *widget,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...)
{
- GtkObject *object;
va_list var_args;
- GSList *arg_list = NULL;
- GSList *info_list = NULL;
- gchar *error;
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
- object = GTK_OBJECT (widget);
-
- va_start (var_args, first_arg_name);
- error = gtk_object_args_collect (GTK_OBJECT_TYPE (object),
- &arg_list,
- &info_list,
- first_arg_name,
- var_args);
+ va_start (var_args, first_property_name);
+ g_object_set_valist (G_OBJECT (widget), first_property_name, var_args);
va_end (var_args);
-
- if (error)
- {
- g_warning ("gtk_widget_set(): %s", error);
- g_free (error);
- }
- else
- {
- GSList *slist_arg;
- GSList *slist_info;
-
- slist_arg = arg_list;
- slist_info = info_list;
- while (slist_arg)
- {
- gtk_object_arg_set (object, slist_arg->data, slist_info->data);
- slist_arg = slist_arg->next;
- slist_info = slist_info->next;
- }
- gtk_args_collect_cleanup (arg_list, info_list);
- }
-}
-
-/**
- * gtk_widget_setv:
- * @widget: a #GtkWidget
- * @nargs: args in @args
- * @args: array of args to set on the widget
- *
- * Each arg in @args should have its name and value filled in. The
- * corresponding properties will be set on the
- * widget. gtk_object_set() is a more convenient version of this
- * function, since it takes varargs in place of the array. You may
- * need the array version to construct the list of args to set at
- * runtime.
- *
- **/
-void
-gtk_widget_setv (GtkWidget *widget,
- guint nargs,
- GtkArg *args)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_object_setv (GTK_OBJECT (widget), nargs, args);
}
static inline void
@@ -1416,7 +1264,6 @@ gtk_widget_destroy (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (GTK_OBJECT_CONSTRUCTED (widget));
gtk_object_destroy ((GtkObject*) widget);
}
@@ -2872,7 +2719,7 @@ gtk_widget_is_focus (GtkWidget *widget)
{
GtkWidget *toplevel;
- g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
toplevel = gtk_widget_get_toplevel (widget);
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 70bfd6b96..aa36d1572 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -398,27 +398,16 @@ struct _GtkWidgetShapeInfo
GtkType gtk_widget_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_widget_new (GtkType type,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...);
-GtkWidget* gtk_widget_newv (GtkType type,
- guint nargs,
- GtkArg *args);
GtkWidget* gtk_widget_ref (GtkWidget *widget);
void gtk_widget_unref (GtkWidget *widget);
void gtk_widget_destroy (GtkWidget *widget);
void gtk_widget_destroyed (GtkWidget *widget,
GtkWidget **widget_pointer);
-void gtk_widget_get (GtkWidget *widget,
- GtkArg *arg);
-void gtk_widget_getv (GtkWidget *widget,
- guint nargs,
- GtkArg *args);
void gtk_widget_set (GtkWidget *widget,
- const gchar *first_arg_name,
+ const gchar *first_property_name,
...);
-void gtk_widget_setv (GtkWidget *widget,
- guint nargs,
- GtkArg *args);
void gtk_widget_unparent (GtkWidget *widget);
void gtk_widget_show (GtkWidget *widget);
void gtk_widget_show_now (GtkWidget *widget);
@@ -658,7 +647,6 @@ void gtk_widget_class_path (GtkWidget *widget,
#endif /* GTK_TRACE_OBJECTS && __GNUC__ */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index bea9bb646..898748dae 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -218,28 +218,6 @@ gtk_window_class_init (GtkWindowClass *klass)
gobject_class->shutdown = gtk_window_shutdown;
gobject_class->finalize = gtk_window_finalize;
- gtk_object_add_arg_type ("GtkWindow::type", GTK_TYPE_WINDOW_TYPE, GTK_ARG_READWRITE, ARG_TYPE);
- gtk_object_add_arg_type ("GtkWindow::title", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE);
- gtk_object_add_arg_type ("GtkWindow::auto_shrink", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_AUTO_SHRINK);
- gtk_object_add_arg_type ("GtkWindow::allow_shrink", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_SHRINK);
- gtk_object_add_arg_type ("GtkWindow::allow_grow", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_GROW);
- gtk_object_add_arg_type ("GtkWindow::modal", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_MODAL);
- gtk_object_add_arg_type ("GtkWindow::window_position", GTK_TYPE_WINDOW_POSITION, GTK_ARG_READWRITE, ARG_WIN_POS);
- gtk_object_add_arg_type ("GtkWindow::default_width", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_WIDTH);
- gtk_object_add_arg_type ("GtkWindow::default_height", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_HEIGHT);
- gtk_object_add_arg_type ("GtkWindow::destroy_with_parent", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DESTROY_WITH_PARENT);
-
- window_signals[SET_FOCUS] =
- gtk_signal_new ("set_focus",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (GtkWindowClass, set_focus),
- gtk_marshal_VOID__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
-
- gtk_object_class_add_signals (object_class, window_signals, LAST_SIGNAL);
-
object_class->set_arg = gtk_window_set_arg;
object_class->get_arg = gtk_window_get_arg;
object_class->destroy = gtk_window_destroy;
@@ -266,6 +244,26 @@ gtk_window_class_init (GtkWindowClass *klass)
container_class->focus = gtk_window_focus;
klass->set_focus = gtk_window_real_set_focus;
+
+ gtk_object_add_arg_type ("GtkWindow::type", GTK_TYPE_WINDOW_TYPE, GTK_ARG_READWRITE, ARG_TYPE);
+ gtk_object_add_arg_type ("GtkWindow::title", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE);
+ gtk_object_add_arg_type ("GtkWindow::auto_shrink", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_AUTO_SHRINK);
+ gtk_object_add_arg_type ("GtkWindow::allow_shrink", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_SHRINK);
+ gtk_object_add_arg_type ("GtkWindow::allow_grow", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_GROW);
+ gtk_object_add_arg_type ("GtkWindow::modal", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_MODAL);
+ gtk_object_add_arg_type ("GtkWindow::window_position", GTK_TYPE_WINDOW_POSITION, GTK_ARG_READWRITE, ARG_WIN_POS);
+ gtk_object_add_arg_type ("GtkWindow::default_width", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_WIDTH);
+ gtk_object_add_arg_type ("GtkWindow::default_height", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_HEIGHT);
+ gtk_object_add_arg_type ("GtkWindow::destroy_with_parent", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DESTROY_WITH_PARENT);
+
+ window_signals[SET_FOCUS] =
+ gtk_signal_new ("set_focus",
+ GTK_RUN_LAST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (GtkWindowClass, set_focus),
+ gtk_marshal_VOID__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
}
static void
diff --git a/gtk/stock-icons/Makefile.am b/gtk/stock-icons/Makefile.am
index c11abfca2..6ea383e8c 100644
--- a/gtk/stock-icons/Makefile.am
+++ b/gtk/stock-icons/Makefile.am
@@ -1,8 +1,25 @@
-BUILT_SOURCES=gtkstockpixbufs.h
-IMAGES= dialog_error.png dialog_info.png dialog_question.png dialog_warning.png stock_button_apply.png stock_button_cancel.png stock_button_close.png stock_button_no.png stock_button_ok.png stock_button_yes.png stock_close.png stock_exit.png stock_help.png stock_new.png stock_open.png stock_save.png
+IMAGES = @STRIP_BEGIN@ \
+ dialog_error.png \
+ dialog_info.png \
+ dialog_question.png \
+ dialog_warning.png \
+ stock_button_apply.png \
+ stock_button_cancel.png \
+ stock_button_close.png \
+ stock_button_no.png \
+ stock_button_ok.png \
+ stock_button_yes.png \
+ stock_close.png \
+ stock_exit.png \
+ stock_help.png \
+ stock_new.png \
+ stock_open.png \
+ stock_save.png \
+@STRIP_END@
-VARIABLES= dialog_error dialog_error.png \
+VARIABLES = @STRIP_BEGIN@ \
+ dialog_error dialog_error.png \
dialog_info dialog_info.png \
dialog_question dialog_question.png \
dialog_warning dialog_warning.png \
@@ -17,15 +34,17 @@ VARIABLES= dialog_error dialog_error.png \
stock_help stock_help.png \
stock_new stock_new.png \
stock_open stock_open.png \
- stock_save stock_save.png
+ stock_save stock_save.png \
+@STRIP_END@
-gtkstockpixbufs.h: $(top_builddir)/gdk-pixbuf/make-inline-pixbuf $(IMAGES)
- (topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
- cd $(top_srcdir)/gtk/stock-icons && \
- GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/make-inline-pixbuf $$curdir/gtkstockpixbufs.h $(VARIABLES))
+noinst_DATA = gtkstockpixbufs.h
+CLEANFILES += $(noinst_DATA)
-EXTRA_DIST = $(IMAGES)
+pixbuf_dir = $(top_builddir)/gdk-pixbuf
-# For some reason, rebuilding of this file doesn't happen in the make dist'ed version, so force it.
+gtkstockpixbufs.h: $(pixbuf_dir)/make-inline-pixbuf $(IMAGES)
+ cd $(srcdir) \
+ && GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
+ $(pixbuf_dir)/make-inline-pixbuf gtkstockpixbufs.h $(VARIABLES)
-all-am: gtkstockpixbufs.h
+EXTRA_DIST = $(IMAGES)