Re: [Vala] Exposing the CLUTTER_COLOR_* macros in Vala


On 15 September 2012 02:30, Kerrick Staley <mail kerrickstaley com> wrote:
I've created a patch for Vala [1] that will expose the CLUTTER_COLOR_*
macros in Vala as Clutter.Color.*. It maps e.g. CLUTTER_COLOR_Red to
Clutter.Color.RED and CLUTTER_COLOR_DarkOrange to
Clutter.Color.DARK_ORANGE. This convention disagrees with
ClutterStaticColor (but does agree with CLUTTER_COLOR_*). ebassi, do
you think this convention is OK?

it's a bit icky. the CLUTTER_COLOR_* pre-processor macros were added
mostly for convenience of the C developers, and the fact that they
reference a function makes them invisible for consumers of the
introspection data (the introspection scanner only recognises macros
that evaluates to numbers and strings).

from a Vala perspective, Clutter.Color.* matches the keysym namespace
of Clutter.Key.*, which was the intent on the C side, so it'd be
correct. as for the implementation of the patch, I'll leave it to Vala
developers to actually comment on.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]