call the base class init fucntions from all parent types upon class

Sun Jun 28 04:29:10 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
	fucntions from all parent types upon class initialization.

	* gtk/gtkcontainer.c:
 	(gtk_container_get_type): announce gtk_container_base_class_init to
 	the type system.
	(gtk_container_base_class_init): new function to feature base class
	initialization.
	(gtk_container_get_child_arg):
	(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
	and set_child_arg methods of the class indicated through the argument
	name.

	* gtk/gtkobject.c:
	(gtk_object_base_class_init): new function to feature base class
 	initialization.
	(gtk_object_init_type): announce gtk_object_base_class_init to the type
	system.
	(gtk_object_class_init): setup the get_arg and set_arg pointers for
	GtkObjectClass.
	(gtk_object_setv):
 	(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
 	instead of bothering the type system with this.

	* gtk/gtkaccellabel.c:
	* gtk/gtkbutton.c:
	* gtk/gtkradiobutton.c:
	* gtk/gtktable.c:
	* gtk/gtktogglebutton.c:
	* gtk/gtktipsquery.c:
	* gtk/gtkbox.c:
	* gtk/gtkpacker.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkframe.c:
	* gtk/gtkmisc.c:
	* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
	corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
	functions wrt GtkTypeInfo initialization. changed a lot of the set/get
	arg functions to take a GtkObject argument.

	gtk/gtkadjustment.c:
	gtk/gtkalignment.c:
	gtk/gtkarrow.c:
	gtk/gtkaspectframe.c:
	gtk/gtkbbox.c:
	gtk/gtkbin.c:
	gtk/gtkcheckbutton.c:
	gtk/gtkcheckmenuitem.c:
	gtk/gtkclist.c:
	gtk/gtkcolorsel.c:
	gtk/gtkcombo.c:
	gtk/gtkctree.c:
	gtk/gtkcurve.c:
	gtk/gtkdata.c:
	gtk/gtkdialog.c:
	gtk/gtkdrawingarea.c:
	gtk/gtkeditable.c:
	gtk/gtkentry.c:
	gtk/gtkeventbox.c:
	gtk/gtkfilesel.c:
	gtk/gtkfixed.c:
	gtk/gtkfontsel.c:
	gtk/gtkgamma.c:
	gtk/gtkhandlebox.c:
	gtk/gtkhbbox.c:
	gtk/gtkhbox.c:
	gtk/gtkhpaned.c:
	gtk/gtkhruler.c:
	gtk/gtkhscale.c:
	gtk/gtkhscrollbar.c:
	gtk/gtkhseparator.c:
	gtk/gtkimage.c:
	gtk/gtkinputdialog.c:
	gtk/gtkitem.c:
	gtk/gtkitemfactory.c:
	gtk/gtklist.c:
	gtk/gtklistitem.c:
	gtk/gtkmenu.c:
	gtk/gtkmenubar.c:
	gtk/gtkmenuitem.c:
	gtk/gtkmenushell.c:
	gtk/gtknotebook.c:
	gtk/gtkoptionmenu.c:
	gtk/gtkpaned.c:
	gtk/gtkpixmap.c:
	gtk/gtkpreview.c:
	gtk/gtkprogressbar.c:
	gtk/gtkradiomenuitem.c:
	gtk/gtkrange.c:
	gtk/gtkruler.c:
	gtk/gtkscale.c:
	gtk/gtkscrollbar.c:
	gtk/gtkscrolledwindow.c:
	gtk/gtkseparator.c:
	gtk/gtkspinbutton.c:
	gtk/gtkstatusbar.c:
	gtk/gtktext.c:
	gtk/gtktoolbar.c:
	gtk/gtktooltips.c:
	gtk/gtktree.c:
	gtk/gtktreeitem.c:
	gtk/gtkvbbox.c:
	gtk/gtkvbox.c:
	gtk/gtkviewport.c:
	gtk/gtkvpaned.c:
	gtk/gtkvruler.c:
	gtk/gtkvscale.c:
	gtk/gtkvscrollbar.c:
	gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
	match the modified GtkTypeInfo structure.
This commit is contained in:
Tim Janik 1998-06-28 07:46:10 +00:00 committed by Tim Janik
parent e07f8bfc6f
commit e63d08e43f
94 changed files with 1375 additions and 352 deletions

114
ChangeLog
View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -1,3 +1,117 @@
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Sat Jun 27 23:23:27 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/testgtk.c: use rand() instead of random() for portability

View File

@ -33,10 +33,10 @@ enum {
static void gtk_accel_label_class_init (GtkAccelLabelClass *klass);
static void gtk_accel_label_init (GtkAccelLabel *accel_label);
static void gtk_accel_label_set_arg (GtkAccelLabel *accel_label,
GtkArg *arg,
guint arg_id);
static void gtk_accel_label_get_arg (GtkAccelLabel *accel_label,
static void gtk_accel_label_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_accel_label_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_accel_label_destroy (GtkObject *object);
@ -64,8 +64,9 @@ gtk_accel_label_get_type (void)
sizeof (GtkAccelLabelClass),
(GtkClassInitFunc) gtk_accel_label_class_init,
(GtkObjectInitFunc) gtk_accel_label_init,
(GtkArgSetFunc) gtk_accel_label_set_arg,
(GtkArgGetFunc) gtk_accel_label_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
accel_label_type = gtk_type_unique (gtk_label_get_type (), &accel_label_info);
@ -91,7 +92,9 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
parent_class = gtk_type_class (gtk_label_get_type ());
gtk_object_add_arg_type ("GtkAccelLabel::accel_widget", GTK_TYPE_WIDGET, GTK_ARG_READWRITE, ARG_ACCEL_WIDGET);
object_class->set_arg = gtk_accel_label_set_arg;
object_class->get_arg = gtk_accel_label_get_arg;
object_class->destroy = gtk_accel_label_destroy;
object_class->finalize = gtk_accel_label_finalize;
@ -109,10 +112,14 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
}
static void
gtk_accel_label_set_arg (GtkAccelLabel *accel_label,
gtk_accel_label_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkAccelLabel *accel_label;
accel_label = GTK_ACCEL_LABEL (object);
switch (arg_id)
{
case ARG_ACCEL_WIDGET:
@ -124,10 +131,14 @@ gtk_accel_label_set_arg (GtkAccelLabel *accel_label,
}
static void
gtk_accel_label_get_arg (GtkAccelLabel *accel_label,
gtk_accel_label_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkAccelLabel *accel_label;
accel_label = GTK_ACCEL_LABEL (object);
switch (arg_id)
{
case ARG_ACCEL_WIDGET:

View File

@ -48,8 +48,9 @@ gtk_adjustment_get_type (void)
sizeof (GtkAdjustmentClass),
(GtkClassInitFunc) gtk_adjustment_class_init,
(GtkObjectInitFunc) gtk_adjustment_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
adjustment_type = gtk_type_unique (gtk_data_get_type (), &adjustment_info);

View File

@ -41,8 +41,9 @@ gtk_alignment_get_type (void)
sizeof (GtkAlignmentClass),
(GtkClassInitFunc) gtk_alignment_class_init,
(GtkObjectInitFunc) gtk_alignment_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
alignment_type = gtk_type_unique (gtk_bin_get_type (), &alignment_info);

View File

@ -42,8 +42,9 @@ gtk_arrow_get_type (void)
sizeof (GtkArrowClass),
(GtkClassInitFunc) gtk_arrow_class_init,
(GtkObjectInitFunc) gtk_arrow_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
arrow_type = gtk_type_unique (gtk_misc_get_type (), &arrow_info);

View File

@ -51,8 +51,9 @@ gtk_aspect_frame_get_type (void)
sizeof (GtkAspectFrameClass),
(GtkClassInitFunc) gtk_aspect_frame_class_init,
(GtkObjectInitFunc) gtk_aspect_frame_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
aspect_frame_type = gtk_type_unique (gtk_frame_get_type (), &aspect_frame_info);

View File

@ -43,8 +43,9 @@ gtk_button_box_get_type (void)
sizeof (GtkButtonBoxClass),
(GtkClassInitFunc) gtk_button_box_class_init,
(GtkObjectInitFunc) gtk_button_box_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
button_box_type = gtk_type_unique (gtk_box_get_type (), &button_box_info);

View File

@ -54,8 +54,9 @@ gtk_bin_get_type (void)
sizeof (GtkBinClass),
(GtkClassInitFunc) gtk_bin_class_init,
(GtkObjectInitFunc) gtk_bin_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
bin_type = gtk_type_unique (gtk_container_get_type (), &bin_info);

View File

@ -35,10 +35,10 @@ enum {
static void gtk_box_class_init (GtkBoxClass *klass);
static void gtk_box_init (GtkBox *box);
static void gtk_box_get_arg (GtkBox *box,
static void gtk_box_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_box_set_arg (GtkBox *box,
static void gtk_box_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_box_map (GtkWidget *widget);
@ -82,8 +82,9 @@ gtk_box_get_type (void)
sizeof (GtkBoxClass),
(GtkClassInitFunc) gtk_box_class_init,
(GtkObjectInitFunc) gtk_box_init,
(GtkArgSetFunc) gtk_box_set_arg,
(GtkArgGetFunc) gtk_box_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
box_type = gtk_type_unique (GTK_TYPE_CONTAINER, &box_info);
@ -113,6 +114,9 @@ gtk_box_class_init (GtkBoxClass *class)
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);
object_class->set_arg = gtk_box_set_arg;
object_class->get_arg = gtk_box_get_arg;
widget_class->map = gtk_box_map;
widget_class->unmap = gtk_box_unmap;
widget_class->draw = gtk_box_draw;
@ -137,10 +141,14 @@ gtk_box_init (GtkBox *box)
}
static void
gtk_box_set_arg (GtkBox *box,
gtk_box_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkBox *box;
box = GTK_BOX (object);
switch (arg_id)
{
case ARG_SPACING:
@ -155,10 +163,14 @@ gtk_box_set_arg (GtkBox *box,
}
static void
gtk_box_get_arg (GtkBox *box,
gtk_box_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkBox *box;
box = GTK_BOX (object);
switch (arg_id)
{
case ARG_SPACING:

View File

@ -46,10 +46,10 @@ enum {
static void gtk_button_class_init (GtkButtonClass *klass);
static void gtk_button_init (GtkButton *button);
static void gtk_button_set_arg (GtkButton *button,
static void gtk_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_button_get_arg (GtkButton *button,
static void gtk_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_button_map (GtkWidget *widget);
@ -111,8 +111,9 @@ gtk_button_get_type (void)
sizeof (GtkButtonClass),
(GtkClassInitFunc) gtk_button_class_init,
(GtkObjectInitFunc) gtk_button_init,
(GtkArgSetFunc) gtk_button_set_arg,
(GtkArgGetFunc) gtk_button_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
button_type = gtk_type_unique (gtk_container_get_type (), &button_info);
@ -175,6 +176,9 @@ gtk_button_class_init (GtkButtonClass *klass)
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->map = gtk_button_map;
widget_class->unmap = gtk_button_unmap;
@ -225,14 +229,18 @@ gtk_button_child_type (GtkContainer *container)
}
static void
gtk_button_set_arg (GtkButton *button,
gtk_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkWidget *label;
GtkButton *button;
button = GTK_BUTTON (object);
switch (arg_id)
{
GtkWidget *label;
case ARG_LABEL:
if (button->child)
{
@ -251,10 +259,14 @@ gtk_button_set_arg (GtkButton *button,
}
static void
gtk_button_get_arg (GtkButton *button,
gtk_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkButton *button;
button = GTK_BUTTON (object);
switch (arg_id)
{
case ARG_LABEL:

View File

@ -60,8 +60,9 @@ gtk_check_button_get_type (void)
sizeof (GtkCheckButtonClass),
(GtkClassInitFunc) gtk_check_button_class_init,
(GtkObjectInitFunc) gtk_check_button_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
check_button_type = gtk_type_unique (gtk_toggle_button_get_type (), &check_button_info);

View File

@ -61,8 +61,9 @@ gtk_check_menu_item_get_type (void)
sizeof (GtkCheckMenuItemClass),
(GtkClassInitFunc) gtk_check_menu_item_class_init,
(GtkObjectInitFunc) gtk_check_menu_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
check_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (), &check_menu_item_info);

View File

@ -294,8 +294,9 @@ gtk_clist_get_type (void)
sizeof (GtkCListClass),
(GtkClassInitFunc) gtk_clist_class_init,
(GtkObjectInitFunc) gtk_clist_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
clist_type = gtk_type_unique (gtk_container_get_type (), &clist_info);

View File

@ -207,8 +207,9 @@ gtk_color_selection_get_type (void)
sizeof (GtkColorSelectionClass),
(GtkClassInitFunc) gtk_color_selection_class_init,
(GtkObjectInitFunc) gtk_color_selection_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
color_selection_type = gtk_type_unique (gtk_vbox_get_type (), &colorsel_info);
@ -1444,8 +1445,9 @@ gtk_color_selection_dialog_get_type (void)
sizeof (GtkColorSelectionDialogClass),
(GtkClassInitFunc) gtk_color_selection_dialog_class_init,
(GtkObjectInitFunc) gtk_color_selection_dialog_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
color_selection_dialog_type = gtk_type_unique (gtk_window_get_type (), &colorsel_diag_info);

View File

@ -703,8 +703,9 @@ gtk_combo_get_type (void)
sizeof (GtkComboClass),
(GtkClassInitFunc) gtk_combo_class_init,
(GtkObjectInitFunc) gtk_combo_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
combo_type = gtk_type_unique (gtk_hbox_get_type (), &combo_info);
}

View File

@ -80,13 +80,14 @@ static void gtk_container_marshal_signal_3 (GtkObject *object,
GtkArg *args);
static void gtk_container_base_class_init (GtkContainerClass *klass);
static void gtk_container_class_init (GtkContainerClass *klass);
static void gtk_container_init (GtkContainer *container);
static void gtk_container_destroy (GtkObject *object);
static void gtk_container_get_arg (GtkContainer *container,
static void gtk_container_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_container_set_arg (GtkContainer *container,
static void gtk_container_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_container_add_unimplemented (GtkContainer *container,
@ -147,8 +148,9 @@ gtk_container_get_type (void)
sizeof (GtkContainerClass),
(GtkClassInitFunc) gtk_container_class_init,
(GtkObjectInitFunc) gtk_container_init,
(GtkArgSetFunc) gtk_container_set_arg,
(GtkArgGetFunc) gtk_container_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) gtk_container_base_class_init,
};
container_type = gtk_type_unique (gtk_widget_get_type (), &container_info);
@ -157,6 +159,15 @@ gtk_container_get_type (void)
return container_type;
}
static void
gtk_container_base_class_init (GtkContainerClass *class)
{
/* reset instance specifc class fields that don't get inherited */
class->n_child_args = 0;
class->set_child_arg = NULL;
class->get_child_arg = NULL;
}
static void
gtk_container_class_init (GtkContainerClass *class)
{
@ -223,7 +234,9 @@ gtk_container_class_init (GtkContainerClass *class)
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;
/* Other container classes should overwrite show_all and hide_all,
@ -239,11 +252,7 @@ gtk_container_class_init (GtkContainerClass *class)
class->foreach = NULL;
class->focus = gtk_container_real_focus;
class->set_focus_child = gtk_container_real_set_focus_child;
/* linkage */
class->child_type = NULL;
class->get_child_arg = NULL;
class->set_child_arg = NULL;
}
static void
@ -259,10 +268,10 @@ gtk_container_get_child_arg (GtkContainer *container,
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (arg != NULL);
class = GTK_CONTAINER_CLASS (GTK_OBJECT (container)->klass);
if (class->get_child_arg)
class = gtk_type_class (type);
if (class && class->get_child_arg)
class->get_child_arg (container, child, arg, arg_id);
else
arg->type = GTK_TYPE_INVALID;
@ -281,10 +290,10 @@ gtk_container_set_child_arg (GtkContainer *container,
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (arg != NULL);
class = GTK_CONTAINER_CLASS (GTK_OBJECT (container)->klass);
if (class->set_child_arg)
class = gtk_type_class (type);
if (class && class->set_child_arg)
class->set_child_arg (container, child, arg, arg_id);
}
@ -297,10 +306,11 @@ gtk_container_child_type (GtkContainer *container)
g_return_val_if_fail (container != NULL, 0);
g_return_val_if_fail (GTK_IS_CONTAINER (container), 0);
slot = GTK_TYPE_NONE;
class = GTK_CONTAINER_CLASS (GTK_OBJECT (container)->klass);
if (class->child_type)
slot = class->child_type (container);
else
slot = GTK_TYPE_NONE;
return slot;
}
@ -767,10 +777,14 @@ gtk_container_destroy (GtkObject *object)
}
static void
gtk_container_set_arg (GtkContainer *container,
gtk_container_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkContainer *container;
container = GTK_CONTAINER (object);
switch (arg_id)
{
case ARG_BORDER_WIDTH:
@ -788,10 +802,14 @@ gtk_container_set_arg (GtkContainer *container,
}
static void
gtk_container_get_arg (GtkContainer *container,
gtk_container_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkContainer *container;
container = GTK_CONTAINER (object);
switch (arg_id)
{
case ARG_BORDER_WIDTH:

View File

@ -211,8 +211,9 @@ gtk_ctree_get_type (void)
sizeof (GtkCTreeClass),
(GtkClassInitFunc) gtk_ctree_class_init,
(GtkObjectInitFunc) gtk_ctree_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
ctree_type = gtk_type_unique (gtk_clist_get_type (), &ctree_info);

View File

@ -65,8 +65,9 @@ gtk_curve_get_type (void)
sizeof (GtkCurveClass),
(GtkClassInitFunc) gtk_curve_class_init,
(GtkObjectInitFunc) gtk_curve_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
curve_type = gtk_type_unique (gtk_drawing_area_get_type (), &curve_info);

View File

@ -46,8 +46,9 @@ gtk_data_get_type (void)
sizeof (GtkDataClass),
(GtkClassInitFunc) gtk_data_class_init,
(GtkObjectInitFunc) NULL,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
data_type = gtk_type_unique (gtk_object_get_type (), &data_info);

View File

@ -41,8 +41,9 @@ gtk_dialog_get_type (void)
sizeof (GtkDialogClass),
(GtkClassInitFunc) gtk_dialog_class_init,
(GtkObjectInitFunc) gtk_dialog_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
dialog_type = gtk_type_unique (gtk_window_get_type (), &dialog_info);

View File

@ -41,8 +41,9 @@ gtk_drawing_area_get_type (void)
sizeof (GtkDrawingAreaClass),
(GtkClassInitFunc) gtk_drawing_area_class_init,
(GtkObjectInitFunc) gtk_drawing_area_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
drawing_area_type = gtk_type_unique (gtk_widget_get_type (), &drawing_area_info);

View File

@ -121,8 +121,9 @@ gtk_editable_get_type (void)
sizeof (GtkEditableClass),
(GtkClassInitFunc) gtk_editable_class_init,
(GtkObjectInitFunc) gtk_editable_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
editable_type = gtk_type_unique (gtk_widget_get_type (), &editable_info);

View File

@ -214,8 +214,9 @@ gtk_entry_get_type (void)
sizeof (GtkEntryClass),
(GtkClassInitFunc) gtk_entry_class_init,
(GtkObjectInitFunc) gtk_entry_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
entry_type = gtk_type_unique (gtk_editable_get_type (), &entry_info);

View File

@ -47,8 +47,9 @@ gtk_event_box_get_type (void)
sizeof (GtkEventBoxClass),
(GtkClassInitFunc) gtk_event_box_class_init,
(GtkObjectInitFunc) gtk_event_box_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
event_box_type = gtk_type_unique (gtk_bin_get_type (), &event_box_info);

View File

@ -331,8 +331,9 @@ gtk_file_selection_get_type (void)
sizeof (GtkFileSelectionClass),
(GtkClassInitFunc) gtk_file_selection_class_init,
(GtkObjectInitFunc) gtk_file_selection_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
file_selection_type = gtk_type_unique (gtk_window_get_type (), &filesel_info);

View File

@ -61,8 +61,9 @@ gtk_fixed_get_type (void)
sizeof (GtkFixedClass),
(GtkClassInitFunc) gtk_fixed_class_init,
(GtkObjectInitFunc) gtk_fixed_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
fixed_type = gtk_type_unique (gtk_container_get_type (), &fixed_info);

View File

@ -399,8 +399,9 @@ gtk_font_selection_get_type()
sizeof(GtkFontSelectionClass),
(GtkClassInitFunc) gtk_font_selection_class_init,
(GtkObjectInitFunc) gtk_font_selection_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
font_selection_type = gtk_type_unique (gtk_notebook_get_type(),
@ -2363,13 +2364,15 @@ gtk_font_selection_get_fonts (void)
res_y = atoi(field);
if (pixels == 0 && points == 0)
if (res_x == 0 && res_y == 0)
flags = SCALABLE_FONT;
else
{
flags = SCALABLE_BITMAP_FONT;
fontsel_info->scaled_bitmaps_available = TRUE;
}
{
if (res_x == 0 && res_y == 0)
flags = SCALABLE_FONT;
else
{
flags = SCALABLE_BITMAP_FONT;
fontsel_info->scaled_bitmaps_available = TRUE;
}
}
else
flags = BITMAP_FONT;
@ -3074,8 +3077,9 @@ gtk_font_selection_dialog_get_type (void)
sizeof (GtkFontSelectionDialogClass),
(GtkClassInitFunc) gtk_font_selection_dialog_class_init,
(GtkObjectInitFunc) gtk_font_selection_dialog_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
font_selection_dialog_type = gtk_type_unique (gtk_window_get_type (), &fontsel_diag_info);

View File

@ -30,10 +30,10 @@ enum {
static void gtk_frame_class_init (GtkFrameClass *klass);
static void gtk_frame_init (GtkFrame *frame);
static void gtk_frame_set_arg (GtkFrame *frame,
static void gtk_frame_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_frame_get_arg (GtkFrame *frame,
static void gtk_frame_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_frame_finalize (GtkObject *object);
@ -68,8 +68,9 @@ gtk_frame_get_type (void)
sizeof (GtkFrameClass),
(GtkClassInitFunc) gtk_frame_class_init,
(GtkObjectInitFunc) gtk_frame_init,
(GtkArgSetFunc) gtk_frame_set_arg,
(GtkArgGetFunc) gtk_frame_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
frame_type = gtk_type_unique (gtk_bin_get_type (), &frame_info);
@ -94,6 +95,8 @@ gtk_frame_class_init (GtkFrameClass *class)
gtk_object_add_arg_type ("GtkFrame::label_yalign", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_LABEL_YALIGN);
gtk_object_add_arg_type ("GtkFrame::shadow", GTK_TYPE_SHADOW_TYPE, GTK_ARG_READWRITE, ARG_SHADOW);
object_class->set_arg = gtk_frame_set_arg;
object_class->get_arg = gtk_frame_get_arg;
object_class->finalize = gtk_frame_finalize;
widget_class->draw = gtk_frame_draw;
@ -117,10 +120,14 @@ gtk_frame_init (GtkFrame *frame)
}
static void
gtk_frame_set_arg (GtkFrame *frame,
gtk_frame_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkFrame *frame;
frame = GTK_FRAME (object);
switch (arg_id)
{
case ARG_LABEL:
@ -141,10 +148,14 @@ gtk_frame_set_arg (GtkFrame *frame,
}
static void
gtk_frame_get_arg (GtkFrame *frame,
gtk_frame_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkFrame *frame;
frame = GTK_FRAME (object);
switch (arg_id)
{
case ARG_LABEL:

View File

@ -216,8 +216,9 @@ gtk_gamma_curve_get_type (void)
sizeof (GtkGammaCurveClass),
(GtkClassInitFunc) gtk_gamma_curve_class_init,
(GtkObjectInitFunc) gtk_gamma_curve_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
gamma_curve_type =

View File

@ -93,8 +93,9 @@ gtk_handle_box_get_type (void)
sizeof (GtkHandleBoxClass),
(GtkClassInitFunc) gtk_handle_box_class_init,
(GtkObjectInitFunc) gtk_handle_box_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
handle_box_type = gtk_type_unique (gtk_bin_get_type (), &handle_box_info);

View File

@ -44,8 +44,9 @@ gtk_hbutton_box_get_type (void)
sizeof (GtkHButtonBoxClass),
(GtkClassInitFunc) gtk_hbutton_box_class_init,
(GtkObjectInitFunc) gtk_hbutton_box_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hbutton_box_type = gtk_type_unique (gtk_button_box_get_type (), &hbutton_box_info);

View File

@ -41,8 +41,9 @@ gtk_hbox_get_type (void)
sizeof (GtkHBoxClass),
(GtkClassInitFunc) gtk_hbox_class_init,
(GtkObjectInitFunc) gtk_hbox_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hbox_type = gtk_type_unique (GTK_TYPE_BOX, &hbox_info);

View File

@ -50,8 +50,9 @@ gtk_hpaned_get_type (void)
sizeof (GtkHPanedClass),
(GtkClassInitFunc) gtk_hpaned_class_init,
(GtkObjectInitFunc) gtk_hpaned_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hpaned_type = gtk_type_unique (gtk_paned_get_type (), &hpaned_info);

View File

@ -52,8 +52,9 @@ gtk_hruler_get_type (void)
sizeof (GtkHRulerClass),
(GtkClassInitFunc) gtk_hruler_class_init,
(GtkObjectInitFunc) gtk_hruler_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hruler_type = gtk_type_unique (gtk_ruler_get_type (), &hruler_info);

View File

@ -59,8 +59,9 @@ gtk_hscale_get_type (void)
sizeof (GtkHScaleClass),
(GtkClassInitFunc) gtk_hscale_class_init,
(GtkObjectInitFunc) gtk_hscale_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hscale_type = gtk_type_unique (gtk_scale_get_type (), &hscale_info);

View File

@ -55,8 +55,9 @@ gtk_hscrollbar_get_type (void)
sizeof (GtkHScrollbarClass),
(GtkClassInitFunc) gtk_hscrollbar_class_init,
(GtkObjectInitFunc) gtk_hscrollbar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hscrollbar_type = gtk_type_unique (gtk_scrollbar_get_type (), &hscrollbar_info);

View File

@ -39,8 +39,9 @@ gtk_hseparator_get_type (void)
sizeof (GtkHSeparatorClass),
(GtkClassInitFunc) gtk_hseparator_class_init,
(GtkObjectInitFunc) gtk_hseparator_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
hseparator_type = gtk_type_unique (gtk_separator_get_type (), &hseparator_info);

View File

@ -40,8 +40,9 @@ gtk_image_get_type (void)
sizeof (GtkImageClass),
(GtkClassInitFunc) gtk_image_class_init,
(GtkObjectInitFunc) gtk_image_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
image_type = gtk_type_unique (gtk_misc_get_type (), &image_info);

View File

@ -141,8 +141,9 @@ gtk_input_dialog_get_type (void)
sizeof (GtkInputDialogClass),
(GtkClassInitFunc) gtk_input_dialog_class_init,
(GtkObjectInitFunc) gtk_input_dialog_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
input_dialog_type = gtk_type_unique (gtk_dialog_get_type (),

View File

@ -56,8 +56,9 @@ gtk_item_get_type (void)
sizeof (GtkItemClass),
(GtkClassInitFunc) gtk_item_class_init,
(GtkObjectInitFunc) gtk_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
item_type = gtk_type_unique (gtk_bin_get_type (), &item_info);

View File

@ -162,8 +162,9 @@ gtk_item_factory_get_type (void)
sizeof (GtkItemFactoryClass),
(GtkClassInitFunc) gtk_item_factory_class_init,
(GtkObjectInitFunc) gtk_item_factory_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
item_factory_type = gtk_type_unique (GTK_TYPE_OBJECT, &item_factory_info);

View File

@ -28,10 +28,10 @@ enum {
static void gtk_label_class_init (GtkLabelClass *klass);
static void gtk_label_init (GtkLabel *label);
static void gtk_label_set_arg (GtkLabel *label,
static void gtk_label_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_label_get_arg (GtkLabel *label,
static void gtk_label_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_label_finalize (GtkObject *object);
@ -63,8 +63,9 @@ gtk_label_get_type (void)
sizeof (GtkLabelClass),
(GtkClassInitFunc) gtk_label_class_init,
(GtkObjectInitFunc) gtk_label_init,
(GtkArgSetFunc) gtk_label_set_arg,
(GtkArgGetFunc) gtk_label_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
label_type = gtk_type_unique (gtk_misc_get_type (), &label_info);
@ -87,7 +88,9 @@ gtk_label_class_init (GtkLabelClass *class)
gtk_object_add_arg_type ("GtkLabel::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkLabel::justify", GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_JUSTIFY);
object_class->set_arg = gtk_label_set_arg;
object_class->get_arg = gtk_label_get_arg;
object_class->finalize = gtk_label_finalize;
widget_class->size_request = gtk_label_size_request;
@ -97,10 +100,14 @@ gtk_label_class_init (GtkLabelClass *class)
}
static void
gtk_label_set_arg (GtkLabel *label,
gtk_label_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkLabel *label;
label = GTK_LABEL (object);
switch (arg_id)
{
case ARG_LABEL:
@ -115,10 +122,14 @@ gtk_label_set_arg (GtkLabel *label,
}
static void
gtk_label_get_arg (GtkLabel *label,
gtk_label_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkLabel *label;
label = GTK_LABEL (object);
switch (arg_id)
{
case ARG_LABEL:

View File

@ -94,8 +94,9 @@ gtk_list_get_type (void)
sizeof (GtkListClass),
(GtkClassInitFunc) gtk_list_class_init,
(GtkObjectInitFunc) gtk_list_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
list_type = gtk_type_unique (gtk_container_get_type (), &list_info);

View File

@ -60,8 +60,9 @@ gtk_list_item_get_type (void)
sizeof (GtkListItemClass),
(GtkClassInitFunc) gtk_list_item_class_init,
(GtkObjectInitFunc) gtk_list_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
list_item_type = gtk_type_unique (gtk_item_get_type (), &list_item_info);

View File

@ -79,8 +79,9 @@ gtk_menu_get_type (void)
sizeof (GtkMenuClass),
(GtkClassInitFunc) gtk_menu_class_init,
(GtkObjectInitFunc) gtk_menu_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
menu_type = gtk_type_unique (gtk_menu_shell_get_type (), &menu_info);

View File

@ -52,8 +52,9 @@ gtk_menu_bar_get_type (void)
sizeof (GtkMenuBarClass),
(GtkClassInitFunc) gtk_menu_bar_class_init,
(GtkObjectInitFunc) gtk_menu_bar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
menu_bar_type = gtk_type_unique (gtk_menu_shell_get_type (), &menu_bar_info);

View File

@ -77,8 +77,9 @@ gtk_menu_item_get_type (void)
sizeof (GtkMenuItemClass),
(GtkClassInitFunc) gtk_menu_item_class_init,
(GtkObjectInitFunc) gtk_menu_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
menu_item_type = gtk_type_unique (gtk_item_get_type (), &menu_item_info);

View File

@ -78,8 +78,9 @@ gtk_menu_shell_get_type (void)
sizeof (GtkMenuShellClass),
(GtkClassInitFunc) gtk_menu_shell_class_init,
(GtkObjectInitFunc) gtk_menu_shell_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
menu_shell_type = gtk_type_unique (gtk_container_get_type (), &menu_shell_info);

View File

@ -31,10 +31,10 @@ enum {
static void gtk_misc_class_init (GtkMiscClass *klass);
static void gtk_misc_init (GtkMisc *misc);
static void gtk_misc_realize (GtkWidget *widget);
static void gtk_misc_set_arg (GtkMisc *misc,
static void gtk_misc_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_misc_get_arg (GtkMisc *misc,
static void gtk_misc_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
@ -53,8 +53,9 @@ gtk_misc_get_type (void)
sizeof (GtkMiscClass),
(GtkClassInitFunc) gtk_misc_class_init,
(GtkObjectInitFunc) gtk_misc_init,
(GtkArgSetFunc) gtk_misc_set_arg,
(GtkArgGetFunc) gtk_misc_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
misc_type = gtk_type_unique (GTK_TYPE_WIDGET, &misc_info);
@ -66,14 +67,19 @@ gtk_misc_get_type (void)
static void
gtk_misc_class_init (GtkMiscClass *class)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
gtk_object_add_arg_type ("GtkMisc::xalign", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_XALIGN);
gtk_object_add_arg_type ("GtkMisc::yalign", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_YALIGN);
gtk_object_add_arg_type ("GtkMisc::xpad", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_XPAD);
gtk_object_add_arg_type ("GtkMisc::ypad", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_YPAD);
object_class->set_arg = gtk_misc_set_arg;
object_class->get_arg = gtk_misc_get_arg;
widget_class->realize = gtk_misc_realize;
}
@ -90,10 +96,14 @@ gtk_misc_init (GtkMisc *misc)
}
static void
gtk_misc_set_arg (GtkMisc *misc,
gtk_misc_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkMisc *misc;
misc = GTK_MISC (object);
switch (arg_id)
{
case ARG_XALIGN:
@ -114,10 +124,14 @@ gtk_misc_set_arg (GtkMisc *misc,
}
static void
gtk_misc_get_arg (GtkMisc *misc,
gtk_misc_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkMisc *misc;
misc = GTK_MISC (object);
switch (arg_id)
{
case ARG_XALIGN:

View File

@ -161,8 +161,9 @@ gtk_notebook_get_type (void)
sizeof (GtkNotebookClass),
(GtkClassInitFunc) gtk_notebook_class_init,
(GtkObjectInitFunc) gtk_notebook_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
notebook_type = gtk_type_unique (gtk_container_get_type (), &notebook_info);

View File

@ -61,24 +61,25 @@ struct _GtkArgInfo
};
void gtk_object_init_type (void);
static void gtk_object_class_init (GtkObjectClass *klass);
static void gtk_object_init (GtkObject *object);
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_shutdown (GtkObject *object);
static void gtk_object_real_destroy (GtkObject *object);
static void gtk_object_finalize (GtkObject *object);
static void gtk_object_notify_weaks (GtkObject *object);
void gtk_object_init_type (void);
static void gtk_object_base_class_init (GtkObjectClass *klass);
static void gtk_object_class_init (GtkObjectClass *klass);
static void gtk_object_init (GtkObject *object);
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_shutdown (GtkObject *object);
static void gtk_object_real_destroy (GtkObject *object);
static void gtk_object_finalize (GtkObject *object);
static void gtk_object_notify_weaks (GtkObject *object);
GtkArg* gtk_object_collect_args (guint *nargs,
GtkType (*) (const gchar*),
va_list args1,
va_list args2);
GtkArg* gtk_object_collect_args (guint *nargs,
GtkType (*) (const gchar*),
va_list args1,
va_list args2);
static guint object_signals[LAST_SIGNAL] = { 0 };
@ -140,8 +141,9 @@ gtk_object_init_type (void)
sizeof (GtkObjectClass),
(GtkClassInitFunc) gtk_object_class_init,
(GtkObjectInitFunc) gtk_object_init,
gtk_object_set_arg,
gtk_object_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) gtk_object_base_class_init,
};
object_type = gtk_type_unique (0, &object_info);
@ -160,12 +162,21 @@ gtk_object_get_type (void)
}
static void
gtk_object_class_init (GtkObjectClass *class)
gtk_object_base_class_init (GtkObjectClass *class)
{
/* reset instance specific fields that don't get inhrited */
class->signals = NULL;
class->nsignals = 0;
class->n_args = 0;
/* reset instance specifc methods that don't get inherited */
class->get_arg = NULL;
class->set_arg = NULL;
}
static void
gtk_object_class_init (GtkObjectClass *class)
{
gtk_object_add_arg_type ("GtkObject::user_data",
GTK_TYPE_POINTER,
GTK_ARG_READWRITE,
@ -189,6 +200,8 @@ gtk_object_class_init (GtkObjectClass *class)
gtk_object_class_add_signals (class, object_signals, LAST_SIGNAL);
class->get_arg = gtk_object_get_arg;
class->set_arg = gtk_object_set_arg;
class->shutdown = gtk_object_shutdown;
class->destroy = gtk_object_real_destroy;
class->finalize = gtk_object_finalize;
@ -286,7 +299,7 @@ gtk_object_set_arg (GtkObject *object,
case ARG_SIGNAL:
if ((arg->name[9 + 2 + 6] != ':') || (arg->name[9 + 2 + 7] != ':'))
{
g_warning ("invalid signal argument: \"%s\"\n", arg->name);
g_warning ("gtk_object_set_arg(): invalid signal argument: \"%s\"\n", arg->name);
return;
}
gtk_signal_connect (object, arg->name + 9 + 2 + 6 + 2,
@ -296,7 +309,7 @@ gtk_object_set_arg (GtkObject *object,
case ARG_OBJECT_SIGNAL:
if ((arg->name[9 + 2 + 13] != ':') || (arg->name[9 + 2 + 14] != ':'))
{
g_warning ("invalid signal argument: \"%s\"\n", arg->name);
g_warning ("gtk_object_set_arg(): invalid signal argument: \"%s\"\n", arg->name);
return;
}
gtk_signal_connect_object (object, arg->name + 9 + 2 + 13 + 2,
@ -677,6 +690,7 @@ gtk_object_getv (GtkObject *object,
GtkArgInfo *info;
gchar *lookup_name;
gchar *d;
GtkObjectClass *oclass;
/* hm, the name cutting shouldn't be needed on gets, but what the heck...
@ -722,7 +736,16 @@ gtk_object_getv (GtkObject *object,
g_free (lookup_name);
args[i].type = info->type;
oclass = gtk_type_class (info->class_type);
if (oclass && oclass->get_arg)
oclass->get_arg (object, &args[i], info->arg_id);
else
args[i].type = GTK_TYPE_INVALID;
#if 0
gtk_type_get_arg (object, info->class_type, &args[i], info->arg_id);
#endif
}
}
@ -882,6 +905,7 @@ gtk_object_setv (GtkObject *object,
gchar *lookup_name;
gchar *d;
gboolean arg_ok;
GtkObjectClass *oclass;
lookup_name = g_strdup (args[i].name);
d = strchr (lookup_name, ':');
@ -928,7 +952,13 @@ gtk_object_setv (GtkObject *object,
if (!arg_ok)
continue;
oclass = gtk_type_class (info->class_type);
if (oclass && oclass->set_arg)
oclass->set_arg (object, &args[i], info->arg_id);
#if 0
gtk_type_set_arg (object, info->class_type, &args[i], info->arg_id);
#endif
}
}

View File

@ -189,6 +189,14 @@ struct _GtkObjectClass
/* The number of arguments per class.
*/
guint n_args;
/* Non overridable class methods to set and get per class arguments */
void (*set_arg) (GtkObject *object,
GtkArg *arg,
guint arg_id);
void (*get_arg) (GtkObject *object,
GtkArg *arg,
guint arg_id);
/* The functions that will end an objects life time. In one way ore
* another all three of them are defined for all objects. If an
@ -199,7 +207,7 @@ struct _GtkObjectClass
* an example of how to do this).
*/
void (* shutdown) (GtkObject *object);
void (* destroy) (GtkObject *object);
void (* destroy) (GtkObject *object);
void (* finalize) (GtkObject *object);
};

View File

@ -77,8 +77,9 @@ gtk_option_menu_get_type (void)
sizeof (GtkOptionMenuClass),
(GtkClassInitFunc) gtk_option_menu_class_init,
(GtkObjectInitFunc) gtk_option_menu_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
option_menu_type = gtk_type_unique (gtk_button_get_type (), &option_menu_info);

View File

@ -167,8 +167,9 @@ gtk_packer_get_type (void)
sizeof (GtkPackerClass),
(GtkClassInitFunc) gtk_packer_class_init,
(GtkObjectInitFunc) gtk_packer_init,
(GtkArgSetFunc) gtk_packer_set_arg,
(GtkArgGetFunc) gtk_packer_get_arg
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
packer_type = gtk_type_unique (GTK_TYPE_CONTAINER, &packer_info);
@ -180,9 +181,11 @@ gtk_packer_get_type (void)
static void
gtk_packer_class_init (GtkPackerClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
object_class = (GtkObjectClass*) klass;
widget_class = (GtkWidgetClass*) klass;
container_class = (GtkContainerClass*) klass;
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
@ -207,6 +210,9 @@ gtk_packer_class_init (GtkPackerClass *klass)
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);
object_class->set_arg = gtk_packer_set_arg;
object_class->get_arg = gtk_packer_get_arg;
widget_class->map = gtk_packer_map;
widget_class->unmap = gtk_packer_unmap;
widget_class->draw = gtk_packer_draw;

View File

@ -54,8 +54,9 @@ gtk_paned_get_type (void)
sizeof (GtkPanedClass),
(GtkClassInitFunc) gtk_paned_class_init,
(GtkObjectInitFunc) gtk_paned_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
paned_type = gtk_type_unique (gtk_container_get_type (), &paned_info);

View File

@ -42,8 +42,9 @@ gtk_pixmap_get_type (void)
sizeof (GtkPixmapClass),
(GtkClassInitFunc) gtk_pixmap_class_init,
(GtkObjectInitFunc) gtk_pixmap_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
pixmap_type = gtk_type_unique (GTK_TYPE_MISC, &pixmap_info);

View File

@ -139,8 +139,9 @@ gtk_preview_get_type (void)
sizeof (GtkPreviewClass),
(GtkClassInitFunc) gtk_preview_class_init,
(GtkObjectInitFunc) gtk_preview_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
preview_type = gtk_type_unique (gtk_widget_get_type (), &preview_info);

View File

@ -48,8 +48,9 @@ gtk_progress_bar_get_type (void)
sizeof (GtkProgressBarClass),
(GtkClassInitFunc) gtk_progress_bar_class_init,
(GtkObjectInitFunc) gtk_progress_bar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
progress_bar_type = gtk_type_unique (gtk_widget_get_type (), &progress_bar_info);

View File

@ -60,8 +60,9 @@ gtk_radio_button_get_type (void)
sizeof (GtkRadioButtonClass),
(GtkClassInitFunc) gtk_radio_button_class_init,
(GtkObjectInitFunc) gtk_radio_button_init,
(GtkArgSetFunc) gtk_radio_button_set_arg,
(GtkArgGetFunc) gtk_radio_button_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
radio_button_type = gtk_type_unique (gtk_check_button_get_type (), &radio_button_info);
@ -85,6 +86,8 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
gtk_object_add_arg_type ("GtkRadioButton::group", GTK_TYPE_RADIO_BUTTON, GTK_ARG_WRITABLE, ARG_GROUP);
object_class->set_arg = gtk_radio_button_set_arg;
object_class->get_arg = gtk_radio_button_get_arg;
object_class->destroy = gtk_radio_button_destroy;
button_class->clicked = gtk_radio_button_clicked;

View File

@ -41,8 +41,9 @@ gtk_radio_menu_item_get_type (void)
sizeof (GtkRadioMenuItemClass),
(GtkClassInitFunc) gtk_radio_menu_item_class_init,
(GtkObjectInitFunc) gtk_radio_menu_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
radio_menu_item_type = gtk_type_unique (gtk_check_menu_item_get_type (), &radio_menu_item_info);

View File

@ -95,8 +95,9 @@ gtk_range_get_type (void)
sizeof (GtkRangeClass),
(GtkClassInitFunc) gtk_range_class_init,
(GtkObjectInitFunc) gtk_range_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
range_type = gtk_type_unique (gtk_widget_get_type (), &range_info);

View File

@ -54,8 +54,9 @@ gtk_ruler_get_type (void)
sizeof (GtkRulerClass),
(GtkClassInitFunc) gtk_ruler_class_init,
(GtkObjectInitFunc) gtk_ruler_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
ruler_type = gtk_type_unique (gtk_widget_get_type (), &ruler_info);

View File

@ -46,8 +46,9 @@ gtk_scale_get_type (void)
sizeof (GtkScaleClass),
(GtkClassInitFunc) gtk_scale_class_init,
(GtkObjectInitFunc) gtk_scale_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
scale_type = gtk_type_unique (gtk_range_get_type (), &scale_info);

View File

@ -35,8 +35,9 @@ gtk_scrollbar_get_type (void)
sizeof (GtkScrollbarClass),
(GtkClassInitFunc) gtk_scrollbar_class_init,
(GtkObjectInitFunc) gtk_scrollbar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
scrollbar_type = gtk_type_unique (gtk_range_get_type (), &scrollbar_info);

View File

@ -65,8 +65,9 @@ gtk_scrolled_window_get_type (void)
sizeof (GtkScrolledWindowClass),
(GtkClassInitFunc) gtk_scrolled_window_class_init,
(GtkObjectInitFunc) gtk_scrolled_window_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
scrolled_window_type = gtk_type_unique (gtk_container_get_type (), &scrolled_window_info);

View File

@ -37,8 +37,9 @@ gtk_separator_get_type (void)
sizeof (GtkSeparatorClass),
(GtkClassInitFunc) gtk_separator_class_init,
(GtkObjectInitFunc) gtk_separator_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
separator_type = gtk_type_unique (gtk_widget_get_type (), &separator_info);

View File

@ -107,8 +107,9 @@ gtk_spin_button_get_type (void)
sizeof (GtkSpinButtonClass),
(GtkClassInitFunc) gtk_spin_button_class_init,
(GtkObjectInitFunc) gtk_spin_button_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
spin_button_type = gtk_type_unique (gtk_entry_get_type (),

View File

@ -61,8 +61,9 @@ gtk_statusbar_get_type (void)
sizeof (GtkStatusbarClass),
(GtkClassInitFunc) gtk_statusbar_class_init,
(GtkObjectInitFunc) gtk_statusbar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
statusbar_type = gtk_type_unique (gtk_hbox_get_type (), &statusbar_info);

View File

@ -106,8 +106,9 @@ gtk_table_get_type (void)
sizeof (GtkTableClass),
(GtkClassInitFunc) gtk_table_class_init,
(GtkObjectInitFunc) gtk_table_init,
gtk_table_set_arg,
gtk_table_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
table_type = gtk_type_unique (gtk_container_get_type (), &table_info);
@ -143,6 +144,8 @@ gtk_table_class_init (GtkTableClass *class)
gtk_container_add_child_arg_type ("GtkTable::x_padding", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_X_PADDING);
gtk_container_add_child_arg_type ("GtkTable::y_padding", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_Y_PADDING);
object_class->get_arg = gtk_table_get_arg;
object_class->set_arg = gtk_table_set_arg;
object_class->finalize = gtk_table_finalize;
widget_class->map = gtk_table_map;

View File

@ -459,8 +459,9 @@ gtk_text_get_type (void)
sizeof (GtkTextClass),
(GtkClassInitFunc) gtk_text_class_init,
(GtkObjectInitFunc) gtk_text_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
text_type = gtk_type_unique (gtk_editable_get_type (), &text_info);

View File

@ -64,10 +64,10 @@ static void gtk_tips_query_init (GtkTipsQuery *tips_query);
static void gtk_tips_query_destroy (GtkObject *object);
static gint gtk_tips_query_event (GtkWidget *widget,
GdkEvent *event);
static void gtk_tips_query_set_arg (GtkTipsQuery *tips_query,
static void gtk_tips_query_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_tips_query_get_arg (GtkTipsQuery *tips_query,
static void gtk_tips_query_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_tips_query_real_start_query (GtkTipsQuery *tips_query);
@ -98,8 +98,9 @@ gtk_tips_query_get_type (void)
sizeof (GtkTipsQueryClass),
(GtkClassInitFunc) gtk_tips_query_class_init,
(GtkObjectInitFunc) gtk_tips_query_init,
(GtkArgSetFunc) gtk_tips_query_set_arg,
(GtkArgGetFunc) gtk_tips_query_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
tips_query_type = gtk_type_unique (gtk_label_get_type (), &tips_query_info);
@ -195,7 +196,10 @@ gtk_tips_query_class_init (GtkTipsQueryClass *class)
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;
@ -219,10 +223,14 @@ gtk_tips_query_init (GtkTipsQuery *tips_query)
}
static void
gtk_tips_query_set_arg (GtkTipsQuery *tips_query,
gtk_tips_query_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkTipsQuery *tips_query;
tips_query = GTK_TIPS_QUERY (object);
switch (arg_id)
{
case ARG_EMIT_ALWAYS:
@ -243,10 +251,14 @@ gtk_tips_query_set_arg (GtkTipsQuery *tips_query,
}
static void
gtk_tips_query_get_arg (GtkTipsQuery *tips_query,
GtkArg *arg,
gtk_tips_query_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkTipsQuery *tips_query;
tips_query = GTK_TIPS_QUERY (object);
switch (arg_id)
{
case ARG_EMIT_ALWAYS:

View File

@ -71,8 +71,9 @@ gtk_toggle_button_get_type (void)
sizeof (GtkToggleButtonClass),
(GtkClassInitFunc) gtk_toggle_button_class_init,
(GtkObjectInitFunc) gtk_toggle_button_init,
(GtkArgSetFunc) gtk_toggle_button_set_arg,
(GtkArgGetFunc) gtk_toggle_button_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
toggle_button_type = gtk_type_unique (gtk_button_get_type (), &toggle_button_info);
@ -107,6 +108,9 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
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;
widget_class->draw_focus = gtk_toggle_button_draw_focus;
button_class->pressed = gtk_toggle_button_pressed;

View File

@ -90,8 +90,9 @@ gtk_toolbar_get_type (void)
sizeof (GtkToolbarClass),
(GtkClassInitFunc) gtk_toolbar_class_init,
(GtkObjectInitFunc) gtk_toolbar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
toolbar_type = gtk_type_unique (gtk_container_get_type (), &toolbar_info);

View File

@ -63,8 +63,9 @@ gtk_tooltips_get_type (void)
sizeof (GtkTooltipsClass),
(GtkClassInitFunc) gtk_tooltips_class_init,
(GtkObjectInitFunc) gtk_tooltips_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
tooltips_type = gtk_type_unique (gtk_data_get_type (), &tooltips_info);

View File

@ -88,8 +88,9 @@ gtk_tree_get_type (void)
sizeof (GtkTreeClass),
(GtkClassInitFunc) gtk_tree_class_init,
(GtkObjectInitFunc) gtk_tree_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
tree_type = gtk_type_unique (gtk_container_get_type (), &tree_info);

View File

@ -106,8 +106,9 @@ gtk_tree_item_get_type (void)
sizeof (GtkTreeItemClass),
(GtkClassInitFunc) gtk_tree_item_class_init,
(GtkObjectInitFunc) gtk_tree_item_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
tree_item_type = gtk_type_unique (gtk_item_get_type (), &tree_item_info);

View File

@ -191,6 +191,8 @@ gtk_type_create (GtkType parent_type,
new_node->type_info = *type_info;
new_node->type_info.type_name = type_name;
/* new_node->type_info.reserved_1 = NULL; */
new_node->type_info.reserved_2 = NULL;
new_node->n_supers = parent ? parent->n_supers + 1 : 0;
new_node->chunk_alloc_locked = FALSE;
new_node->supers = g_new0 (GtkType, new_node->n_supers + 1);
@ -472,42 +474,6 @@ gtk_type_is_a (GtkType type,
return FALSE;
}
void
gtk_type_get_arg (GtkObject *object,
GtkType type,
GtkArg *arg,
guint arg_id)
{
GtkTypeNode *node;
g_return_if_fail (object != NULL);
g_return_if_fail (arg != NULL);
LOOKUP_TYPE_NODE (node, type);
if (node && node->type_info.arg_get_func)
(* node->type_info.arg_get_func) (object, arg, arg_id);
else
arg->type = GTK_TYPE_INVALID;
}
void
gtk_type_set_arg (GtkObject *object,
GtkType type,
GtkArg *arg,
guint arg_id)
{
GtkTypeNode *node;
g_return_if_fail (object != NULL);
g_return_if_fail (arg != NULL);
LOOKUP_TYPE_NODE (node, type);
if (node && node->type_info.arg_set_func)
(* node->type_info.arg_set_func) (object, arg, arg_id);
}
GtkArg*
gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg)
@ -534,6 +500,12 @@ gtk_type_class_init (GtkTypeNode *node)
{
if (!node->klass && node->type_info.class_size)
{
GtkObjectClass *object_class;
GtkTypeNode *base_node;
GSList *slist;
g_assert (node->type_info.class_size >= sizeof (GtkObjectClass));
node->klass = g_malloc0 (node->type_info.class_size);
if (node->parent_type)
@ -547,28 +519,42 @@ gtk_type_class_init (GtkTypeNode *node)
if (parent->klass)
memcpy (node->klass, parent->klass, parent->type_info.class_size);
}
if (gtk_type_is_a (node->type, GTK_TYPE_OBJECT))
{
GtkObjectClass *object_class;
object_class = node->klass;
object_class->type = node->type;
/* stack all base class initialization functions, so we
* call them in ascending order.
*/
base_node = node;
slist = NULL;
while (base_node)
{
if (base_node->type_info.base_class_init_func)
slist = g_slist_prepend (slist, base_node->type_info.base_class_init_func);
LOOKUP_TYPE_NODE (base_node, base_node->parent_type);
}
if (slist)
{
GSList *walk;
for (walk = slist; walk; walk = walk->next)
{
register GtkClassInitFunc base_class_init;
base_class_init = walk->data;
base_class_init (node->klass);
}
g_slist_free (slist);
}
/* FIXME: this initialization needs to be done through
* a function pointer someday.
*/
g_assert (node->type_info.class_size >= sizeof (GtkObjectClass));
object_class = node->klass;
object_class->type = node->type;
object_class->signals = NULL;
object_class->nsignals = 0;
object_class->n_args = 0;
}
/* class_init_func is used as data pointer for
* class_size==0 types
*/
if (node->type_info.class_init_func)
(* node->type_info.class_init_func) (node->klass);
node->type_info.class_init_func (node->klass);
}
}
@ -582,7 +568,7 @@ gtk_type_enum_get_values (GtkType enum_type)
LOOKUP_TYPE_NODE (node, enum_type);
if (node)
return (GtkEnumValue*) node->type_info.class_init_func;
return (GtkEnumValue*) node->type_info.reserved_1;
}
g_warning ("gtk_type_enum_get_values(): type `%s' is not derived from `enum' or `flags'",
@ -608,10 +594,10 @@ gtk_type_register_intern (gchar *name,
info.type_name = name;
info.object_size = 0;
info.class_size = 0;
info.class_init_func = (void*) values;
info.class_init_func = NULL;
info.object_init_func = NULL;
info.arg_set_func = NULL;
info.arg_get_func = NULL;
info.reserved_1 = values;
info.reserved_2 = NULL;
/* relookup pointers afterwards.
*/

View File

@ -80,16 +80,20 @@ typedef struct _GtkTypeInfo GtkTypeInfo;
typedef struct _GtkEnumValue GtkEnumValue;
typedef struct _GtkEnumValue GtkFlagValue;
typedef void (*GtkClassInitFunc) (gpointer klass);
typedef void (*GtkObjectInitFunc) (gpointer object);
typedef void (*GtkArgGetFunc) (GtkObject *object, GtkArg *arg, guint arg_id);
typedef void (*GtkArgSetFunc) (GtkObject *object, GtkArg *arg, guint arg_id);
typedef gint (*GtkFunction) (gpointer data);
typedef void (*GtkClassInitFunc) (gpointer klass);
typedef void (*GtkObjectInitFunc) (gpointer object);
typedef void (*GtkArgGetFunc) (GtkObject *object,
GtkArg *arg,
guint arg_id);
typedef void (*GtkArgSetFunc) (GtkObject *object,
GtkArg *arg,
guint arg_id);
typedef gint (*GtkFunction) (gpointer data);
typedef void (*GtkCallbackMarshal) (GtkObject *object,
gpointer data,
guint n_args,
GtkArg *args);
typedef void (*GtkDestroyNotify) (gpointer data);
gpointer data,
guint n_args,
GtkArg *args);
typedef void (*GtkDestroyNotify) (gpointer data);
struct _GtkArg
{
@ -169,13 +173,14 @@ struct _GtkArg
struct _GtkTypeInfo
{
gchar *type_name;
guint object_size;
guint class_size;
GtkClassInitFunc class_init_func;
GtkObjectInitFunc object_init_func;
GtkArgSetFunc arg_set_func;
GtkArgGetFunc arg_get_func;
gchar *type_name;
guint object_size;
guint class_size;
GtkClassInitFunc class_init_func;
GtkObjectInitFunc object_init_func;
gpointer reserved_1;
gpointer reserved_2;
GtkClassInitFunc base_class_init_func;
};
struct _GtkEnumValue
@ -205,22 +210,14 @@ void gtk_type_describe_tree (GtkType type,
gboolean show_size);
gint gtk_type_is_a (GtkType type,
GtkType is_a_type);
void gtk_type_get_arg (GtkObject *object,
GtkType type,
GtkArg *arg,
guint arg_id);
void gtk_type_set_arg (GtkObject *object,
GtkType type,
GtkArg *arg,
guint arg_id);
GtkArg* gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg);
GtkType gtk_type_register_enum (const gchar *type_name,
GtkEnumValue *values);
GtkType gtk_type_register_flags (const gchar *type_name,
GtkFlagValue *values);
GtkEnumValue* gtk_type_enum_get_values (GtkType enum_type);
GtkFlagValue* gtk_type_flags_get_values (GtkType flags_type);
GtkArg* gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg);
#ifdef __cplusplus

View File

@ -43,8 +43,9 @@ gtk_vbutton_box_get_type (void)
sizeof (GtkVButtonBoxClass),
(GtkClassInitFunc) gtk_vbutton_box_class_init,
(GtkObjectInitFunc) gtk_vbutton_box_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vbutton_box_type = gtk_type_unique (gtk_button_box_get_type (), &vbutton_box_info);

View File

@ -41,8 +41,9 @@ gtk_vbox_get_type (void)
sizeof (GtkVBoxClass),
(GtkClassInitFunc) gtk_vbox_class_init,
(GtkObjectInitFunc) gtk_vbox_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vbox_type = gtk_type_unique (GTK_TYPE_BOX, &vbox_info);

View File

@ -60,8 +60,9 @@ gtk_viewport_get_type (void)
sizeof (GtkViewportClass),
(GtkClassInitFunc) gtk_viewport_class_init,
(GtkObjectInitFunc) gtk_viewport_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
viewport_type = gtk_type_unique (gtk_bin_get_type (), &viewport_info);

View File

@ -50,8 +50,9 @@ gtk_vpaned_get_type (void)
sizeof (GtkVPanedClass),
(GtkClassInitFunc) gtk_vpaned_class_init,
(GtkObjectInitFunc) gtk_vpaned_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vpaned_type = gtk_type_unique (gtk_paned_get_type (), &vpaned_info);

View File

@ -52,8 +52,9 @@ gtk_vruler_get_type (void)
sizeof (GtkVRulerClass),
(GtkClassInitFunc) gtk_vruler_class_init,
(GtkObjectInitFunc) gtk_vruler_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vruler_type = gtk_type_unique (gtk_ruler_get_type (), &vruler_info);

View File

@ -60,8 +60,9 @@ gtk_vscale_get_type (void)
sizeof (GtkVScaleClass),
(GtkClassInitFunc) gtk_vscale_class_init,
(GtkObjectInitFunc) gtk_vscale_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vscale_type = gtk_type_unique (gtk_scale_get_type (), &vscale_info);

View File

@ -54,8 +54,9 @@ gtk_vscrollbar_get_type (void)
sizeof (GtkVScrollbarClass),
(GtkClassInitFunc) gtk_vscrollbar_class_init,
(GtkObjectInitFunc) gtk_vscrollbar_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vscrollbar_type = gtk_type_unique (gtk_scrollbar_get_type (), &vscrollbar_info);

View File

@ -39,8 +39,9 @@ gtk_vseparator_get_type (void)
sizeof (GtkVSeparatorClass),
(GtkClassInitFunc) gtk_vseparator_class_init,
(GtkObjectInitFunc) gtk_vseparator_init,
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
vseparator_type = gtk_type_unique (gtk_separator_get_type (), &vseparator_info);

View File

@ -165,10 +165,10 @@ static void gtk_widget_marshal_signal_7 (GtkObject *object,
static void gtk_widget_class_init (GtkWidgetClass *klass);
static void gtk_widget_init (GtkWidget *widget);
static void gtk_widget_set_arg (GtkWidget *widget,
static void gtk_widget_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_widget_get_arg (GtkWidget *widget,
static void gtk_widget_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_widget_shutdown (GtkObject *object);
@ -266,8 +266,9 @@ gtk_widget_get_type (void)
sizeof (GtkWidgetClass),
(GtkClassInitFunc) gtk_widget_class_init,
(GtkObjectInitFunc) gtk_widget_init,
(GtkArgSetFunc) gtk_widget_set_arg,
(GtkArgGetFunc) gtk_widget_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
widget_type = gtk_type_unique (gtk_object_get_type (), &widget_info);
@ -686,7 +687,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_TYPE_GDK_EVENT);
gtk_object_class_add_signals (object_class, widget_signals, LAST_SIGNAL);
object_class->set_arg = gtk_widget_set_arg;
object_class->get_arg = gtk_widget_get_arg;
object_class->shutdown = gtk_widget_shutdown;
object_class->destroy = gtk_widget_real_destroy;
object_class->finalize = gtk_widget_finalize;
@ -751,23 +754,19 @@ gtk_widget_class_init (GtkWidgetClass *klass)
}
}
/*****************************************
* gtk_widget_set_arg:
*
* arguments:
*
* results:
*****************************************/
static void
gtk_widget_set_arg (GtkWidget *widget,
gtk_widget_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
guint32 saved_flags;
GtkWidget *widget;
widget = GTK_WIDGET (object);
switch (arg_id)
{
guint32 saved_flags;
case ARG_NAME:
gtk_widget_set_name (widget, GTK_VALUE_STRING (*arg));
break;
@ -845,16 +844,20 @@ gtk_widget_set_arg (GtkWidget *widget,
*****************************************/
static void
gtk_widget_get_arg (GtkWidget *widget,
gtk_widget_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkWidgetAuxInfo *aux_info;
gint *eventp;
GdkExtensionMode *modep;
GtkWidget *widget;
widget = GTK_WIDGET (object);
switch (arg_id)
{
GtkWidgetAuxInfo *aux_info;
gint *eventp;
GdkExtensionMode *modep;
case ARG_NAME:
if (widget->name)
GTK_VALUE_STRING (*arg) = g_strdup (widget->name);

View File

@ -57,10 +57,10 @@ static void gtk_window_marshal_signal_2 (GtkObject *object,
GtkArg *args);
static void gtk_window_class_init (GtkWindowClass *klass);
static void gtk_window_init (GtkWindow *window);
static void gtk_window_set_arg (GtkWindow *window,
static void gtk_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_window_get_arg (GtkWindow *window,
static void gtk_window_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_window_shutdown (GtkObject *object);
@ -122,8 +122,9 @@ gtk_window_get_type (void)
sizeof (GtkWindowClass),
(GtkClassInitFunc) gtk_window_class_init,
(GtkObjectInitFunc) gtk_window_init,
(GtkArgSetFunc) gtk_window_set_arg,
(GtkArgGetFunc) gtk_window_get_arg,
/* reversed_1 */ NULL,
/* reversed_2 */ NULL,
(GtkClassInitFunc) NULL,
};
window_type = gtk_type_unique (gtk_bin_get_type (), &window_info);
@ -163,6 +164,8 @@ gtk_window_class_init (GtkWindowClass *klass)
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->shutdown = gtk_window_shutdown;
object_class->destroy = gtk_window_destroy;
object_class->finalize = gtk_window_finalize;
@ -215,10 +218,14 @@ gtk_window_init (GtkWindow *window)
}
static void
gtk_window_set_arg (GtkWindow *window,
gtk_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkWindow *window;
window = GTK_WINDOW (object);
switch (arg_id)
{
case ARG_TYPE:
@ -248,10 +255,14 @@ gtk_window_set_arg (GtkWindow *window,
}
static void
gtk_window_get_arg (GtkWindow *window,
gtk_window_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
{
GtkWindow *window;
window = GTK_WINDOW (object);
switch (arg_id)
{
case ARG_TYPE: