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