Index: Glib/GObject.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v retrieving revision 1.2 diff -u -p -r1.2 GObject.xs --- Glib/GObject.xs 22 May 2003 14:23:11 -0000 1.2 +++ Glib/GObject.xs 1 Jun 2003 06:36:49 -0000 @@ -390,37 +390,49 @@ g_object_get_data (object, key) SV * -g_object_get (object, name) +g_object_get (object, ...) GObject * object - char * name ALIAS: Glib::Object::get = 0 Glib::Object::get_property = 1 PREINIT: GValue value = {0,}; - CODE: - init_property_value (object, name, &value); - g_object_get_property (object, name, &value); - RETVAL = gperl_sv_from_value (&value); - g_value_unset (&value); - OUTPUT: - RETVAL + PPCODE: + int i; + + EXTEND (SP, items); + for (i = 1; i < items; i++) { + char *name = SvPV_nolen (ST (i)); + + init_property_value (object, name, &value); + g_object_get_property (object, name, &value); + PUSHs (sv_2mortal (gperl_sv_from_value (&value))); + g_value_unset (&value); + } void -g_object_set (object, name, newval) +g_object_set (object, ...) GObject * object - char * name - SV * newval ALIAS: Glib::Object::set = 0 Glib::Object::set_property = 1 PREINIT: GValue value = {0,}; CODE: - init_property_value (object, name, &value); - gperl_value_from_sv (&value, newval); - g_object_set_property (object, name, &value); - g_value_unset (&value); + int i; + + if (!(items % 2)) + croak ("set method expects name => value pairs (off number of arguments detected)"); + + for (i = 1; i < items; i += 2) { + char *name = SvPV_nolen (ST (i)); + SV *newval = ST (i + 1); + + init_property_value (object, name, &value); + gperl_value_from_sv (&value, newval); + g_object_set_property (object, name, &value); + g_value_unset (&value); + } void Index: Glib/gperl.h =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v retrieving revision 1.4 diff -u -p -r1.4 gperl.h --- Glib/gperl.h 31 May 2003 04:00:45 -0000 1.4 +++ Glib/gperl.h 1 Jun 2003 06:36:51 -0000 @@ -28,6 +28,11 @@ #include +#ifndef PERL_IMPLICIT_CONTEXT +# undef aTHX +# define aTHX (void *)0 +#endif + /* * miscellaneous */ Index: Gtk2/xs/GtkAspectFrame.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkAspectFrame.xs,v retrieving revision 1.3 diff -u -p -r1.3 GtkAspectFrame.xs --- Gtk2/xs/GtkAspectFrame.xs 22 May 2003 14:23:23 -0000 1.3 +++ Gtk2/xs/GtkAspectFrame.xs 1 Jun 2003 06:36:51 -0000 @@ -21,7 +21,7 @@ #include "gtk2perl.h" -MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspectframe_ +MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspect_frame_ ## GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) GtkWidget * @@ -35,9 +35,10 @@ gtk_aspect_frame_new (class, label, xali C_ARGS: label, xalign, yalign, ratio, obey_child +# renamed to set_params because the existing ->set method is more important ## void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child) void -gtk_aspect_frame_set (aspect_frame, xalign, yalign, ratio, obey_child) +gtk_aspect_frame_set_params (aspect_frame, xalign, yalign, ratio, obey_child) GtkAspectFrame * aspect_frame gfloat xalign gfloat yalign Index: Gtk2/xs/GtkTreeSortable.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkTreeSortable.xs,v retrieving revision 1.3 diff -u -p -r1.3 GtkTreeSortable.xs --- Gtk2/xs/GtkTreeSortable.xs 22 May 2003 14:23:24 -0000 1.3 +++ Gtk2/xs/GtkTreeSortable.xs 1 Jun 2003 06:36:51 -0000 @@ -23,7 +23,7 @@ // typedef gint (* GtkTreeIterCompareFunc) (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) -MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tre_sortable_ +MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tree_sortable_ ## void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable) void