Clutter.SnapConstraint

g Clutter.ActorMeta Clutter.ActorMeta Clutter.Constraint Clutter.Constraint Clutter.ActorMeta->Clutter.Constraint Clutter.SnapConstraint Clutter.SnapConstraint Clutter.Constraint->Clutter.SnapConstraint GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.ActorMeta GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.ActorMeta (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (source, from_edge, to_edge, offset)

get_edges ()

get_offset ()

get_source ()

set_edges (from_edge, to_edge)

set_offset (offset)

set_source (source)

Virtual Methods

Inherited:

Clutter.Constraint (2), Clutter.ActorMeta (1), GObject.Object (7)

Properties

Inherited:

Clutter.ActorMeta (3)

Name

Type

Flags

Short Description

from-edge

Clutter.SnapEdge

r/w/c

The edge of the actor that should be snapped

offset

float

r/w/c

The offset in pixels to apply to the constraint

source

Clutter.Actor

r/w/c

The source of the constraint

to-edge

Clutter.SnapEdge

r/w/c

The edge of the source that should be snapped

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Clutter.SnapConstraint(**kwargs)
Bases:

Clutter.Constraint

Abstract:

No

Structure:

Clutter.SnapConstraintClass

Clutter.SnapConstraint is an opaque structure whose members cannot be directly accesses

New in version 1.6.

classmethod new(source, from_edge, to_edge, offset)
Parameters:
Returns:

the newly created Clutter.SnapConstraint

Return type:

Clutter.Constraint

Creates a new Clutter.SnapConstraint that will snap a Clutter.Actor to the edge of source, with the given offset.

New in version 1.6.

get_edges()
Returns:

from_edge:

return location for the actor’s edge, or None

to_edge:

return location for the source’s edge, or None

Return type:

(from_edge: Clutter.SnapEdge, to_edge: Clutter.SnapEdge)

Retrieves the edges used by the self

New in version 1.6.

get_offset()
Returns:

the offset, in pixels

Return type:

float

Retrieves the offset set using Clutter.SnapConstraint.set_offset()

New in version 1.6.

get_source()
Returns:

a pointer to the source actor

Return type:

Clutter.Actor

Retrieves the Clutter.Actor set using Clutter.SnapConstraint.set_source()

New in version 1.6.

set_edges(from_edge, to_edge)
Parameters:

Sets the edges to be used by the self

The from_edge is the edge on the Clutter.Actor to which self has been added. The to_edge is the edge of the Clutter.Actor inside the Clutter.SnapConstraint :source property.

New in version 1.6.

set_offset(offset)
Parameters:

offset (float) – the offset to apply, in pixels

Sets the offset to be applied to the constraint

New in version 1.6.

set_source(source)
Parameters:

source (Clutter.Actor or None) – a Clutter.Actor, or None to unset the source

Sets the source Clutter.Actor for the constraint

New in version 1.6.

Property Details

Clutter.SnapConstraint.props.from_edge
Name:

from-edge

Type:

Clutter.SnapEdge

Default Value:

Clutter.SnapEdge.RIGHT

Flags:

READABLE, WRITABLE, CONSTRUCT

The edge of the Clutter.Actor that should be snapped

New in version 1.6.

Clutter.SnapConstraint.props.offset
Name:

offset

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE, CONSTRUCT

The offset, in pixels, between Clutter.SnapConstraint :from-edge and Clutter.SnapConstraint :to-edge

New in version 1.6.

Clutter.SnapConstraint.props.source
Name:

source

Type:

Clutter.Actor

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The Clutter.Actor used as the source for the constraint

New in version 1.6.

Clutter.SnapConstraint.props.to_edge
Name:

to-edge

Type:

Clutter.SnapEdge

Default Value:

Clutter.SnapEdge.RIGHT

Flags:

READABLE, WRITABLE, CONSTRUCT

The edge of the Clutter.SnapConstraint :source that should be snapped

New in version 1.6.