docs: Fixes for cross-references

This commit is contained in:
Emmanuele Bassi 2011-09-12 13:12:14 +01:00
parent 2a56cc799a
commit a9a104e109
9 changed files with 74 additions and 66 deletions

View File

@ -73,8 +73,8 @@
* <title>Defining a ClutterAlpha in ClutterScript</title> * <title>Defining a ClutterAlpha in ClutterScript</title>
* <para>The following JSON fragment defines a #ClutterAlpha * <para>The following JSON fragment defines a #ClutterAlpha
* using a #ClutterTimeline with id "sine-timeline" and an alpha * using a #ClutterTimeline with id "sine-timeline" and an alpha
* function called my_sine_alpha(). The defined #ClutterAlpha * function called <function>my_sine_alpha</function>. The defined
* instance can be reused in multiple #ClutterBehaviour * #ClutterAlpha instance can be reused in multiple #ClutterBehaviour
* definitions or for #ClutterAnimation definitions.</para> * definitions or for #ClutterAnimation definitions.</para>
* <programlisting><![CDATA[ * <programlisting><![CDATA[
* { * {

View File

@ -29,10 +29,10 @@
* #ClutterAnimatable is an interface that allows a #GObject class * #ClutterAnimatable is an interface that allows a #GObject class
* to control how a #ClutterAnimation will animate a property. * to control how a #ClutterAnimation will animate a property.
* *
* Each #ClutterAnimatable should implement the animate_property() * Each #ClutterAnimatable should implement the
* virtual function of the interface to compute the animation state * <function>animate_property</function> virtual function of the interface
* between two values of an interval depending on a progress factor, * to compute the animation state between two values of an interval depending
* expressed as a floating point value. * on a progress factor, expressed as a floating point value.
* *
* If a #ClutterAnimatable is animated by a #ClutterAnimation * If a #ClutterAnimatable is animated by a #ClutterAnimation
* instance, the #ClutterAnimation will call * instance, the #ClutterAnimation will call

View File

@ -60,8 +60,9 @@
* #ClutterAnimation<!-- -->s are distinguished from #ClutterBehaviour<!-- -->s * #ClutterAnimation<!-- -->s are distinguished from #ClutterBehaviour<!-- -->s
* because the former can only control #GObject properties of a single * because the former can only control #GObject properties of a single
* #GObject instance, while the latter can control multiple properties * #GObject instance, while the latter can control multiple properties
* using accessor functions inside the #ClutterBehaviour::alpha_notify * using accessor functions inside the #ClutterBehaviour
* virtual function, and can control multiple #ClutterActor<!-- -->s as well. * <function>alpha_notify</function> virtual function, and can control
* multiple #ClutterActor<!-- -->s as well.
* *
* For convenience, it is possible to use the clutter_actor_animate() * For convenience, it is possible to use the clutter_actor_animate()
* function call which will take care of setting up and tearing down * function call which will take care of setting up and tearing down
@ -735,7 +736,7 @@ clutter_animation_validate_bind (ClutterAnimation *animation,
* about animations, see clutter_actor_animate(). * about animations, see clutter_actor_animate().
* *
* If you need to update the interval instance use * If you need to update the interval instance use
* clutter_animation_update_property() instead. * clutter_animation_update_interval() instead.
* *
* Return value: (transfer none): The animation itself. * Return value: (transfer none): The animation itself.
* Since: 1.0 * Since: 1.0

View File

@ -56,7 +56,7 @@ typedef struct _ClutterChildMetaClass ClutterChildMetaClass;
* about each individual child added to a container. * about each individual child added to a container.
* *
* In order to use it you should create your own subclass of * In order to use it you should create your own subclass of
* #ClutterChildMeta and set the #ClutterContainerIface::child_meta_type * #ClutterChildMeta and set the #ClutterContainerIface child_meta_type
* interface member to your subclass type, like: * interface member to your subclass type, like:
* *
* |[ * |[
@ -80,9 +80,10 @@ typedef struct _ClutterChildMetaClass ClutterChildMetaClass;
* act like g_object_set() and g_object_get(). * act like g_object_set() and g_object_get().
* *
* You can provide hooks for your own storage as well as control the * You can provide hooks for your own storage as well as control the
* instantiation by overriding #ClutterContainerIface::create_child_meta, * instantiation by overriding the #ClutterContainerIface virtual functions
* #ClutterContainerIface::destroy_child_meta and * <function>create_child_meta</function>,
* #ClutterContainerIface::get_child_meta. * <function>destroy_child_meta</function>,
* and <function>get_child_meta</function>.
* *
* Since: 0.8 * Since: 0.8
*/ */

View File

@ -66,7 +66,7 @@
* the paint sequence. This is useful for example if the effect * the paint sequence. This is useful for example if the effect
* contains a cached image of the actor. In that case it can * contains a cached image of the actor. In that case it can
* optimise painting by avoiding the actor paint and instead * optimise painting by avoiding the actor paint and instead
* painting the cached image. The %CLUTTER_EFFECT_RUN_ACTOR_DIRTY * painting the cached image. The %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY
* flag is useful in this case. Clutter will set this flag when a * flag is useful in this case. Clutter will set this flag when a
* redraw has been queued on the actor since it was last * redraw has been queued on the actor since it was last
* painted. The effect can use this information to decide if the * painted. The effect can use this information to decide if the
@ -345,7 +345,7 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
* *
* Queues a repaint of the effect. The effect can detect when the paint * Queues a repaint of the effect. The effect can detect when the paint
* method is called as a result of this function because it will not * method is called as a result of this function because it will not
* have the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY flag set. In that case the * have the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag set. In that case the
* effect is free to assume that the actor has not changed its * effect is free to assume that the actor has not changed its
* appearance since the last time it was painted so it doesn't need to * appearance since the last time it was painted so it doesn't need to
* call clutter_actor_continue_paint() if it can draw a cached * call clutter_actor_continue_paint() if it can draw a cached
@ -366,17 +366,17 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
* Note however that modifying the position of the parent of an actor * Note however that modifying the position of the parent of an actor
* may change the appearance of the actor because its transformation * may change the appearance of the actor because its transformation
* matrix would change. In this case a redraw wouldn't be queued on * matrix would change. In this case a redraw wouldn't be queued on
* the actor itself so the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY would still * the actor itself so the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY would still
* not be set. The effect can detect this case by keeping track of the * not be set. The effect can detect this case by keeping track of the
* last modelview matrix that was used to render the actor and * last modelview matrix that was used to render the actor and
* veryifying that it remains the same in the next paint. * veryifying that it remains the same in the next paint.
* *
* Any other effects that are layered on top of the passed in effect * Any other effects that are layered on top of the passed in effect
* will still be passed the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY flag. If * will still be passed the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY flag. If
* anything queues a redraw on the actor without specifying an effect * anything queues a redraw on the actor without specifying an effect
* or with an effect that is lower in the chain of effects than this * or with an effect that is lower in the chain of effects than this
* one then that will override this call. In that case this effect * one then that will override this call. In that case this effect
* will instead be called with the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY * will instead be called with the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY
* flag set. * flag set.
* *
* Since: 1.8 * Since: 1.8

View File

@ -31,8 +31,8 @@
* #ClutterGestureAction is a sub-class of #ClutterAction that implements * #ClutterGestureAction is a sub-class of #ClutterAction that implements
* the logic for recognizing gesture gestures. It listens for low level events * the logic for recognizing gesture gestures. It listens for low level events
* such as #ClutterButtonEvent and #ClutterMotionEvent on the stage to raise * such as #ClutterButtonEvent and #ClutterMotionEvent on the stage to raise
* the signals #ClutterGestureAction::gesture-begin, #ClutterGestureAction::gesture-motion and * the #ClutterGestureAction::gesture-begin, #ClutterGestureAction::gesture-progress,
* #ClutterGestureAction::gesture-end. * and * #ClutterGestureAction::gesture-end signals.
* *
* To use #ClutterGestureAction you just need to apply it to a #ClutterActor * To use #ClutterGestureAction you just need to apply it to a #ClutterActor
* using clutter_actor_add_action() and connect to the signals: * using clutter_actor_add_action() and connect to the signals:
@ -43,7 +43,7 @@
* clutter_actor_add_action (actor, action); * clutter_actor_add_action (actor, action);
* *
* g_signal_connect (action, "gesture-begin", G_CALLBACK (on_gesture_begin), NULL); * g_signal_connect (action, "gesture-begin", G_CALLBACK (on_gesture_begin), NULL);
* g_signal_connect (action, "gesture-motion", G_CALLBACK (on_gesture_motion), NULL); * g_signal_connect (action, "gesture-progress", G_CALLBACK (on_gesture_progress), NULL);
* g_signal_connect (action, "gesture-end", G_CALLBACK (on_gesture_end), NULL); * g_signal_connect (action, "gesture-end", G_CALLBACK (on_gesture_end), NULL);
* ]| * ]|
* *

View File

@ -3029,11 +3029,11 @@ clutter_check_version (guint major,
* clutter_get_default_text_direction: * clutter_get_default_text_direction:
* *
* Retrieves the default direction for the text. The text direction is * Retrieves the default direction for the text. The text direction is
* determined by the locale and/or by the %CLUTTER_TEXT_DIRECTION environment * determined by the locale and/or by the <varname>CLUTTER_TEXT_DIRECTION</varname>
* variable * environment variable.
* *
* The default text direction can be overridden on a per-actor basis by using * The default text direction can be overridden on a per-actor basis by using
* clutter_actor_set_text_direction() * clutter_actor_set_text_direction().
* *
* Return value: the default text direction * Return value: the default text direction
* *

View File

@ -3727,7 +3727,7 @@ clutter_text_new_with_text (const gchar *font_name,
* Sets whether the #ClutterText actor should be editable. * Sets whether the #ClutterText actor should be editable.
* *
* An editable #ClutterText with key focus set using * An editable #ClutterText with key focus set using
* clutter_actor_grab_key_focus() or clutter_stage_take_key_focus() * clutter_actor_grab_key_focus() or clutter_stage_set_key_focus()
* will receive key events and will update its contents accordingly. * will receive key events and will update its contents accordingly.
* *
* Since: 1.0 * Since: 1.0

View File

@ -105,22 +105,22 @@ foo_actor_init (FooActor *actor)
<para>The size requisition is split into two different phases: width <para>The size requisition is split into two different phases: width
requisition and height requisition.</para> requisition and height requisition.</para>
<para>The <classname>ClutterActor</classname>::get_preferred_width() and <para>The <classname>ClutterActor</classname>::<function>get_preferred_width</function> and
<classname>ClutterActor</classname>::get_preferred_height() methods of a <classname>ClutterActor</classname>::<function>get_preferred_height</function> methods of a
#ClutterActor are invoked when clutter_actor_get_preferred_width() and #ClutterActor are invoked when clutter_actor_get_preferred_width() and
clutter_actor_get_preferred_height() are respectively called on an instance clutter_actor_get_preferred_height() are respectively called on an instance
of that actor class. They are used to return the preferred size of the of that actor class. They are used to return the preferred size of the
actor. Container actors, or composite actors with internal children, actor. Container actors, or composite actors with internal children,
should call clutter_actor_get_preferred_width() and should call clutter_actor_get_preferred_width() and
clutter_actor_get_preferred_height() on each visible child inside clutter_actor_get_preferred_height() on each visible child inside
their implementation of the get_preferred_width() and get_preferred_height() their implementation of the <function>get_preferred_width</function> and
virtual functions.</para> <function>get_preferred_height</function> virtual functions.</para>
<para>The get_preferred_width() and get_preferred_height() virtual <para>The <function>get_preferred_width</function> and <function>get_preferred_height</function>
functions return both the minimum size of the actor and its natural virtual functions return both the minimum size of the actor and its natural
size. The minimum size is defined as the amount of space an actor size. The minimum size is defined as the amount of space an actor must
must occupy to be useful; the natural size is defined as the amount occupy to be useful; the natural size is defined as the amount of space an
of space an actor would occupy if nothing would constrain it.</para> actor would occupy if nothing would constrain it.</para>
<note><para>The natural size must always be greater than, or equal <note><para>The natural size must always be greater than, or equal
to the minimum size. #ClutterActor will just ignore a natural size to the minimum size. #ClutterActor will just ignore a natural size
@ -137,9 +137,10 @@ foo_actor_init (FooActor *actor)
<note><para>The clutter_actor_get_preferred_size() function will <note><para>The clutter_actor_get_preferred_size() function will
automatically check the geometry management preferred by the actor automatically check the geometry management preferred by the actor
and return its preferred size depending on the value of the request-mode and return its preferred size depending on the value of the request-mode
property and on the natural size of the actor. The get_preferred_size() property and on the natural size of the actor. The
method, though, will ignore any notion of "available size" so it should clutter_actor_get_preferred_size() method, though, will ignore any
not be used inside a <classname>ClutterActor</classname>::allocate() notion of "available size" so it should not be used inside a
<classname>ClutterActor</classname>::<function>allocate</function>
implementation.</para></note> implementation.</para></note>
<para>The size requisition starts from the #ClutterStage and it is <para>The size requisition starts from the #ClutterStage and it is
@ -159,12 +160,13 @@ foo_actor_init (FooActor *actor)
<title>Width requisition implementation of a container</title> <title>Width requisition implementation of a container</title>
<para>This example shows how an actor class should override the <para>This example shows how an actor class should override the
get_preferred_width() virtual function of #ClutterActor. In this case, <function>get_preferred_width</function> virtual function of
the returned widths are the union of the extents of all the #ClutterActor. In this case, the returned widths are the union of
<classname>FooActor</classname> children.</para> the extents of all the <classname>FooActor</classname> children.</para>
<para>The get_preferred_height() implementation would be similar to the <para>The <function>get_preferred_height</function> implementation
get_preferred_width() implementation, so it is omitted.</para> would be similar to the <function>get_preferred_width</function>
implementation, so it is omitted.</para>
<programlisting> <programlisting>
static void static void
@ -250,21 +252,21 @@ foo_actor_get_preferred_width (ClutterActor *actor,
<refsect1 id="actor-size-allocation"> <refsect1 id="actor-size-allocation">
<title>Size allocation</title> <title>Size allocation</title>
<para>The <classname>ClutterActor</classname>::allocate() method of a <para>The <classname>ClutterActor</classname>::<function>allocate</function>
#ClutterActor is invoked when clutter_actor_allocate() is called on an virtual function of a #ClutterActor is invoked when clutter_actor_allocate()
instance of that actor class. It is used by a parent actor to set the is called on an instance of that actor class. It is used by a parent actor
coordinates of the bounding box for its children actors. Hence, to set the coordinates of the bounding box for its children actors. Hence,
container actors, or composite actors with internal children, should container actors, or composite actors with internal children, should
override the allocate() virtual function and call clutter_actor_allocate() override the <function>allocate</function> virtual function and call
on each visible child.</para> clutter_actor_allocate() on each visible child.</para>
<para>Each actor can know from their allocation box whether they <para>Each actor can know from their allocation box whether they
have been moved with respect to their parent actor. Each child will have been moved with respect to their parent actor. Each child will
also be able to tell whether their parent has been moved with respect also be able to tell whether their parent has been moved with respect
to the stage.</para> to the stage.</para>
<note><para>The allocate() virtual function implementation will be <note><para>The <function>allocate</function> virtual function implementation
notified whether the actor has been moved, while clutter_actor_allocate() will be notified whether the actor has been moved, while clutter_actor_allocate()
will usually be invoked with the %CLUTTER_ABSOLUTE_ORIGIN_CHANGED flag, will usually be invoked with the %CLUTTER_ABSOLUTE_ORIGIN_CHANGED flag,
meaning that the parent has been moved.</para></note> meaning that the parent has been moved.</para></note>
@ -376,16 +378,18 @@ foo_actor_allocate (ClutterActor *actor,
<refsect1 id="actor-painting-and-picking"> <refsect1 id="actor-painting-and-picking">
<title>Painting and picking</title> <title>Painting and picking</title>
<para>The <classname>ClutterActor</classname>::paint() method should be <para>The <classname>ClutterActor</classname>::<function>paint</function>
overridden if the actor needs to control its drawing process, by virtual function should be overridden if the actor needs to control its
painting other child actors or drawing with the Cogl 3D graphics drawing process, by painting other child actors or drawing with the Cogl
3D graphics
API.</para> API.</para>
<example id="simple-actor-paint-example"> <example id="simple-actor-paint-example">
<title>Paint implementation of a simple actor</title> <title>Paint implementation of a simple actor</title>
<para>In this example, the <classname>FooActor</classname> <para>In this example, the <classname>FooActor</classname>
implementation of the paint() virtual function is drawing a rectangle implementation of the <function>paint</function> virtual function is
with rounded corners with a custom color using the Cogl API.</para> drawing a rectangle with rounded corners with a custom color using the
Cogl API.</para>
<programlisting> <programlisting>
static void static void
foo_actor_paint (ClutterActor *actor) foo_actor_paint (ClutterActor *actor)
@ -422,8 +426,8 @@ foo_actor_paint (ClutterActor *actor)
</programlisting> </programlisting>
</example> </example>
<note><para>When inside the <classname>ClutterActor</classname>::paint() <note><para>When inside the <classname>ClutterActor</classname>::<function>paint</function>
method the actor is already positioned at the coordinates specified by virtual function the actor is already positioned at the coordinates specified by
its parent; all the paint operations should take place from the (0, 0) its parent; all the paint operations should take place from the (0, 0)
coordinates.</para></note> coordinates.</para></note>
@ -456,16 +460,18 @@ foo_actor_paint (ClutterActor *actor)
<para>If the actor has a non-rectangular shape, or it has internal <para>If the actor has a non-rectangular shape, or it has internal
children that need to be distinguished by the events delivery mechanism, children that need to be distinguished by the events delivery mechanism,
the <classname>ClutterActor</classname>::pick() method should also be the <classname>ClutterActor</classname>::<function>pick</function> virtual
overridden. The pick() method works exactly like the paint() method, but function should also be overridden. The <function>pick</function> virtual
the actor should paint just its shape with the passed colour:</para> function works exactly like the <function>paint</function> virtual
function, but the actor should paint just its shape with the passed
colour:</para>
<example id="simple-actor-pick-example"> <example id="simple-actor-pick-example">
<title>Pick implementation of a simple actor</title> <title>Pick implementation of a simple actor</title>
<para>In this example, <classname>FooActor</classname> overrides the <para>In this example, <classname>FooActor</classname> overrides the
pick() virtual function default implementation to paint itself with a <function>pick</function> virtual function default implementation to
shaped silhouette, to allow events only on the actual shape of the actor paint itself with a shaped silhouette, to allow events only on the
instead of the whole paint area.</para> actual shape of the actor instead of the whole paint area.</para>
<programlisting> <programlisting>
static void static void
foo_actor_pick (ClutterActor *actor, foo_actor_pick (ClutterActor *actor,
@ -500,8 +506,8 @@ foo_actor_pick (ClutterActor *actor,
</example> </example>
<para>Containers should simply chain up to the parent class' <para>Containers should simply chain up to the parent class'
pick() implementation to get their silhouette painted and then <function>pick</function> implementation to get their silhouette painted
paint their children:</para> and then paint their children:</para>
<example id="container-actor-pick-example"> <example id="container-actor-pick-example">
<title>Pick implementation of a container</title> <title>Pick implementation of a container</title>