From a9a104e109722e0972afcd6fa4cf3c2774d3333e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 12 Sep 2011 13:12:14 +0100 Subject: [PATCH] docs: Fixes for cross-references --- clutter/clutter-alpha.c | 4 +- clutter/clutter-animatable.c | 8 +- clutter/clutter-animation.c | 7 +- clutter/clutter-child-meta.h | 9 ++- clutter/clutter-effect.c | 10 +-- clutter/clutter-gesture-action.c | 6 +- clutter/clutter-main.c | 6 +- clutter/clutter-text.c | 2 +- doc/reference/clutter/subclassing-ClutterActor.xml | 88 ++++++++++++---------- 9 files changed, 74 insertions(+), 66 deletions(-) diff --git a/clutter/clutter-alpha.c b/clutter/clutter-alpha.c index f79a2e8..a99cfc9 100644 --- a/clutter/clutter-alpha.c +++ b/clutter/clutter-alpha.c @@ -73,8 +73,8 @@ * Defining a ClutterAlpha in ClutterScript * The following JSON fragment defines a #ClutterAlpha * using a #ClutterTimeline with id "sine-timeline" and an alpha - * function called my_sine_alpha(). The defined #ClutterAlpha - * instance can be reused in multiple #ClutterBehaviour + * function called my_sine_alpha. The defined + * #ClutterAlpha instance can be reused in multiple #ClutterBehaviour * definitions or for #ClutterAnimation definitions. * animate_property virtual function of the interface + * to compute the animation state between two values of an interval depending + * on a progress factor, expressed as a floating point value. * * If a #ClutterAnimatable is animated by a #ClutterAnimation * instance, the #ClutterAnimation will call diff --git a/clutter/clutter-animation.c b/clutter/clutter-animation.c index a572c31..555a615 100644 --- a/clutter/clutter-animation.c +++ b/clutter/clutter-animation.c @@ -60,8 +60,9 @@ * #ClutterAnimations are distinguished from #ClutterBehaviours * because the former can only control #GObject properties of a single * #GObject instance, while the latter can control multiple properties - * using accessor functions inside the #ClutterBehaviour::alpha_notify - * virtual function, and can control multiple #ClutterActors as well. + * using accessor functions inside the #ClutterBehaviour + * alpha_notify virtual function, and can control + * multiple #ClutterActors as well. * * For convenience, it is possible to use the clutter_actor_animate() * 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(). * * 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. * Since: 1.0 diff --git a/clutter/clutter-child-meta.h b/clutter/clutter-child-meta.h index d093c1a..0a249f0 100644 --- a/clutter/clutter-child-meta.h +++ b/clutter/clutter-child-meta.h @@ -56,7 +56,7 @@ typedef struct _ClutterChildMetaClass ClutterChildMetaClass; * about each individual child added to a container. * * 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: * * |[ @@ -80,9 +80,10 @@ typedef struct _ClutterChildMetaClass ClutterChildMetaClass; * act like g_object_set() and g_object_get(). * * You can provide hooks for your own storage as well as control the - * instantiation by overriding #ClutterContainerIface::create_child_meta, - * #ClutterContainerIface::destroy_child_meta and - * #ClutterContainerIface::get_child_meta. + * instantiation by overriding the #ClutterContainerIface virtual functions + * create_child_meta, + * destroy_child_meta, + * and get_child_meta. * * Since: 0.8 */ diff --git a/clutter/clutter-effect.c b/clutter/clutter-effect.c index 576ea77..d83b181 100644 --- a/clutter/clutter-effect.c +++ b/clutter/clutter-effect.c @@ -66,7 +66,7 @@ * the paint sequence. This is useful for example if the effect * contains a cached image of the actor. In that case it can * 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 * redraw has been queued on the actor since it was last * 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’ * 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 * 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 @@ -366,17 +366,17 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect, * Note however that modifying the position of the parent of an actor * may change the appearance of the actor because its transformation * 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 * last modelview matrix that was used to render the actor and * veryifying that it remains the same in the next paint. * * 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 * 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 - * will instead be called with the %CLUTTER_EFFECT_RUN_ACTOR_DIRTY + * will instead be called with the %CLUTTER_EFFECT_PAINT_ACTOR_DIRTY * flag set. * * Since: 1.8 diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c index b423e9b..4210b61 100644 --- a/clutter/clutter-gesture-action.c +++ b/clutter/clutter-gesture-action.c @@ -31,8 +31,8 @@ * #ClutterGestureAction is a sub-class of #ClutterAction that implements * the logic for recognizing gesture gestures. It listens for low level events * such as #ClutterButtonEvent and #ClutterMotionEvent on the stage to raise - * the signals #ClutterGestureAction::gesture-begin, #ClutterGestureAction::gesture-motion and - * #ClutterGestureAction::gesture-end. + * the #ClutterGestureAction::gesture-begin, #ClutterGestureAction::gesture-progress, + * and * #ClutterGestureAction::gesture-end signals. * * To use #ClutterGestureAction you just need to apply it to a #ClutterActor * using clutter_actor_add_action() and connect to the signals: @@ -43,7 +43,7 @@ * clutter_actor_add_action (actor, action); * * 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); * ]| * diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index ef605de..55320c6 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -3029,11 +3029,11 @@ clutter_check_version (guint major, * clutter_get_default_text_direction: * * Retrieves the default direction for the text. The text direction is - * determined by the locale and/or by the %CLUTTER_TEXT_DIRECTION environment - * variable + * determined by the locale and/or by the CLUTTER_TEXT_DIRECTION + * environment variable. * * 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 * diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 2afdbf5..8d39f38 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -3727,7 +3727,7 @@ clutter_text_new_with_text (const gchar *font_name, * Sets whether the #ClutterText actor should be editable. * * 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. * * Since: 1.0 diff --git a/doc/reference/clutter/subclassing-ClutterActor.xml b/doc/reference/clutter/subclassing-ClutterActor.xml index a9ef7b4..eed8570 100644 --- a/doc/reference/clutter/subclassing-ClutterActor.xml +++ b/doc/reference/clutter/subclassing-ClutterActor.xml @@ -105,22 +105,22 @@ foo_actor_init (FooActor *actor) The size requisition is split into two different phases: width requisition and height requisition. - The ClutterActor::get_preferred_width() and - ClutterActor::get_preferred_height() methods of a + The ClutterActor::get_preferred_width and + ClutterActor::get_preferred_height methods of a #ClutterActor are invoked when clutter_actor_get_preferred_width() and 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 actor. Container actors, or composite actors with internal children, should call clutter_actor_get_preferred_width() and clutter_actor_get_preferred_height() on each visible child inside - their implementation of the get_preferred_width() and get_preferred_height() - virtual functions. + their implementation of the get_preferred_width and + get_preferred_height virtual functions. - The get_preferred_width() and get_preferred_height() 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 - must occupy to be useful; the natural size is defined as the amount - of space an actor would occupy if nothing would constrain it. + The get_preferred_width and get_preferred_height + 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 must + occupy to be useful; the natural size is defined as the amount of space an + actor would occupy if nothing would constrain it. The natural size must always be greater than, or equal to the minimum size. #ClutterActor will just ignore a natural size @@ -137,9 +137,10 @@ foo_actor_init (FooActor *actor) The clutter_actor_get_preferred_size() function will automatically check the geometry management preferred by the actor 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() - method, though, will ignore any notion of "available size" so it should - not be used inside a ClutterActor::allocate() + property and on the natural size of the actor. The + clutter_actor_get_preferred_size() method, though, will ignore any + notion of "available size" so it should not be used inside a + ClutterActor::allocate implementation. The size requisition starts from the #ClutterStage and it is @@ -159,12 +160,13 @@ foo_actor_init (FooActor *actor) Width requisition implementation of a container This example shows how an actor class should override the - get_preferred_width() virtual function of #ClutterActor. In this case, - the returned widths are the union of the extents of all the - FooActor children. + get_preferred_width virtual function of + #ClutterActor. In this case, the returned widths are the union of + the extents of all the FooActor children. - The get_preferred_height() implementation would be similar to the - get_preferred_width() implementation, so it is omitted. + The get_preferred_height implementation + would be similar to the get_preferred_width + implementation, so it is omitted. static void @@ -250,21 +252,21 @@ foo_actor_get_preferred_width (ClutterActor *actor, Size allocation - The ClutterActor::allocate() method of a - #ClutterActor is invoked when clutter_actor_allocate() is called on an - instance of that actor class. It is used by a parent actor to set the - coordinates of the bounding box for its children actors. Hence, - container actors, or composite actors with internal children, should - override the allocate() virtual function and call clutter_actor_allocate() - on each visible child. + The ClutterActor::allocate + virtual function of a #ClutterActor is invoked when clutter_actor_allocate() + is called on an instance of that actor class. It is used by a parent actor + to set the coordinates of the bounding box for its children actors. Hence, + container actors, or composite actors with internal children, should + override the allocate virtual function and call + clutter_actor_allocate() on each visible child. Each actor can know from their allocation box whether they 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 to the stage. - The allocate() virtual function implementation will be - notified whether the actor has been moved, while clutter_actor_allocate() + The allocate virtual function implementation + will be notified whether the actor has been moved, while clutter_actor_allocate() will usually be invoked with the %CLUTTER_ABSOLUTE_ORIGIN_CHANGED flag, meaning that the parent has been moved. @@ -376,16 +378,18 @@ foo_actor_allocate (ClutterActor *actor, Painting and picking - The ClutterActor::paint() method should be - overridden if the actor needs to control its drawing process, by - painting other child actors or drawing with the Cogl 3D graphics + The ClutterActor::paint + virtual function should be overridden if the actor needs to control its + drawing process, by painting other child actors or drawing with the Cogl + 3D graphics API. Paint implementation of a simple actor In this example, the FooActor - implementation of the paint() virtual function is drawing a rectangle - with rounded corners with a custom color using the Cogl API. + implementation of the paint virtual function is + drawing a rectangle with rounded corners with a custom color using the + Cogl API. static void foo_actor_paint (ClutterActor *actor) @@ -422,8 +426,8 @@ foo_actor_paint (ClutterActor *actor) - When inside the ClutterActor::paint() - method the actor is already positioned at the coordinates specified by + When inside the ClutterActor::paint + 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) coordinates. @@ -456,16 +460,18 @@ foo_actor_paint (ClutterActor *actor) If the actor has a non-rectangular shape, or it has internal children that need to be distinguished by the events delivery mechanism, - the ClutterActor::pick() method should also be - overridden. The pick() method works exactly like the paint() method, but - the actor should paint just its shape with the passed colour: + the ClutterActor::pick virtual + function should also be overridden. The pick virtual + function works exactly like the paint virtual + function, but the actor should paint just its shape with the passed + colour: Pick implementation of a simple actor In this example, FooActor overrides the - pick() virtual function default implementation to paint itself with a - shaped silhouette, to allow events only on the actual shape of the actor - instead of the whole paint area. + pick virtual function default implementation to + paint itself with a shaped silhouette, to allow events only on the + actual shape of the actor instead of the whole paint area. static void foo_actor_pick (ClutterActor *actor, @@ -500,8 +506,8 @@ foo_actor_pick (ClutterActor *actor, Containers should simply chain up to the parent class' - pick() implementation to get their silhouette painted and then - paint their children: + pick implementation to get their silhouette painted + and then paint their children: Pick implementation of a container -- 2.7.4