Fix last improper usage of ClutterUnits

ClutterUnits should not be used interchangeably as, or with
ClutterFixed values. ClutterUnits should also not be assumed
to be integers.

This commit fixes the last few improper usages of ClutterUnit
values, and adds a CLUTTER_UNITS_FORMAT macro for safely printing
ClutterUnit values with printf().
This commit is contained in:
Emmanuele Bassi
2009-01-08 15:45:22 +00:00
parent e4b1859077
commit e9ee7f049d
3 changed files with 59 additions and 52 deletions

View File

@ -59,6 +59,8 @@ typedef gint32 ClutterUnit;
#define CLUTTER_UNITS_FROM_FIXED(x) (x)
#define CLUTTER_UNITS_TO_FIXED(x) (x)
#define CLUTTER_UNITS_FORMAT "d"
/**
* CLUTTER_UNITS_FROM_DEVICE:
* @x: value in pixels