This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Completed RGB functionality


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]