Commit Graph

227 Commits

Author SHA1 Message Date
Øyvind Kolås
4582ab12b8 * clutter/clutter-texture.c: made the filter-quality proeprty also
control the use of mipmapping.
* clutter/clutter-texture.h: added ClutterTextureQuality enum.
* tests/test-texture-quality.c: new test.
* tests/Makefile.am: added test-texture-quality
2008-06-07 15:08:05 +00:00
Emmanuele Bassi
eb990a853a 2008-06-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c:
	(clutter_texture_class_init): Do not unrealize on hide(), and
	do not realize() on show. By default, clutter_actor_show() will
	realize ourselves, and we don't want to unrealize when hidden
	to avoid paying the penalty of reading back the texture data
	from the video memory.

	* tests/test-actors.c: Show all textures again when pressing
	the 'r' key.
2008-06-06 16:22:55 +00:00
Neil Roberts
d66fe947a0 * tests/test-shader.c: Use the special wrapper vars when building
for GLES 2 and automatically cycle the shaders because it's
	difficult to right-click.
2008-06-06 15:41:52 +00:00
Neil Roberts
b2bebe0586 * tests/test-shader.c: Fixed to use sampler2D instead of
sampler2DRect now that GL_TEXTURE_RECTANGLE support is disabled in
	revision 2834. The ClutterTexture actor now has the
	'disable-slicing' property set. The distance in texture
	coordinates between pixels is passed in as a uniform so that the
	box-blur shader can still work.
2008-06-06 15:00:12 +00:00
Emmanuele Bassi
80cc7351b7 2008-06-06 Emmanuele Bassi <ebassi@openedhand.com>
Bug #952 - Fix test-textures in trunk

	* tests/test-textures.c: Use USE_GDKPIXBUF instead of
	USE_PIXBUF. (#952, Gwenole Beauchesne)
2008-06-06 14:56:08 +00:00
Emmanuele Bassi
2d29f11cf6 2008-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* tests/Makefile.am:
	* tests/test-paint-wrapper.c: Add a test case (merely, a copy
	of test-actors.c) that verifies that handlers to the ::paint
	signal are called in the right order.
2008-06-05 15:07:51 +00:00
Robert Bragg
1be042189f 2008-06-04 Robert Bragg <bob@o-hand.com>
* tests/test-clip.c:
	Removes a spurious #include <gdk-pixbuf/gdk-pixbuf.h> which may not
	be found if using --with-imagebackend=internal
2008-06-04 16:02:40 +00:00
Neil Roberts
8bdb98736d Applied 'final patch' from bug #874
* clutter/cogl/gles/cogl.c:
	* clutter/cogl/gl/cogl.c: The clip planes are now set using the
	inverse projection matrix as the modelview matrix so that they can
	be specified in screen coordinates.

	* clutter/cogl/gles/cogl-context.h (CoglContext):
	* clutter/cogl/gl/cogl-context.h (CoglContext): Added a member to
	cache the inverse projection matrix

	* clutter/clutter-fixed.h: Added a constant for converting from
	radians to degrees.

	* clutter/clutter-fixed.c (clutter_atani, clutter_atan2i): Added
	fixed-point versions of atan and atan2.

	* tests/test-clip.c: Added a test for clipping with various
	rotations and depths.

	* tests/Makefile.am (noinst_PROGRAMS): Added test-clip
2008-06-02 12:34:10 +00:00
Emmanuele Bassi
a03ec45dff 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/pangoclutter-font.c: Remove unneeded file.

	* tests/Makefile.am:
	* tests/test-random-text.c: Add a test for checking the
	glyph cache.
2008-05-28 14:14:56 +00:00
Emmanuele Bassi
28430b7c1b 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-script.c:
	* tests/test-script.json: Test merging the same actor from two
	different sources.
2008-05-28 12:20:54 +00:00
Emmanuele Bassi
f6dce7f9e5 2008-05-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-backend-x11.c:
	* clutter/clutter-event.h:
	* clutter/clutter-feature.h:
	* clutter/clutter-fixed.c:
	* clutter/clutter-model.h: Fix documentation.

	* clutter/eglnative/clutter-backend-egl.[ch]:
	* clutter/eglnative/clutter-event-egl.c: Add the same solution
	used for the SDL backend in order to get the time of an event.
	This should fix the motion event throttling and the click count
	on button press.

	* tests/test-pixmap.c (create_pixmap), (main): Fix preprocessor
	directives.
2008-05-15 14:31:43 +00:00
Emmanuele Bassi
3171062b3f 2008-05-14 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-threads.c: Add a "progress bar" actor and
	make the test take less amount of time to complete.
2008-05-14 17:26:59 +00:00
Emmanuele Bassi
99b303dbcc 2008-05-14 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-events.c: Clean up a bit, and print out more
	messages when pressing one of the rectangles.

	* tests/test-threads.c: Be more verbose in the console, and
	apply another behaviour on the rectangle, to show that we
	are not blocking.
2008-05-14 16:47:38 +00:00
Matthew Allum
f360f81f22 2008-05-12 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-x11-texture-pixmap.c:
        * configure.ac:
        * tests/Makefile.am:
        Remove the XComposite dep from Clutter itself, just use
        in test-pixmap (if available)
2008-05-12 16:22:16 +00:00
Emmanuele Bassi
101a3cac4e 2008-05-12 Emmanuele Bassi <ebassi@openedhand.com>
Rework the stage wrapper/implementation relation: remove
	duplicated code and all the bookkeeping from the backends into
	ClutterStage whenever possible, to reduce the amount of	work a
	backend must do (and possibly get wrong). Thanks to Tommi
	Komulainen.

	* clutter/clutter-main.c:
	(clutter_init_with_args), (clutter_init): Realize the default
	stage after creation. The default stage is special, because we
	use it in the initialization sequence. This removes the burden
	from the backends and reduces the things a backend can get
	wrong.

	* clutter/clutter-stage.c:
	(clutter_stage_show): Make sure to realize the implementation if
	it hasn't been realized yet.

	(clutter_stage_realize): Set the REALIZED flag and call
	clutter_stage_ensure_current() if the implementation was
	successfully realized.

	(clutter_stage_unrealized): Call clutter_stage_ensure_current()
	on unrealize.

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Do not realize the stage anymore
	when creating it, and let the normal realization sequence take
	place.

	(clutter_backend_glx_ensure_context): Trap for X11 errors.

	* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_realize): Chain up to the X11 implementation
	so that we can set up the window state (title, cursor visibility)
	when we actually have a X window. Also, do not call
	clutter_stage_ensure_current(), and rely on the wrapper to do
	it for us. This means we can drop setting the REALIZED flag on
	the wrapper.

	(clutter_stage_glx_unrealize): Do not call
	clutter_stage_ensure_current() ourselves, and rely on the wrapper
	to do it for us.

	* clutter/x11/clutter-stage-x11.c:
	(set_wm_title),	(set_cursor_visible): Move the WM title and
	cursor visibility code inside their own functions.

	(clutter_stage_x11_realize): Set the window title and whether the
	cursor is visible or not after realizing the stage.

	(clutter_stage_x11_set_cursor_visible),
	(clutter_stage_x11_set_title): Call set_wm_title() and
	set_cursor_visible().

	(clutter_stage_x11_finalize): Free the title string.

	* clutter/x11/clutter-stage-x11.h: Save more of the stage state,
	so that we can set it even when the stage hasn't been realized
	yet.

	* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage):
	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_unrealize),
	(clutter_stage_egl_realize): Update the eglnative backend.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_ensure_context),
	(clutter_backend_egl_create_stage):
	* clutter/eglx/clutter-stage-egl.c:
	(clutter_stage_egl_unrealize),
	(clutter_stage_egl_realize): Update the eglx backend.

	* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_create_stage):
	* clutter/sdl/clutter-stage-sdl.c:
	(clutter_stage_sdl_realize): Update the sdl backend.

	* clutter/fruity/clutter-backend-fruity.c:
	(clutter_backend_fruity_create_stage):
	* clutter/sdl/clutter-stage-fruity.c:
	(clutter_stage_fruity_realize): Update the fruity backend.

	* tests/test-multistage.c (on_button_press): Bail out if
	clutter_stage_new() returns NULL.

	* HACKING.backends: Update backend writing documentation.
2008-05-12 15:26:37 +00:00
Emmanuele Bassi
d7a8fa8b53 2008-05-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h: Add a flag for the
	default stage.

	* clutter/clutter-script.c:
	(json_object_end): If the "type" member is "ClutterStage"
	and we have a "is-default" member set to true then this
	is the default stage.

	(clutter_script_construct_object): Special case the default
	stage instead of each ClutterStage.
	
	(object_info_free): Ditto as above.

	* tests/test-script.json: Test the creation of a non-default
	stage and the ::destroy handler to quit.
2008-05-09 13:58:04 +00:00
Emmanuele Bassi
1abccbad21 2008-05-09 Emmanuele Bassi <ebassi@openedhand.com>
Bug #902 - Support transform from G_TYPE_INT to ClutterUnit

	* clutter/clutter-units.c:
	(clutter_value_transform_int_unit),
	(clutter_unit_get_type): Add GValue transformation function from
	integer values to ClutterUnit. (#902)

	(param_unit_validate): Fix validation for ClutterParamSpecUnit;
	this allows writable ClutterUnit properties.

	* clutter/clutter-fixed.c:
	(clutter_value_transform_int_fixed),
	(clutter_value_transform_double_fixed),
	(clutter_value_transform_float_fixed): Add GValue transformation
	functions from native types (int, double, float) to ClutterFixed.

	(clutter_fixed_get_type): Register the new transformation functions.

	(param_fixed_validate): Fix validation for ClutterParamSpecUnit;
	this allows writable ClutterFixed properties.
2008-05-09 10:58:26 +00:00
Ivan Leben
ef084cfa95 * clutter/cogl/cogl.h.in:
* clutter/cogl/gl(es)/cogl-texture.h:
	* clutter/cogl/gl(es)/cogl-texture.c:
	cogl_texture_new_* functions take a gboolean auto_mipmap argument.
	If TRUE automatic mipmap generation is enabled during the process
	of slice texture object creation.
	(cogl_texture_new_from_foreign:) now allows mipmap min filter
	flags.

	* clutter/clutter-texture.c:
	* clutter/glx/clutter-glx-texture-pixmap.c:
	* tests/test-cogl-offscreen.c:
	* tests/test-cogl-tex-tile.c:
	* tests/test-cogl-tex-convert.c:
	* tests/test-cogl-tex-polygon.c:
	* tests/test-cogl-tex-getset.c:
	Pass FALSE for auto_mipmap to cogl_texture_new_*.

	* clutter/pango/pangoclutter-render.c:
	(tc_get:) Pass TRUE to cogl_texture_new_with_size and use mipmap
	min filter for nicer glyphs at small scales. As a result test-text
	has gone all beautiful now.
2008-05-07 16:12:54 +00:00
Øyvind Kolås
0e6ad06db4 * clutter/cogl/cogl.h.in: api review touch ups.
* clutter/cogl/common/cogl-primitives.c: api review touch ups.
* clutter/cogl/gl/cogl-primitives.c: (cogl_path_fill),
(cogl_path_stroke): indentation.
* clutter/cogl/gles/cogl-primitives.c:
(_cogl_path_fill_nodes): free allocated resources.
* tests/test-cogl-primitives.c: updated to new API, added rotation to
test to show that cogl renders paths correct under perspective
distortion.
2008-05-05 10:25:11 +00:00
Matthew Allum
f72af9926d 2008-05-01 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
        * tests/test-pixmap.c:
        Fix up texture-pixmap, now works.
        Thanks to Neil for spotting we were actually using
        wrong texture type in fbconfig (COGL change).
2008-04-30 23:07:23 +00:00
Matthew Allum
ca3074f772 2008-04-29 Matthew Allum <mallum@openedhand.com>
* clutter/glx/Makefile.am:
        * clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/glx/clutter-glx-texture-pixmap.h:
        * clutter/x11/Makefile.am:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        * tests/test-pixmap.c:
        Commit newer x11 texture pixmap stuff (optionally using SHM).
        Also seemingly still broken overhauled glx-texture-pixmap
        (code by Robert and myself)

* configure.ac:
        Minor formatting change.
2008-04-29 16:30:47 +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
Neil Roberts
ed9f2bc16f * tests/test-cogl-tex-polygon.c: Added buttons to toggle whether
slicing and linear filtering is enabled. By default slicing is
	disabled to help test on GL ES.
2008-04-28 11:23:27 +00:00
Neil Roberts
ae915f8ca4 * tests/Makefile.am (INCLUDES): Added $(top_srcdir)/clutter to the
include path. Otherwise the tests will fail to build trying to
	include "json/json-types.h" when building out-of-tree.
2008-04-28 10:11:14 +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
f7d9c5eaa1 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-script.json: Remove the explicit "visible"
	member to test that the visibility of actors is TRUE
	by default.
2008-04-23 14:01:09 +00:00
Matthew Allum
c2cb5bf64a 2008-04-15 Matthew Allum <mallum@openedhand.com>
Work related to #873;

        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        * clutter/x11/clutter-x11-texture-pixmap.h:
        General cleanup of texture pixmap code, adding;
          - Pixmap dimentions and depth now auto probed, read only props.
          - More X safety traps
          - Add support for optionally tracking damage and automatically
            updating texture.

        * clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/glx/clutter-glx-texture-pixmap.h:
        General cleanup and some safety additions. Needs more work so
        'proper' subclass - dependent on new COGL.

        * clutter/x11/clutter-backend-x11.c: (clutter_x11_remove_filter):
        Invert g_return_if check.

        * configure.ac:
        Pull in XComposite and XDamage (at least for now)

        * tests/Makefile.am:
        * tests/test-pixmap.c:
        Add a modified test from Johan for above.
2008-04-15 21:18:13 +00:00
Emmanuele Bassi
8867c1bae5 2008-04-11 Emmanuele Bassi <ebassi@openedhand.com>
* README: Add a note about the Shader API changes.

	* clutter/clutter-deprecated.h: Add deprecation symbols.

	* clutter/clutter-shader.[ch]: Rename the :bound read-only
	property to :compiled. Also rename clutter_shader_bind()
	and clutter_shader_is_bound() to clutter_shader_compil() and
	clutter_shader_is_compiled(), respectively.

	* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_unrealize): Update after
	clutter_shader_release_all() rename.

	* tests/test-shader.c (button_release_cb), (main): Update.
2008-04-11 12:00:50 +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
Emmanuele Bassi
477db755b7 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.[ch]: Remove all the API changes, and
	just add a clutter_score_append_at_marker(); the implementation
	remains the same, but the marker must be explicitly created by
	the developer. The ids are no longer used to create implicit
	markers, so they can return to be unsigned integers.

	* clutter/clutter-timeline.[ch]:
	(clutter_timeline_has_marker): Add a function to query a timeline
	for a marker being set.

	* tests/test-score.c (main): Update with the API changes.

	* clutter.symbols: Update exported symbols.
2008-03-18 22:07:17 +00:00
Emmanuele Bassi
b6b9dd7c65 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add new symbols

	* clutter/clutter-score.[ch]: Use the newly added marker API
	on the timelines to implement attaching timelines at specific
	points, using either milliseconds or frames.

	* tests/test-score.c (main): Test the new API.
2008-03-18 17:54:40 +00:00
Emmanuele Bassi
be97c496b6 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-marshal.list: Add signature for the
	::marker-reached signal marshaller.

	* clutter/clutter-timeline.[ch]: Add timeline marker API;
	using markers it is possible to add a unique identifier to
	a particular frame of the timeline, and receive a signal
	notification when reaching that particular marker while
	playing the timeline. (#641)

	* tests/test-timeline.c: Update the test case to check for
	the marker-reached signal emission.

	* clutter.symbols: Add new symbols.
2008-03-18 17:50:45 +00:00
Øyvind Kolås
b6cc7c1249 rearrange to be less than 80col 2008-03-10 23:09:28 +00:00
Øyvind Kolås
aa1e89cc92 * tests/test-shader.c: improved readability of fragment shader
examples by factoring out common bits into FRAGMENT_SHADER_BEGIN and
FRAGMENT_SHADER_END macros.
2008-03-10 23:07:22 +00:00
Robert Bragg
59699b1bdd removes test-timeline-frame-count references 2008-03-06 13:47:06 +00:00
Emmanuele Bassi
daea8af85e 2008-03-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.h:
	* clutter/clutter-entry.c:
	(clutter_entry_handle_key_event_internal),
	(clutter_entry_key_press), (clutter_entry_class_init),
	(clutter_entry_handle_key_event): Handle a default class handler
	for the key-press-event, so that giving key focus to an entry will
	automatically make it work. This deprecates the
	clutter_entry_handle_key_event() function. (#824)

	* tests/test-entry.c (main): Remove the handle_key_event()
	machinery, and just give focus to the entry.
2008-03-06 12:39:24 +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
Robert Bragg
37e9d94f4b Adds some new timeline unit-tests (#439) with actual timeline
fixes to follow.
2008-03-05 16:04:06 +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
bab8b24aed 2008-02-11 Emmanuele Bassi <ebassi@openedhand.com>
* README:
	* NEWS: Release 0.5.6

	* configure.ac: Post release bump to 0.5.7.

	* clutter/clutter-behaviour-scale.c:
	* tests/test-fbo.c: Fix compilation warnings.
2008-02-11 16:29:31 +00:00
Tomas Frydrych
18eef53cfc 2008-02-07 Tomas Frydrych <tf@openedhand.com>
* tests/test-actors.c:
	Reverted previous change.
2008-02-07 17:04:43 +00:00
Øyvind Kolås
2994de63ef * tests/test-shader.c: (button_release_cb): added simplified
implementation of a box-blur shader from Gwenole Beauchesne that
should work on GLSL implementing low-end IGPs not implementing
dynamic branching. The original code used crashed some of these
due to bugs in drivers or similar. Resolves bug #710.
2008-02-07 16:52:12 +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
Neil J. Patel
384c7048e3 2008-02-07 Neil J. Patel <njp@o-hand.com>
* tests/test-actors.c: (frame_cb), (main):
	Changed set_anchor to move_anchor.
	Changed clutter_actor_rotate x & y values to 0,0.
	Switched on scaling because it seems to work without drifting.
2008-02-07 15:01:03 +00:00
Emmanuele Bassi
c8499a7619 2008-02-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.c (traverse_children): Actually implement
	clutter_score_list_timelines().

	* tests/test-score.c (main): Test clutter_score_list_timelines().
2008-02-07 11:53:52 +00:00
Matthew Allum
3d802b172c 2008-02-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Minor clean up from last commit.

        * tests/test-fbo.c:
        Swall tweak (rotate offscreen, rather than resize
2008-02-06 14:50:15 +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
Øyvind Kolås
545e323ec1 * tests/test-fbo.c: (make_shader):
* tests/test-shader.c: (main): multiply the resulting gl_FragColor
with gl_Color before being done to take opacity into account in the
GLSL fragments.
2008-02-04 13:05:16 +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
Matthew Allum
9026b8f976 2008-02-03 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-shader.c:
        Minor formatting cleanups to fit in 80 cols.

        * clutter/clutter-texture.c:
        More safety checks, clean ups in clutter_texture_new_from_actor()

        * clutter/cogl/gl/cogl.c:
        Always clear the FBO initially when rendering

        * tests/test-fbo.c:
        Overhall the test as to be more useful (and show current issues)
2008-02-03 01:53:10 +00:00
Matthew Allum
8366a906e2 2008-02-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-feature.h:
        * clutter/clutter-texture.c:
        * clutter/clutter-texture.h:
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        * tests/Makefile.am:
        * tests/test.fbo.c:
        Add initial support for FBO's in Clutter (OpenGL only so far).
        See new clutter_texture_new_from_actor()
        Initial implementation, needs work.

        * clutter/x11/clutter-stage-x11.c:
        (clutter_stage_x11_set_cursor_visible):
        Fall back to again not relying on xfixes to hide cursor. *sigh*

        * clutter/clutter-deprecated.h:
        Add clutter_group_find_child_by_id
2008-02-01 15:29:00 +00:00
Øyvind Kolås
1c05c60e99 * tests/test-depth.c: added a box of cloned hands to further expand
the scope of depth testing scenarios exercised by test-depth.
2008-01-31 16:55:34 +00:00
Øyvind Kolås
70601b469b * tests/test-depth.c: (timeline_completed): make use of
clutter_timeline_set_direction instead of static state.
(raise_top): made rectangle remain at fixed depth and raise
above each other.
(janus_group): added a rectangle with two faces, one red and
one green, that spins around.
2008-01-31 14:42:49 +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
5bf265fbae 2008-01-27 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-depth.c (main): Use a group instead of pushing
	the actors on the stage.
2008-01-27 23:39:23 +00:00
Emmanuele Bassi
97a23161f6 2008-01-23 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Use variables, instead of substitutions.

	* clutter/clutter-private.h:
	* clutter/clutter-main.h: Make clutter_do_event() public again,
	as we need it in clutter-gtk.

	* configure.ac:
	* clutter/x11/Makefile.am:
	* clutter/x11/clutter-x11.pc.in: Add a clutter-x11 pkg-config
	file for clutter-gtk, as it depends on the X11 backend API, as
	implemented by the GLX and EGLX backends.

	* clutter/x11/clutter-event-x11.c (event_translate): Do not
	propagate DestroyNotify events if the stage doesn't own the
	window.

	* tests/test-scale.c (main): Set values different from the default.
2008-01-23 11:08:39 +00:00
Emmanuele Bassi
e0fc055dd2 2008-01-21 Emmanuele Bassi,,, <ebassi@sprite>
* clutter/clutter-behaviour-depth.h:
	* clutter/clutter-behaviour-depth.c:
	(clutter_behaviour_depth_set_bounds),
	(clutter_behaviour_depth_get_bounds): Add the depth-start and
	depth-end accessors.

	* tests/test-depth.c (timeline_completed): Use set_bounds()
	instead of g_object_set().

	* clutter.symbols: Add clutter_behaviour_depth_set_bounds()
	and clutter_behaviour_opacity_get_bounds() to the list of
	public symbols.
2008-01-21 16:07:28 +00:00
Øyvind Kolås
e58d0d7f34 * tests/test-shader.c: fix incompatible types in shader programs
Apparently floats can't be multiplied or divided with ints without
explicit type casts. Use 2.0 or float(var) where appropriate. Patch
from Tommi Komulainen (#715).
2008-01-21 11:27:53 +00:00
Emmanuele Bassi
86c2e6e734 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-actors.c (input_cb): Fix the callback signature;
	hide the clicked actor only if it's a hand.
2008-01-18 18:11:33 +00:00
Emmanuele Bassi
fe2379a810 2008-01-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add new ClutterBehaviourScale setters.

	* clutter/clutter-behaviour-scale.[ch]: Split the scaling factors
	on both axis. Add setters for all the behaviour properties.

	* clutter/clutter-effect.h:
	* clutter/clutter-effect.c (clutter_effect_scale): Split the
	final scale factor to match the ClutterBehaviourScale changes. (#709)
	
	* tests/test-actors.c:
	* tests/test-effects.c:
	* tests/test-rotate.c:
	* tests/test-scale.c: Update after API change.
2008-01-17 14:31:14 +00:00
Emmanuele Bassi
71127caa65 2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-scale.c: Improve test case for scaling (#684,
	Jaap A. Haitsma)
2008-01-14 13:13:23 +00:00
Emmanuele Bassi
6b3b6c5afe 2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.[ch]: Rename ClutterModelDefault
	into ClutterListModel, to make it clear that the default
	ClutterModel implementation is list-based

	* tests/test-model.c: Update call
2008-01-09 14:34:24 +00:00
Emmanuele Bassi
09263f94b0 2008-01-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.h:
	* clutter/clutter-model.c:
	(clutter_model_appendv),
	(clutter_model_prependv): Add vector based API for bindings.
	
	(clutter_model_get_column_name),
	(clutter_model_get_column_type),
	(clutter_model_set_sorting_column): Fix the check in the condition
	on the column index.

	* tests/test-scale.c (on_timeline_completed), (main): Fix spelling

	* clutter.symbols: Update public symbols
2008-01-07 17:17:43 +00:00
Emmanuele Bassi
0bfe32314a 2007-12-25 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-script.json: Fix the JSON syntax
2007-12-25 20:09:20 +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
ecded5cb7c 2007-12-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c:
	(clutter_label_query_coords): Return the bounding box set inside
	request_coords(), if any; otherwise, return the natural allocation
	of the label. (#678, reported by Gwenole Beauchesne)

	* tests/test-rotate.c: Align the label
2007-12-20 09:22:05 +00:00
Emmanuele Bassi
afaa4fe26f 2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.c:
	(clutter_model_default_iter_next),
	(clutter_model_default_iter_prev): Do not instantiate a new
	iterator, and update the passed one instead, as we say we do
	in the documentation. This avoid leaking tons of iterators.

	* clutter/clutter-model.[ch]: Update the documentation.

	* tests/test-model.c: Prettify some output.
2007-12-15 13:02:06 +00:00
Emmanuele Bassi
6193beb8be 2007-12-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.c:
	(clutter_knot_get_type): Use the I_() macro.

	* clutter/clutter-model.[ch]: Make ClutterModel and ClutterModelIter
	abstract classes; also, provide more virtual functions inside the
	ClutterModel vtable, to allow subclasses and language bindings to
	override the entire ClutterModel using other/native data types
	to store the rows.
	
	* clutter/clutter-model-default.[ch]: ClutterModelDefault is a
	default implementation of ClutterModel and ClutterModelIter using
	GSequence.

	* clutter/Makefile.am:
	* clutter/clutter.h: Build glue for ClutterModelDefault.

	* tests/test-model.c: Update for constructor changes.

	* tests/test-shader.c: Fix a typo.
2007-12-14 17:25:55 +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
aed212384a 2007-12-10 Tomas Frydrych <tf@openedhand.com>
* tests/Makefile.am:
	Fixed a typo.
2007-12-10 10:16:55 +00:00
Tomas Frydrych
54b752c869 2007-12-10 Tomas Frydrych <tf@openedhand.com>
* tests/test-viewport.c:
	* tests/Makefile.am:
	Added a simple viewport test.
2007-12-10 10:13:31 +00:00
Emmanuele Bassi
e1b1bc289c 2007-12-09 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-events.c (input_cb):
	* tests/test-text.c (main): Fix compiler errors. (#592,
	Gwenole Beauchesne)
2007-12-09 08:53:06 +00:00
Emmanuele Bassi
6e25c4ef96 Rever accidental commit 2007-12-06 10:58:42 +00:00
Emmanuele Bassi
b1eca511d6 Update the svn:ignore property 2007-12-06 10:57:29 +00:00
Emmanuele Bassi
2a5a4f598f 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-unproject.c: Fix type comparison.

	* tests/test-score.c: Save the returned ids.
2007-12-06 09:07:12 +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
Emmanuele Bassi
51a0d5a80f 2007-12-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.[ch]: Reimplement ClutterScore using
	a N-ary tree to store the timelines. Remove clutter_score_add():
	the same functionality can be achieved by passing a NULL
	parent to clutter_score_append().

	* tests/test-score.c: Update ClutterScore test unit, and add
	debug printouts.
2007-12-04 16:26:19 +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
Emmanuele Bassi
687561dfe2 2007-11-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.[ch]: Slight API change in the constructor
	functions for ClutterModel: clutter_model_new() now takes a list
	of GType/string pairs for both the column type and the column name.

	(clutter_model_set_n_columns),
	(clutter_model_set_names),
	(clutter_model_set_types): Subclasses of ClutterModel will be able
	to call clutter_model_set_types() and clutter_model_set_names() in
	any order, provided that they don't call each function more than
	once.

	* tests/test-model.c: Update the test case.
2007-11-29 15:01:21 +00:00
Emmanuele Bassi
4976be12ca 2007-11-28 Emmanuele Bassi <ebassi@openedhand.com>
Remove the layout containers: they will be moved to a
	high-level library.

	* clutter/clutter.h:
	* clutter/Makefile.am: Remove layout and boxes from the
	build.

	* clutter/clutter-layout.[ch]: Remove the ClutterLayout
	interface.
	
	* clutter/clutter-box.[ch]:
	* clutter/clutter-hbox.[ch]:
	* clutter/clutter-vbox.[ch]: Remove ClutterBox and its
	subclasses.
	
	* clutter/clutter-label.c: Remove ClutterLayout implementation

	* clutter/clutter-script-private.h:
	* clutter/clutter-script-parser.c:
	* clutter/clutter-script.c:
	(clutter_script_parse_node): Remove special parsing for
	ClutterMargin and ClutterPadding.

	* clutter/clutter-types.h: Remove ClutterPadding and ClutterMargin.

	* tests/Makefile.am:
	* tests/test-boxes.c: Remove the boxes test case.
2007-11-28 13:50:24 +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
e06cb4234d 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-event.c: Back out an accidental commit.
2007-11-23 13:12:37 +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
2b447c3b48 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.[ch]: Update the effects API to remove
	the start value for most of them.

	(clutter_effect_move): Make it a simple "move from current
	position to new coordinates" effect.

	(clutter_effect_path): Rename from clutter_effect_move().

	(clutter_effect_rotate): Sync up with the new actor rotation API.

	* tests/test-effects.c: Regression test for the effects.

	* tests/Makefile.am: Build glue for test-effects

	* tests/test-behave.c: Emulate a full ramp by using a looping
	timeline changing its direction when reaching the last frame.
2007-11-23 11:23:19 +00:00
Emmanuele Bassi
99acb8e9c1 2007-11-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/cogl.h: Add cogl_fog_set() abstracting the
	glFog() functions and enabling the GL_FOG flag.

	* clutter/cogl/gl/cogl.c: Add GL implementation of cogl_fog_set().
	
	* clutter/cogl/gles/cogl.c: Add GL/ES implementation of
	cogl_fog_set().

	* clutter.symbols: Add new symbols.

	* clutter/clutter-stage.h: Add API to enable depth cueing on
	the stage using a linear GL fog, and to set the parameters
	for it (#637).

	* clutter/clutter-stage.c (clutter_stage_paint): Enable the
	GL fog if the ClutterStage:use-fog property is true.

	* tests/test-depth.c: Test the new stage API.
2007-11-21 11:55:26 +00:00
Øyvind Kolås
a770e57193 * clutter/clutter-main.c: (event_click_count_generate): generalized
click_count generation code.
* tests/test-events.c: (input_cb): extended test to report click_count
for release and scroll events as well as press events.
2007-11-20 17:14:05 +00:00
Emmanuele Bassi
caa56dadd4 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.[ch]: Fix ClutterLabel size allocation when
	no bounding box has been provided, and store the box set by the
	user so that it can be reused when recomputing the layout. (#600)

	(clutter_label_class_init),
	(clutter_label_init): Set the :wrap property default to FALSE.
	
	* clutter/clutter-units.h: Add ClutterUnit-to-PangoUnit conversion
	macro.

	* tests/test-rotate.c: Fix string.
2007-11-19 21:14:16 +00:00
Emmanuele Bassi
b676210545 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Update

	* clutter/clutter-actor.h: Rename the angle argument for
	set_rotationx() to avoid gtk-doc complaining

	* clutter/clutter-main.h:
	* clutter/clutter-main.c:
	(clutter_set_motion_events_enabled): Rename for consistency

	(clutter_get_motion_events_frequency),
	(clutter_set_motion_events_frequency): Add accessors for the default
	motion events deliver frequency.
	
	(clutter_do_event): Throttle down motion events delivery using the
	motion events frequency setting, to avoid excessive redraws. (#608)

	(clutter_context_get_default): Enable per-actor motion events, at
	least for now.

	* tests/test-events.c (red_button_cb):
	* tests/test-grab.c (green_press_cb): Update.
2007-11-19 16:30: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
b7a79cf198 2007-11-17 Emmanuele Bassi <ebassi@openedhand.com>
Optimise Atoms usage in the X11 and X11-based backends.

	* clutter/x11/clutter-backend-x11.c:
2007-11-17 18:11:14 +00:00
Øyvind Kolås
8339cf3fce * tests/test-grab.c: (main): fix use of clutter_actor_set_reactive 2007-11-16 13:40:43 +00:00
Emmanuele Bassi
108461c6b9 Fix test usage for set_reactive() 2007-11-15 18:04:42 +00:00