Re: Gdk RGBA color
- From: Dave M <dave nerd gmail com>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: Gdk RGBA color
- Date: Sun, 27 Jan 2013 08:33:23 -0600
On Wed, Jan 23, 2013 at 6:22 PM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 13.08.2012 23:41, Torsten Schoenfeld wrote:
On 13.08.2012 17:33, zentara wrote:
$textview1->override_background_color('normal', Gtk3::Gdk::RGBA(
0,0,0,1 ) );
Gtk3::Gdk::RGBA->new (...) should work, but doesn't currently. That's a
genuine hole in the bindings: GdkRGBA is a boxed type which doesn't have
a constructor, which is something Glib::Object::Introspection doesn't
support at the moment. Usually, structs that you are supposed to create
manually (which is something G:O:I does support) don't have a boxed type
associated to them. If GdkRGBA didn't have a boxed type, then {red=>1,
green=>1, ...} would work wherever a GdkRGBA is expected.
It looks like we need to add a standard constructor for boxed types
which don't provide one already.
This is now done with these two commits:
<http://git.gnome.org/browse/perl-Glib-Object-Introspection/commit/?id=fc2a3ceb6d07bd0e2010dcb3cc0473e9fe4464c0>
<http://git.gnome.org/browse/perl-Gtk3/commit/?id=607f2ef3d8092e5eb189553b5636f983fb48408f>
Sorry, little help here please. When I try examples from the new
Gtk3::Gdk::RGBA tests you linked to, I get:
Gtk3::Gdk::RGBA=SCALAR(0x10b9f60) is not of type Gtk3::Gdk::Color at
/path/lib/perl5/x86_64-linux-thread-multi//Glib/Object/Introspection.pm
line 59
Obviously you would not have pushed them if they didn't work, so
apparently 'm doing something wrong... and all I'm doing are things
like
my $rgba = Gtk3::Gdk::RGBA->new ({red => 0.0, green => 0.5, blue =>
0.5, alpha => 0.5});
Thanks,
Dave M
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]