1
0
Fork 0
Commit graph

248 commits

Author SHA1 Message Date
Emmanuele Bassi
6ec5cc538c 2008-06-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_unparent): Reset the
	:show-on-set-parent property to TRUE when unparenting.

	* tests/Makefile.am: Add test-invariant to the build.

	* tests/test-invariants.c: Test the invariants that we are going
	to honour (and document, at some point).
2008-06-16 13:40:39 +00:00
Tomas Frydrych
1c4b1ce90e 2008-06-16 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	    (clutter_actor_move_anchor_point):
	    (clutter_actor_move_anchor_pointu):
	    (clutter_actor_move_anchor_point_from_gravity):
	    Fixed incorrect sign of position adjustment.
	    Fixed replace call to _move_by with move_byu in
	    _move_anchor_pointu.

	    Stripped trailing whitespace.
2008-06-16 09:27:44 +00:00
Emmanuele Bassi
4b97a02410 2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-actor.h:
	* tests/test-cogl-primitives.c:
	* tests/test-events.c:
	* tests/test-multistage.c:
	* tests/test-textures.c:
	* tests/test-timeline.c: Miscellaneous fixes for distcheck to
	pass.
2008-06-13 15:01:34 +00:00
Emmanuele Bassi
e3de3f196b 2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
Bug #953 - Actors are not hidden before unrealized or
	           disposed (Tommi Komulainen)

	* clutter/clutter-actor.c:
	(clutter_actor_unrealize): Hide a visible actor when unrealizing
	it.

	(clutter_actor_dispose): Make sure to unrealize an actor when
	disposing it.
2008-06-13 14:16:22 +00:00
Emmanuele Bassi
23c160886b 2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_dispose), (clutter_actor_destroy),
	(clutter_actor_unparent): Clean up the actor's destruction
	sequence, making sure that every operation is performed
	under the CLUTTER_ACTOR_IN_DESTRUCTION internal flag.
2008-06-13 13:59:07 +00:00
Emmanuele Bassi
d1006ca506 2008-06-12 Emmanuele Bassi <ebassi@openedhand.com>
Bug #964 - "unrealized" signal of ClutterActor wrongly named

	* clutter/clutter-actor.c (clutter_actor_class_init): Fix typo
	in the ::unrealize signal name. (Armin Burgmeier)
2008-06-12 17:24:07 +00:00
Emmanuele Bassi
13df7d579d 2008-06-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Add more clarifications on the
	size and position accessors and the distinction between
	transformed and untransformed actor box inside the actor's
	description.
2008-06-12 16:34:50 +00:00
Emmanuele Bassi
da8eea1842 2008-06-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Clarify the documentation of the
	accessors of the width and height.
2008-06-12 16:20:08 +00:00
Emmanuele Bassi
8ff6cec829 2008-06-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Documentation fixes.

	* clutter/clutter-backend.c: Documentation fixes.

	* clutter/clutter-container.h: Documentation fixes.

	* clutter/clutter-fixed.c (clutter_qdivx): Fix the return
	value to be after the description.

	* clutter/clutter-texture.[ch]: Documentation fixes.

	* clutter/clutter-timeline.c: Documentation fixes.
2008-06-12 11:43:25 +00:00
Neil Roberts
3d1d677902 * clutter/clutter-actor.c (clutter_actor_allocate): Fixed the
logic when detecting whether the actor has moved.
2008-06-11 17:12:29 +00:00
Emmanuele Bassi
c859a2f7fd 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Notify :x, :y, :width and :height
	properties using ClutterUnits, not pixels.
2008-06-11 15:08:03 +00:00
Emmanuele Bassi
473d0e9fc3 2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box

	* clutter/clutter-actor.[ch]: Rework the size allocation,
	request and paint area. Now ::request_coords() is called
	::allocate(), and ::query_coords() has been split into
	::get_preferred_width() and ::get_preferred_height(). See
	the documentation and the layout test on how to implement
	a container and layout manager with the new API. (#915,
	based on a patch by Havoc Pennington, Lucas Rocha and Johan
	Bilien)

	* clutter/clutter-clone-texture.c: Port CloneTexture to
	the new size negotiation API; it just means forwarding
	the requests to the parent texture.

	* clutter/clutter-deprecated.h: Add deprecated and replaced
	API.

	* clutter/clutter-entry.c: Port Entry to the new size
	negotiation API.

	* clutter/clutter-group.c: Port Group to the new size
	negotiation API; the semantics of the Group actor do not
	change.

	* clutter/clutter-label.c: Port Label to the new size
	negotiation API, and vastly simplify the code.

	* clutter/clutter-main.[ch]: Add API for executing a
	relayout when needed.

	* clutter/clutter-private.h: Add new Stage private API.

	* clutter/clutter-rectangle.c: Update the get_abs_opacity()
	call to get_paint_opacity().

	* clutter/clutter-stage.c:
	(clutter_stage_get_preferred_width),
	(clutter_stage_get_preferred_height),
	(clutter_stage_allocate),
	(clutter_stage_class_init): Port Stage to the new size
	negotiation API.

	* clutter/clutter-texture.c: Port Texture to the new size
	negotiation API.

	* clutter/clutter-types.h: Add ClutterRequestMode enumeration.

	* clutter/x11/clutter-stage-x11.c: Port the X11 stage
	implementation to the new size negotiation API.

	* tests/Makefile.am: Add the layout manager test case.

	* tests/test-opacity.c: Update.

	* tests/test-project.c: Update.

	* tests/test-layout.c: Test case for a layout manager implemented
	using the new size negotiation API; the layout manager handles
	both transformed and untransformed children.
2008-06-10 17:07:52 +00:00
Emmanuele Bassi
a06a79737b 2008-06-05 Emmanuele Bassi <ebassi@openedhand.com>
Bug #840 - Implement prepare-paint and finish-paint signals.

	* clutter/clutter-actor.c:
	(clutter_actor_class_init): Add the ::paint, ::realize and
	::unrealize signals to ClutterActor. It is possible to
	override the paint, realization and unrealization of an
	actor without subclassing it. The ::paint signal handlers
	have the same limitations of a ClutterActor::paint implementation
	inside a subclass.

	(clutter_actor_realize),
	(clutter_actor_unrealize),
	(clutter_actor_paint): Emit the signals instead of calling
	the functions from the class vtable.
2008-06-05 14:32:18 +00:00
Neil Roberts
b887bddbb1 Applied patch from bug #947
* clutter/clutter-stage.c (clutter_stage_get_default): Don't grab
	the floating reference when creating the default stage. The stage
	manager will take a reference to it so it will behave as any other
	stage.
	(clutter_stage_new): Don't take the floating reference to the new
	stage but let the stage manager keep it instead.

	* clutter/clutter-stage-manager.c
	(_clutter_stage_manager_add_stage): Take a reference to the stage
	when it is added to the list.
	(_clutter_stage_manager_remove_stage): Unref the stage when it is
	removed from the list.
	(clutter_stage_manager_dispose): Keep track of the 'next' pointer
	as a separate variable so we can cope when the stage being
	destroyed removes itself from the list as the list is being
	iterated.

	* clutter/clutter-actor.c (clutter_actor_destroy): Take a
	reference at the beginning of the function even if there is no
	parent container so that overall the reference count is not
	changed when the actor is unref'd again at the bottom of the
	function. Previously it would have a net effect of leaving the
	reference count alone unless it is a top level actor in which case
	it would unref it.
2008-06-03 20:15:11 +00:00
Emmanuele Bassi
5cc8687e7e 2008-05-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug #928 - Reparenting a child that itself is a container
	doesn't work

	* clutter/clutter-actor.c (clutter_actor_set_parent): Realize
	an actor when setting its parent, if the parent is realized.

	* clutter/clutter-group.c:
	(clutter_group_realize), (clutter_group_class_init): Add the
	missing implementation of the ::realize() virtual function; this
	makes sure that the children of a Group are realized if the Group
	is realized. (#928)
2008-05-23 09:42:32 +00:00
Matthew Allum
092fdf1d79 2008-05-14 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-main.c:
        * clutter/clutter-private.h:
        Rejid Øyvind's previous commit a little moving more into
        clutter-main.c and using ClutterContext.
        Also Refactor clutter_init & clutter_init_with_args to share
        same core init code.
2008-05-13 23:02:45 +00:00
Øyvind Kolås
a1b240d31b Made it possible to do picking when the colors stored in the
framebuffer are only approximately the correct value.
* clutter/clutter-actor.c: 
(init_bits): initialize constants about how many bits are
available/will be used for r,g,b components.
(_clutter_pix_to_id): now own function, compute an id from a
pixel into its own function (used from _clutter_do_pick). 
(_clutter_id_to_col): now own function, computes the color to use for
a given id.
(clutter_actor_paint): use clutter_id_to_col.
* clutter/clutter-main.c:
(_clutter_do_pick): use _clutter_pix_to_id
(clutter_main): re-enable invocation of fruity app shell.
2008-05-13 18:40:14 +00:00
Emmanuele Bassi
a231418c9d 2008-05-02 Emmanuele Bassi <ebassi@openedhand.com>
Bug #900 - clutter_actor_lower() and friends do not queue redraw

	* clutter/clutter-actor.c:
	(clutter_actor_raise),
	(clutter_actor_lower): Queue a redraw after raising and lowering
	and actor in the paint order stack. (#900)
2008-05-02 11:48:43 +00:00
Neil Roberts
a5cd811a9c * clutter/clutter-actor.c (clutter_actor_move_anchor_point): The
actor position was being moved in the wrong direction. Perhaps
	this was a cut-and-paste bug from move_anchor_point_from_gravity
	because in that function ax and ay represent the old anchor
	position, but in this function they represent the new.
2008-04-29 21:27:52 +00:00
Øyvind Kolås
83e2861614 * clutter/cogl/cogl.h.in: renaming of API's in cogl to make the
primitives and path API a bit smaller and more resembling cairo.
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl.c:
* clutter/clutter-actor.c:
* clutter/clutter-rectangle.c:
* tests/test-cogl-offscreen.c:
* tests/test-cogl-primitives.c:
* tests/test-cogl-tex-convert.c:
* tests/test-cogl-tex-foreign.c:
* tests/test-cogl-tex-getset.c:
* tests/test-cogl-tex-tile.c: updated according to changes in cogl.
2008-04-29 15:41:34 +00:00
Emmanuele Bassi
90c815efb8 2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(parse_rotation_array),
	(clutter_actor_set_custom_property): Use the internal, unit based
	rotation setter when parsing the rotation from a ClutterScript
	file.
	
	(clutter_geometry_copy),
	(clutter_vertex_copy),
	(clutter_actor_box_copy): Use the more efficient g_slice_dup().

	(clutter_actor_get_stage): Add documentation.

	* clutter/clutter-group.c: Documentation fix.
2008-04-28 15:32:42 +00:00
Neil Roberts
6409b1adeb Merged clutter-ivan branch into trunk.
svn merge \
 https://svn.o-hand.com/repos/clutter/trunk/clutter@2509 \
 https://svn.o-hand.com/repos/clutter/branches/clutter-ivan@HEAD
2008-04-25 13:37:36 +00:00
Emmanuele Bassi
43992d9964 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Document :show-on-set-parent and
	the fact that calling clutter_actor_show() and hide() on an
	unparented actor will change that property as well as a side
	effect.
2008-04-23 13:54:13 +00:00
Emmanuele Bassi
7d103daed4 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_set_property): Use the
	internal setter for the rotation center.
2008-04-23 13:21:33 +00:00
Emmanuele Bassi
b450363370 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Add units based variant of the
	rotation accessors.
2008-04-23 12:53:25 +00:00
Emmanuele Bassi
e1dfbec336 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 892 - Incorrect results using rotation-[center|angle] properties

	* clutter/clutter-actor.c:
	(clutter_actor_set_rotation_internal): Inline function for setting
	the rotation using fixed point for the angle and units for the
	center of rotation.

	(clutter_actor_set_property),
	(clutter_actor_set_rotationx): Use the internal setter to avoid
	loss of precision and too many conversions to and from units.
2008-04-23 12:39:50 +00:00
Øyvind Kolås
429f7e64ca * clutter/clutter-actor.c: (clutter_actor_set_shader_param): queue a
redraw when a shader_param is set. Normalized some gtk-doc syntax in
some of the api documentation.
2008-04-15 13:55:36 +00:00
Emmanuele Bassi
f859135082 2008-04-04 Emmanuele Bassi <ebassi@openedhand.com>
Bug #864 - Allow instantiating and subclassing of ClutterStage

	* clutter/Makefile.am: Add clutter-stage-window.[ch]

	* clutter/clutter-stage-manager.c:
	(_clutter_stage_manager_remove_stage): Do not warn if removing
	a stage we don't manage, as we might be invoked multiple times
	during a ClutterState dispose sequence.

	* clutter/clutter-actor.c:
	* clutter/clutter-backend.[ch]:
	* clutter/clutter-main.c:
	* clutter/clutter-private.h:
	* clutter/clutter-stage.[ch]: Make ClutterStage a proxy actor,
	with a private actor implementing the ClutterStageWindow
	interface for handling the per-backend realization, painting
	and unrealization, plus all the windowing system abstraction.

	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-stage-x11.[ch]: Port the X11 backend
	to the new backend and stage API and semantics.

	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-stage-glx.c: Port the GLX backend to
	the new backend and stage API and semantics.

	* clutter/eglx/clutter-backend-egl.[ch]:
	* clutter/eglx/clutter-stage-egl.[ch]: Port the EGLX backend
	to the new backend and stage API and semantics (untested).

	* tests/test-multistage.c (on_button_press): Rename
	clutter_stage_create_new() to clutter_stage_new().
2008-04-04 15:02:11 +00:00
Matthew Allum
e44ac14ef7 2008-04-04 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        Remove uneeded stage private member.
        Add show-on-set-parent prop and make so by default Actors are
        now automatically shown when reparented (#791)

        * clutter/eglx/clutter-backend-egl.c:
        * clutter/cogl/gles/cogl.c:
        A couple of minor comments.

        * clutter/eglnative/Makefile.am:
        Add missing clutter-egl.h header (back port from trunk)

        * tests/test-actors.c:
        Modify to take advantage of new show-on-set-parent functionality.
2008-04-04 13:20:02 +00:00
Matthew Allum
8847bcd195 2008-03-28 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-backend.c:
        * clutter/clutter-backend.h:
        * clutter/clutter-debug.h:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-feature.h:
        * clutter/clutter-group.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-private.h:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/clutter-stage-manager.c
        * clutter/clutter-stage-manager.h
        * clutter/clutter-types.h:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-backend-x11.h:
        * clutter/x11/clutter-event-x11.c:
        * clutter/x11/clutter-stage-x11.c:
        * clutter/x11/clutter-x11.h:
        * tests/Makefile.am:
        * tests/test-multistage.c:
        Initial commit of multi stage support (mostly a merge from the
        clutter-multistage branch).
        Note, this commit will break all backends except glx.
2008-03-28 22:50:55 +00:00
Chris Lord
b961d5484c * clutter/clutter-actor.c:
(_clutter_actor_apply_modelview_transform), (clutter_actor_paint):
        Apply clip inside paint function instead of transform function
2008-03-19 11:38:53 +00:00
Øyvind Kolås
cdf8bb0739 Refactored the integer id->ClutterActor mapping code to be a self
contained data structure.
* clutter/clutter-id-pool.[ch]: new files.
* clutter/Makefile.am: added clutter-id-pool.[ch]
* clutter/clutter-private.h: use a ClutterIDPool instead of GArray and
GSList to keep track of the reusable ids.
* clutter/clutter-actor.c: moved id pool logic away.
* clutter/clutter-main.c: simplified id pool creation/finalization.
2008-03-07 17:34:40 +00:00
Emmanuele Bassi
abc29d4407 2008-03-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_anchor_point_from_gravity): Fix a stupid
	conversion from pixels to units that should I not have made.
2008-03-06 18:12:40 +00:00
Emmanuele Bassi
7fc0bd0dd5 2008-03-06 Emmanuele Bassi <ebassi@openedhand.com>
Add support for the anchor point inside ClutterScript (#834,
	David Stanczak)

	* clutter/clutter-actor.c:
	(clutter_actor_set_property),
	(clutter_actor_get_property),
	(clutter_actor_class_init): Add the :anchor-x and :anchor-y
	properties to the ClutterActor class.

	(clutter_actor_set_anchor_point),
	(clutter_actor_set_anchor_pointu),
	(clutter_actor_set_anchor_point_from_gravity): Reimplement
	the pixel based and gravity based API using the units based
	one. Emit the ::notify signal for the :anchor-x and :anchor-y
	properties.
	
	(parse_units),
	(clutter_actor_parse_custom_node): Parse the :anchor-x and
	:anchor-y properties using the custom units format (mm, px,
	pt and %).

	* tests/test-script.json: Test the newly added properties.
2008-03-06 04:37:00 +00:00
Øyvind Kolås
bb6f3c6a4f Reuse the numeric id's used for picking actors to avoid the potential
of overflowing the id numbers when continusly creating and destroying
actors on long running applications for 16bpp.
* clutter/clutter-private.h: replaced hashtable with GArray and a
GSList for available slots in the array.
* clutter/clutter-actor.c: (create_actor_id): function to create an
actor->id mapping, (release_actor_id): function to mark an existing id
as available for reuse.
* clutter/clutter-main.c: (clutter_context_free): added utility
function for cleaning up the context, 
(clutter_get_actor_by_gid): use the GArray for looking up actors.
2008-02-29 14:54:28 +00:00
Emmanuele Bassi
bcd9a6dcec 2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Remove the usage of g_return_if_fail()
	from static functions: either assert or use g_warning() to check
	internal state, as g_return_if_fail() can be compiled out.

	* clutter/clutter-main.c: Ditto as above.
2008-02-25 12:24:56 +00:00
Emmanuele Bassi
8c451b8a67 2008-02-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_get_abs_opacity): Add function that does what
	get_opacity() does now...

	(clutter_actor_get_opacity): ... and make get_opacity() do what
	it's supposed to be doing. The original get_opacity() returned
	a composited value, and there's no way to actually extract the
	real opacity value set with set_opacity().

	* clutter/clutter-clone-texture.c:
	* clutter/clutter-rectangle.c:
	* clutter/clutter-texture.c: Update to use get_abs_opacity().

	* clutter/clutter-entry.c:
	* clutter/clutter-label.c: Ditto. Also, never change the stored
	alpha value. (#804)

	* tests/Makefile.am:
	* tests/test-opacity.c: Test suite for the get_opacity() and
	get_abs_opacity() API, and correct opacity handling.

	* README: Add note about the change in get_opacity().
2008-02-20 10:59:47 +00:00
Emmanuele Bassi
117b00e0f9 2008-02-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_get_box_from_vertices): Avoid a masking warning
	caused by math.h utter braindamage.
2008-02-18 09:56:37 +00:00
Emmanuele Bassi
cbbab92b78 2008-02-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Document the fact that ancestor can
	be NULL in the relative transformation API, and what are the
	effects.
2008-02-18 09:43:01 +00:00
Chris Lord
d722fb9220 * clutter/clutter-actor.c:
* clutter/clutter-container.c:
        * clutter/clutter-media.c:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-stage.c: (clutter_stage_class_init):
        * clutter/clutter-stage.h:
        * clutter/clutter-texture.c:
        * doc/reference/clutter-docs.sgml:
        Fix more documentation
2008-02-15 15:18:02 +00:00
Emmanuele Bassi
66f244b1cc 2008-02-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]:
	* clutter/clutter-types.h:
	* doc/reference/clutter-docs.sgml: Fix a lot of documentation.

2008-02-15  Matthew Allum  <mallum@openedhand.com>
2008-02-15 14:39:25 +00:00
Emmanuele Bassi
d76f7e42ea 2008-02-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Rename
	clutter_actor_get_box_from_vertices() to
	clutter_actor_box_get_from_vertices().

	* clutter/clutter-group.c (clutter_group_query_coords): Fix the
	query_coords() implementation.
2008-02-15 10:46:38 +00:00
Tomas Frydrych
78341d2e28 2008-02-15 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-actor.h:
	(clutter_group_query_coords):
	Added function to translate vertex array to a bounding box.

	(clutter_actor_is_scaled):
	(clutter_actor_is_rotated):
	Fixed documentation.
2008-02-15 09:40:41 +00:00
Tomas Frydrych
ea9b7b6550 2008-02-14 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-actor.h:
	(clutter_actor_is_scaled):
	(clutter_actor_is_rotated):
	Convenience functions to test whether actor is scaled or rotated.

	(clutter_actor_apply_relative_transform_to_point):
	Removed unused variable.

	* clutter/clutter-group.c:
	(clutter_group_query_coords):
	Use clutter_actor_get_relative_vertices() to calculate bounding
	boxes of children that are scaled or rotated.
2008-02-15 09:13:50 +00:00
Tomas Frydrych
02ae0fcd9e 2008-02-14 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-actor.h:
	(clutter_actor_get_relative_vertices):
	(clutter_actor_apply_relative_transform_to_point):
	Functions to calculate actor vertices in the plane of a given
	ancestor.
2008-02-14 15:59:38 +00:00
Matthew Allum
3ef9e235ef 2008-02-11 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        Minor documentation tweak to class description.

        * clutter/clutter-behaviour-scale.c:
        'Force' start + end vals of scale behaviour
        (#779, Havoc Pennington)
2008-02-11 20:31:16 +00:00
Tomas Frydrych
3c1792bc86 2008-02-11 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_transform_stage_point):
	Moved part of the calculation to floating point to avoid overflow
	of ClutterFixed range for large actors (bug 613).
2008-02-11 10:56:57 +00:00
Emmanuele Bassi
d192f73b78 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Add actor box diagram and notes.
2008-02-08 16:13:15 +00:00
Emmanuele Bassi
9a05ab16e6 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Reference the newly added event-flow.png

	* clutter/clutter-alpha.c: Ditto, with alpha-func.png

	* clutter/clutter-texture.c: Fix the XML.
2008-02-08 13:52:11 +00:00
Emmanuele Bassi
d3e15f20eb 2008-02-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Add a note on clutter_actor_set_size()
	reguarding groups.

	* clutter/clutter-group.c: Clarify group sizing.
2008-02-07 17:08:29 +00:00
Tomas Frydrych
1f5e879e2f 2008-02-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_property):
	Fixed handling of PROP_ROTATE_CENTER_Y, ROTATE_CENTER_Z

	* tests/test-actors.c:
	Adjusted to use anchor point for both group and hands.
2008-02-07 15:06:31 +00:00
Øyvind Kolås
56a34b724f * clutter/clutter-actor.c:
(_clutter_actor_apply_modelview_transform): perform translation as
well as anchor point adjustment based on self not being stage (and
not by self not being an orphan).
2008-02-07 13:05:18 +00:00
Matthew Allum
49b189ecbb 2008-02-05 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c: (clutter_actor_get_vertices):
        Make sure GL related Matrices are initialised. Fixes #756

        * clutter/clutter-texture.c:
        Fix up code from Norways answer to Jean-Michel Basquiat.
        (warning on tile_get_pixbuf)
2008-02-05 16:40:46 +00:00
Emmanuele Bassi
2764fa2f87 2008-02-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-shader.c: Small documentation and style fixes

	* tests/test-scale.c: Constify the gravities array.
2008-02-04 22:35:38 +00:00
Chris Lord
3878e6730a * clutter/clutter-actor.c: (clutter_actor_transform_stage_point):
Check that x_out and y_out != NULL before setting their contents
2008-02-04 15:11:29 +00:00
Øyvind Kolås
1fe08217b7 * clutter/clutter-actor.[ch]: added clutter_actor_get_shader and
renamed clutter_actor_apply_shader to be clutter_actor_set_shader.
Reindented/aligned header.
* clutter/clutter-texture.c: (clutter_texture_paint): temporarily
disable the shader on top of the clutter context's shader stack while
rendering into the FBO.
* tests/test-fbo.c: (main): s/apply_shader/set_shader/
* tests/test-shader.c: (button_release_cb), (main):
s/apply_shader/set_shader/
2008-02-04 11:45:12 +00:00
Matthew Allum
680cd23b43 2008-02-03 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c: (clutter_actor_set_rotationx):
        Add notify signal for set_rotate

        * clutter/clutter-texture.c:
        Add basic cleanup code for fbo's

        * tests/test-fbo.c: (main):
        Minor notes.

        * clutter/osx/clutter-stage-osx.c: (clutter_stage_osx_realize):
        Turn on vblanking.
2008-02-03 23:25:12 +00:00
Emmanuele Bassi
ecc673d9cd 2008-02-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_get_property): Use clutter_actor_get_reactive()
	instead of the IS_REACTIVE() macro.

	(clutter_actor_set_reactive): Emit the notify signal for the
	reactive property.

	* clutter/clutter-timeline.c:
	(timeline_timeout_func),
	(clutter_timeline_get_delta): Coding style fixes.
2008-02-01 11:22:59 +00:00
Tomas Frydrych
81612d44e7 2007-01-31 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_transform_vertices):
	Call clutter_actor_query_coords() instead of accessing the actor
	box, so that actors that calculate their bounding box on the fly
	(like ClutterGroup) work.

	* (_clutter_actor_apply_modelview_transform_recursive):
	Made to work for parentless actors.
2008-01-31 17:30:46 +00:00
Emmanuele Bassi
d7e01ee396 2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_init): Explicitly
	memset() to 0 the clip container, so if you get the clip without
	having set it, you won't get garbage.

2008-01-31  Rob Bradford  <rob@openedhand.com>
2008-01-31 14:21:36 +00:00
Tomas Frydrych
4a1e765e19 2007-01-30 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
	Added new clutter_actor_move_anchor_point_ API.

        * clutter/clutter-behaviour-scale.c:
        * clutter/clutter-behaviour-scale.h:
        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        * tests/test-actors.c:
        * tests/test-effects.c:
        * tests/test-scale.c:
	Removed gravity from ClutterBehaviourScale.
2008-01-30 12:13:26 +00:00
Emmanuele Bassi
28ef76edfa 2008-01-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add clutter_actor_move_byu()
	
	* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_move_by),
	(clutter_actor_move_byu): Add a units-based variant of the
	clutter_actor_move_by() function
2008-01-04 18:30:25 +00:00
Emmanuele Bassi
ac9f2fb1c5 2007-12-25 Emmanuele Bassi <ebassi@openedhand.com>
reviewed by: <delete if not using a buddy>

	* clutter/clutter-actor.c:
	(parse_rotation_array): Inline, and get the JsonArray as a parameter

	(parse_rotation): Update

	* clutter/clutter-script.c:
	(warn_missing_attribute): Fix for emacs-style warnings
	
	(clutter_script_parse_node): Remove an ifdeffed out section

	(clutter_script_construct_parameters),
	(clutter_script_construct_object): Rename get_parameters, so
	it's obvious what it does
2007-12-25 22:31:11 +00:00
Emmanuele Bassi
53aee5ffb4 2007-12-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add clutter_actor_set_clipu() and
	clutter_actor_get_clipu()

	* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_set_clipu), (clutter_actor_get_clipu): Add the
	new units-based versions of the clip accessors

	(clutter_actor_set_clip), (clutter_actor_get_clip): Reimplement
	the pixels-based clip accessors as proxies for the units-based
	ones
2007-12-24 14:21:19 +00:00
Emmanuele Bassi
97dd890ae1 2007-12-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/cogl.h: Update cogl_clip_set() to accept the
	clip components as ClutterFixed values

	* clutter/cogl/gl/cogl.c (cogl_clip_set): Update the GL implementation
	of cogl_clip_set()

	* clutter/cogl/gles/cogl.c:
	(cogl_rectangle_internal): Provide an internal, inlined rectangle
	drawing	function using fixed point values, to be shared by
	cogl_clip_set() and cogl_rectangle()

	(cogl_clip_set), (cogl_rectangle): Update the GLES implementation
	of cogl_clip_set() and cogl_rectangle() to use the new internal
	rectangle drawing function

	* clutter/clutter-actor.c: Make the clip an array of ClutterUnit
	values instead of pixel-based; this allows higher precision and
	device independence

	(_clutter_actor_apply_modelview_transform): Pass the clip
	components converting from units to fixed point values, using
	the new cogl_clip_set() signature

	(clutter_actor_get_property), (clutter_actor_set_clip),
	(clutter_actor_get_clip): Update the accessors of the clip
	property
2007-12-24 12:53:04 +00:00
Emmanuele Bassi
ee4bcf6465 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Move tests build before docs, to cut down the
	distcheck failure discovery

	* clutter.symbols: Add clutter_texture_set_area_from_rgb_data()

	* clutter/clutter-actor.c:
	* clutter/clutter-script.c:
	* clutter/clutter-texture.c:
	* clutter/json/json-generator.c:
	* clutter/json/json-parser.c: Compilation fixes for passing distcheck

	* tests/test-grab.c:
	* tests/test-score.c:
	* tests/test-script.c:
	* tests/test-shader.c:
	* tests/test-unproject.c: Ditto as above
2007-12-21 15:25:00 +00:00
Emmanuele Bassi
98c537365c 2007-12-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_should_pick_paint),
	(clutter_actor_apply_transform_to_point): Fix the whitespace.

	(clutter_actor_set_rotation): Clarify that the coordinates of
	the centre of rotation are relative to the anchor point or,
	if not set, to the upper left corner of the bounding box.
2007-12-17 17:45:49 +00:00
Emmanuele Bassi
4f651833b4 2007-12-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Fix documentation for
	the ::captured-event signal. (#673)
2007-12-17 15:47:19 +00:00
Emmanuele Bassi
f7606ebb89 2007-12-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Clarify the set_clip() method
	documentation, pointing out that the clip area origin is
	always the top-left corner of an actor.
2007-12-17 15:08:43 +00:00
Emmanuele Bassi
5eecda2dba 2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-alpha.h:
	* clutter/clutter-event.h:
	* clutter/clutter-fixed.[ch]:
	* clutter/clutter-model.h:
	* clutter/clutter-shader.[ch]:
	* clutter/clutter-stage.c: Documentation fixes.
2007-12-15 14:36:27 +00:00
Øyvind Kolås
5220f68e17 Refined the ClutterShader API based on a patch from Emmanuele Bassi.
* clutter/clutter-actor.c: (clutter_actor_paint),
(clutter_actor_apply_shader): queue a redraw of actor when shader is
set.
* clutter/clutter-actor.h: indentation.
* clutter/clutter-shader.[ch]: made the fragment and vertex shader
sources properties. Report error through GError when binding shaders.
* tests/test-shader.c: modified to use newer API.
2007-12-11 14:49:41 +00:00
Emmanuele Bassi
0f535537c2 2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_property),
	(clutter_actor_get_property),
	(clutter_actor_class_init): Add the rotation-* properties,
	controlling the rotation angle and center on each axis. (#614)

	(parse_rotation_array), (parse_rotation),
	(clutter_actor_parse_custom_node),
	(clutter_actor_set_custom_property),
	(clutter_scriptable_iface_init): Add a new "rotation" custom
	property for expressing the rotation along each axis in a
	compact way:

	  "rotation" : [
	    { "x-axis" : [ <angle>, [ <y>, <z> ] ] },
	    { "y-axis" : [ <angle>, [ <x>, <z> ] ] },
	    { "z-axis" : [ <angle>, [ <x>, <y> ] ] }
	  ]

	(clutter_geometry_get_type),(clutter_vertex_get_type),
	(clutter_actor_box_get_type): Use the I_() macro instead of
	directly calling g_intern_static_string().
	
	* clutter/clutter-entry.c (clutter_entry_request_coords):
	* clutter/clutter-label.c (clutter_label_ensure_layout),
	(clutter_label_request_coords): Use CLUTTER_UNITS_FROM_DEVICE()
	instead of CLUTTER_UNITS_FROM_INT(), as "device" means "pixels".

	* clutter/clutter-private.h: Add the I_() macro for intern
	static strings.

	* tests/test-script.json: Test the newly added "rotation"
	custom property.
2007-12-10 11:01:10 +00:00
Tomas Frydrych
797805c6e7 2007-12-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	(_clutter_actor_apply_modelview_transform):
	Moved offset translation after rotation so that rotation coords
	are also relative to the offset point.
2007-12-10 08:15:10 +00:00
Emmanuele Bassi
bd355346de 2007-12-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Document the values for full
	transparency and full opacity in the set_opacity()
	method. (#662)

	* clutter/clutter-behaviour-ellipse.c: Improve consistency
	in the apidoc.
2007-12-09 08:47:11 +00:00
Emmanuele Bassi
f476cfbd4c 2007-12-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_get_sizeu),
	(clutter_actor_get_positionu): Add unit-based accessors to
	the size and position.
2007-12-07 15:49:54 +00:00
Tomas Frydrych
e9d9715dcf 2007-12-05 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-actor.h:
	* tests/Makefile.am:
	* tests/test-unproject:
	(clutter_actor_transform_stage_point):
	Added new function for translating stage coordinates into local
	actor coordinates.
2007-12-05 14:54:15 +00:00
Øyvind Kolås
e92b864dff Support for shaders in clutter. At the moment limited to drivers
providing GLSL support.
* clutter/cogl/cogl.h: added rather direct binding of needed for glsl
shaders.
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl-defines.h: added stubs.
* clutter/cogl/gles/cogl.c: added stubs.
* clutter/glx/clutter-stage-glx.c:
(clutter_stage_glx_realize): unrelated memory management sanity fix.
(clutter_stage_glx_unrealize): unbind all shaders on stage unrealize.
* clutter/Makefile.am: added clutter-shader.[ch]
* clutter/clutter-actor.[ch]: adding shader capability to 
actors.
* clutter/clutter-feature.h: added CLUTTER_FEATURE_SHADERS_GLSL
* clutter/clutter-private.h: added stack of shaders to context.
* clutter/clutter-shader.[ch]: new.
* tests/Makefile.am: added shader test.
* tests/test-shader.c: (frame_cb), (main): simple shader test,
cycle through the inline shader with right/left mouse buttons.
2007-12-03 16:29:18 +00:00
Emmanuele Bassi
97631bffd5 2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (parse_units),
	(clutter_actor_parse_custom_node): Do not allow using percentages
	of the stage on the stage itself, as it makes little to no
	sense.

	* clutter/clutter-script.c:
	(clutter_script_construct_object): Rearrange code.

	* tests/test-script.json: Do not set the size of the stage, to
	test for the stage size percentage.
2007-11-30 14:36:07 +00:00
Emmanuele Bassi
f04a0a4645 2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (parse_units),
	(clutter_actor_parse_custom_node),
	(clutter_scriptable_iface_init): Override the parsing code
	for the x, y, width and height properties of ClutterActor,
	to allow strings with modifiers when defining the position
	and/or the dimensions of an actor. Bare integers are assumed
	as pixels; floating point values in the [0, 1] interval are
	assumed as percentages; strings can have these modifiers:

	  - px - pixels
	  - mm - millimeters
	  - pt - points (at the current resolution)
	  - %  - percentage of the stage

	* clutter/clutter-units.h: Fix the conversion macros

	* tests/test-script.json: Test the new values.
2007-11-30 09:27:10 +00:00
Tomas Frydrych
9c77b0ab13 2007-11-29 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.h:
        * clutter/clutter-actor.c:
	Converted depth and rotation offsets to ClutterUnit.

	(clutter_actor_set_depthu):
	(clutter_actor_get_depthu):
	Additional ClutterUnit API.

	(_clutter_actor_apply_modelview_transform):
	Use cogl_translatex() in place of cogl_translate().
2007-11-29 13:47:37 +00:00
Tomas Frydrych
132296dcc3 2007-11-28 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
	(clutter_actor_set_positionu):
	(clutter_actor_set_sizeu):
	(clutter_actor_get_widthu):
	(clutter_actor_get_heightu):
	(clutter_actor_set_widthu):
	(clutter_actor_set_heightu):
	(clutter_actor_get_xu):
	(clutter_actor_get_yu):
	(clutter_actor_set_xu):
	(clutter_actor_set_yu):
	Expanded ClutterActor API with new ClutterUnit-base functions.

        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
	(clutter_stage_get_resolution):
	(clutter_stage_get_resolutionx):
	New function to query stage resolution (floating and fixed point
	versions).

        * clutter/clutter-units.h:
	(CLUTTER_UNITS_FROM_STAGE_WIDTH_PERCENTAGE):
	(CLUTTER_UNITS_FROM_STAGE_HEIGHT_PERCENTAGE):
	(CLUTTER_UNITS_FROM_PARENT_WIDTH_PERCENTAGE):
	(CLUTTER_UNITS_FROM_PARENT_HEIGHT_PERCENTAGE):
	(CLUTTER_UNITS_FROM_MM):
	(CLUTTER_UNITS_FROM_MMX):
	(CLUTTER_UNITS_FROM_POINTS):
	(CLUTTER_UNITS_FROM_POINTSX):
	New macros for conversions to ClutterUnits.

	* clutter.symbols:
	Added:
	        ClutterActor anchor_point functions,
                clutter_stage_get_resolution functions.

	Removed:
                clutter_actor_scale_with_gravity functions.
2007-11-28 15:31:41 +00:00
Emmanuele Bassi
f4817f279a 2007-11-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Documentation fixes.
2007-11-28 14:16:37 +00:00
Tomas Frydrych
20a9bf142c 2007-11-28 Tomas Frydrych <tf@openedhand.com>
* clutter/NEWS:
	Started 0.6.0 section with comment on actor anchor point.

        * clutter/clutter/clutter-actor.c:
        * clutter/clutter/clutter-actor.h:
        * clutter/clutter/clutter-behaviour-scale.c:
        * clutter/clutter/clutter-deprecated.h:
	(clutter_actor_set_anchor_point):
	(clutter_actor_set_anchor_pointu):
	(clutter_actor_get_anchor_point):
	(clutter_actor_get_anchor_pointu):
	(clutter_actor_set_anchor_point_from_gravity):
	New anchor point API deprecating old gravity scaling, added
	comments on modelview matrix construction to ClutterActor
	documentation.

	(clutter_actor_set_scale_with_gravity):
	(clutter_actor_set_scale_with_gravityx):
	Deprecated; use clutter_actor_set_anchor_point_from_gravity() instead.
2007-11-28 12:23:31 +00:00
Emmanuele Bassi
ceecc23a02 2007-11-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_destroy): Remove the
	reference we hold on the actor, as it was preventing the finalization
	of every child on the stage.
2007-11-27 11:05:26 +00:00
Emmanuele Bassi
a02e20a14a 2007-11-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_real_show),
	(clutter_actor_real_hide): Do not set the MAPPED flag on the actor
	if it is a top-level one (like ClutterStage); the backends are
	responsible for setting that flag, as it might be the result of an
	asynchronous operation (e.g. on X11).
	
	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_show),
	(clutter_stage_egl_hide): Set/unset the CLUTTER_ACTOR_MAPPED flag
	on show and hide respectively.

	* clutter/osx/clutter-stage-osx.c:
	(clutter_stage_osx_show),
	(clutter_stage_osx_hide): Ditto as above.

	* clutter/sdl/clutter-stage-sdl.c:
	(clutter_stage_sdl_show),
	(clutter_stage_sdl_hide): Ditto as above, plus chain up to the
	parent class show/hide virtual functions.

	* clutter/x11/clutter-event-x11.c (event_translate): Use the MapNotify
	and UnmapNotify events to call the X11 stage map/unmap functions.

	* clutter/x11/clutter-stage-x11.[ch]:
	(clutter_stage_x11_set_fullscreen): Set the fullscreen_on_map flag
	with the fullscreen value.

	(clutter_stage_x11_map), (clutter_stage_x11_unmap): Set the MAPPED
	flag on the stage actor and redraw; also, if the fullscreen_on_map
	flag was set, call clutter_stage_fullscreen() as well. (#648)

	* tests/Makefile.am:
	* tests/test-fullscreen.c: Add a fullscreen test case for checking
	whether fullscreen works on every backend/platform.
2007-11-26 12:07:25 +00:00
Emmanuele Bassi
c4f89675e0 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_real_request_coords),
	(clutter_actor_request_coords),
	(clutter_actor_class_init): Provide a default ::request_coords()
	implementation in ClutterActor and use it to store the bounding
	box passed to clutter_actor_request_coords(). This makes the code
	more reliable and clean, and avoids a call to the subclass
	request_coords() method if the bounding box did not change. Now,
	every class overriding ClutterActor::request_coords() *must* chain
	up to the parent class method or the bounding box will not be
	saved inside the ClutterActor structure.
	
	* clutter/clutter-entry.c:
	* clutter/clutter-group.c:
	* clutter/clutter-hbox.c:
	* clutter/clutter-label.c:
	* clutter/clutter-texture.c:
	* clutter/clutter-vbox.c: Chain up to the parent class
	request_coords() method.
2007-11-23 17:12:27 +00:00
Emmanuele Bassi
07079204ac 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-alpha.c:
	* clutter/clutter-effect.c:
	* clutter/clutter-event.c:
	* clutter/clutter-event.h:
	* clutter/clutter-group.h:
	* clutter/clutter-model.c:,
	* clutter/clutter-script.c:
	* clutter/clutter-scriptable.h:
	* clutter/clutter-stage.c: Documentation fixes.

	* clutter/clutter-score.c: Fix implementation.
2007-11-23 13:11:10 +00:00
Emmanuele Bassi
e57b42ae52 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_destroy): Bail out
	if clutter_actor_destroy() was called on the stage: the stage
	is not for the user to destroy.

	* clutter/x11/clutter-backend-x11.c:
	* clutter/eglnative/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c:
	* clutter/osx/clutter-backend-osx.c: Unset the top-level private
	flag on the stage when disposing it, so the backends can safely
	call clutter_actor_destroy().

	* clutter/clutter-private.h: Tweak the private flags accessors,
	to avoid the typecheck.
2007-11-23 11:20:14 +00:00
Øyvind Kolås
c7292a0d8b * clutter/clutter-actor.c: mended a couple of typos in documentation. 2007-11-21 23:25:56 +00:00
Øyvind Kolås
7fca77fa5e * clutter/clutter-actor.c: mended a couple of typos in documentation. 2007-11-21 23:25:30 +00:00
Emmanuele Bassi
9955b06542 2007-11-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c::
	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-effect.c:
	* clutter/clutter-label.c: Remove the usage of G_PARAM_CONSTRUCT
	without an override for the ::construct virtual function; using
	G_PARAM_CONSTRUCT to set the default value of a property is not
	the recommended approach; default values are set inside the
	instance init function.
2007-11-20 16:05:56 +00:00
Øyvind Kolås
990d0e90a5 * clutter/clutter-actor.[ch]: (clutter_actor_set_rotationx),
(clutter_actor_set_rotation): swapped axis and angle around,
the new argument order is: (axis, angle, x, y, z). Also removed
deprecated rotation functions from header.
Updated use of clutter_actor_set_rotation? in the following files:
* clutter/clutter-behaviour-rotate.c: 
* clutter/clutter-effect.c: 
* tests/test-actors.c: 
* tests/test-project.c:
2007-11-19 11:43:20 +00:00
Matthew Allum
382852f921 2007-11-18 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-group.c:
        * clutter/clutter-main.c:
        * clutter/clutter-stage.c:
        * tests/test-events.c:
        Parent Actors no longer need to be set reactive for reactive
        children to get events. Also makes groups now pickable.
        (#597, #423)

        * clutter/clutter-texture.c:
        Handle case when 1x1 tiled texture is created,
        falling 'back' to being non tiled. (#596)

        * clutter/eglx/clutter-backend-egl.c:
        Call EglTerminate on backend shutdown.
2007-11-18 23:24:55 +00:00
Emmanuele Bassi
7495848f14 2007-11-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Update exported symbols.

	* clutter/clutter-actor.[ch]: Remove clutter_actor_rotate_*
	and clutter_actor_get_rx* and provide a simpler rotation API:
	clutter_actor_set_rotation() and clutter_actor_get_rotation().

	* clutter/clutter-deprecated.h: Deprecate the old rotation API.

	* clutter/clutter-behaviour-bspline.c:
	* clutter/clutter-behaviour-rotate.c:
	* clutter/clutter-effect.c: Update internal usage of the
	rotation API.

	* tests/test-project.c: Ditto as above.
2007-11-18 15:36:04 +00:00
Emmanuele Bassi
75d186c3f9 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Massive API clean-ups. Initial
	fixes for bugs #614 and #628.

	* clutter/clutter-main.c:
	* clutter/clutter-stage.c: Update internal usage of the actor
	API.

	* tests/test-events.c: Update test suite.
2007-11-15 17:35:47 +00:00
Emmanuele Bassi
4de1adb04a 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Rename clutter_actor_get_id() to
	clutter_actor_get_gid().

	(clutter_actor_set_parent): Use GUINT_TO_POINTER().

	* clutter/clutter-deprecated.h: Add a replacement warning for
	clutter_actor_get_id().

	* clutter/clutter-texture.c (texture_upload_data): Use
	clutter_actor_get_gid(), and don't leak the filename string.
2007-11-14 11:43:18 +00:00
Emmanuele Bassi
b0e169d73c 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name
	to ::set_id and ::get_id, to avoid potential confusion with the
	ClutterActor:name property.

	* clutter/clutter-script.h:
	* clutter/clutter-script.c (clutter_script_construct_object): Use
	clutter_scriptable_set_id().

	(clutter_get_script_id): Add a public function to retrieve the ID
	used in the UI definition files from an object.

	* clutter/clutter-actor.c: Do not set the name of the actor with
	the ID set in the UI definition files.

	* tests/test-script.c: Test clutter_get_script_id().

	* clutter.symbols: Update with the new symbols.
2007-11-14 11:32:24 +00:00
Emmanuele Bassi
72ce4487f8 2007-11-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Fix the declaration of the
	class handlers for the ::captured-event, ::enter-event and
	::leave-event signals; the function signatures were missing
	the return value the signals marshallers were expecting, and
	their names weren't respecting the convention for event-related
	signals.
2007-11-07 16:40:30 +00:00
Emmanuele Bassi
f0f043cb19 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Implement part of the ClutterScriptable
	interface, using the ClutterActor API to set and get the name
	of an actor.

	(clutter_geometry_copy), (clutter_geometry_free): Use
	the slice allocator to avoid fragmentation when setting
	properties and emitting signals (that is: when packing
	boxed types into GValues).

	(clutter_actor_box_copy), (clutter_actor_box_free),
	(clutter_vertex_copy), (clutter_vertex_free): Ditto.

	* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_push_transform_child),
	(clutter_actor_pop_transfomr_child): Simple wrappers around
	COGL API, which avoid including clutter/cogl.h when writing
	container actors outside Clutter.
2007-10-25 14:36:37 +00:00
Emmanuele Bassi
03fe64e8f8 2007-10-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_property), (clutter_actor_get_property),
	(clutter_actor_class_init): Add the :reactive property, to
	control reactiveness using the UI definition files.

	(clutter_actor_reparent): Do not assume the parent is a
	ClutterContainer, and call the container API only if needed.

	(clutter_actor_destroy): Remove from the parent if needed,
	just like the documentation says.
2007-10-17 16:43:46 +00:00