Copies units
Frees the resources allocated by units
You should only call this function on a #ClutterUnits created using clutter_units_copy()
Retrieves the unit type of the value stored inside units
Retrieves the value stored inside units
Converts a value in #ClutterUnits to pixels
Converts units
into a string
See clutter_units_from_string() for the units syntax and for examples of output
Fractional values are truncated to the second decimal position for em, mm and cm, and to the first decimal position for typographic points. Pixels are integers.
Stores a value in centimeters inside units
centimeters
Stores a value in em inside units,
using the default font
name as returned by clutter_backend_get_font_name()
em
Stores a value in em inside units
using font_name
the font name and size
em
Stores a value in millimiters inside units
millimeters
Stores a value in pixels inside units
pixels
Stores a value in typographic points inside units
typographic points
Parses a value and updates units
with it
A #ClutterUnits expressed in string should match:
|[ units: wsp* unit-value wsp* unit-name? wsp* unit-value: number unit-name: 'px' | 'pt' | 'mm' | 'em' | 'cm' number: digit+ | digit* sep digit+ sep: '.' | ',' digit: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' wsp: (#0x20 | #0x9 | #0xA | #0xB | #0xC | #0xD)+
For instance, these are valid strings:
|[
10 px
5.1 em
24 pt
12.6 mm
.3 cm
While these are not:
|[ 42 cats omg!1!ponies
If no unit is specified, pixels are assumed.
@param str the string to convert
An opaque structure, to be used to store sizing and positioning values along with their unit.