Top |
ClutterSnapEdge | from-edge | Read / Write / Construct |
gfloat | offset | Read / Write / Construct |
ClutterActor * | source | Read / Write / Construct |
ClutterSnapEdge | to-edge | Read / Write / Construct |
GObject ╰── GInitiallyUnowned ╰── ClutterActorMeta ╰── ClutterConstraint ╰── ClutterSnapConstraint
ClutterSnapConstraint is a constraint the snaps the edges of two actors together, expanding the actor's allocation if necessary.
An offset can be applied to the constraint, to provide spacing.
ClutterSnapConstraint is available since Clutter 1.6
ClutterConstraint * clutter_snap_constraint_new (ClutterActor *source
,ClutterSnapEdge from_edge
,ClutterSnapEdge to_edge
,gfloat offset
);
Creates a new ClutterSnapConstraint that will snap a ClutterActor
to the edge
of source
, with the given offset
.
source |
the ClutterActor to use as the source of
the constraint, or |
[allow-none] |
from_edge |
the edge of the actor to use in the constraint |
|
to_edge |
the edge of |
|
offset |
the offset to apply to the constraint, in pixels |
Since: 1.6
void clutter_snap_constraint_set_source (ClutterSnapConstraint *constraint
,ClutterActor *source
);
Sets the source ClutterActor for the constraint
Since: 1.6
ClutterActor *
clutter_snap_constraint_get_source (ClutterSnapConstraint *constraint
);
Retrieves the ClutterActor set using clutter_snap_constraint_set_source()
Since: 1.6
void clutter_snap_constraint_set_edges (ClutterSnapConstraint *constraint
,ClutterSnapEdge from_edge
,ClutterSnapEdge to_edge
);
Sets the edges to be used by the constraint
The from_edge
is the edge on the ClutterActor to which constraint
has been added. The to_edge
is the edge of the ClutterActor inside
the “source” property.
Since: 1.6
void clutter_snap_constraint_get_edges (ClutterSnapConstraint *constraint
,ClutterSnapEdge *from_edge
,ClutterSnapEdge *to_edge
);
Retrieves the edges used by the constraint
constraint |
||
from_edge |
return location for the actor's edge, or |
[out] |
to_edge |
return location for the source's edge, or |
[out] |
Since: 1.6
void clutter_snap_constraint_set_offset (ClutterSnapConstraint *constraint
,gfloat offset
);
Sets the offset to be applied to the constraint
Since: 1.6
gfloat
clutter_snap_constraint_get_offset (ClutterSnapConstraint *constraint
);
Retrieves the offset set using clutter_snap_constraint_set_offset()
Since: 1.6
typedef struct _ClutterSnapConstraint ClutterSnapConstraint;
ClutterSnapConstraint is an opaque structure whose members cannot be directly accesses
Since: 1.6
“from-edge”
property“from-edge” ClutterSnapEdge
The edge of the ClutterActor that should be snapped
Flags: Read / Write / Construct
Default value: CLUTTER_SNAP_EDGE_RIGHT
Since: 1.6
“offset”
property “offset” gfloat
The offset, in pixels, between “from-edge” and “to-edge”
Flags: Read / Write / Construct
Default value: 0
Since: 1.6
“source”
property“source” ClutterActor *
The ClutterActor used as the source for the constraint
Flags: Read / Write / Construct
Since: 1.6
“to-edge”
property“to-edge” ClutterSnapEdge
The edge of the “source” that should be snapped
Flags: Read / Write / Construct
Default value: CLUTTER_SNAP_EDGE_RIGHT
Since: 1.6