### Class

# Clutter Interval

#### Description [src]

    class Clutter.Interval : GObject.InitiallyUnowned
    {
      /* No available fields */
    }

An object holding an interval of two values

`ClutterInterval` is a simple object that can hold two values defining an interval. `ClutterInterval` can hold any value that can be enclosed inside a `GValue`.

Once a `ClutterInterval` for a specific `GType` has been instantiated the `ClutterInterval:value-type` property cannot be changed anymore.

`ClutterInterval` starts with a floating reference; this means that any object taking a reference on a `ClutterInterval` instance should also take ownership of the interval by using g_object_ref_sink().

`ClutterInterval` can be subclassed to override the validation and value computation.

#### Ancestors

- GInitiallyUnowned
- GObject

#### Constructors

###### clutter_interval_new

Creates a new `ClutterInterval` holding values of type `gtype`.

###### clutter_interval_new_with_values

Creates a new `ClutterInterval` of type `gtype`, between `initial` and `final`.

#### Functions

###### clutter_interval_register_progress_func

Sets the progress function for a given `value_type`, like:.

#### Instance methods

###### clutter_interval_clone

Creates a copy of `interval`.

###### clutter_interval_compute

Computes the value between the `interval` boundaries given the progress `factor`.

###### clutter_interval_compute_value

Computes the value between the `interval` boundaries given the progress `factor` and copies it into `value`.

###### clutter_interval_get_final_value

Retrieves the final value of `interval` and copies it into `value`.

###### clutter_interval_get_initial_value

Retrieves the initial value of `interval` and copies it into `value`.

###### clutter_interval_get_interval

Variable arguments wrapper for `clutter_interval_get_initial_value()` and `clutter_interval_get_final_value()` that avoids using the `GValue` arguments:.

###### clutter_interval_get_value_type

Retrieves the `GType` of the values inside `interval`.

###### clutter_interval_is_valid

Checks if the `interval` has a valid initial and final values.

###### clutter_interval_peek_final_value

Gets the pointer to the final value of `interval`.

###### clutter_interval_peek_initial_value

Gets the pointer to the initial value of `interval`.

###### clutter_interval_set_final

Variadic arguments version of `clutter_interval_set_final_value()`.

###### clutter_interval_set_final_value

Sets the final value of `interval` to `value`. The value is copied inside the `ClutterInterval`.

###### clutter_interval_set_initial

Variadic arguments version of `clutter_interval_set_initial_value()`.

###### clutter_interval_set_initial_value

Sets the initial value of `interval` to `value`. The value is copied inside the `ClutterInterval`.

###### clutter_interval_set_interval

Variable arguments wrapper for `clutter_interval_set_initial_value()` and `clutter_interval_set_final_value()` that avoids using the `GValue` arguments:.

###### clutter_interval_validate

Validates the initial and final values of `interval` against a `GParamSpec`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Clutter.Interval:final

The final value of the interval.

###### Clutter.Interval:initial

The initial value of the interval.

###### Clutter.Interval:value-type

The type of the values in the interval.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct ClutterIntervalClass {
      gboolean (* validate) (
        ClutterInterval* interval,
        GParamSpec* pspec
      );
      gboolean (* compute_value) (
        ClutterInterval* interval,
        gdouble factor,
        GValue* value
      );

    }

The `ClutterIntervalClass` contains only private data.

###### Class members

`validate: gboolean (* validate) ( ClutterInterval* interval, GParamSpec* pspec )`

  Virtual function for validating an interval using a `GParamSpec`.

`compute_value: gboolean (* compute_value) ( ClutterInterval* interval, gdouble factor, GValue* value )`

  Virtual function for computing the value inside an interval using an adimensional factor between 0 and 1.

#### Virtual methods

###### Clutter.IntervalClass.compute_value

Computes the value between the `interval` boundaries given the progress `factor` and copies it into `value`.

###### Clutter.IntervalClass.validate

Validates the initial and final values of `interval` against a `GParamSpec`.