Re: [gtk-list] Perl/Gtk: GdkColor support ?
- From: Kenneth Albanowski <kjahds kjahds com>
- To: GTK List <gtk-list redhat com>
- Subject: Re: [gtk-list] Perl/Gtk: GdkColor support ?
- Date: Sat, 15 Aug 1998 22:03:59 -0400 (EDT)
On Tue, 11 Aug 1998, Marin Purgar - PMC wrote:
> Ho!
>
> How to use GkdColor form Perl/Gtk ?
>
> I am trying to do something like:
>
> # ok there is no new method for Gtk::Gdk::Color ! But what to use instead ?
> $color = new Gtk::Gdk::Color;
>
> $color->blue( 65000 );
> $color->red( 0 );
> $color->green( 0 );
>
> $widget->get_colormap->color_alloc( $color );
With the next-to-be-released version, this becomes:
$color = $widget->get_colormap->color_alloc( { red => 0, green => 0,
blue => 65000 } );
Gtk::Gdk::Color doesn't have a real Perl proxy, like the other Gtk
types. This makes a certain amount of sense to me, but I can't easily
explain the logic, beyond "it seemed like a good idea at the time".
--
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]