mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
docs: Add PathConstraint
This commit is contained in:
parent
6f8e46e0b3
commit
f6ab7eccd9
@ -22,6 +22,20 @@
|
||||
* Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:clutter-path-constraint
|
||||
* @Title: ClutterPathConstraint
|
||||
* @Short_Description: A constraint that follows a path
|
||||
*
|
||||
* #ClutterPathConstraint is a simple constraint that modifies the allocation
|
||||
* of the #ClutterActor to which it has been applied using a #ClutterPath.
|
||||
*
|
||||
* By setting the #ClutterPathConstraint:offset property it is possible to
|
||||
* control how far along the path the #ClutterActor should be.
|
||||
*
|
||||
* ClutterPathConstraint is available since Clutter 1.6.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@ -216,6 +230,17 @@ clutter_path_constraint_init (ClutterPathConstraint *self)
|
||||
self->offset = 0.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_path_constraint_new:
|
||||
* @path: (allow-none): a #ClutterPath, or %NULL
|
||||
* @offset: the offset along the #ClutterPath
|
||||
*
|
||||
* Creates a new #ClutterPathConstraint with the given @path and @offset
|
||||
*
|
||||
* Return value: (transfer full): the newly created #ClutterPathConstraint
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
ClutterConstraint *
|
||||
clutter_path_constraint_new (ClutterPath *path,
|
||||
gfloat offset)
|
||||
@ -228,6 +253,18 @@ clutter_path_constraint_new (ClutterPath *path,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_path_constraint_set_path:
|
||||
* @constraint: a #ClutterPathConstraint
|
||||
* @path: (allow-none): a #ClutterPath
|
||||
*
|
||||
* Sets the @path to be followed by the #ClutterPathConstraint.
|
||||
*
|
||||
* The @constraint will take ownership of the #ClutterPath passed to this
|
||||
* function.
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
void
|
||||
clutter_path_constraint_set_path (ClutterPathConstraint *constraint,
|
||||
ClutterPath *path)
|
||||
@ -253,6 +290,18 @@ clutter_path_constraint_set_path (ClutterPathConstraint *constraint,
|
||||
_clutter_notify_by_pspec (G_OBJECT (constraint), path_properties[PROP_PATH]);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_path_constraint_get_path:
|
||||
* @constraint: a #ClutterPathConstraint
|
||||
*
|
||||
* Retrieves a pointer to the #ClutterPath used by @constraint.
|
||||
*
|
||||
* Return value: (transfer none): the #ClutterPath used by the
|
||||
* #ClutterPathConstraint, or %NULL. The returned #ClutterPath is owned
|
||||
* by the constraint and it should not be unreferenced
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
ClutterPath *
|
||||
clutter_path_constraint_get_path (ClutterPathConstraint *constraint)
|
||||
{
|
||||
@ -261,6 +310,15 @@ clutter_path_constraint_get_path (ClutterPathConstraint *constraint)
|
||||
return constraint->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_path_constraint_set_offset:
|
||||
* @constraint: a #ClutterPathConstraint
|
||||
* @offset: the offset along the path
|
||||
*
|
||||
* Sets the offset along the #ClutterPath used by @constraint.
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
void
|
||||
clutter_path_constraint_set_offset (ClutterPathConstraint *constraint,
|
||||
gfloat offset)
|
||||
@ -278,6 +336,16 @@ clutter_path_constraint_set_offset (ClutterPathConstraint *constraint,
|
||||
_clutter_notify_by_pspec (G_OBJECT (constraint), path_properties[PROP_OFFSET]);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_path_constraint_get_offset:
|
||||
* @constraint: a #ClutterPathConstraint
|
||||
*
|
||||
* Retrieves the offset along the #ClutterPath used by @constraint.
|
||||
*
|
||||
* Return value: the offset
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
gfloat
|
||||
clutter_path_constraint_get_offset (ClutterPathConstraint *constraint)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ G_BEGIN_DECLS
|
||||
* <structname>ClutterPathConstraint</structname> is an opaque structure
|
||||
* whose members cannot be directly accessed
|
||||
*
|
||||
* Since: 1.4
|
||||
* Since: 1.6
|
||||
*/
|
||||
typedef struct _ClutterPathConstraint ClutterPathConstraint;
|
||||
|
||||
|
@ -2556,3 +2556,19 @@ CLUTTER_IS_SETTINGS
|
||||
<SUBSECTION Private>
|
||||
clutter_settings_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>clutter-path-constraint</FILE>
|
||||
ClutterPathConstraint
|
||||
clutter_path_constraint_new
|
||||
clutter_path_constraint_set_path
|
||||
clutter_path_constraint_get_path
|
||||
clutter_path_constraint_set_offset
|
||||
clutter_path_constraint_get_offset
|
||||
<SUBSECTION Standard>
|
||||
CLUTTER_PATH_CONSTRAINT
|
||||
CLUTTER_IS_PATH_CONSTRAINT
|
||||
CLUTTER_TYPE_PATH_CONSTRAINT
|
||||
<SUBSECTION Private>
|
||||
clutter_path_constraint_get_type
|
||||
</SECTION>
|
||||
|
Loading…
Reference in New Issue
Block a user