Clutter.Alpha

g Clutter.Alpha Clutter.Alpha Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Alpha GObject.GInterface GObject.GInterface GObject.GInterface->Clutter.Scriptable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.Alpha GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Clutter.Scriptable (4)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_full (timeline, mode)

class

new_with_func (timeline, func, *data)

class

register_func (closure)

get_alpha ()

get_mode ()

get_timeline ()

set_closure (closure)

set_func (func, *data)

set_mode (mode)

set_timeline (timeline)

Virtual Methods

Inherited:

GObject.Object (7), Clutter.Scriptable (4)

Properties

Name

Type

Flags

Short Description

alpha

float

r

Alpha value as computed by the alpha deprecated

mode

int

r/w/c

Progress mode deprecated

timeline

Clutter.Timeline

r/w

Timeline used by the alpha deprecated

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.InitiallyUnowned

r

Class Details

class Clutter.Alpha(**kwargs)
Bases:

GObject.InitiallyUnowned, Clutter.Scriptable

Abstract:

No

Structure:

Clutter.AlphaClass

Clutter.Alpha combines a Clutter.Timeline and a function. The contents of the Clutter.Alpha structure are private and should only be accessed using the provided API.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline instead

classmethod new()
Returns:

the newly created empty Clutter.Alpha instance.

Return type:

Clutter.Alpha

Creates a new Clutter.Alpha instance. You must set a function to compute the alpha value using Clutter.Alpha.set_func() and bind a Clutter.Timeline object to the Clutter.Alpha instance using Clutter.Alpha.set_timeline().

You should use the newly created Clutter.Alpha instance inside a Clutter.Behaviour object.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline instead

classmethod new_full(timeline, mode)
Parameters:
Returns:

the newly created Clutter.Alpha

Return type:

Clutter.Alpha

Creates a new Clutter.Alpha instance and sets the timeline and animation mode.

See also Clutter.Alpha.set_timeline() and Clutter.Alpha.set_mode().

New in version 1.0.

Deprecated since version 1.12: Use Clutter.Timeline instead

classmethod new_with_func(timeline, func, *data)
Parameters:
Returns:

the newly created Clutter.Alpha

Return type:

Clutter.Alpha

Creates a new Clutter.Alpha instances and sets the timeline and the alpha function.

This function will not register func as a global alpha function.

See also Clutter.Alpha.set_timeline() and Clutter.Alpha.set_func().

New in version 1.0.

Deprecated since version 1.12: Use Clutter.Timeline instead

classmethod register_func(closure)
Parameters:

closure (GObject.Closure) – a GObject.Closure

Returns:

the logical id of the alpha function

Return type:

int

GObject.Closure variant of Clutter.Alpha.register_func().

Registers a global alpha function and returns its logical id to be used by Clutter.Alpha.set_mode() or by Clutter.Animation.

The logical id is always greater than Clutter.AnimationMode.ANIMATION_LAST.

New in version 1.0.

Deprecated since version 1.12: There is no direct replacement for this function. Use Clutter.Timeline.set_progress_func() on each specific Clutter.Timeline instance

get_alpha()
Returns:

The current alpha value for the alpha

Return type:

float

Query the current alpha value.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline.get_progress()

get_mode()
Returns:

the animation mode

Return type:

int

Retrieves the Clutter.AnimationMode used by self.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.Timeline instead

get_timeline()
Returns:

a Clutter.Timeline instance

Return type:

Clutter.Timeline

Gets the Clutter.Timeline bound to self.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline directlry

set_closure(closure)
Parameters:

closure (GObject.Closure) – A GObject.Closure

Sets the GObject.Closure used to compute the alpha value at each frame of the Clutter.Timeline bound to self.

New in version 0.8.

Deprecated since version 1.12: Use Clutter.Timeline.set_progress_func()

set_func(func, *data)
Parameters:

Sets the Clutter.AlphaFunc function used to compute the alpha value at each frame of the Clutter.Timeline bound to self.

This function will not register func as a global alpha function.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline.set_progress_func()

set_mode(mode)
Parameters:

mode (int) – a Clutter.AnimationMode

Sets the progress function of self using the symbolic value of mode, as taken by the Clutter.AnimationMode enumeration or using the value returned by Clutter.Alpha.register_func().

New in version 1.0.

Deprecated since version 1.12: Use Clutter.Timeline and Clutter.Timeline.set_progress_mode() instead

set_timeline(timeline)
Parameters:

timeline (Clutter.Timeline) – A Clutter.Timeline

Binds self to timeline.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline directly

Property Details

Clutter.Alpha.props.alpha
Name:

alpha

Type:

float

Default Value:

0.0

Flags:

READABLE

The alpha value as computed by the alpha function. The linear interval is 0.0 to 1.0, but the Alpha allows overshooting by one unit in each direction, so the valid interval is -1.0 to 2.0.

New in version 0.2.

Deprecated since version 1.12: Use Clutter.Timeline ::new-frame and Clutter.Timeline.get_progress() instead

Clutter.Alpha.props.mode
Name:

mode

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

The progress function logical id - either a value from the Clutter.AnimationMode enumeration or a value returned by Clutter.Alpha.register_func().

If Clutter.AnimationMode.CUSTOM_MODE is used then the function set using Clutter.Alpha.set_closure() or Clutter.Alpha.set_func() will be used.

New in version 1.0.

Deprecated since version 1.12: Use Clutter.Timeline :progress-mode

Clutter.Alpha.props.timeline
Name:

timeline

Type:

Clutter.Timeline

Default Value:

None

Flags:

READABLE, WRITABLE

A Clutter.Timeline instance used to drive the alpha function.

New in version 0.2.

Deprecated since version 1.12.