This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: Completed RGB functionality
- From: Kevin Ryde <user42 at zip dot com dot au>
- To: Marko Rauhamaa <marko at pacujo dot net>
- Cc: guile-gtk at sources dot redhat dot com
- Date: Fri, 16 May 2003 09:00:18 +1000
- Subject: Re: Completed RGB functionality
- References: <m38ytjs8a0.fsf@lumo.pacujo.net>
Marko Rauhamaa <marko@pacujo.net> writes:
>
> - gdk-1.2.defs: Decided not to implement the function
> gdk_rgb_xpixel_from_rgb since it would have no use in scheme code.
> Instead, I implemented (gdk-color-new rgb), which calls
> gdk_rgb_xpixel_from_rgb to create a new GdkColor. Gdk-color-new has
> no C equivalent.
I don't think this should be called gdk-color-new, a name like that
gives no hint that GdkRGB is being run.
I'd suggest gdk-color-new should just create a GdkColor object with
zero fields. Field setter functions can be introduced to manipulate
them.
I think field setters would be good anyway (for gdk_colormap_alloc and
friends for instance), and in this case they'd mean a direct
gdk_rgb_xpixel_from_rgb was useful.
Another thing field setters would do is mean that gdk-color-change can
take the same parameters as the C gdk_color_change, ie. a GdkColor
containing a pixel value. Unnecessary variations between the C and
Scheme functions are not good.