On Wed, 2009-02-25 at 17:30 +0100, Michal Kolodziejczyk wrote:
> Hello,
> would it be possible to make API more consistent?

it depends on how you define "consistency". :-)

for clutter_color_parse() I followed the gtk+ style -- see
gdk_color_parse().

it's also following the rest of the API, where the "destination" value
is at the end:

  clutter_color_add()
  clutter_color_subtract()
  clutter_color_shade()

but from_hls() and from_pixel() are different.

mmh, nice mess I gotten myself into.

okay, let's try to be consistent:

  gboolean
  clutter_color_from_string (ClutterColor *color,
                             const gchar  *string);

  void
  clutter_color_from_hls    (ClutterColor *color,
                             gfloat        hue,
                             gfloat        luminance,
                             gfloat        saturation);

  void
  clutter_color_from_pixel  (ClutterColor *color,
                             guint32       pixel);

and for the other methods that take a color and return a new value:

  void
  clutter_color_shade       (const ClutterColor *color,
                             ClutterColor       *result);

does this look good?

ciao,
 Emmanuele.

> For example:
> 
> gboolean clutter_color_parse (const gchar *color, ClutterColor *dest);
> void clutter_color_from_pixel (ClutterColor *dest, guint32 pixel);
> 
> If it was:
> gboolean clutter_color_parse (ClutterColor *dest, const gchar *color)
> 
> it would really help to make other languages bindings automatically.
> So would it be possible for any future version of clutter to use "self"
> objects as a first parameter?

-- 
Emmanuele Bassi, Intel Open Source Technology Center

-- 
To unsubscribe send a mail to [email protected]

Reply via email to