ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/gtk2-perl-xs.patch
(Generate patch)

Comparing kgsueme/gtk2-perl-xs.patch (file contents):
Revision 1.1 by pcg, Sun Jun 1 06:07:11 2003 UTC vs.
Revision 1.6 by pcg, Tue Jun 3 18:35:55 2003 UTC

1 1
2Gtk2
3 * xs/GtkAdjustment.xs: add accors/mutators for struct values.
4 * xs/GtkTextTag.xs: add GtkTextTagTable + some methods.
5 * gtk-demo/textview.pl: fix demo to actually use unicode
6 as opposed to the garbled latin1.
2 7
3Gtk2/ChangeLog 8Glib
42003/06/01 08:07 pcg 9 * gperl.h: make it compile even on non-threaded perls (where aTHX is empty).
5 10
6 * xs/GtkAspectFrame.xs: fixed package name typo. 11Index: Gtk2/ChangeLog
7 * xs/GtkAspectFrame.xs: renamed ->set to set_param, because ->set is more
8 universal.
9 * xs/GtkTreeSortable: fixed package name typo.
10
11Glib/ChangeLog
122003/06/01 08:07 pcg
13
14 * gperl.h: make it compile even on non-threaded perls (where aTHX is empty).
15 * GObject.xs: ->set and ->get accept more than one property pair/name.
16
17
18Index: Glib/GObject.xs
19=================================================================== 12===================================================================
20RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v 13RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/ChangeLog,v
21retrieving revision 1.2 14retrieving revision 1.13
22diff -u -p -r1.2 GObject.xs 15diff -u -p -r1.13 ChangeLog
23--- Glib/GObject.xs 22 May 2003 14:23:11 -0000 1.2 16--- Gtk2/ChangeLog 2 Jun 2003 22:14:01 -0000 1.13
24+++ Glib/GObject.xs 1 Jun 2003 06:05:24 -0000 17+++ Gtk2/ChangeLog 3 Jun 2003 18:23:31 -0000
25@@ -390,37 +390,49 @@ g_object_get_data (object, key) 18@@ -1,3 +1,7 @@
19+pcg
20+
21+ * xs/GtkTextTagTable.xs: new file with complete methods.
22+
23 2003/06/02 18:10 muppetman
26 24
27 25 another patch from marc lehmann:
28 SV *
29-g_object_get (object, name)
30+g_object_get (object, ...)
31 GObject * object
32- char * name
33 ALIAS:
34 Glib::Object::get = 0
35 Glib::Object::get_property = 1
36 PREINIT:
37 GValue value = {0,};
38- CODE:
39- init_property_value (object, name, &value);
40- g_object_get_property (object, name, &value);
41- RETVAL = gperl_sv_from_value (&value);
42- g_value_unset (&value);
43- OUTPUT:
44- RETVAL
45+ PPCODE:
46+ int i;
47+
48+ EXTEND (SP, items);
49+ for (i = 1; i <= items; i++) {
50+ char *name = SvPV_nolen (ST (i));
51+
52+ init_property_value (object, name, &value);
53+ g_object_get_property (object, name, &value);
54+ PUSHs (sv_2mortal (gperl_sv_from_value (&value)));
55+ g_value_unset (&value);
56+ }
57
58 void
59-g_object_set (object, name, newval)
60+g_object_set (object, ...)
61 GObject * object
62- char * name
63- SV * newval
64 ALIAS:
65 Glib::Object::set = 0
66 Glib::Object::set_property = 1
67 PREINIT:
68 GValue value = {0,};
69 CODE:
70- init_property_value (object, name, &value);
71- gperl_value_from_sv (&value, newval);
72- g_object_set_property (object, name, &value);
73- g_value_unset (&value);
74+ int i;
75+
76+ if (!(items % 2))
77+ croak ("set method expects name => value pairs (off number of arguments detected)");
78+
79+ for (i = 1; i < items; i += 2) {
80+ char *name = SvPV_nolen (ST (i));
81+ SV *newval = ST (i + 1);
82+
83+ init_property_value (object, name, &value);
84+ gperl_value_from_sv (&value, newval);
85+ g_object_set_property (object, name, &value);
86+ g_value_unset (&value);
87+ }
88
89
90 void
91Index: Glib/gperl.h
92===================================================================
93RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v
94retrieving revision 1.4
95diff -u -p -r1.4 gperl.h
96--- Glib/gperl.h 31 May 2003 04:00:45 -0000 1.4
97+++ Glib/gperl.h 1 Jun 2003 06:05:24 -0000
98@@ -28,6 +28,11 @@
99
100 #include <glib-object.h>
101
102+#ifndef PERL_IMPLICIT_CONTEXT
103+# undef aTHX
104+# define aTHX (void *)0
105+#endif
106+
107 /*
108 * miscellaneous
109 */
110Index: Gtk2/xs/GtkAspectFrame.xs
111===================================================================
112RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkAspectFrame.xs,v
113retrieving revision 1.3
114diff -u -p -r1.3 GtkAspectFrame.xs
115--- Gtk2/xs/GtkAspectFrame.xs 22 May 2003 14:23:23 -0000 1.3
116+++ Gtk2/xs/GtkAspectFrame.xs 1 Jun 2003 06:05:24 -0000
117@@ -21,7 +21,7 @@
118
119 #include "gtk2perl.h"
120
121-MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspectframe_
122+MODULE = Gtk2::AspectFrame PACKAGE = Gtk2::AspectFrame PREFIX = gtk_aspect_frame_
123
124 ## GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child)
125 GtkWidget *
126@@ -35,9 +35,10 @@ gtk_aspect_frame_new (class, label, xali
127 C_ARGS:
128 label, xalign, yalign, ratio, obey_child
129
130+# renamed to set_params because the existing ->set method is more important
131 ## void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, gfloat ratio, gboolean obey_child)
132 void
133-gtk_aspect_frame_set (aspect_frame, xalign, yalign, ratio, obey_child)
134+gtk_aspect_frame_set_params (aspect_frame, xalign, yalign, ratio, obey_child)
135 GtkAspectFrame * aspect_frame
136 gfloat xalign
137 gfloat yalign
138Index: Gtk2/xs/GtkTreeSortable.xs
139===================================================================
140RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkTreeSortable.xs,v
141retrieving revision 1.3
142diff -u -p -r1.3 GtkTreeSortable.xs
143--- Gtk2/xs/GtkTreeSortable.xs 22 May 2003 14:23:24 -0000 1.3
144+++ Gtk2/xs/GtkTreeSortable.xs 1 Jun 2003 06:05:24 -0000
145@@ -23,7 +23,7 @@
146
147 // typedef gint (* GtkTreeIterCompareFunc) (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
148
149-MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tre_sortable_
150+MODULE = Gtk2::TreeSortable PACKAGE = Gtk2::TreeSortable PREFIX = gtk_tree_sortable_
151
152 ## void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
153 void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines