/** * clutter_value_set_units: * @value: a #GValue initialized to %CLUTTER_TYPE_UNITS * @units: the units to set * * Sets @value to @units * * Since: 0.8 */ void clutter_value_set_units (GValue *value, const ClutterUnits *units) { g_return_if_fail (CLUTTER_VALUE_HOLDS_UNITS (value)); value->data[0].v_pointer = clutter_units_copy (units); }
static void dax_element_video_init (DaxElementVideo *self) { DaxElementVideoPrivate *priv; DaxPreserveAspectRatio par; ClutterUnits zero; self->priv = priv = ELEMENT_VIDEO_PRIVATE (self); clutter_units_from_pixels (&zero, 0.0f); priv->x = clutter_units_copy (&zero); priv->y = clutter_units_copy (&zero); priv->width = clutter_units_copy (&zero); priv->height = clutter_units_copy (&zero); dax_preserve_aspect_ratio_set_default (&par); priv->par = dax_preserve_aspect_ratio_copy (&par); }
static void dax_element_video_set_height (DaxElementVideo *video, const ClutterUnits *height) { DaxElementVideoPrivate *priv = video->priv; if (priv->height) clutter_units_free (priv->height); priv->height = clutter_units_copy (height); }
static void dax_element_video_set_width (DaxElementVideo *video, const ClutterUnits *width) { DaxElementVideoPrivate *priv = video->priv; if (priv->width) clutter_units_free (priv->width); priv->width = clutter_units_copy (width); }
static void dax_element_video_set_y (DaxElementVideo *video, const ClutterUnits *y) { DaxElementVideoPrivate *priv = video->priv; if (priv->y) clutter_units_free (priv->y); priv->y = clutter_units_copy (y); }
static void dax_element_video_set_x (DaxElementVideo *video, const ClutterUnits *x) { DaxElementVideoPrivate *priv = video->priv; if (priv->x) clutter_units_free (priv->x); priv->x = clutter_units_copy (x); }