An object holding an interval of two values
<clutter-interval>
is a simple object that can hold two values
defining an interval. <clutter-interval>
can hold any value that
can be enclosed inside a <gvalue>
.
Once a <clutter-interval>
for a specific <g-type>
has been
instantiated the <"value-type">
property cannot be changed
anymore.
<clutter-interval>
starts with a floating reference; this means
that any object taking a reference on a <clutter-interval>
instance should also take ownership of the interval by using
g-object-ref-sink
.
<clutter-interval>
is used by <clutter-animation>
to
define the interval of values that an implicit animation should tween
over.
<clutter-interval>
can be subclassed to override the validation
and value computation.
<clutter-interval>
is available since Clutter 1.0
<gtype>
) (initial <gvalue>
) (final <gvalue>
) ⇒ (ret <clutter-interval>
)Creates a new
<clutter-interval>
of type gtype, between initial and final.This function is useful for language bindings.
- gtype
- the type of the values in the interval
- initial
- a
<gvalue>
holding the initial value of the interval- final
- a
<gvalue>
holding the final value of the interval- ret
- the newly created
<clutter-interval>
Since 1.0
<clutter-interval>
) ⇒ (ret <clutter-interval>
)Creates a copy of interval.
- interval
- a
<clutter-interval>
- ret
- the newly created
<clutter-interval>
.Since 1.0
<clutter-interval>
) ⇒ (ret <gtype>
)Retrieves the
<g-type>
of the values inside interval.
- interval
- a
<clutter-interval>
- ret
- the type of the value, or G_TYPE_INVALID
Since 1.0
<clutter-interval>
) (value <gvalue>
)Sets the initial value of interval to value. The value is copied inside the
<clutter-interval>
.Rename to: clutter_interval_set_initial
- interval
- a
<clutter-interval>
- value
- a
<gvalue>
Since 1.0
<clutter-interval>
) ⇒ (ret <gvalue>
)Retrieves the initial value of interval and copies it into value.
The passed
<gvalue>
must be initialized to the value held by the<clutter-interval>
.
- interval
- a
<clutter-interval>
- value
- a
<gvalue>
.Since 1.0
<clutter-interval>
) (value <gvalue>
)Sets the final value of interval to value. The value is copied inside the
<clutter-interval>
.Rename to: clutter_interval_set_final
- interval
- a
<clutter-interval>
- value
- a
<gvalue>
Since 1.0
<clutter-interval>
) ⇒ (ret <gvalue>
)Retrieves the final value of interval and copies it into value.
The passed
<gvalue>
must be initialized to the value held by the<clutter-interval>
.
- interval
- a
<clutter-interval>
- value
- a
<gvalue>
.Since 1.0
<clutter-interval>
) (pspec <gparam>
) ⇒ (ret bool
)Validates the initial and final values of interval against a
<gparam>
.
- interval
- a
<clutter-interval>
- pspec
- a
<gparam>
- ret
- ‘
#t
’ if the<clutter-interval>
is valid, ‘#f
’ otherwiseSince 1.0
<clutter-interval>
) (factor double
) ⇒ (ret <gvalue>
)Computes the value between the interval boundaries given the progress factor
Unlike
clutter-interval-compute-value
, this function will return a const pointer to the computed valueYou should use this function if you immediately pass the computed value to another function that makes a copy of it, like
g-object-set-property
- interval
- a
<clutter-interval>
- factor
- the progress factor, between 0 and 1
- ret
- a pointer to the computed value, or ‘
#f
’ if the computation was not successfull.Since 1.4