1
0
Fork 0
Commit graph

13 commits

Author SHA1 Message Date
Emmanuele Bassi
10fbfb1659 2006-12-12 Emmanuele Bassi <ebassi@openedhand.com>
Rework part of the show/hide machinery.  Allow groups sub-classes
	and composite actors to override show_all/hide_all in order to
	decide which children they wish to show/hide.  This means that
	if an actor overrides the default show/hide virtual methods, it'll
	have to chain up to the parent class show/hide.  While we're at it,
	provide the fully recursive clutter_actor_show_all() and
	clutter_actor_hide_all() methods.

	* clutter/clutter-behaviour-path.c: Add apidoc for the ClutterKnot
	functions; add pathological equality case for clutter_knot_equal().

	* clutter/clutter-event.h:
	* clutter/clutter-feature.h:
	* clutter/clutter-behaviour.c:
	* clutter/clutter-behaviour-scale.c:Fix parameters name so that
	gtk-doc doesn't complain.

	* clutter/clutter-actor.c:
	* clutter/clutter-event.c: Add apidoc

	* clutter/clutter-actor.h:
	* clutter/clutter-actor.c: Add a clutter_actor_show_all() and a
	clutter_actor_hide_all() functions; provide a mechanism for
	groups and composited actors to programmatically select what to
	show/hide when clutter_actor_show_all() and clutter_actor_hide_all()
	are called.  If you are overriding the ClutterActor::show or
	the ClutterActor::hide virtual methods you should chain up with
	the parent class.

	* clutter/clutter-group.c: Override show_all and hide_all and
	recursively show/hide every child inside the group;
	clutter_group_show_all() and clutter_group_hide_all() remain as non
	recursive versions of clutter_actor_show_all() and
	clutter_actor_hide_all() (maybe we should rename them in order
	to avoid name clashes with the bindings).

	* clutter/clutter-stage.c:
	* clutter/clutter-texture.c: Chain up with parent class show
	and hide vfuncs.

	* clutter/clutter-clone-texture.h:
	* clutter/clutter-clone-texture.c: Provide API for changing the
	parent texture of a clone texture actor.

	* examples/behave.c:
	* examples/super-oh.c:
	* examples/test.c: Use clutter_actor_show_all() instead of
	clutter_group_show_all().
2006-12-12 20:20:04 +00:00
Emmanuele Bassi
aa623df78f 2006-12-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.h: Add a function prototype
	for the foreach function: we need something more specific
	than GFunc; add clutter_behaviour_get_actors(), used to
	get a list of the actors.

	* clutter/clutter-behaviour.c: Add debugging notes; add
	a warning for behaviour implementations missing the
	alpha_notify vfunc; add api documentation

	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behaviour-scale.c: Reimplement the
	alpha_notify functions using the new foreach function
	and, where possible, by directly iterating on the
	actors: this shaves off the number of recalculations
	of the property/alpha values, and the number of
	functions.
2006-12-08 16:12:52 +00:00
Emmanuele Bassi
f83ffa3520 2006-12-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-private.h: Add our own READABLE,
	WRITABLE and READWRITE paramspec flags, declaring the
	string components of the properties GParamSpec as static;
	this should shave off some bytes in the memory footprint
	and avoid relocations.

	* clutter/clutter-actor.c:
	* clutter/clutter-behaviour.c:
	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behavuour-scale.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-label.c:
	* clutter/clutter-rectangle.c:
	* clutter/clutter-stage.c:
	* clutter/clutter-texture.c:
	* clutter/clutter-timeline.c: Use the CLUTTER_PARAM_*
	macros we just added.

	* clutter/clutter-behaviour-scale.c: Add properties for
	the scale begin, scale end and gravity parameters.

	* clutter/clutter-behaviour-path.h: Mark the ClutterKnot
	memory management functions as public (for the bindings),
	since we use the slice allocator for copying knots around;
	add a clutter_knot_equal() function.

	* clutter/clutter-behaviour-path.c:
	(node_distance): Use clutter_knot_equal() as a fast path
	to avoid the sqrt() in case the nodes we are using are
	at the same position.
	(path_total_length): Additional check on the existence
	of the next node.

	* examples/behave.c: Do not leak the ClutterBehaviour
	objects around.
2006-12-04 16:26:35 +00:00
Emmanuele Bassi
28d83d3c1a 2006-12-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.h: Clean up.

	* clutter/clutter-texture.c: Typo fix in the name
	of ClutterTextureTileDimension.

	* clutter/clutter-behaviour.c: Allow passing NULL
	to clutter_behaviour_set_alpha() (as we pass NULL
	in the finalize process).
2006-12-03 18:34:41 +00:00
Emmanuele Bassi
237496fa75 2006-11-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.h:
	* clutter/clutter-behaviour-path.c: Add a "knot-reached" signal,
	which is emitted when the path reaches a node in the nodes list;
	flesh out the documentation a bit; sync the parameters names
	so that gtk-doc doesn't complain about missing stuff.

	* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviour.c: Add the alpha value to the
	ClutterBehaviour::alpha_notify vfunc, so you don't have to
	get the value from the alpha inside the behaviour implementations;
	add more documentation.

	* clutter/clutter-alpha.c: Flesh out the description.

	* clutter/clutter-actor.h: Update the header.

	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-scale.c: Update docs.
2006-11-17 18:45:31 +00:00
Emmanuele Bassi
3f62c72d07 2006-11-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.h:
	* clutter/clutter-alpha.c: ClutterAlpha is an initially
	floating object, as it makes sense only when bound to
	a ClutterBehaviour; add checks for public API.

	* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviour.c: Remove the ClutterBehaviour
	constructor: ClutterBehaviour is an abstract class which
	must be implemented by subclassing; add checks for public
	API; unref the actors on finalize; sink the ClutterAlpha
	object.

	* clutter/clutter-behaviours.h: ClutterKnot is a boxed
	type: add the _get_type() function declaration and the
	type macro.
2006-11-14 14:12:56 +00:00
Matthew Allum
ddab271272 2006-10-23 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-alpha.h:
        * clutter/clutter-behaviour.c:
        * clutter/clutter-behaviour.h:
        * clutter/clutter-behaviours.c:
        * clutter/clutter-behaviours.h:
        * examples/behave.c:
        Behaviours now only 'driven' by ClutterAlpha, not any object/prop.
        Add simple Clutter path behaviour.
2006-10-22 23:33:14 +00:00
Emmanuele Bassi
4dea33e123 revert changes 2006-09-08 20:57:31 +00:00
Emmanuele Bassi
ba32170d94 creating a branch for experimenting with the behaviour API 2006-09-08 20:52:38 +00:00
Jorn Baayen
9f81571737 2006-08-29 Jorn Baayen <jorn@openedhand.com>
* clutter/clutter-behaviour.c: (_clutter_behaviour_finalize),
	(_clutter_behaviour_set_property),
	(_clutter_behaviour_get_property), (clutter_behaviour_class_init),
	(clutter_behaviour_init), (clutter_behaviour_apply),
	(clutter_behaviour_remove), (clutter_behaviour_remove_all),
	(clutter_behaviour_actors_foreach):
	* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviours.c:
	(clutter_behaviour_property_change),
	(clutter_behaviour_opacity_dispose),
	(clutter_behaviour_opacity_finalize),
	(clutter_behaviour_opacity_class_init),
	(clutter_behaviour_opacity_init):
	* clutter/clutter-behaviours.h:
	* clutter/clutter-marshal.list:
	* examples/behave.c: (main):

	Behaviours track generic GObject properties.

	* clutter/clutter-video-texture.h:

	Remove signal prototypes - they are already specified in
	clutter-media.h.
2006-08-29 13:20:29 +00:00
Jorn Baayen
bc3d914ccd 2006-08-28 Jorn Baayen <jorn@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter-alpha.c:
	* clutter/clutter-alpha.h:
	* clutter/clutter-behaviours.c:
	(clutter_behaviour_opacity_dispose),
	(clutter_behaviour_opacity_init),
	(clutter_behaviour_opacity_frame_foreach),
	(clutter_behaviour_opacity_frame):
	* clutter/clutter-behaviours.h:
	* clutter/clutter-timeline.c: (clutter_timeline_class_init):
	* clutter/clutter-timeline.h:
	* clutter/clutter.h:
	* examples/behave.c: (main):

	Separate alpha calculation into its own class.

	* clutter/clutter-behaviour.c: (clutter_behaviour_set_timelime):

	Correct NULL check.
2006-08-28 17:11:15 +00:00
Matthew Allum
2c41d38fed 2006-08-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour.c:
        * clutter/clutter-behaviour.h:
        * clutter/clutter-behaviours.c:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeline.h:
        * clutter/clutter.h:
        Make basic behaviour infrastructure actually work.

        * examples/Makefile.am:
        * examples/behave.c:
        Add a simple behaviour demo/test

        * clutter/clutter-media.c: (clutter_media_set_volume):
        Actuall set volume rather than position..   (Fixes #141)
2006-08-15 20:28:41 +00:00
Matthew Allum
c13b025083 2006-08-14 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-behaviour.c:
        * clutter/clutter-behaviour.h:
        * clutter/clutter-behaviours.c:
        * clutter/clutter-behaviours.h:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeline.h:
        Add very initial new behaviour functionality.

        * clutter/clutter-stage.c:
        * clutter/clutter-main.c:
        * clutter/clutter-actor.c:
        Improve clipping using stencil test rather than scissor check.
        ( Should now handle rotated clips etc ).

        * clutter/clutter-group.c: (clutter_group_paint):
        Fix typo on position check.
2006-08-13 23:55:52 +00:00