Example #1
0
/**
 * 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);
}
Example #2
0
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);
}
Example #3
0
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);
}
Example #4
0
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);
}
Example #5
0
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);
}
Example #6
0
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);
}