Bug #902 - Support transform from G_TYPE_INT to ClutterUnit
* clutter/clutter-units.c:
(clutter_value_transform_int_unit),
(clutter_unit_get_type): Add GValue transformation function from
integer values to ClutterUnit. (#902)
(param_unit_validate): Fix validation for ClutterParamSpecUnit;
this allows writable ClutterUnit properties.
* clutter/clutter-fixed.c:
(clutter_value_transform_int_fixed),
(clutter_value_transform_double_fixed),
(clutter_value_transform_float_fixed): Add GValue transformation
functions from native types (int, double, float) to ClutterFixed.
(clutter_fixed_get_type): Register the new transformation functions.
(param_fixed_validate): Fix validation for ClutterParamSpecUnit;
this allows writable ClutterFixed properties.
* clutter/clutter-units.c (param_unit_init): Use the right
macros to set the default minimum and maximum values.
* clutter/clutter-fixed.c (param_fixed_init): Ditto as above.
* clutter/clutter-fixed.c:
(clutter_value_transform_fixed_int),
(clutter_value_transform_fixed_double),
(clutter_value_transform_fixed_float),
(clutter_fixed_get_type): Add GValue transformation functions
for ClutterFixed; copying a CLUTTER_TYPE_FIXED GValue into
a G_TYPE_FLOAT/G_TYPE_DOUBLE one will automatically transform
the fixed point representation into a floating point one. Also
add the G_TYPE_INT transformation function to do a plain
fixed->int copy.
* clutter/clutter-units.c:
(clutter_value_transform_unit_int),
(clutter_unit_get_type): Add a unit->int transformation function.
* clutter/Makefile.am: Add clutter-units.c
* clutter/clutter-units.[ch]: Add a ClutterUnit fundamental
type, and wrappers for storing it into GValues; also add a
GParamSpec subclass for defining parameters holding ClutterUnit
values. This allows creating GObject properties using units.
* doc/reference/clutter-sections.txt: Document the newly
added API.