Re: Gtk2::Gdk::Window->new attributes docs
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2::Gdk::Window->new attributes docs
- Date: Tue, 20 May 2008 22:36:55 +0200
Kevin Ryde wrote:
It'd be nice if the attributes to Gtk2::Gdk::Window->new were described
a bit, perhaps per below (formatted and a diff), unless I missed it
elsewhere. (I went to use it and had to have a dig in the source.)
Committed. Thanks a lot!
It occurred to me maybe override_redirect could use sv_2bool or whatever
on its value instead of SvUV, to allow undef and empty string to mean
false too, in the usual way.
Yep. Committed the attached patch.
--
Bye,
-Torsten
Index: t/GdkWindow.t
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GdkWindow.t,v
retrieving revision 1.26
diff -u -d -p -r1.26 GdkWindow.t
--- t/GdkWindow.t 30 Mar 2008 19:31:13 -0000 1.26
+++ t/GdkWindow.t 20 May 2008 20:35:19 -0000
@@ -18,7 +18,7 @@ my $attributes = {
colormap => Gtk2::Gdk::Colormap -> get_system(),
window_type => "toplevel",
cursor => Gtk2::Gdk::Cursor -> new("arrow"),
- override_redirect => 0
+ override_redirect => ''
};
my $attributes_small = {
Index: xs/GdkWindow.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkWindow.xs,v
retrieving revision 1.53
diff -u -d -p -r1.53 GdkWindow.xs
--- xs/GdkWindow.xs 20 May 2008 20:26:12 -0000 1.53
+++ xs/GdkWindow.xs 20 May 2008 20:35:19 -0000
@@ -43,7 +43,7 @@ newSVGdkWindowAttr (GdkWindowAttr *attr)
hv_store (object, "cursor", 6, newSVGdkCursor (attr->cursor), 0);
hv_store (object, "wmclass_name", 12, newSVGChar (attr->wmclass_name), 0);
hv_store (object, "wmclass_class", 13, newSVGChar (attr->wmclass_class), 0);
- hv_store (object, "override_redirect", 17, newSVuv (attr->override_redirect), 0);
+ hv_store (object, "override_redirect", 17, boolSV (attr->override_redirect), 0);
}
return sv_bless (newRV_noinc ((SV *) object),
@@ -82,7 +82,7 @@ SvGdkWindowAttrReal (SV *object, GdkWind
GTK2PERL_WINDOW_ATTR_FETCH (cursor, "cursor", SvGdkCursor);
GTK2PERL_WINDOW_ATTR_FETCH (wmclass_name, "wmclass_name", SvGChar);
GTK2PERL_WINDOW_ATTR_FETCH (wmclass_class, "wmclass_class", SvGChar);
- GTK2PERL_WINDOW_ATTR_FETCH (override_redirect, "override_redirect", SvUV);
+ GTK2PERL_WINDOW_ATTR_FETCH (override_redirect, "override_redirect", sv_2bool);
if (mask) {
if (title) *mask |= GDK_WA_TITLE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]