1
0
Fork 0
Commit graph

1823 commits

Author SHA1 Message Date
Neil Roberts
6dac43ddeb Bug 1145 - Flicker on resize the window
* clutter/glx/clutter-stage-glx.c (clutter_stage_glx_realize):
	Don't set a backing pixel on the X window. Otherwise when the
	window resizes it will flicker when X paints the background
	immediatly before Clutter repaints the whole stage.
2008-09-17 13:25:50 +00:00
Neil Roberts
147880b148 * clutter/clutter-types.h: Swap left and right in the
documentation for ClutterGravity.
2008-09-17 10:40:40 +00:00
Neil Roberts
ae8bab0bc8 Bug 1121 - Setting anchor point doesn't work if set too early
* clutter/clutter-actor.c
	(clutter_actor_set_anchor_point_from_gravity)
	(clutter_actor_move_anchor_point_from_gravity): Add documentation
	to make it clear that the anchor point won't move when the actor
	is resized.
2008-09-17 10:40:32 +00:00
Neil Roberts
3fb00f9cdd Bug 1100 - WM_SIZE not handled correctly, user_resize and
window_style correction.

	* clutter/win32/clutter-stage-win32.c (get_window_style): Remove
	the WS_MAXIMIZEBOX style if the stage isn't resizable.
	(clutter_stage_win32_set_user_resize): Queue a redraw of the
	window frame when the user_resize property is changed.

	* clutter/win32/clutter-event-win32.c (message_translate): Don't
	update the size of the stage when handling WM_SIZE messages that
	result from the stage being minimized. Thanks to Roman Yazmin.
2008-09-16 16:00:31 +00:00
Tomas Frydrych
8be7e29a6b 2008-09-16 Tomas Frydrych <tf@linux.intel.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
	    * clutter/x11/clutter-x11-texture-pixmap.c:
	    TFP resyncing on MapNotify/ConfigureNotify (bug  1020; patch by
	    Andy Wingo <wingo@pobox.com>).
2008-09-16 11:50:38 +00:00
Øyvind Kolås
7294239d64 * clutter/clutter-main.c: amended typo in gtk-doc. 2008-09-15 14:47:25 +00:00
Neil Roberts
8d429e8abc Bug 1034 - Picking doesn't work on Eee PC
* clutter/clutter-main.c (_clutter_id_to_color): When choosing a
	pick color, set all but the most significant of the unused
	bits. This should make make it more likely that the GL
	implementation will round down to the right value.

	* tests/test-pick.c: Test case for picking. It creates 192 actors
	at known positions and stores their gids. It then calls
	clutter_stage_get_actor_at_pos with each position to check that
	the right gid is returned.

	* tests/Makefile.am (noinst_PROGRAMS): Add test-pick
2008-09-12 12:43:25 +00:00
Neil Roberts
b16e75db2c Bug 1010 - ClutterLabel does not update the layout (again)
* clutter/clutter-label.c: Bring back layout caching. This time it
	will cache up to three different layouts. The width for which each
	layout was generated is stored so that if the same width is
	requested again it can use the cached version. If no cached
	version is available it will try to replace the oldest
	layout. 'Age' is determined by a counter which is incremented
	every time a layout is created. The cache is cleared after any
	property changes that might affect the layout.
	(struct _ClutterLabelPrivate): Removed extents_width,
	extents_height and context because they weren't used anywhere.

	* tests/test-label-cache.c: Add a test which checks whether the
	label is using a different layout when properties are
	changed. Also compares the extents of the label's layout with an
	independent layout and fails if they aren't the same.

	* tests/Makefile.am (noinst_PROGRAMS): Add test-label-cache
2008-09-12 10:31:44 +00:00
Neil Roberts
b83470366c Bug 1137 - Setting the anchor point does not trigger a re-paint
* clutter/clutter-actor.c (clutter_actor_set_property): When
	changing the anchor point properties, use set_anchor_pointu
	instead of changing the value directly so that a redraw will be
	queued.
	(clutter_actor_set_anchor_pointu): Queue a redraw when the anchor
	point is changed. Thanks to Johan Bilien.
2008-09-10 11:20:22 +00:00
Emmanuele Bassi
0515ee22c2 2008-08-27 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1082 - Texture bitmap is destroyed in wrong way

	* clutter/cogl/common/cogl-bitmap-pixbuf.c:
	(_cogl_bitmap_from_file): Make a copy of the pixbuf data in
	the internal image loader so that we can keep working under
	the assumption that we are using the GLib memory allocation
	and deallocation functions.
2008-08-27 12:56:54 +00:00
Emmanuele Bassi
c34e17163d 2008-08-27 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1099 - No ClutterScript API to get a list of IDs in a given file

	* clutter/clutter-script.[ch]: Add clutter_script_list_objects(),
	a function for retrieving all the objects built by a ClutterScript
	instance. (Based on a patch by Noah Gibbs)
2008-08-27 12:16:56 +00:00
Emmanuele Bassi
d03ad3dd41 2008-08-26 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1090 - Label somtimes returns natural_width < min_width

	* clutter/clutter-label.c:
	(clutter_label_get_preferred_width): Check that the width of the
	layout is always greater than 0. (Johan Bilien)
2008-08-26 12:57:04 +00:00
Neil Roberts
607503ca43 Bug 1103 - Two typos in clutter documentation
* doc/reference/clutter/subclassing-ClutterActor.xml: Update the
	custom actor example since the Cogl API was changed to namespace
	all of the path related functions in cogl_path_*. Thanks to Nati
	Berkover.
	
	* clutter/clutter-score.c: Add missing parameter in example of
	calling clutter_score_start().
2008-08-19 10:55:49 +00:00
Neil Roberts
6b4a033efe Bug 1085 - Cursor is in wrong position on ClutterEntry if set
x-align property

	* clutter/clutter-entry.c (clutter_entry_paint): When calculating
	the position to draw the cursor at, take into account the
	alignment of the text. Queue a redraw when the x-align property is
	changed.
2008-08-18 15:33:38 +00:00
Neil Roberts
cd7b7c9c72 Bug 1091 - WM_MOUSEWHEEL (scroll-event) not handled correctlly
* clutter/win32/clutter-event-win32.c (message_translate): The
	coordinates in a WM_MOUSEWEEL message are given relative to the
	screen so they need to be converted to client coordinates before
	use. Thanks to Roman Yazmin.
2008-08-07 20:34:37 +00:00
Emmanuele Bassi
3e31f02211 2008-08-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-child-meta.c:
	(clutter_child_meta_set_property),
	(clutter_child_meta_class_init): Make the :container and
	:actor properties of ChildMeta construct-only, to allow
	bindings to actually use ChildMeta without abusing the API.

	* clutter/clutter-container.c (create_child_meta): Instead of
	setting the members of the ChildMeta structure, use the
	constructor properties.
2008-08-06 10:20:57 +00:00
Emmanuele Bassi
265f72ff2b 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-keysyms.h: Resync with keysymdef.h inside Xorg.
2008-08-05 10:54:40 +00:00
Emmanuele Bassi
bd30ac8e28 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c:
	(clutter_script_default_connect): Improve wording and debug
	messages in the default autoconnection for signal handlers.
2008-08-04 16:33:43 +00:00
Emmanuele Bassi
fbe225d179 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-parser.c:
	* clutter/clutter-script-private.h: Clean up the code; add a
	conversion function for reading a ClutterColor out of a
	JSON object or array definition.

	* clutter/clutter-script.c: Clean up the code; document properly
	how we translate from type name to type function.
2008-08-04 16:21:27 +00:00
Emmanuele Bassi
2e67125cc9 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c: Rework and improve the documentation
	of the thread-safe timeout and idle source installer functions.
2008-08-04 10:36:37 +00:00
Neil Roberts
db4c5e2829 Bug 945 - Clipping+fbo cloning bugs
* clutter/cogl/gl/cogl.c: 
	* clutter/cogl/gles/cogl.c: 
	* clutter/cogl/cogl.h.in: Add cogl_clip_stack_save,
	cogl_clip_stack_restore, cogl_viewport and cogl_frustum.

	* clutter/cogl/gl/cogl-fbo.h: 
	* clutter/cogl/gl/cogl-fbo.c: Try to attach a stencil buffer when
	creating an FBO.

	* clutter/cogl/common/cogl-clip-stack.c: Add functions to save and
	restore the whole state of the stack.

	* clutter/clutter-texture.c (clutter_texture_paint): When
	rendering the FBO source, setup a temporary asymmetric perspective
	projection matrix to render it as it would appear on screen.

	* clutter/clutter-private.h: 
	* clutter/clutter-actor.c
	(_clutter_actor_apply_modelview_transform_recursive): No longer
	static and exported in clutter-private.h
2008-08-01 12:23:57 +00:00
Neil Roberts
fc73b84002 Bug 1071 - clutter_timeline_get_duration doesn't always work
* clutter/clutter-timeline.c: Calculate the 'duration' property
	on-demand instead of storing it as a member variable. Notify
	duration property changes whenever the fps or num_frames changes.
2008-08-01 11:09:43 +00:00
Neil Roberts
420dcf7437 Bug 1069 - Warnings with ClutterScore
* clutter/clutter-score.c (clutter_score_is_playing): Check
	whether priv->running_timelines is NULL before checking its
	length.
	(foreach_running_timeline): Remove the completed signal handler
	when stopping the score. Otherwise the completed callback will get
	called multiple times if the timeline is started later.
2008-08-01 11:09:31 +00:00
Neil Roberts
1e84798546 Bug 1075 - Difficult to bind clutter_stage_new
* clutter/clutter-stage.c (clutter_stage_dispose): Unrealize the
	stage before removing the update idle handler. Otherwise
	unrealizing causes another redraw to be queued and if the stage
	object remains alive it will cause an assert and abort.
2008-07-31 08:54:43 +00:00
Neil Roberts
6974c31ad5 * clutter/clutter-stage.c (clutter_stage_class_init): Added the
'perspective' property. All of the machinery was there to
	implement the property but somehow the call that actually installs
	it was missing.
2008-07-30 21:09:58 +00:00
Emmanuele Bassi
ba257b0196 2008-07-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.h:
	* clutter/clutter-units.h: Fix the upper and lower boundaries of
	ClutterFixed and ClutterUnit types; G_MAXINT16 and G_MININT16
	were not enough to describe those values.
2008-07-30 15:47:43 +00:00
Ross Burton
56be7fb7ea 2008-07-30 Ross Burton <ross@openedhand.com>
* clutter/clutter-main.c:
	Destroy the debugging timer when the context is freed.

	* clutter/clutter-stage.c:
	Free the stage title when the stage is finalized.
2008-07-30 15:01:37 +00:00
Neil Roberts
d6496254d6 * clutter/clutter-model.c (clutter_model_set_sorting_column): This
function is supposed to accept -1 to disable sorting. However it
	checks for whether the column is >= the number of columns, but
	clutter_model_get_n_columns() returns an unsigned int so the
	column number also gets promoted to unsigned for the
	comparison. Therefore -1 is always greater than the number of
	columns so it wouldn't let you set it.
2008-07-30 10:32:25 +00:00
Neil Roberts
7df15542e4 * clutter/clutter-timeline.c (clutter_timeline_list_markers): When
requesting the list of markers it was returning the marker data as
	a string instead of the name so it was copying garbage.
2008-07-26 14:00:32 +00:00
Neil Roberts
0d700d7abb * clutter/clutter-actor.c (clutter_actor_remove_clip)
(clutter_actor_set_clipu): Queue a redraw when the clip is
	changed.
2008-07-25 11:29:12 +00:00
Neil Roberts
7c8fdee369 * clutter/clutter-script.c: The example in the documentation
showed a color being specified as '0xff0000ff' but it should be
	'#ff0000ff'
2008-07-24 09:11:54 +00:00
Emmanuele Bassi
931c9edde3 2008-07-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1062 - clutter_actor_query_coords() replacement in 0.8

	* clutter/clutter-deprecated.h: Fix the deprecation warning
	for clutter_actor_query_coords(). (Gwenole Beauchesne)
2008-07-23 12:20:35 +00:00
Emmanuele Bassi
d3d4f7be5a Fix the dependencies in the Makefile template 2008-07-17 11:17:32 +00:00
Neil Roberts
e33cce309a * clutter/clutter-texture.c:
* clutter/clutter-rectangle.c: 
	* clutter/clutter-group.c: 
	* clutter/clutter-entry.c: 
	* clutter/clutter-clone-texture.c: Remove unnecessary calls to
	cogl_{push,pop}_matrix. The matrix is preserved in
	clutter_actor_paint whenever the actor's transformation is applied
	so there should be no need to push the matrix in actor paint
	implementations unless it does some additional transformations
	itself.
2008-07-17 10:08:52 +00:00
Neil Roberts
9fbdee463d * clutter/cogl/common/cogl-primitives.c (cogl_path_rel_curve_to):
Fixed a typo in the second parameter which meant the curve was
	drawn incorrectly.
2008-07-14 19:22:17 +00:00
Emmanuele Bassi
d3e2b27cff 2008-07-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h: Include missing installed files.
2008-07-14 13:46:31 +00:00
Tomas Frydrych
7a33510e0c 2008-07-14 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-stage.c:
	    (clutter_stage_hide_cursor):
	    Fixed C&P bug that made it impossible to show cursor once hidden.

	    Stripped trailing whitespace.
2008-07-14 08:49:22 +00:00
Matthew Allum
d5369aa9bf 2008-07-13 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-x11-texture-pixmap.c:
        Call XSync in unredirect X error trap (Thanks to Andy Wingo)
2008-07-13 22:54:19 +00:00
Tomas Frydrych
5f8dc01de3 2008-07-11 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.c:
	    Move G_IMPLEMENT_INLINES before all other #include statements (bug
	    #1038).
2008-07-11 10:36:07 +00:00
Tomas Frydrych
9b4daec78b 2008-07-11 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.c:
	    Changed #define G_IMPLEMENTS_INLINES to G_IMPLEMENT_INLINES (bug
	    #1038).
2008-07-11 10:12:05 +00:00
Matthew Allum
34329a1ffb 008-07-10 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl-fbo.c:
        * clutter/cogl/gles/cogl-texture.c:
        Fix warnings with eglnative build
2008-07-10 16:19:09 +00:00
Matthew Allum
18e1dfb232 2008-07-10 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
        Assume TFP npots sized textures are always supported if TFP ext is!
        (Based on patch from James Ketrenos)
2008-07-10 00:12:23 +00:00
Matthew Allum
34f6defca9 2008-07-08 Matthew Allum <mallum@openedhand.com>
Bug 1011 - Fix TFP fallback mechanism (take 2)

        * clutter/glx/clutter-glx-texture-pixmap.c:
        * tests/test-pixmap.c:
        Slightly modified patch from Gwenole Beauchesne applied
       to better handle both falling back to non accelerated tfp
       and improvements to the test case.
2008-07-08 11:58:08 +00:00
Matthew Allum
0a1ad0342e 2008-07-07 Matthew Allum <mallum@openedhand.com>
Bug 1016 - Changing window-redirect-automatic property after
                   creating ClutterX11TexturePixmap doesn't work.

        * clutter/x11/clutter-x11-texture-pixmap.c:
        (clutter_x11_texture_pixmap_set_window):
        Sync up redirection prop correctly (Jason Tackaberry)
2008-07-07 22:28:13 +00:00
Matthew Allum
cc43d7a30d 2008-07-07 Matthew Allum <mallum@openedhand.com>
Bug 1019 - clutter-frame-source.h not included by clutter.h

        * clutter/clutter.h:
        Add missing header include.
2008-07-07 22:18:27 +00:00
Neil Roberts
34a7433c6f * clutter/clutter-actor.h: Remove redundant duplicate declaration
of clutter_actor_allocate_preferred_size
2008-07-05 15:56:03 +00:00
Emmanuele Bassi
8e4ed73af8 2008-07-05 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1033 - Manually parsing command line options prevents
	           initializing clutter (Armin Burgmeier)

	* clutter/clutter-main.c:
	(post_parse_hook), (clutter_init_real): Set the is_initialized
	flag inside the real initialization function.
2008-07-05 12:39:37 +00:00
Emmanuele Bassi
4d51f3e7ea 2008-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c: Properly document the behaviour
	of the :alignment property.
2008-07-04 12:27:03 +00:00
Neil Roberts
167475e422 Bug 1015 - Cloning unparented actors with FBOs doesn't work with
new layout code

	* clutter/clutter-texture.c (clutter_texture_new_from_actor): Now
	parents the source actor if it doesn't already have a parent so
	that it will get an allocation during layout.

	* tests/test-fbo.c: One of the tests tries to ensure that the
	ClutterTexture clone keeps the source actor alive by derefing
	it. However as actors have a floating reference then test-fbo
	doesn't have its own reference once the source is parented so
	unrefing just steals the parent's reference and causes
	badness. The test now claims the floating reference before cloning
	the source so that it can safely be unref'd later.
2008-07-04 10:44:18 +00:00
Emmanuele Bassi
00e327fbec 2008-07-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/Makefile.am: Fix distchecking by adding the
	generated enum types files to DISTCLEANFILES.
2008-07-03 17:07:51 +00:00
Tomas Frydrych
f3d5d9d757 2008-07-03 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.h:
	    * clutter/clutter-fixed.c
	    Fixed inlining of clutter_qmulx() and clutter_qdivx() (bug 1022).
2008-07-03 12:30:36 +00:00
Neil Roberts
0ee57b37cd * clutter/clutter-shader.c (bind_glsl_shader): Fix a cut-and-paste
error which broke vertex shaders
2008-07-03 12:29:03 +00:00
Øyvind Kolås
60341ad959 * clutter/cogl/common/cogl-bitmap-pixbuf.c:
(_cogl_bitmap_from_file): removed debug g_printf that announces each
successful image load done by the internal image backend.
2008-07-03 09:49:06 +00:00
Neil Roberts
919efb5a6f * clutter/clutter-actor.c
(clutter_actor_get_abs_allocation_vertices): The initialization of
	the local stage pointer got moved away in revision 3081 so it was
	crashing if the function is called before the layout is run.
2008-07-02 16:15:30 +00:00
Emmanuele Bassi
9056e3ac4c 2008-07-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c:
	(clutter_label_create_layout_no_cache),
	(clutter_label_create_layout): Split the layout creation in two
	functions: one creating the layout, the other creating the layout
	and hitting the glyphs cache. The first one is for the offscren
	operations - like requesting the preferred size; the second one
	is for paint and allocation.
	
	(clutter_label_allocate): Try to aggressively cache the PangoLayout
	between allocations - to avoid recreating it even when the label
	just moved because of an animation. See bug #1010.
2008-07-02 14:36:35 +00:00
Øyvind Kolås
5829aa8210 * clutter/fruity/clutter-fruity.c: made the multi touch code more
robust. There are situations though where the device seems to stop
generating any touch events until all fingers have been lifted and
a new interaction session is started.
2008-07-02 13:44:53 +00:00
Neil Roberts
1001d1ffa1 * clutter/eglx/clutter-stage-egl.c (clutter_stage_egl_realize):
Use clutter_x11_has_event_retrieval() instead of
	!backend_x11->no_xevent_retrieval to reflect the changes to the
	GLX backend in revision 3078
2008-07-02 09:48:06 +00:00
Emmanuele Bassi
12fd095006 2008-07-02 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1010 - ClutterLabel does not update the layout (Lee Jusung)

	* clutter/clutter-actor.c:
	(clutter_actor_queue_relayout): Remove some pointer dereferencing.
	
	* clutter/clutter-label.c:
	(clutter_label_allocate): Revert the change of r2883 and remove the
	layout width cache and force a recreation of the layout every time
	we receive an allocation.
2008-07-02 09:24:25 +00:00
Neil Roberts
cfd91cd0ef * clutter/clutter-actor.c (clutter_actor_get_transformed_sizeu):
This is now do-what-I-mean like clutter_actor_get_size so that if
	the allocation box is available it will use that, otherwise it
	will use the preferred size. clutter_actor_transform_vertices has
	been converted to clutter_actor_transform_and_project_box so that
	it can be used by both functions. Based on a patch by Emmanuele
	Bassi.
	(clutter_actor_get_abs_allocation_vertices)
	(clutter_actor_get_allocation_vertices): These two functions now
	force a relayout if the allocation box is not available.

	* tests/test-fbo.c: Fixed the shader to use texture2D instead of
	texture2DRect now that GL_EXT_texture_rectangle is no longer used.
2008-07-01 21:52:19 +00:00
Chris Lord
9ed5d2577d * clutter/clutter-stage.c:
Add a note to the clutter_stage_read_pixels doc that the alpha channel
        isn't guaranteed to contain sensible data

        * tests/test-stage-read-pixels.c: (update_snapshot):
        Overwrite the alpha data when using clutter_stage_read_pixels; fixes
        this test on non-nvidia drivers
2008-07-01 14:08:24 +00:00
Matthew Allum
be160d971a 2008-07-01 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-stage-glx.c:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-backend-x11.h:
        * clutter/x11/clutter-event-x11.c:
        * clutter/x11/clutter-x11.h:
        * tests/test-devices.c:
        Disable use of XInput and add an explicit clutter_x11_enable_xinput
        to enable it.
        Also fix up the x11 pre-init calls to not need g_type_init.
2008-07-01 13:41:23 +00:00
Øyvind Kolås
6f68ae35b7 Bug 1013 - Per device grabs are not obeyed in pointer device propagation.
* clutter/clutter-event.c: (clutter_event_get_device_id): swap
arguments of g_return_val_if_fail around.
* clutter/clutter-event.h: added *device field to crossing events as
well.
* clutter/clutter-main.c: (emit_pointer_event): added a device
argument and check for per device grabs if this device is passed.
(clutter_do_event): pass the device if present for all pointer event
emissions.
(generate_enter_leave_events): copy the device from the motion events
when generating enter/leave events.
2008-07-01 11:51:20 +00:00
Chris Lord
00f77ed840 * clutter/clutter-texture.c:
Correct documentation about accepted pixel formats

        * tests/test-stage-read-pixels.c: (main):
        Don't try to free a ClutterTexture after main, fixes segfault on quit
2008-07-01 10:11:39 +00:00
Emmanuele Bassi
07f68e61f8 2008-07-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-bspline.h:
	* clutter/clutter-behaviour.h:
	* clutter/clutter-event.h:
	* clutter/clutter-texture.h: Add missing documentation and
	change the copyright and licensing notice to use the FSF
	website instead of its address. (#512)
2008-07-01 10:08:28 +00:00
Matthew Allum
5beb8b7779 2008-06-30 Matthew Allum <mallum@openedhand.com>
Bug 1008 - tfp still a bit borked

        * clutter/x11/clutter-x11-texture-pixmap.c:
        Fix from Andy Wingo for sync_window borkage
2008-06-30 22:00:49 +00:00
Neil Roberts
604990a53b Bug 985 - MSC math.h / M_PI issue
* clutter/cogl/gl/cogl.c (set_clip_plane): 
	* clutter/clutter-alpha.c (sinc_func): Use G_PI instead of M_PI
	because M_PI isn't defined in MSVC without a special
	#define. Thanks to Haakon Sporsheim
2008-06-30 16:15:53 +00:00
Neil Roberts
abbcf0ee4b * clutter/win32/clutter-backend-win32.c (check_vblank_env): Use
g_ascii_strcasecmp instead of strcasecmp because strcasecmp isn't
	available in MSVC.
2008-06-30 16:08:45 +00:00
Matthew Allum
7d59aa3da0 2008-06-30 Matthew Allum <mallum@openedhand.com>
Bug 1007 - Fix TFP fallback mechanism

        * clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        Add some extra safety to glx pixmap creations and tidy up some notes.
        Patch from Gwenole Beauchesne.
2008-06-30 16:06:36 +00:00
Neil Roberts
06d0696874 * clutter/x11/clutter-event-x11.c:
* clutter/win32/clutter-event-win32.c: Use the HAVE_CONFIG_H guard
	around #include "config.h"
2008-06-30 16:01:56 +00:00
Emmanuele Bassi
b510d2827c 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/eglx/Makefile.am:
	* clutter/glx/Makefile.am: Build the X11 base backend before
	the backends that depend on it.
2008-06-30 15:58:25 +00:00
Emmanuele Bassi
ad221bfe4e 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1000 - clutter-x11 should define gtypes for its enumerations

	* clutter/x11/Makefile.am:
	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-x11-enum-types.c.in:
	* clutter/x11/clutter-x11-enum-types.h.in:
	* clutter/x11/clutter-x11.h: Add the GTypes for the X11-specific
	enumerations, so that they can be used by the bindings. (Andy
	Wingo)
2008-06-30 15:03:42 +00:00
Matthew Allum
ac02680447 2008-06-30 Matthew Allum <mallum@openedhand.com>
Bug 997 - automatic updates not working for named TFP pixmaps,
                  at least in x11

        * clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/glx/clutter-glx-texture-pixmap.h:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        * clutter/x11/clutter-x11-texture-pixmap.h:
        * clutter/x11/clutter-x11.h:
        * configure.ac:
        * tests/test-pixmap.c:
        Rework Andy Wingos patch a little adding more safety for now also
        handling redirect Windows (as well as pixmaps)
2008-06-30 14:36:49 +00:00
Emmanuele Bassi
edca282ad0 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com>
Bug 980 - cogl-bitmap-fallback.c compiler error/warning due to
	          cast issue (Haakon Sporsheim)

	* clutter/cogl/common/cogl-bitmap-fallback.c:
	(_cogl_unpremult_alpha_last),
	(_cogl_unpremult_alpha_first): Cast to avoid a compiler warning
	with MSC.
2008-06-30 14:20:46 +00:00
Øyvind Kolås
5525d0cad7 Disable XInput handling for keyboard events, re-enabling key press and
release events when pointer is outside window as well as re-enabling
keyrepeat.
* clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_realize): select
for KeyPressMask and KeyReleaseMask even with XInput enabled.
* clutter/x11/clutter-backend-x11.c: (_clutter_x11_register_xinput): 
Disabled the XInput keyboard code paths (comments and #if 0's)
* clutter/x11/clutter-event-x11.c: (event_translate): always handle
keyboard events without regard to XInput.
2008-06-30 14:01:03 +00:00
Matthew Allum
9fa47035ac 2008-06-29 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-event-x11.c:
        ifdef convert_xdevicekey_to_xkey () with XINPUT check.
        (fix via Andy Wingo)
2008-06-29 22:19:20 +00:00
Tommi Komulainen
4471e886f5 OSX: don't depend on ClutterGLWindow
* clutter/osx/clutter-osx.h (_clutter_event_osx_put)
	* clutter/osx/clutter-event-osx.c (clutter_event_osx_translate,
	NSEvent:clutterStage:)
	* clutter/osx/clutter-stage-osx.c (EVENT_HANDLER): Since events are
	delivered to ClutterGLView, pass the associated ClutterStage directly
	to event translation. Avoids relying on being embedded in
	ClutterGLWindow, which makes it easier to implement clutter-gtk.
2008-06-29 10:31:31 +00:00
Tommi Komulainen
079747e8cb OSX: document Shift modifier speciality
* clutter/osx/clutter-event.osx.c (NSEvent:clutterKeyVal:): Add
	comment, on OSX backend the Shift modifier is included in 'keyval'
	making it identical to 'unicode_value'  Instead of <Shift>a or
	<Shift>3 you'd get <Shift>A and <Shift>#
2008-06-29 10:31:05 +00:00
Matthew Allum
03d7fdacd6 2008-06-27 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl.c:
        Temp workaround for 10.4 ATI card OSX folks, see #929
        (Tommi Komulainen)

        Bug 998 - clutter always captures X input events

* clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-stage-glx.c:
When we disable X event retrival, dont still select for window
events.
2008-06-27 23:02:30 +00:00
Emmanuele Bassi
17f46e57f3 2008-06-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.h:
	* clutter/clutter-main.c:
	* clutter/x11/clutter-backend-x11.c: Add further documentation,
	and increase the coverage to 94%.
2008-06-27 21:13:19 +00:00
Neil Roberts
114148bab5 Bug 993 - Underline colors are sometimes wrong
* clutter/pango/pangoclutter-render.c: Fixed so that instead
	of trying to set the color in prepare_run it uses draw_glyphs
	to draw groups of glyphs and requests the color for each part
	from Pango.
2008-06-27 14:36:59 +00:00
Emmanuele Bassi
d88d2a6061 Fix the previous commit 2008-06-26 22:36:25 +00:00
Emmanuele Bassi
a07d57572c 2008-06-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_min_width),
	(clutter_actor_set_min_height),
	(clutter_actor_set_natural_width),
	(clutter_actor_set_natural_height): Ignore any override of the
	minimum and natural size of the stage on backends that only
	support static stages.

	* clutter/clutter-stage.c (clutter_stage_allocate): Use the
	preferred size of the ClutterStage implementation instead of
	the display size.

	* clutter/clutter-backend.[ch]: Remove get_display_size() and
	clutter_backend_get_display_size().

	* clutter/eglnative/clutter-backend-egl.c:
	* clutter/fruity/clutter-backend-fruity.c:
	* clutter/osx/clutter-backend-osx.c:
	* clutter/sdl/clutter-backend-sdl.c:
	* clutter/win32/clutter-backend-win32.c:
	* clutter/x11/clutter-backend-x11.c: Remove get_display_size()
	implementations.
2008-06-26 21:42:44 +00:00
Emmanuele Bassi
b6aa1ca9ec 2008-06-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-shader.c (bind_glsl_shader): Verify that the
	vertex shader has been successfully compiled, like we do with
	the fragment shader.
2008-06-26 13:54:13 +00:00
Emmanuele Bassi
561e95eedf 2008-06-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/osx/clutter-backend-osx.c:
	(clutter_backend_osx_get_display_size): Fix the allocation pool
	macro name.
2008-06-26 13:52:35 +00:00
Matthew Allum
244995a834 2008-06-26 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
        Move the gl extension probe into the regular object init() rather than
        class_init. Should be a little safer.
2008-06-26 09:47:58 +00:00
Neil Roberts
5f3db8e0a0 * clutter/win32/clutter-backend-win32.c
(clutter_backend_win32_get_display_size): Implement
	get_display_size on the Win32 backend.
2008-06-25 16:51:43 +00:00
Emmanuele Bassi
dd185940c0 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.h: Make the priority constants public.

	* clutter/clutter-stage.c: Use CLUTTER_PRIORITY_REDRAW.

	* clutter/clutter-timeline.c: Use CLUTTER_PRIORITY_TIMELINE.
2008-06-25 16:46:42 +00:00
Emmanuele Bassi
ce348f805c 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/osx/clutter-backend-osx.c:
	(clutter_backend_osx_get_display_size),
	(clutter_backend_osx_class_init): Implement the get_display_size
	function.
2008-06-25 15:59:54 +00:00
Emmanuele Bassi
eb6fba284d 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_min_width),
	(clutter_actor_set_min_height),
	(clutter_actor_set_natural_width),
	(clutter_actor_set_natural_height): Add a comment explaining
	the override in place for backends providing a fixed size
	on a stage.
2008-06-25 15:02:13 +00:00
Emmanuele Bassi
79b214e1f1 2008-06-25 Emmanuele Bassi <set EMAIL_ADDRESS environment variable>
* clutter/clutter-actor.c:
	(clutter_actor_set_min_width),
	(clutter_actor_set_min_height),
	(clutter_actor_set_natural_width),
	(clutter_actor_set_natural_height): If setting the minimum
	and natural width and height on a top-level actor, and on
	a backend that provides only static stages, then override
	the value and use the size of the display as returned by
	the backend.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_realize): Remove the setting of the
	minimum and natural width and height.
2008-06-25 14:47:00 +00:00
Emmanuele Bassi
8a51236858 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.c:
	(clutter_stage_allocate): Minor optimization.

	(clutter_stage_init): Do not set the minimum size of the
	stage wrapper, and require that the backends set the size
	themselves.
2008-06-25 14:20:27 +00:00
Emmanuele Bassi
72bdcccf26 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_realize): Try to force the minimum and
	natural size on realization.
2008-06-25 13:52:17 +00:00
Emmanuele Bassi
d651cc4337 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.c:
	(clutter_backend_get_display_size): Provide a fallback for
	backends not implementing get_display_size().

	* clutter/clutter-stage.c:
	(clutter_stage_allocate): Add debug messages.

	* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_get_display_size),
	(clutter_backend_sdl_class_init): Implement get_display_size()
	on the SDL backend.
2008-06-25 13:32:03 +00:00
Chris Lord
631277be44 * clutter/clutter-fixed.c: (clutter_sinx):
Fix clutter_sinx for angles > CFX_2PI - CFX_ONE. Also add note to
        documentation about being able to use modulus with ClutterFixed
2008-06-25 13:21:25 +00:00
Emmanuele Bassi
49c5c97dd8 Fix another typo 2008-06-25 13:18:21 +00:00
Emmanuele Bassi
09956cba74 Fix typo 2008-06-25 13:16:07 +00:00
Emmanuele Bassi
8008bfea25 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.h:
	* clutter/clutter-backend.c:
	(clutter_backend_get_display_size): Add a function for getting the
	display size out of the backend.

	* clutter/clutter-stage.c:
	(clutter_stage_allocate): When allocating on a backend with a
	static stage, we simply ignore the passed box and override it with
	the size of the display.

	* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_get_display_size),
	(clutter_backend_egl_class_init): Implement get_display_size() by
	returning the size of the EGL surface.

	* clutter/fruity/clutter-backend-fruity.c:
	(clutter_backend_egl_get_display_size),
	(clutter_backend_egl_class_init): Ditto as above.

	* clutter/x11/clutter-backend-x11.c:
	(clutter_backend_x11_get_display_size),
	(clutter_backend_x11_class_init): Implement get_display_size() by
	returning the DisplayWidth and DisplayHeight of the current
	screen.
2008-06-25 13:05:59 +00:00
Neil Roberts
1049959d34 * clutter/win32/clutter-stage-win32.c
(clutter_stage_win32_realize): Use a more direct method to choose
	the best pixel format instead of ChoosePixelFormat because
	otherwise if the display's depth is 16 then it will prefer the
	non-accelerated software implementation when the requested depth
	is 24.
2008-06-25 12:25:43 +00:00
Emmanuele Bassi
09097fc810 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.c (clutter_stage_allocate): Fix condition;
	should always test before committing.
2008-06-25 12:08:49 +00:00
Matthew Allum
6371f0c621 2008-06-25 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-backend-x11.c: (_clutter_x11_register_xinput)
        Add extra safety and fallback if no useable pointing devices are
        found.
2008-06-25 12:02:11 +00:00
Emmanuele Bassi
8b1385ed23 2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.c:
	(clutter_stage_allocate): Check if the stage provided by the
	backend is static (i.e. a framebuffer that cannot be resized)
	and interrupt the allocation chain there.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_class_init): Remove the ::allocate empty
	stub.
2008-06-25 11:49:43 +00:00
Matthew Allum
b84c5311ee 2008-06-25 Matthew Allum <mallum@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        Disable passing of attribs to eglCreateContext() on GLES 1.1 h/w
2008-06-25 11:17:43 +00:00
Neil Roberts
ed44a845a5 * clutter/clutter-actor.c (clutter_actor_paint): Guard against the
actor clip being enabled or disabled in an actor paint
	method. Otherwise the clip stack can be become unbalanced. This
	was happening in ClutterEntry until it was fixed in revision 2983.
2008-06-25 08:40:25 +00:00
Neil Roberts
feb16bcf95 Bug 979 - Wrong call convension for SwapIntervalProc in win32 backend
* clutter/win32/clutter-backend-win32.c: Use the correct calling
	convention for SwapInterval. Thanks to Haakon Sporsheim.
2008-06-24 22:07:15 +00:00
Emmanuele Bassi
5521867989 2008-06-24 Emmanuele Bassi <ebassi@openedhand.com>
Bug 989 - Add a search path for clutter script assets

	* clutter/clutter-script.h:
	* clutter/clutter-script.c:
	(clutter_script_finalize),
	(clutter_script_add_search_paths),
	(clutter_script_lookup_filename): Add the ability to define multiple
	search paths inside ClutterScript and to look up a specific filename
	inside those search paths. This is useful to define a set of
	directories where the assets for a UI definition are and still
	reference those assets by their name instead of the full path. (989,
	based on a patch by Matthew Allum)

	* clutter/clutter-texture.c:
	(clutter_texture_set_custom_property): Use the newly added
	clutter_script_lookup_filename() function.
2008-06-24 16:47:43 +00:00
Neil Roberts
d4da3a3e2a * clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c: All of the settings and
	uniforms are now proxied into COGL variables instead of setting
	the GL uniforms directly. Just before glDrawArrays is executed a
	shader is generated using the given settings to avoid using 'if'
	statements. The shaders are cached.

	* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: 
	* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: The shaders
	are now split into parts using comments instead of 'if' statements
	so that the simplest shader can be generated on the fly.

	* clutter/cogl/gles/stringify.sh: Now splits up the shader sources
	into separate C strings where deliminated by special comments.

	* clutter/cogl/gles/cogl-program.h: 
	* clutter/cogl/gles/cogl-program.c: A custom shader can no longer
	be directly linked with the fixed-functionality replacement
	because the replacement changes depending on the settings. Instead
	the bound shader is linked with the appropriate replacement shader
	just before glDrawArrays is executed. The custom uniform variables
	must also be proxied through COGL variables because their location
	can change when relinked.
2008-06-24 16:21:40 +00:00
Øyvind Kolås
eac5e21f1c * clutter/fruity/clutter-fruity.c: removed dead code and unused
variables.
2008-06-24 11:34:22 +00:00
Emmanuele Bassi
9bc15bb467 2008-06-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c:
	(clutter_entry_ensure_layout): Convert the invisible char
	to UTF-8 to avoid Pango barfing on us.
2008-06-24 10:40:58 +00:00
Matthew Allum
a692421945 2008-06-24 Matthew Allum <mallum@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c:
        Add an extra debug note.
        * configure.ac:
        Generate version.xml for COGL API docs
2008-06-24 10:39:12 +00:00
Chris Lord
bc55368304 Bug 988 - cursor position wrong with multibyte invisible char
* clutter/clutter-entry.c: (clutter_entry_ensure_cursor_position):
        Fix cursor position calculation when using invisible text
2008-06-24 10:22:53 +00:00
Emmanuele Bassi
00efebe00a 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-event-x11.c (event_translate): Set the
	event type explicitly in the union members as well for the
	key events, like we do for all the other events.
2008-06-23 22:00:37 +00:00
Neil Roberts
e11d08807d * clutter/clutter-entry.c (clutter_entry_paint): Set the clip
using COGL directly instead of setting the actor clip. Otherwise
	the clip stack will be unbalanced after the first draw. This also
	frees up the actor clip to be set by an application.
2008-06-23 20:55:24 +00:00
Matthew Allum
20c384cab8 2008-06-23 Matthew Allum <mallum@openedhand.com>
Bug 987 - clutter-event.c c99 variable declaration

        * clutter/clutter-event.c:
        Remove c99ism.
2008-06-23 18:58:33 +00:00
Emmanuele Bassi
300d1ef025 Fixes for distcheck 2008-06-23 16:43:49 +00:00
Emmanuele Bassi
9006de848b 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c:
	(clutter_texture_get_preferred_width),
	(clutter_texture_get_preferred_height),
	(clutter_texture_set_property),
	(clutter_texture_get_property),
	(clutter_texture_class_init),
	(clutter_texture_init): Add the new :keep-aspect-ratio property
	to ClutterTexture; when set to TRUE the texture will return a
	preferred width maintaining the aspect ratio with the given height
	and a preferred height maintaining the aspect ratio with the
	given width. This allows to set the width or the height and have
	the texture automatically request the height or the width respectively
	while maintaining the aspect ratio of the original image.

	* tests/test-script.json: Update to test the new :keep-aspect-ratio
	property.
2008-06-23 15:31:12 +00:00
Neil Roberts
dff84094ff Bug 918 - Group doesn't clip if it's children are clipped
* clutter/cogl/common/cogl-clip-stack.h: 
	* clutter/cogl/common/cogl-clip-stack.c: Added functions to
	maintain a stack of clipping rectangles.

	* clutter/cogl/gles/cogl.c: 
	* clutter/cogl/gl/cogl.c: The cogl_clip_set and unset functions
	have moved into cogl-clip-stack.c which calls back to cogl.c to
	set the actual rectangles. Multiple clip rectangles are combined
	by merging the stencil buffers.

	* clutter/cogl/gles/cogl-primitives.c (_cogl_path_fill_nodes): 
	* clutter/cogl/gl/cogl-primitives.c (_cogl_path_fill_nodes): Merge
	the stencil buffer with the contents of the clipping stack after
	drawing the path.

	* clutter/cogl/gles/cogl-context.h (CoglContext): 
	* clutter/cogl/gl/cogl-context.h (CoglContext): Store the number
	of available stencil bits.

	* clutter/cogl/common/Makefile.am
	(libclutter_cogl_common_la_SOURCES): Added cogl-clip-stack.c
2008-06-23 14:57:36 +00:00
Robert Bragg
030ac047d1 2008-06-23 Robert Bragg <bob@o-hand.com>
* clutter/eglx/clutter-stage-egl.c: Makes sure the eglx backend
	passes the EGL_OPENGL_ES2_BIT surface attrib when using
	GLES2.0 under cogl
2008-06-23 13:09:08 +00:00
Chris Lord
6ba7710224 * clutter/x11/clutter-event-x11.c: (convert_xdevicekey_to_xkey),
(translate_key_event), (event_translate):
        Change the xinput event handling to use translate_key (fixes modifier
        handling with xinput key events)
2008-06-23 12:45:20 +00:00
Emmanuele Bassi
d9b657bdfc 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 982 - __COGL_GET_CONTEXT MS compiler issue (Haakon Sporsheim)

	* clutter/cogl/common/cogl-handle.h:
	* clutter/cogl/common/cogl-primitives.c: Remove C99-isms.

	* clutter/cogl/gl/cogl-fbo.c:
	* clutter/cogl/gl/cogl-primitives.c:
	* clutter/cogl/gl/cogl-texture.c:
	* clutter/cogl/gl/cogl.c: Ditto as above.

	* clutter/cogl/gles/cogl-fbo.c:
	* clutter/cogl/gles/cogl-primitives.c:
	* clutter/cogl/gles/cogl-texture.c: Ditto as above.
2008-06-23 11:01:30 +00:00
Emmanuele Bassi
04e5b4a710 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 984 - pango_clutter_render_layout() declared void, but
	          returns (Haakon Sporsheim)

	* clutter/pango/pangoclutter-render.c:
	(pango_clutter_render_layout): Do not use a return statement.
2008-06-23 10:37:43 +00:00
Emmanuele Bassi
a843a5f90e 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 905 - Paint cursor directly (Xan López)

	* clutter/clutter-entry.c:
	(clutter_entry_paint_cursor),
	(clutter_entry_init),
	(clutter_entry_set_color): Directly paint the cursor on the
	entry instead of using an actor.
2008-06-23 10:32:43 +00:00
Emmanuele Bassi
87d68544d0 2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 981 - clutter_stage_read_pixels temprow fix (Haakon Sporsheim)

	* clutter/clutter-stage.c (clutter_stage_read_pixels): Allocate
	the temporary row data used to flip the buffer from glReadPixels()
	in order to fix compilation under MSVC. Also validate the input
	parameters to avoid random segfaults.
2008-06-23 10:06:02 +00:00
Matthew Allum
b241481586 2008-06-23 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-private.h:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/fruity/clutter-backend-fruity.c:
        * clutter/fruity/clutter-backend-fruity.h:
        * clutter/fruity/clutter-fruity.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-backend-x11.h:
        * clutter/x11/clutter-event-x11.c:
        * clutter/x11/clutter-stage-x11.h:
        * clutter/x11/clutter-x11.h:
        * configure.ac:
        * tests/Makefile.am:
        * tests/test-devices.c:
        Merge of 'xinput' branch giving initial basic support of
        multiple input devices.
2008-06-23 09:55:42 +00:00
Matthew Allum
920687a470 2008-06-23 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-group.c:
        Remove uneeded (at least for now) paint_area method (#970)
2008-06-23 09:08:27 +00:00
Emmanuele Bassi
62cc9ec3c9 2008-06-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c: Be more explicit about the fact that
	the script id is not the name of an actor, and that it is retrieved
	by using clutter_get_script_id().
2008-06-19 20:45:28 +00:00
Emmanuele Bassi
e29ae614b5 2008-06-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h:
	* clutter/clutter-actor.c:
	(clutter_actor_allocate_preferred_size): Add more documentation
	and notes on where it's appropriate to call this function.
2008-06-17 15:59:08 +00:00
Chris Lord
b592efcf99 * clutter/clutter-texture.c: (clutter_texture_get_preferred_width),
(clutter_texture_get_preferred_height):
        Maintain aspect ratio with natural width/height when for_width/height
        are specified
2008-06-17 14:45:33 +00:00
Matthew Allum
2dbbee28d5 2008-06-17 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        Clean up of parenting code (see #972)
        Doc updates to section intro.
        Add clutter_actor_allocate_preferred_size () utility call

        * clutter/clutter-group.c: (clutter_fixed_layout_allocate):
        Use clutter_actor_allocate_preferred_size ()

        * doc/clutter-actor-invariants.txt:
        Add some more notes
2008-06-17 13:49:40 +00:00
Emmanuele Bassi
988cac1dfb 2008-06-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_parent): Do not emit ::parent-set when
	reparenting.

	(clutter_actor_unparent): Ditto, as above.
	
	(clutter_actor_reparent): Emit ::parent-set with the old
	parent and set the IN_REPARENT flag unconditionally.
2008-06-17 12:39:37 +00:00
Emmanuele Bassi
ec91b3d253 2008-06-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_parent): Document and maintain the invariant
	that after setting a realized parent on an actor, the actor is
	also going to be realized.

	(clutter_actor_unparent): Change the invariant that an unparented
	actor is also unrealized: the paint is fast enough to avoid
	unrealizing, since it also causes more problems that what it's
	worth.

	* tests/test-invariants.c (test_show_on_set_parent): Update the
	invariants test because we changed the invariants.
2008-06-17 09:33:18 +00:00
Jussi Kukkonen
d03314cb84 * clutter/clutter-score.c (clutter_score_append):
initialize "marker" string and "complete_id" signal id when creating a
	ClutterScoreEntry.
2008-06-17 08:55:54 +00:00
Tomas Frydrych
2ccfd3c08f 2008-06-16 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	    (clutter_actor_move_anchor_point_from_gravity):
	    Fixed incorrect sign of position adjustment (revert of earlier
	    change).
2008-06-16 14:14:19 +00:00
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
Emmanuele Bassi
aef6fc5f61 2008-06-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c: Ignore any size allocation
	we receive from the user.

	* clutter/fruity/clutter-stage-fruity.c: Ditto as above.
2008-06-16 13:38:46 +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
8996406189 2008-06-15 Emmanuele Bassi <ebassi@openedhand.com>
Bug #967 - Mismatch of Timeline::marker-reached signal signature

	* clutter/clutter-marshal.list:
	* clutter/clutter-timeline.c:
	(clutter_timeline_class_init): Fix the type of the frame_num
	argument in the ::marker-reached signal creation to match the
	signal class handler. (Armin Burgmeier)
2008-06-15 12:50:05 +00:00
Matthew Allum
6fe23fefe9 Revert miscommit of unfinished cogl changes in r2920 2008-06-14 22:07:23 +00:00
Matthew Allum
04bf04db4d 2008-06-14 Matthew Allum <mallum@openedhand.com>
* README:
        Make needed GL version 1.4, note GLES2 support, add some notes
        for COGL.
2008-06-13 23:03:45 +00:00
Emmanuele Bassi
a840375b81 Remove the "hiding" in the texture description 2008-06-13 15:37:58 +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
76b71f8cc4 2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c:
	(clutter_texture_unrealize), (clutter_texture_dispose): Add a
	guard against reading back memory during the unrealization on
	dispose.
2008-06-13 14:58:18 +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
be0711b88b 2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
Bug #960 - PangoContext creation code should not be duplicated

	* clutter/clutter-private.h:
	* clutter/clutter-main.c:
	(_clutter_context_create_pango_context): Abstract the creation
	of the PangoContext inside its own function, to avoid code and
	bugs duplication. (Tommi Komulainen)

	* clutter/clutter-entry.c (clutter_entry_init): Use the newly
	added PangoContext creation function.

	* clutter/clutter-label.c (clutter_label_init): Ditto as above.
2008-06-13 09:10:39 +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
a4c4e3464d 2008-06-12 Emmanuele Bassi <ebassi@openedhand.com>
* doc/reference/cogl/Makefile.am: Ignore cogl/gl and cogl/gles
	when building the documentation.

	* clutter/cogl/cogl.h.in: Add sections in the header file.
2008-06-12 17:21:16 +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
Neil Roberts
e4304e2d0a * clutter/win32/clutter-stage-win32.c: Updated to the new layout
API. All code to do with positioning the stage has been removed so
	the window is left where Windows wants to put it and it can not be
	moved with clutter_actor_set_position.

	* clutter/win32/clutter-stage-win32.h (ClutterStageWin32): Remove
	win_xpos and win_ypos.

	* clutter/win32/clutter-event-win32.c (message_translate): Remove
	the handler for WM_MOVE because the stage no longer cares where it
	is positioned.
2008-06-12 12:12:25 +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
Emmanuele Bassi
00a1e0c3ee 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c: Remove a duplicate
	get_preferred_width() implementation. (thanks to Iain Holmes)
2008-06-11 17:32:22 +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
Iain Holmes
04df29dbd4 2008-06-11 Iain Holmes <iain@openedhand.com>
* configure.ac: Detect the GL headers in flavour=fruity

        * clutter/fruity/clutter-stage-fruity.c: Update the Fruity 
backend to 
        use the new size negotiation API.
2008-06-11 16:29:20 +00:00
Emmanuele Bassi
583ea401c3 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c (clutter_label_allocate): Keep the
	layout if the size of the allocation is the same as the last
	allocation received by the label.
2008-06-11 16:12:52 +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
d642636fd1 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c: Update the EGL native
	backend to use the new size negotiation API.
2008-06-11 10:19:02 +00:00
Emmanuele Bassi
bae4bd0796 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/sdl/clutter-stage-sdl.c: Update the SDL backend to
	use the new size negotiation API.
2008-06-11 10:12:44 +00:00
Emmanuele Bassi
df86cb1ae3 2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
Bug #961 - Fails to build on OSX

	* clutter/osx/clutter-stage-osx.c: Update the OSX backend to
	use the new size negotiation API.
2008-06-11 09:45:22 +00:00
Neil Roberts
1aa77985f4 * clutter/clutter-main.c: Include <locale.h> for setlocale() 2008-06-10 21:25:23 +00:00
Emmanuele Bassi
4a788a6df7 2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-child-meta.c: Fix section name

	* clutter/clutter-container.c:
	(clutter_container_child_set_property),
	(clutter_container_child_get_property): Fix gtk-doc parameter
	name.

	* clutter/clutter-container.h: Fix documentation of the
	interface vfuncs.

	* clutter/clutter-event.h: Fix documentation.

	* clutter/clutter-feature.h: Fix documentation.

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

	* clutter/x11/clutter-event-x11.c: Fix documentation.

	* tests/test-fullscreen.c: Verify that the stage size has been
	changed by clutter_stage_fullscreen().
2008-06-10 17:11:14 +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
8f013e1b22 Update svn:ignore property 2008-06-10 16:49:39 +00:00
Emmanuele Bassi
a930370b81 2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
* autogen.sh: Check for, and run glib-gettextize.

	* configure.ac: Set up the localization support.

	* clutter/clutter-main.c: Do not define the GETTEXT_PACKAGE,
	but use the one from the configure script.

	* po/POTFILES.in: Template for the translatable files.
2008-06-10 16:47:38 +00:00
Chris Lord
878b353568 * clutter/clutter-main.c: (pre_parse_hook):
Call setlocale on init
        
        * clutter/x11/clutter-event-x11.c: (translate_key_event):
        Fix typo and use the same buffer size as xev
2008-06-10 14:01:43 +00:00
Øyvind Kolås
8fcfd8ff21 * clutter/clutter-texture.c: improved documentation for
clutter_texture_set_filter_quality.
2008-06-10 11:18:19 +00:00
Chris Lord
67fbfebd6d Bug #916 - ClutterKeyEvent:unicode_value is ignored
Bug #950 - AltGr not handled 

        * clutter/osx/clutter-event-osx.c: (clutter_event_osx_translate):
        * clutter/x11/clutter-event-x11.c: (translate_key_event):
        * tests/test-events.c: (fill_keybuf), (input_cb):
        Apply patch from Tommi Komulainen, fill the unicode_value attribute of
        the ClutterKeyEvent struct. Also use XKeycodeToKeysym, as suggested in
        bug #950, comment #2
2008-06-10 10:57:50 +00:00
Matthew Allum
5d9e1bbbb0 2008-06-10 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Minor reformatting cleanups. Emit filter-quality prop on change.
        * clutter/glx/clutter-glx-texture-pixmap.c:
        Support mipmaps via filter quality prop.
2008-06-10 10:49:21 +00:00
Chris Lord
db518c8736 * clutter/cogl/common/cogl-primitives.c: (_cogl_path_arc):
Draw as expected when end angle is lower than start angle (i.e. do not
        swap the angles). This aligns with cairo behaviour.
2008-06-10 10:05:12 +00:00
Tommi Komulainen
863837baec 7 small miscellaneous fixes
Bug#959 - Multiple minor improvements

	* configure.ac: pick up GDKPIXBUF_PREFIX from gdk-pixbuf-2.0
	module, not pango

	* clutter/clutter-keysyms-table.h: cosmetic fix for ifdef guard
	name in the comment (leftover from earlier commit)

	* tests/test-textures.c: don't depend on GdkPixbuf as we're not
	using any actual features from it, just plain pixel buffer
	manipulation

	* clutter/clutter-timeline.c
	* clutter/clutter-timeline.h (clutter_timeline_list_markers): Use
	gsize* to return number of items, not guint*
	* tests/test-paint-wrapper.c: use correct type (guint*) in call
	to clutter_actor_get_size()

	* tests/test-depth.c (janus_group): properly take height2 into
	account when calculating needed height for the rectangle

	* tests/test-cogl-tex-getset.c: use rowstride, not width*4, when
	calculating pixel offsets

	* tests/test-cogl-tex-getset.c: Don't assume/force RGBA format,
	also support ARGB format (needed with quartz imageloader.)
2008-06-10 06:37:46 +00:00
Tommi Komulainen
45ff3cb00c OSX: print GL_VENDOR, GL_RENDERER, GL_VERSION and GL_EXTENSIONS
* clutter/osx/clutter-backend-osx.c (clutter_backend_osx_post_parse):
	Print GL_VENDOR, GL_RENDERER, GL_VERSION and GL_EXTENSIONS to aid
	debugging.
2008-06-09 23:00:31 +00:00
Tommi Komulainen
78e1f63fcd cogl: add support for quartz imagebackend
Bug #930 - add support for quartz imagebackend

	* clutter/cogl/common/cogl-bitmap-pixbuf.c
	(_cogl_bitmap_from_file): When USE_QUARTZ is defined implement
	using Core Graphics.
	* configure.ac: support --with-imagebackend=quartz and print
	which imagebackend is selected. Make quartz default on OSX
2008-06-09 21:15:12 +00:00
Øyvind Kolås
a28e51d752 * clutter/cogl/common/cogl-primitives.c: (cogl_path_rel_curve_to):
fixed naming of implementation of cogl_path_rel_curve_to (it was
called just cogl_rel_curve_to).
2008-06-09 16:14:06 +00:00
Emmanuele Bassi
40b62c7b67 2008-06-09 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac: Clean up a bit the X11 and X extensions
	checks with PKG_CHECK_EXISTS(). Since we are filling up the
	X11_CFLAGS and X11_LIBS variables ourselves there is no
	point in polluting the Makefiles with unused variables.

	* clutter/Makefile.am: Remove the pkg-config variable
	evaluation and use the values retrieved from the configure
	script.
2008-06-09 13:29:17 +00:00
Chris Lord
db232dd5e7 Bug #914 - ClutterEntry is confused about characters vs. bytes
* clutter/clutter-entry.c: (clutter_entry_ensure_layout),
        (clutter_entry_handle_key_event_internal),
        (clutter_entry_set_text):
        Fix mix-up of character and byte counts, handle unicode correctly.
        Use clutter_key_event_unicode() instead of
        clutter_keysym_to_unicode().

        * clutter/clutter-event.c: (clutter_key_event_unicode):
        Don't ignore ClutterKeyEvent.unicode_value

        * clutter/clutter-keysyms-table.h:
        Rename header define so as not to conflict with clutter-keysyms.h

        Patch originally by Emmanuele Bassi, with input from Tommi Komulainen.
2008-06-09 10:13:20 +00:00
Ø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
Emmanuele Bassi
66474e3aa5 2008-06-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c (clutter_entry_init): Remove a
	variable shadowing another one. (Tommi Komulainen)
2008-06-06 14:45:43 +00:00
Emmanuele Bassi
543b6971b4 2008-06-06 Emmanuele Bassi <ebassi@openedhand.com>
Bug #955 - ClutterLabel is missing fallback resolution handling

	* clutter/clutter-label.c (clutter_label_init): Handle
	clutter_backend_get_resolution() return value -1 similar to
	ClutterEntry (falling back to 96.0). (#955, Tommi Komulainen)
2008-06-06 14:44:49 +00:00
Neil Roberts
1bfeddaaee * clutter/eglnative/clutter-stage-egl.c
(clutter_stage_egl_realize): Use ES 2 renderable type when
	building for GLES 2.

	* clutter/eglnative/clutter-event-egl.c (get_backend_time): Added
	a NULL for the microseconds parameter of g_timer_elapsed.

	* clutter/eglnative/clutter-stage-egl.h: 
	* clutter/eglnative/clutter-egl.h: 
	* clutter/eglnative/clutter-backend-egl.h: Include
	clutter-egl-headers.h instead of including the GL headers directly
	so it can include gl2.h when building for GLES 2.

	* clutter/eglnative/clutter-egl-headers.h: 
	* clutter/eglnative/Makefile.am (libclutter_eglnative_la_SOURCES):
	Added clutter-egl-headers.h

	* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: GLES 2
	doesn't provide a default precision for floats in the fragment
	shader and it will reject the shader if there isn't one.
2008-06-06 14:21:22 +00:00
Matthew Allum
9d8bfaf997 2008-06-06 Matthew Allum <mallum@openedhand.com>
Bug #948 - Remove texture rectangle support

        * clutter/clutter-feature.c:
        * clutter/clutter-feature.h:
        * clutter/clutter-texture.c:
        * clutter/cogl/gl/cogl.c:
* clutter/glx/clutter-glx-texture-pixmap.c:
        Remove support for GL_TEXTURE_RECTANGLE_ARB (now using just regular
        2D textures, with optional npots extension). Simplifys code, + makes
        mipmap & shader support much more sane.
2008-06-06 13:44:22 +00:00
Øyvind Kolås
7804ce7d1a * clutter/cogl/common/cogl-bitmap-pixbuf.c:
(_cogl_bitmap_from_file): allocate height×rowstride and not duplicate
gdkpixbuf's strange optimization saving some bytes at the end of the
pixbuf.
2008-06-06 12:53:35 +00:00
Tommi Komulainen
3d034ff6aa cogl: define GL_READ/DRAW_FRAMEBUFFER_EXT if not available
Bug 913 - cogl fails to build on OSX

	* clutter/cogl/gl/cogl-fbo.c: define GL_READ_FRAMEBUFFER_EXT and
	GL_DRAW_FRAMEBUFFER_EXT if not defined in the build system. The
	#ifdef can fail if they're not #defines but variables or enums.
	As the values are supposed to be industry standard even then
	it shouldn't have ill effects.
2008-06-05 21:40:59 +00:00
Tommi Komulainen
b8e8a80a40 OSX: add multistage support
Bug #911 - OSX: add multistage support

	* clutter/osx/clutter-backend-osx.{c,h}
	(clutter_backend_osx_init_stage, clutter_backend_osx_get_stage,
	clutter_backend_osx_redraw, clutter_backend_osx_create_stage,
	clutter_backend_osx_ensure_context, clutter_backend_osx_class_init,
	clutter_backend_osx_dispose, ClutterGLView:drawRect:):
	* clutter/osx/clutter-stage-osx.{c,h} (clutter_stage_osx_realize,
	ClutterGLWindow:setFrameSize:):
	Adapt to new multistage backend API. Don't keep a pointer to
	default stage. Derive from ClutterActor instead of ClutterStage.
	Implement ClutterStageWindow interface. Paint, resize and
	otherwise manipulate the wrapper rather than self when necessary.

	(clutter_backend_post_parse): Create our singleton GL context
	here. We could probably create the context when the default
	stage is created, but I think this is more clean.

	* clutter/osx/clutter-event-osx.c (clutter_event_osx_translate)
	* clutter/osx/clutter-stage-osx.c (clutter_stage_osx_state_update,
	ClutterGLWindow:windowShouldClose:):
	* clutter/osx/clutter-stage-osx.h: Export ClutterGLWindow interface
	for clutter-event-osx.c to easily get the stage for NSWindow.
	Fill in ClutterEventAny::stage on our events.

	Consistently use 'stage_osx' and 'wrapper' as variable names
	when referring to ClutterStageOSX and ClutterStage objects
	respectively.
2008-06-05 21:27:58 +00:00
Tommi Komulainen
cba23c0b26 OSX: add missing memory pool wrapup
Bug #910 - OSX: missing memory pool

	* clutter/osx/clutter-backend-osx.c (clutter_backend_osx_redraw):
	Add missing memory pool wrapup.
2008-06-05 21:27:28 +00:00
Tommi Komulainen
e783591eab OSX: handle gracefully NULL title
Bug #909 - OSX: missing NULL pointer handling

	* clutter/osx/clutter-stage-osx.c (ClutterGLWindow,
	clutter_stage_osx_set_title): NSString:stringWithUTF8String:
	does not accept NULL values, use empty string ("") instead.
	Avoids potential crash.
2008-06-05 20:10:00 +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
Matthew Allum
a7ce389052 2008-06-05 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.h:
        Actually export clutter_glx_texture_pixmap_using_extension ()
2008-06-05 12:05:19 +00:00
Chris Lord
036c8393a6 * clutter/clutter-entry.c:
Correct the documentation for clutter_entry_set_max_length, fixes bug
        #915.
2008-06-05 10:05:01 +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
Matthew Allum
437fa9239f 2008-06-03 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
        Dont always fallback to x11 (slow) updates for a single
        failed pixmap.
        Minor cleanups.
        * clutter/x11/clutter-x11-texture-pixmap.c:
        Move shm allocation to only area updates.
2008-06-03 16:25:17 +00:00
Øyvind Kolås
474ae2d17e * clutter/clutter-container.c: (container_get_child_property):
s/g_object_set_property/g_object_get_property/
2008-06-03 10:49:49 +00:00
Neil Roberts
dd1a669911 * clutter/pango/pangoclutter-glyph-cache.c
(pango_clutter_glyph_cache_set): When creating a new band, make
	sure the texture is wide enough for the glyph, not just tall
	enough.
2008-06-02 16:02:31 +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
Neil Roberts
42ed195f01 * clutter/cogl/gles/cogl-gles2-wrapper.h: The uniform numbers are
now stored in a separate struct so they can be stored for
	application program objects as well.

	* clutter/cogl/gles/cogl.c: Moved stub shader functions into
	separate files.
	(_cogl_features_init): Report support for the shaders feature on
	GLES 2

	* clutter/cogl/gles/cogl-shader.h:
	* clutter/cogl/gles/cogl-shader.c:
	* clutter/cogl/gles/cogl-program.h:
	* clutter/cogl/gles/cogl-program.c: Separate files to handle
	shaders on programs on GLES. If version 1.1 is being used then the
	stub functions which all fail are still used.

	* clutter/cogl/gles/cogl-gles2-wrapper.c
	(cogl_gles2_wrapper_init, cogl_gles2_wrapper_bind_attributes),
	(cogl_gles2_wrapper_get_uniforms): Move the uniforms and attribute
	bindings into a separate function so they can be used to bind on
	application shaders as well.
	(cogl_gles2_wrapper_update_matrix): Now takes a parameter and is
	no longer static so that it can be used to update all of the
	matrices when a new shader is bound.

	* clutter/cogl/gles/cogl-defines.h.in: Use GL_COMPILE_STATUS for
	CGL_OBJECT_COMPILE_STATUS if the latter isn't available (for
	example on GLES 2).

	* clutter/cogl/gles/cogl-context.h (CoglContext): Added handle
	arrays for programs and shaders.

	* clutter/cogl/gles/cogl-context.c (cogl_create_context)
	(cogl_destroy_context): Initialize and destroy program and shader
	handle array.

	* clutter/cogl/gles/Makefile.am (libclutter_cogl_la_SOURCES): Add
	cogl-{shader,program}.{c,h}
2008-06-02 10:58:57 +00:00
Neil Roberts
de49189c9f * clutter/cogl/gl/cogl-context.c (cogl_destroy_context): Fix
cut-and-paste error where the wrong arrays were being freed.
2008-06-02 09:35:43 +00:00
Emmanuele Bassi
3ab2ff9846 2008-06-01 Emmanuele Bassi <ebassi@openedhand.com>
Merge from clutter-0-6:

	* clutter/clutter-model.c:
	(clutter_model_iter_set_internal_valist): Add an internal function
	wrapping ClutterModelIter::set_value that does not emit the
	::row-changed signal. Emitting this signal before the ::row-added
	one is wrong: a row cannot change before being inserted.

	(clutter_model_append), (clutter_model_prepend),
	(clutter_model_insert): Use the non-signal emitting variant of
	clutter_model_iter_set_valist().

	(clutter_model_iter_set_valist): Use the internal version and emit
	the ::row-changed signal at the end.
2008-06-01 19:57:42 +00:00
Emmanuele Bassi
a4e4faff1d 2008-05-31 Emmanuele Bassi <ebassi@openedhand.com>
Bug #943 - Signals are only emitted within a certain area of
	           the stage

	* clutter/clutter-main.c (clutter_do_event): Use the proper
	API and not the macros for the default stage, in case we are
	using a backend supporting multiple stages. (Julian Aron Prenner)
2008-05-31 17:09:40 +00:00
Emmanuele Bassi
7b9a7b95ec 2008-05-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter-renderer.c: 
	* clutter/pango/pangoclutter.h
	* clutter/pango/pangoclutter-private.h: Add a function retrieving
	the font mipmapping setting.
2008-05-30 16:48:32 +00:00
Neil Roberts
71133b3d0e * clutter/cogl/gles/cogl-gles2-wrapper.h (CoglGles2Wrapper): Added
uniforms for alpha testing.

	* clutter/cogl/gles/cogl-gles2-wrapper.c
	(cogl_gles2_wrapper_init): Get the uniforms for alpha testing
	settings.
	(cogl_wrap_glEnable, cogl_wrap_glDisable): Enable/disable alpha
	testing.
	(cogl_wrap_glAlphaFunc): Filled in the wrapper.

	* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: Added alpha
	testing.

	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	* clutter/cogl/gles/cogl-gles2-wrapper.c
	(cogl_wrap_glGetIntegerv): Added a wrapper for glGetIntegerv so
	that it can report zero clip planes.

	* clutter/cogl/gles/cogl.c:
	* clutter/cogl/gles/cogl-texture.c: Use the wrapped version of
	glGetIntegerv

	* clutter/cogl/gles/cogl-primitives.c (_cogl_path_fill_nodes): Use
	_cogl_features_available to check for the stencil buffer instead
	of an #ifdef. The stencil buffer is available in the default
	profile for the GLES 2 simulator.
2008-05-29 13:29:04 +00:00
Neil Roberts
8d7bf93909 * clutter/cogl/gles/cogl-gles2-wrapper.c
(cogl_gles2_wrapper_init): Get uniforms for fog parameters and
    	initialise them.
    	(cogl_wrap_glDrawArrays): Store the modelview matrix in a uniform
    	as well so that it can be used for fogging calculations.
    	(cogl_wrap_glEnable, cogl_wrap_glDisable): Enable/disable fogging.
    	(cogl_wrap_glFogx, cogl_wrap_glFogxv): Fill in wrapper to set
    	fogging parameters.

    	* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: Calculate the
    	fog amount if fogging is enabled.

    	* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: Mix with fog
    	color.

    	* clutter/cogl/gles/cogl-gles2-wrapper.h (CoglGles2Wrapper): Add
    	uniforms for fogging.
2008-05-28 17:14:17 +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
ed80c88413 Forgot GlyphCache implementation 2008-05-28 14:09:22 +00:00
Emmanuele Bassi
f20cfeadb4 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
Bug #919 - Replacement pango renderer (Neil Roberts)

	* clutter/clutter-backend.h:
	* clutter/clutter-backend.c:
	(clutter_backend_set_font_options),
	(clutter_backend_get_font_options): Add the ability to set
	the cairo_font_options_t* for the backend at construction
	time, so that backend implementations can have their own
	options.

	* clutter/clutter-color.c: Include pango/pango-attributes.h
	for the pango_color_parse() function.

	* clutter/clutter-label.c:
	(clutter_label_ensure_layout),
	(clutter_label_init), (clutter_label_set_text),
	(clutter_label_set_font_name), (clutter_label_set_ellipsize),
	(clutter_label_set_use_markup): Ensure that the cache is
	always primed when the Label changes; this makes sure that
	the cache is rebuilt outside the paint run, which should
	make the painting perform better especially on embedded
	devices.

	* clutter/clutter-entry.c:
	(clutter_entry_ensure_layout),
	(clutter_entry_init), (clutter_entry_set_text),
	(clutter_entry_set_font_name): Ditto as above.

	* clutter/clutter-private.h:
	* clutter/clutter-main.[ch]: Create the font-map inside the
	main context; add two new functions:

	  clutter_clear_glyph_cache()
	  clutter_set_use_mipmapped_text()

	that control the glyphs cache.

	* clutter/pango/Makefile.am:
	* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter-private.h:
	* clutter/pango/pangoclutter-render.c:
	* clutter/pango/pangoclutter.h: Rewrite the Pango renderer
	using a PangoCairo context and saving the glyphs inside a
	more efficient cache.

	* configure.ac: Depend on pangocairo instead of pangoft2.
2008-05-28 14:03:28 +00:00
Emmanuele Bassi
a0747e8c2d 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
Bug 882 - Allow child properties for containers implementing the
	          ClutterContainer interface (Øyvind Kolås)

	* clutter/clutter-child-meta.[ch]: Base class for the metadata
	of a ClutterActor inside a ClutterContainer; the ChildMeta
	object implements a wrapper for storing data that is attached
	to a ClutterActor only when it's part of a ClutterContainer.
	The ChildMeta object is used to store the child properties
	accessible through the ClutterContainer API.

	* clutter/clutter-container.[ch]: Creates the ChildMeta for
	each actor, in case the Container specifies the ChildMeta
	type to use.

	* clutter/Makefile.am: Add clutter-child-meta.[ch] to the build.

	* clutter/clutter-marshal.list: Add the marshaller for the
	ClutterContainer::child-notify signal.

	* clutter/clutter-types.h: Declare ClutterContainer and
	ClutterChildMeta to avoid recursive inclusion.
2008-05-28 13:48:11 +00:00
Neil Roberts
717d9768ed * clutter/cogl/gles/Makefile.am: Use old-style Makefile rules for
the stringify script so that automake won't complain.
2008-05-28 13:17:03 +00:00
Emmanuele Bassi
c74dfa96ca 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
Fix merging of objects with the same id.

	* clutter/clutter-script.c:
	(json_object_end): If there already is an ObjectInfo under the
	parsed id, merge the construction with the currently stored
	state.

	(parse_children), (parse_signals),
	(parse_behaviours): Append the newly parsed children, signals
	and behaviours, in case the ObjectInfo already has unresolved
	items.

	(clutter_script_construct_object): Fix a typo in the type check.
	
	(clutter_script_init): Do not copy the key inside the hash
	table holding the objects - we are already holding it inside
	the value.
2008-05-28 12:09:41 +00:00
Neil Roberts
1502d0690c * clutter/cogl/gles/cogl-gles2-wrapper.c (cogl_wrap_glGetFixedv):
Filled in the wrapper for glGetFixedv
2008-05-28 11:29:58 +00:00
Neil Roberts
29f7cbdfb7 * clutter/cogl/gles/cogl-texture.c: Use the wrapper for
glTexParameteri. Call glGenerateMipmap after every change to the
	texture image data.

	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	* clutter/cogl/gles/cogl-gles2-wrapper.c: Added a wrapper for
	glTexParameteri so that it can ignore requests to set
	GL_GENERATE_MIPMAP. Added a wrapper for glGenerateMipmap that does
	nothing on GLES 1
2008-05-28 10:47:21 +00:00
Emmanuele Bassi
cb279f999a 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c:
	(clutter_script_construct_object): Mark top-level objects,
	that is objects that don't have their ownership transferred
	when building up a ClutterScript.

	(object_info_free): Merge a fix from the stable branch, but
	do not check the type - check whether the object is a top
	level (we still need the ClutterActor type check in order to
	call clutter_actor_destroy()).
2008-05-28 09:03:49 +00:00
Emmanuele Bassi
d27ea0b4ac 2008-05-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-rectangle.c:
	(clutter_rectangle_paint): Remove commented out call to
	cogl_enable(); the call is not needed and the comment is
	in C99.
2008-05-28 08:58:44 +00:00
Neil Roberts
70dbc03734 GLES 2 backend
* clutter/eglx/clutter-stage-egl.h:
	* clutter/eglx/clutter-egl-headers.h:
	* clutter/eglx/clutter-backend-egl.h:
	* clutter/eglx/Makefile.am: Include the GLES and EGL headers via
	clutter-egl-headers.h so that the right version can be used
	depending on whether the GLES 2 wrapper is being used.

	* configure.ac: Added an automake conditional for whether the GLES
	2 wrapper should be used.

	* clutter/eglx/clutter-stage-egl.c (clutter_stage_egl_realize):
	Remove the call to glGetIntegerv to get the max texture size. It
	was being called before the GL context was bound so it didn't work
	anyway and it was causing trouble for the GLES 2 simulator.

	* clutter/cogl/gles/stringify.sh: Shell script to convert the
	shaders into a C string.

	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	* clutter/cogl/gles/cogl-gles2-wrapper.c: Wrappers for most of the
	missing GL functions in GLES 2.

	* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl:
	* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl: New shaders for
	GLES 2

	* clutter/cogl/gles/cogl-defines.h.in: Use the @CLUTTER_GL_HEADER@
	macro instead of always using the GLES 1 header.

	* clutter/cogl/gles/cogl-context.h (CoglContext): Include a field
	for the state of the GLES 2 wrapper.

	* clutter/cogl/gles/cogl-texture.c:
	* clutter/cogl/gles/cogl-primitives.c:
	* clutter/cogl/gles/cogl.c: Use wrapped versions of the GL
	functions where neccessary.

	* clutter/cogl/gles/Makefile.am: Add sources for the GLES 2
	wrapper and an extra build step to put the GLSL files into a C
	string whenever the files change.
2008-05-27 17:42:50 +00:00
Matthew Allum
94b2d6f664 2008-05-26 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-stage-x11.c: (clutter_stage_x11_request_coords):
        Dont allow the window to be resize to 0 dimentions. (fixes #933)
2008-05-26 20:55:53 +00:00
Emmanuele Bassi
4ef8d3bb5f 2008-05-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug #912 - Invalid use of int* as parameter for glGetIntegerv

	* clutter/cogl/gl/cogl.c (_cogl_features_init): Use GLint
	instead of int. (#912, Tommi Komulainen)
2008-05-23 15:23:40 +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
Neil Roberts
f9e43c440b * clutter/cogl/gl/cogl.c (error_string):
* clutter/cogl/gles/cogl.c (error_string): Rename to
	_cogl_error_string and remove the static scoping so that it can be
	called in cogl-texture etc.

	* clutter/cogl/gl/cogl-texture.c (cogl_texture_new_from_foreign):
	* clutter/cogl/gles/cogl-texture.c (cogl_texture_new_from_foreign):
	GE(*) can't be used to wrap around calls that use the return
	value.

	* clutter/cogl/gl/cogl-texture.c (_cogl_texture_quad_sw)
	(_cogl_texture_quad_hw, cogl_texture_polygon): Remove GE(*)
	wrapper around calls in the middle of a glBegin/glEnd pair which
	otherwise always generate an error because glGetError can only be
	called outside of the pair.

	* clutter/cogl/gl/cogl-internal.h: Include stdio.h when definig
	COGL_DEBUG and declare a prototype for _cogl_error_string.

	* clutter/cogl/gles/cogl-internal.h: Match GE(*) macro to GL
	version.
2008-05-21 13:20:33 +00:00
Ivan Leben
9f5a8edc64 * clutter/cogl/gles/cogl-texture.c:
(_cogl_texture_download_from_gl:) Only comment out the broken
	check for framebuffer alpha bits, not the check for alpha in
	texture format.
2008-05-21 10:00:08 +00:00
Øyvind Kolås
ecd5ba2bd2 Decouple actor opacity from fill opacity in ClutterRectangle (fixes
race when both are set from clutter script also makes it more
consistent with the behavior of other actors.)
* clutter/clutter-rectangle.c: (clutter_rectangle_set_color): stop
setting the opacity of the actor from the specified color.
(clutter_rectangle_paint): combine the absolute opacity of the actor
with the alpha of the color when painting.
2008-05-20 16:05:57 +00:00
Ivan Leben
2008a03a6b * clutter/cogl/gles/cogl-texture.c:
(cogl_texture_download_from_gl:) Implemented a workaround
	for missing alpha framebuffer channel. There are still
	some issues with detecting whether alpha is present in the
	framebuffer. See comments in code. Test-cogl-tex-getset now
	successfully retrieves a RGBA texture image data.
2008-05-20 10:37:36 +00:00
Ivan Leben
3d9f83019d * clutter/cogl/gles/cogl-texture.c:
(cogl_texture_download_from_gl:) Store old blending factors
	and restore them when done. The lack of ability to retrieve
	the alpha channel now more noticable in test-cogl-tex-getset
	since the edges of the hand are not antialiased.

	* clutter/cogl/gl(es)/cogl-internal.h: Declare
	cogl_blend_func to avoid "implicit implementation" compile
	warning.
2008-05-19 15:21:56 +00:00
Ivan Leben
f2d701c809 * clutter/cogl/gl(es)/cogl.c: New internal function
cogl_blend_func caches blending setup much like cogl_enable
	does with the enable flags. This separates blending factors
	setup from the enable/disable operation in preparation of
	the texture image retrieval fix for alpha channel on GLES.
	(cogl_enable:) Does not modify blending factors anymore.

	* clutter/cogl/gl(es)/cogl-context.h: CoglContext holds two
	new variables to cache blending src and dst factors.

	* clutter/cogl/gl(es)/cogl-context.c:
	(cogl_create_context:) Initialize blending factors.

	* clutter/cogl/gles/cogl-texture.c:
	(cogl_texture_download_from_gl:) Set blending factors to
	CGL_ONE, CGL_ZERO which fixes the slighlty improper behavior
	where source colour was actually multiplied with its alpha
	value in the result (not noticable on current tests).
2008-05-19 15:02:27 +00:00
Emmanuele Bassi
aec03912b8 2008-05-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/Makefile.am: Fix the INCLUDE directives to
	properly include the X11 backend headers.

	* clutter/glx/Makefile.am: Add the libclutter-x11.la static
	library to the LDADD directives.
2008-05-19 14:21:24 +00:00
Tomas Frydrych
460b05bd83 2008-05-19 Tomas Frydrych <tf@openedhand.com>
* clutter/x11/clutter-x11.h:
	    * clutter/glx/clutter-glx.h:
	    Include texture pixmap headers.
2008-05-19 12:27:26 +00:00
Neil Roberts
fbc68f2d26 * clutter/eglx/clutter-stage-egl.c (clutter_stage_egl_realize):
Fix name of parent class variable which otherwise breaks the
	build.
2008-05-16 15:40:49 +00:00
Neil Roberts
14a48008cd Use the Mesa headers instead of depending on GLee for Win32
builds.

	* configure.ac: No longer check for GLee

	* clutter/cogl/gl/cogl-defines.h.in: Don't bother including GLee.h

	* build/mingw/mingw-cross-compile.sh: No longer downloads libGLee
	but downloads the Mesa library instead and installs the headers
	from that. Fixed the libpng version.
2008-05-16 11:09:59 +00:00
Tomas Frydrych
889222f7d5 2008-05-16 Tomas Frydrych <tf@openedhand.com>
* clutter/glx/Makefile.am:
	    * clutter/x11/Makefile.am:
	    Install glx and x11 specific includes into clutter/glx and
	    clutter/x11 so that header files that include glx/*.h or x11/*.h
	    when installed.
2008-05-16 10:50:29 +00:00
Neil Roberts
bfaacb10bf * clutter/win32/clutter-event-win32.c (message_translate): Fix
signedness of old_xpos and old_ypos to get rid of compiler
	warnings.

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_get_features): Cast the result of
	glGetString to a signed char pointer to avoid compiler warnings.
2008-05-16 09:47:37 +00:00
Neil Roberts
8ef653a9e8 * clutter/win32/clutter-stage-win32.c:
* clutter/win32/clutter-backend-win32.c: Reflect changes to the
	GLX/X11 backend in revisions 2708-2709 and 2713-2715 which
	simplify the backend a little.
2008-05-15 22:03:22 +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
Øyvind Kolås
677a202407 * clutter/cogl/gles/cogl.c: (_cogl_features_init): do not set
COGL_FEATURE_TEXTURE_READ_PIXELS, since it is not available.
2008-05-14 11:10:45 +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
04f3e42253 2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/fruity/clutter-stage-fruity.c:
	(clutter_stage_egl_show), (clutter_stage_egl_hide): Don't chain
	up and set flags, as it is not needed anymore.

	(clutter_stage_egl_realize): Set the REALIZED flag.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_show), (clutter_stage_egl_hide): Don't chain
	up and set flags, as it is not needed anymore.
2008-05-13 16:09:42 +00:00
Emmanuele Bassi
d141f781ec 2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_unrealize): Move the shaders release from here...

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_dispose): ... to here. Shaders should be
	released when the GL context is being destroyed, and that only
	happens when the backend is being disposed, now that we support
	multiple stages.
2008-05-13 10:42:36 +00:00
Emmanuele Bassi
87ccdacdaf 2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.c:
	(_clutter_backend_create_stage): Call _clutter_stage_set_window()
	ourselves, thus removing yet another action that backends must
	implement and might get wrong; also cuts a backend-agnostic piece
	of code duplication.

	* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage): Update the EGL native backend.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage): Update the EGLX backend.

	* clutter/fruity/clutter-backend-fruity.c:
	(clutter_backend_egl_create_stage): Update the fruity backend

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Update the GLX backend.

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

	* HACKING.backends: Update the ::create_stage() description.
2008-05-13 10:37:17 +00:00
Emmanuele Bassi
6022344a80 2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-event-x11.c (event_translate): Remove the
	cheap Expose event compression, as it seems to play games when a
	composite manager is running. It's also not really needed, as
	the redraw queue will avoid redraws too close to each other
	anyway.

	* clutter/x11/clutter-stage-x11.c:
	(clutter_stage_x11_show), (clutter_stage_x11_hide): Do not chain
	up just to set the flags. This fixes a critical warning coming
	from ClutterActor::hide() default implementation.
2008-05-13 10:21:25 +00:00
Ivan Leben
54e2fd14ae * clutter/cogl/gl/cogl-defines.h.in:
Fix GL function prototypes on OS X by #definining APIENTRY and
	APIENTRYP if missing.
2008-05-13 04:56:06 +00:00
Ivan Leben
75b829f930 * clutter/cogl/gl/cogl-defines.h.in:
Defined GL extension functions used by Cogl inside the COGL_
	namespace.

	* clutter/cogl/gl/cogl-context.h:
	* clutter/cogl/gl/cogl.c:
	Use COGL_ extension function prototypes instead of relying
	on glext.h to define them. Should fix the mac compilability
	bug, but haven't tested it yet.
2008-05-12 17:20:22 +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
Robert Bragg
c76e576141 2008-05-12 Robert Bragg <bob@openedhand.com>
* clutter/clutter-timeline.c:
	Adds clutter-timeline documentation RE: r2337, explaining
	the current timeline semantics.
2008-05-12 15:18:38 +00:00
Emmanuele Bassi
6fa7aeef85 2008-05-12 Emmanuele Bassi <ebassi@openedhand.com>
* HACKING.backends: Update documentation.

	* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_realize): Avoid setting more flags than
	necessary.
2008-05-12 10:17:55 +00:00
Neil Roberts
9144b3902e * clutter/clutter-frame-source.c (clutter_frame_source_add)
(clutter_frame_source_add_full): Add gtk-doc and rename the
	'function' parameter to 'func'.

	* clutter/clutter-frame-source.h: Rename the 'function' parameters
	to 'func'.

	* clutter/Makefile.am (source_h): Make clutter-frame-source.h a
	public header.

	* clutter/clutter-main.c (clutter_threads_add_frame_source_full):
	Improve gtk-doc

	* doc/reference/clutter/clutter-sections.txt: Added
	clutter_threads_add_frame_source,
	clutter_threads_add_frame_source_full,
	clutter_frame_source_add and clutter_frame_source_add_full.
2008-05-09 16:27:06 +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
Neil Roberts
046cebf4ac * clutter/clutter-frame-source.h: Added the missing G_BEGIN_DECLS
and G_END_DECLS
2008-05-07 15:16:48 +00:00
Emmanuele Bassi
fabed98362 2008-05-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_dispose): Destroy the timer that we created...
	(clutter_backend_sdl_init): ... here.

	* clutter/sdl/clutter-backend-sdl.h: Add a GTimer for time-based
	operations, like the event time.

	* clutter/sdl/clutter-event-sdl.c:
	(get_backend_time): Get the elapsed milliseconds for the SDL
	backend.

	(_clutter_events_init): Start the timer provided by the backend...
	(_clutter_events_uninit): ... and the stop it.

	(key_event_translate), (event_translate): Use the backend time
	to fill out the time field of the event structures. This fixes
	the motion notification throttling on the SDL backend.
2008-05-07 15:03:59 +00:00
Matthew Allum
0782e7d635 2008-05-06 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        More cleanups, safety additions.
2008-05-06 19:57:05 +00:00
Øyvind Kolås
a1d0b30070 * clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.c: 
* clutter/cogl/common/cogl-primitives.c: moved declaration of
gegl_rectangle and gegl_rectanglex here to satisfy linking
requirements when building the fruity backend.
2008-05-05 12:01:19 +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
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
Emmanuele Bassi
f6cfee60a9 2008-05-01 Emmanuele Bassi <ebassi@openedhand.com>
Build fixes for the SDL flavour.

	* clutter/sdl/clutter-backend-sdl.c: Remove an unused function.

	* clutter/sdl/clutter-event-sdl.c:
	(clutter_event_dispatch): Properly cast the stage pointer.

	* clutter/sdl/clutter-stage-sdl.c:
	(clutter_stage_window_iface_init): Remove the draw_to_pixbuf()
	stub and assignment.
2008-05-01 15:49:57 +00:00
Øyvind Kolås
a628a7cf5c * clutter/cogl/gles/cogl-primitives.c: (_cogl_path_fill_nodes): draw
the rasterized scanlines as an array of triangles.
2008-05-01 11:27:58 +00:00
Emmanuele Bassi
21c0c41e51 2008-05-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.c:
	(clutter_behaviour_remove_all): Disconnect the ::destroy
	handler when removing all actors, to match the behaviour
	of clutter_behaviour_remove().
2008-05-01 09:28:41 +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
Øyvind Kolås
98f5b6a0c9 * clutter/cogl/gles/cogl-primitives.c: (_cogl_path_fill_nodes):
keep track of direction we are drawing in and make sure we leave
two intersection points when we have changed direction.
2008-04-30 21:48:47 +00:00
Øyvind Kolås
6562d30ab0 * clutter/cogl/gles/cogl-primitives.c: (_cogl_path_fill_nodes):
scanline rasterizer fallback for GLES without working stencil
buffer (would benefit from optimization/smarter choice of
datastructures).
2008-04-30 16:57:21 +00:00
Emmanuele Bassi
15af14d933 2008-04-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.c:
	(clutter_effect_closure_destroy): Do not remove the actor
	from the behaviour; the behaviour is an internal detail of the
	effect, and it will remove the actors anyway when finalized
	when g_object_unref() is called. This should guard against
	actors being destroyed while an effect is running.
2008-04-30 16:27:18 +00:00
Øyvind Kolås
11a14de9f1 * clutter/cogl/common/Makefile.am:
* clutter/cogl/common/cogl-primitives.c:
* clutter/cogl/common/cogl-primitives.h:
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gl/cogl-primitives.h:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.h: moved duplicated code to the
common directory.
2008-04-30 15:05:17 +00:00
Robert Bragg
108bbe7474 2008-04-30 Robert Bragg <bob@openedhand.com>
* clutter/clutter/x11/clutter-x11-texture-pixmap.c:
	In _update_area_real with depth=16 we weren't setting up the alpha
	channel.
2008-04-30 14:58:25 +00:00
Matthew Allum
f9c43cd640 2008-04-29 Matthew Allum <mallum@openedhand.com>
* clutter/glx/Makefile.am:
        * clutter/x11/Makefile.am:
        Revert header install locations (Mistake in previous commit,
        fixes #898)
2008-04-29 22:02:10 +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
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
Neil Roberts
19058afe82 Removed COGLhandle and changed shader and program functions to be
wrapped in reference-counted CoglHandles instead.

	* clutter/cogl/gl/cogl-shader.c: 
	* clutter/cogl/gl/cogl-shader.h: 
	* clutter/cogl/gl/cogl-program.c: 
	* clutter/cogl/gl/cogl-program.h: 
	New files to hold the shader and program functions.

	* clutter/cogl/gl/cogl.c: Removed shader and program functions.

	* clutter/cogl/common/cogl-handle.h: New header to define
	COGL_HANDLE_DEFINE which helps build functions to create
	reference-counted handles. This reduces the amount of duplicated
	code.

	* clutter/cogl/gl/cogl-texture.c: 
	* clutter/cogl/gles/cogl-texture.c: 
	* clutter/cogl/gl/cogl-fbo.c: Converted to use COGL_HANDLE_DEFINE
	from cogl-handle.h to avoid duplicating some of the common code.

	* clutter/cogl/gles/cogl-defines.h.in: 
	* clutter/cogl/gl/cogl-defines.h.in: Removed COGLhandle

	* clutter/cogl/gl/cogl-context.h: Added handle arrays for programs
	and shaders.

	* clutter/cogl/gl/cogl-context.c (cogl_create_context): Added
	initialisers for shader_handles and program_handles.
	(cogl_destroy_context): Added calls to g_array_free for all handle
	arrays.

	* clutter/cogl/gl/Makefile.am (libclutter_cogl_la_SOURCES): Added
	cogl-{program,shader}.{c,h}

	* clutter/cogl/common/Makefile.am
	(libclutter_cogl_common_la_SOURCES): Added cogl-handle.h

	* clutter/cogl/gles/cogl.c:
	* clutter/cogl/cogl.h.in: Programs and shaders are now wrapped in
	CoglHandles instead of COGLhandles. cogl_program_destroy and
	cogl_shader_destroy is now replaced with cogl_program_unref and
	cogl_shader_unref. cogl_program_ref and cogl_shader_ref are also
	added.

	* clutter/clutter-shader.c: Converted to use CoglHandles for the
	programs and shaders instead of COGLhandles.

	* cogl/cogl-sections.txt: Added cogl_shader_ref,
	cogl_shader_unref, cogl_is_shader, cogl_program_ref,
	cogl_program_unref, cogl_is_program and cogl_is_offscreen.
2008-04-29 16:10:37 +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
Robert Bragg
c90df4d4a0 2008-04-29 Robert Bragg <bob@o-hand.com>
* clutter/x11/clutter-x11-texture-pixmap.c:
	In clutter_x11_texture_pixmap_set_pixmap, dont assume that the actor
	size should be changed to match the size of the pixmap.
2008-04-29 13:51:25 +00:00
Robert Bragg
3bcd5d3f98 2008-04-29 Robert Bragg <bob@o-hand.com>
* clutter/cogl/gles/cogl-texture.c:
	Replaces an malloc call with g_malloc.
2008-04-29 12:44:41 +00:00
Neil Roberts
122e1dafd1 Fixed 'make dist'
* clutter/cogl/Makefile.am (EXTRA_DIST): Distribute cogl.h.in
	instead of cogl.h
	(DIST_SUBDIRS): Added common folder

	* clutter/cogl/gl/Makefile.am (libclutter_cogl_la_SOURCES): Remove
	cogl-defines.h and use the right location for cogl-defines.gl.h
	(EXTRA_DIST): Distribute cogl-defines.h.in

	* clutter/cogl/gles/Makefile.am (libclutter_cogl_la_SOURCES):
	Remove cogl-defines.h and use the right location for
	cogl-defines.gles.h
	(EXTRA_DIST): Distribute cogl-defines.h.in

	* clutter/Makefile.am (DIST_SUBDIRS): Add fruity
2008-04-28 16:57:44 +00:00
Neil Roberts
18826f3b04 * clutter/cogl/cogl.h.in (COGL_A_BIT): Added the missing comma after
COGL_PIXEL_FORMAT_G_8
2008-04-28 16:03:06 +00:00
Øyvind Kolås
35e0ae7fa9 * clutter/cogl/cogl.h.in: reindented. 2008-04-28 15:36:11 +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
Øyvind Kolås
de5f1e78fb * clutter/cogl/cogl.h.in: moved the documentation of the cogl
primitives to the main public header.
* clutter/cogl/gl/cogl-primitives.c: from here ..
* clutter/cogl/gles/cogl-primitives.c: .. _and_ here.
2008-04-28 14:18:29 +00:00
Øyvind Kolås
aae4c7d0f6 * clutter/cogl/cogl.h.in: added documentation. 2008-04-28 14:00:46 +00:00
Emmanuele Bassi
a7f4767ecb 2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-units.c (param_unit_init): Use the right
	macros to set the default minimum and maximum values.

	* clutter/clutter-fixed.c (param_fixed_init): Ditto as above.
2008-04-28 13:37:28 +00:00
Emmanuele Bassi
b8827ea095 2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_redraw): Whitespace fixes.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_hide): Indentation fixes.

	(clutter_stage_egl_realize): Use g_critical() to report failure,
	unset the flags and bail out instead of continuing the realization
	of the stage.
2008-04-28 09:33:38 +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
7c3cf35eec 2008-04-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/sdl/clutter-stage-sdl.[ch]: Port the SDL stage to
	the new stage implementation API.

	* clutter/sdl/clutter-backend-sdl.[ch]: Port the SDL backend
	to the new backend API.

	* clutter/sdl/clutter-event-sdl.c:
	(clutter_event_dispatch): Assign the default stage as the
	origin of the event.
2008-04-25 12:17:01 +00:00
Emmanuele Bassi
b09e6ce55b 2008-04-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_create_stage): Fix checks using a
	non assigned member of the ClutterBackendEGL structure.
2008-04-24 13:10:45 +00:00
Emmanuele Bassi
6ac86b939b 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.[ch]:
	* clutter/eglnative/clutter-stage-egl.[ch]:
	* clutter/eglnative/clutter-event-egl.c: Port to the new stage
	and backend APIs. *WARNING* untested and not compiled.

	* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_init): Set some defaults.
2008-04-23 17:20:59 +00:00
Emmanuele Bassi
389e1470a5 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac:
	* clutter/Makefile.am: Do not build the internal JSON-GLib
	copy if there is a system installed one.

	* clutter/clutter-json.h: Remove.

	* clutter/clutter-json.h.in: Template for the clutter-json.h
	header file, used to opaquely include the JSON-GLib types.
2008-04-23 13:58:58 +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
Emmanuele Bassi
4b0a15c468 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 891 - assertion failed when test-behave exits

	* clutter/clutter-behaviour.c:
	(remove_actor_on_destroy),
	(clutter_behaviour_apply),
	(clutter_behaviour_remove): Remove the actor if it gets
	destroyed before the behaviour.
2008-04-23 09:46:16 +00:00
Emmanuele Bassi
9655f4d58c 2008-04-18 Emmanuele Bassi <ebassi@openedhand.com>
Bug #884 - Add clutter_alpha_set_closure

	* clutter/clutter-alpha.[ch]: Add clutter_alpha_set_closure(),
	a GClosure variant of clutter_alpha_set_func(), and reimplement
	the latter as a special case of the former. (#884, Xan López)
2008-04-18 15:03:30 +00:00
Neil Roberts
e97cba0162 * clutter/clutter-timeline.c (clutter_timeline_get_progressx):
Changed to use clutter_qdiv instead of CLUTTER_FIXED_DIV otherwise
	it can't cope with timelines with more than 255 frames.
2008-04-18 13:51:16 +00:00
Emmanuele Bassi
816aa93135 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-frame-source.c: Small coding style fixes.
2008-04-17 20:53:37 +00:00
Emmanuele Bassi
af562ad59a Add clutter-frame-source to the repository to fix the build 2008-04-17 20:50:49 +00:00
Neil Roberts
827c26757e Applied patch from bug #881
* clutter/clutter-frame-source.h: 
	* clutter/clutter-frame-source.c:
	New files that contain a replacement for g_timeout that try to
	cope with system delays.

	* clutter/Makefile.am: Added clutter-frame-source.{c,h}

	* clutter/clutter-timeline.c (timeout_add): Use a frame source
	instead of a g_timeout.

	* clutter/clutter-main.c (clutter_threads_add_frame_source_full)
	(clutter_threads_add_frame_source): New public functions to wrap a
	frame source and grab the Clutter mutex.

	* clutter/clutter-timeout-pool.c: Now calculates the timeout
	expiration times in the same way as a frame source does so that it
	counts time in frame intervals instead of setting the next
	expiration time as an offset from the current time.
2008-04-17 16:50:23 +00:00
Emmanuele Bassi
fd70c7df49 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.c:
	(clutter_value_transform_fixed_int),
	(clutter_value_transform_fixed_double),
	(clutter_value_transform_fixed_float),
	(clutter_fixed_get_type): Add GValue transformation functions
	for ClutterFixed; copying a CLUTTER_TYPE_FIXED GValue into
	a G_TYPE_FLOAT/G_TYPE_DOUBLE one will automatically transform
	the fixed point representation into a floating point one. Also
	add the G_TYPE_INT transformation function to do a plain
	fixed->int copy.

	* clutter/clutter-units.c:
	(clutter_value_transform_unit_int),
	(clutter_unit_get_type): Add a unit->int transformation function.
2008-04-17 14:08:26 +00:00
Emmanuele Bassi
fa3b3e7f55 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.c (clutter_value_get_fixed): Fix typo
	in the function name.
2008-04-17 11:42:08 +00:00
Emmanuele Bassi
3d30622d96 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-units.c (clutter_value_get_unit): Fix typo
	in the function name.
2008-04-17 11:40:46 +00:00
Emmanuele Bassi
6d73c5e452 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-units.h:
	* clutter/clutter-fixed.h: Add boundaries for fixed point
	and units values.

	* doc/reference/clutter-sections.txt: Update the documentation.
2008-04-17 11:09:27 +00:00
Emmanuele Bassi
0ecfa9701f 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.[ch]: Add a ClutterFixed fundamental
	type, and wrappers for storing it into GValues; also add a
	GParamSpec subclass for defining parameters holding
	ClutterFixed values. This allows creating GObject properties
	using fixed point values.

	* doc/reference/clutter-sections.txt: Document the newly
	added API.
2008-04-17 10:08:17 +00:00
Emmanuele Bassi
d1ba07d0e7 2008-04-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am: Add clutter-units.c

	* clutter/clutter-units.[ch]: Add a ClutterUnit fundamental
	type, and wrappers for storing it into GValues; also add a
	GParamSpec subclass for defining parameters holding ClutterUnit
	values. This allows creating GObject properties using units.

	* doc/reference/clutter-sections.txt: Document the newly
	added API.
2008-04-17 09:13:12 +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
Neil Roberts
3d1f2a0859 Added support for foreign windows to the Win32 backend.
* clutter/win32/clutter-stage-win32.c
	(clutter_stage_win32_request_coords): Don't resize foreign
	windows.
	(clutter_stage_win32_unrealize): Don't destroy foreign windows.
	(clutter_stage_win32_init): Added initialiser for is_foreign_win.
	(clutter_win32_get_stage_from_window): Resort to looking in the
	stage list if the window isn't the right window class so that it
	can still find stages with foreign windows.
	(clutter_win32_set_stage_foreign): New public function to set a
	foreign window for a stage.

	* clutter/win32/clutter-event-win32.c
	(clutter_win32_disable_event_retrieval): New public function to
	disable event retrieval.
	(message_translate): Don't handle WM_SIZE or WM_MOVE for foreign
	windows.

	* clutter/win32/clutter-backend-win32.h (struct
	_ClutterBackendWin32): Added a flag to disable event retrieval

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_ensure_context): Update debug note to
	include whether the stage is foreign or not.
2008-04-15 16:12:37 +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
Øyvind Kolås
e3c2b27d1d * clutter/clutter-group.c: fixed typo in docs. 2008-04-15 11:31:53 +00:00
Matthew Allum
a435ec43ec 2008-04-14 Matthew Allum <mallum@openedhand.com>
* clutter/eglx/clutter-stage-egl.c:
        Actually set wm protocols on eglx stage windows. Fixes issues with
        cloising stages and cleanup.
2008-04-14 17:01:14 +00:00
Matthew Allum
77a7eaeed5 2008-04-14 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_color):
        Disable use of color4ub, issues with latest MBX SDL (#857)

        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * configure.ac:
        Fixup for the eglx backend to work with new backend/multistage code.
        Some issues remain in destroying stages.
2008-04-14 15:10:22 +00:00
Neil Roberts
f7b53e6004 Bug #853
* clutter/clutter-timeline.c (clutter_timeline_get_progressx): Fix
	arithmetic for calculating the reverse progress when the timeline
	is backward. (Should subtract from one instead of taking the
	reciprocal).
2008-04-14 11:07:34 +00:00
Neil Roberts
0b8a500fca Upgraded the Win32 backend to work with the multi-stage
subclassing code.

	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: Now inherits from
	ClutterGroup and implements ClutterStageWindow instead of
	inheriting directly from ClutterStage.

	* clutter/win32/clutter-event-win32.c (message_translate): Now
	takes an extra parameter to return whether DefWindowProc should be
	called. This is needed to prevent the default WM_CLOSE handler
	from destroying the window.

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_dispose): Destroy all of the stages using
	g_slist_foreach as per bug #871. Now also destroys the GL context.
	(clutter_backend_win32_get_features): Added assertions to ensure
	there is a valid GL context.
	(clutter_backend_win32_ensure_context): Accepts NULL stage. Gets
	implementation pointer from the stage.
2008-04-13 08:43:32 +00:00
Emmanuele Bassi
bf48bd1f55 2008-04-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-container.c:
	(clutter_container_get_type): Relax the precondition on the
	implementations of ClutterContainer from ClutterActor to
	GObject.
2008-04-11 15:40:08 +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
0535283b77 2008-04-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/clutter-backend-egl.c:
	(clutter_backend_egl_ensure_context): Sync up with the GLX
	backend.

	(clutter_backend_egl_create_stage): Dumb compilation fix.

	* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_create_stage): Unref the stage if we are
	erroring out.
2008-04-10 19:58:47 +00:00
Emmanuele Bassi
c97bcb37ba 2008-04-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/clutter-stage-egl.c:
	(clutter_stage_egl_realize): Sync up with the GLX backend.
2008-04-10 19:54:08 +00:00
Emmanuele Bassi
497734062c 2008-04-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am: Update the regular expression to match
	all the namespaces we actually use. Thanks to Neil Roberts for
	spotting this. A make distclean is needed.

	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/json/Makefile.am:
	* clutter/pango/Makefile.am: Revert previous commit.
2008-04-09 14:18:42 +00:00
Emmanuele Bassi
05b2e6bc1c 2008-04-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/Makefile.am:
	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/json/Makefile.am:
	* clutter/pango/Makefile.am: Fix the visibility of all the
	symbols, for the main library and the statically linked ones.
2008-04-09 13:27:00 +00:00
Emmanuele Bassi
cf4ba6c512 2008-04-09 Emmanuele Bassi <ebassi@openedhand.com>
* autogen.sh: Clean up a bit

	* clutter/clutter-fixed.[ch]:
	(clutter_double_to_fixed),
	(clutter_double_to_int),
	(clutter_double_to_uint): Make these functions public, as they
	are expanded by their respective macros. This fixes the errors
	from the linker trying to resolve their name.
2008-04-09 10:51:15 +00:00
Neil Roberts
b4ab8b63a1 Applied patch from bug #871
* clutter/x11/clutter-backend-x11.c (clutter_backend_x11_dispose):
	Call g_slist_foreach instead of iterating over the stage_manager
	list manually when deleting stages. Otherwise the 'next' pointer
	of the list node can get corrupted when the actor removes itself
	from the list.

	* clutter/clutter-stage.c (clutter_stage_dispose): Call
	clutter_actor_unrealize in the dispose handler. This fixes
	problems where the dispose handler for the ClutterStageWrapper
	can't deselect the GL context until the stage is unrealized.
2008-04-09 09:33:32 +00:00
Emmanuele Bassi
7fd5d5d10d 2008-04-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.c: Add more debug messages

	* clutter/clutter-stage.h:
	* clutter/clutter-stage.c:
	(clutter_stage_is_default): Add a function to check if the
	stage is the default one.

	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-stage-glx.c:
	* clutter/x11/clutter-stage-x11.c: Keep the stage wrapper
	and implementation flags in sync, to ensure that the GL
	context is always set.
2008-04-04 17:26:26 +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
Neil Roberts
f126822b5c 2008-04-04 Neil Roberts <neil@o-hand.com>
Applied patch from bug #810.

	* clutter/x11/clutter-event-x11.c (event_translate): Set a flag
	when resizing the stage from a ConfigureNotify event.

	* clutter/x11/clutter-stage-x11.c
	(clutter_stage_x11_request_coords): Don't try to resize the window
	again if the flag is set.
	(clutter_stage_x11_init): Added initialiser for the flag.

	* clutter/x11/clutter-stage-x11.h (struct _ClutterStageX11): Added
	the flag.
2008-04-04 13:46:50 +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
Emmanuele Bassi
509d2ad395 2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am: Only export symbols matching "^clutter.*",
	to avoid exposing the library-private symbols starting with
	an underscore.
2008-04-03 03:26:00 +00:00
Emmanuele Bassi
653afecc11 2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.c: ClutterAlpha is an InitiallyUnowned
	subclass. This should fix a lot of leakage. (#860, Neil Roberts)
2008-04-03 03:09:28 +00:00
Emmanuele Bassi
6fa02d3aa0 2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_get_features): Assert if we don't have a
	GL context here or if it's not matched to a drawable. Asserting
	might seem too drastic, but if we don't have a valid GL context
	here then Clutter will segfault anyway, and I'll take an assert()
	over a hard to read, deep in GLX guts backtrace any day (and
	twice on a monday).

	* clutter/x11/clutter-backend-x11.c:
	(clutter_backend_x11_get_features): No need for a variable here.
2008-04-03 03:04:41 +00:00
Matthew Allum
c158a93a84 2008-04-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-backend.c:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-stage-glx.c:
        Allow NULL to be passed to _clutter_backend_ensure_context
        which essentially clears GL context. This is hooked into stage
        unrealisation.  Isn't yet quite bulletproof.
        Fixes issues with gtk-embed crasher (thanks to Neil).
2008-04-01 14:04:46 +00:00
Robert Bragg
d04fd6d620 2008-04-1 Robert Bragg <bob@o-hand.com>
* clutter/glx/clutter-glx-texture-pixmap.c:
	In clutter_glx_texture_pixmap_dispose; trap X errors around
	glXDestroyGLXPixmap so we can't die due to BadDrawable errors.
2008-04-01 13:36:19 +00:00
Matthew Allum
244eedb5bd 2008-03-31 Matthew Allum <mallum@openedhand.com>
* README:
        Add notes on new multistage feature.

        * clutter/clutter-stage-manager.c:
        Dont ref contained stages.

        * clutter/clutter-stage.c:
        Automatically remove stage from stage manager on finalisation.
        Cleans up warnings when a stage is destroyed.

        * clutter/clutter-backend.h:
        * clutter/glx/clutter-backend-glx.c:
        Minor formatting cleanups.

        * clutter/glx/clutter-stage-glx.c:
        * configure.ac:
        * clutter/clutter-version.h.in:
        Add a general CLUTTER_STAGE_TYPE define, should be useful for
        evntual stage subclassing and creating with g_object_new()
2008-03-31 17:15:02 +00:00
Neil Roberts
e88c8b4ce1 2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_init): Added a call to
	timeBeginPeriod. Without this the frame rates are terrible because
	the glib timeouts are not accurate enough. However this requires
	Glib >= 2.16.0 to take any effect because of a change in the way
	g_poll is implemented. See revision 6597 of glib.
	(clutter_backend_win32_finalize): Added a call to timeEndPeriod.

	* configure.ac: Added -lwinmm to the library dependencies for the
	Win32 backend.
2008-03-30 22:27:27 +00:00
Neil Roberts
1a263dca5c 2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-win32.h: 
	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: 
	* clutter/win32/clutter-event-win32.c: 
	* clutter/win32/clutter-backend-win32.h: 
	* clutter/win32/clutter-backend-win32.c:
	Upgraded for multi-stage support.

	* clutter/win32/clutter-stage-win32.c
	(clutter_stage_win32_request_coords): Fixed so that it doesn't set
	the position or size if it hasn't changed. This was causing
	problems when the window was resized using the top left corner. In
	that case the window receives resize and move messages separately
	which caused the window to flash at a different size or position
	while one message was handled before the other.
	(clutter_stage_win32_realize): Added PFD_GENERIC_ACCELERATED to
	the list of pixel format flags to force it to use hardware
	acceleration.

2008-03-30  Neil Roberts  <neil@o-hand.com>

	* clutter-sections.txt: Added clutter_win32_get_stage_from_window
2008-03-30 16:51:01 +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
Neil Roberts
dd7ff3e829 2008-03-26 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-win32.h: Added gtk-doc documentation for
	the Win32 backend section.

	* clutter/win32/clutter-stage-win32.c
	(clutter_win32_get_stage_window): Fixed punctuation in the
	documentation.

	* README: Added notes about the Win32 backend.

2008-03-26  Neil Roberts  <neil@o-hand.com>

	* clutter-sections.txt: Added a section for the Win32 specific
	API.

	* clutter-docs.sgml: Added comments about the Win32 backend.

	* Makefile.am: Added bits to ignore the headers for the Win32
	backend.
2008-03-26 22:22:32 +00:00
Neil Roberts
9b52136be4 2008-03-26 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-event-win32.c (clutter_event_check):
	Removed the pointless parameter in the call to check_msg_pending.
	(check_msg_pending): Fixed to use PeekMessageW instead of
	PeekMessage.
2008-03-26 10:58:12 +00:00
Neil Roberts
051ed6b43b 2008-03-25 Neil Roberts <neil@o-hand.com>
Added a native Win32 WGL backend.

	* configure.ac: Added the 'win32' flavour.

	* clutter/cogl/gl/cogl.c (cogl_get_proc_address): Added an ifdef
	to use wglGetProcAddress with the Win32 backend.

	* clutter/Makefile.am (DIST_SUBDIRS): Added the win32 directory.

	* clutter/win32/clutter-win32.pc.in:
	* clutter/win32/clutter-win32.h: 
	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: 
	* clutter/win32/clutter-event-win32.c: 
	* clutter/win32/clutter-backend-win32.h: 
	* clutter/win32/Makefile.am:
	* clutter/win32/clutter-backend-win32.c: New files.
2008-03-25 15:42:50 +00:00
Emmanuele Bassi
7c05499865 2008-03-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.[ch]: Add a ::copy() virtual function
	for copying iterators.

	* clutter/clutter-list-model.c:
	(clutter_list_model_iter_copy),
	(clutter_list_model_iter_class_init): Implement the ::copy()
	function inside the ListModel iterator subclass.
2008-03-19 18:33:33 +00:00
Emmanuele Bassi
8efb98edae 2008-03-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-group.c:
	* clutter/clutter-texture.c: Use CLUTTER_ACTOR_IS_VISIBLE()
	and not CLUTTER_ACTOR_IS_MAPPED().
2008-03-19 15:05:16 +00:00
Emmanuele Bassi
57f9439031 2008-03-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.[ch]: Small clean ups and refactoring.
	Use gulong instead of guint, so we have a bigger id space for
	the timelines inside a Score.
2008-03-19 11:46:57 +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
Emmanuele Bassi
c1e45f7ee7 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.c: Update documentation.
2008-03-18 22:10:05 +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
0ca514a35f 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c: Small clean ups in the coding style.
2008-03-18 17:56:50 +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
Matthew Allum
74c8271db6 2008-03-09 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-id-pool.c: (clutter_id_pool_free):
        Use g_slice_free not g_free.
        * clutter/clutter-main.c: (_clutter_do_pick):
        Dont 'over read' the framebuffer when picking (#839, Neil Roberts)
2008-03-09 19:07:17 +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
Robert Bragg
d628513f9d 2008-03-07 Robert Bragg <bob@o-hand.com>
* clutter/clutter-timeline.c:
	Timeline changes to fix the issues identified in bugzilla #439
	
	Notably, this includes some tweaks to timeline semantics. So e.g. for a   
	10 frame timeline here are some points about the new timeline code:
	- When you create a timeline it starts with current_frame_num == 0
	- After starting a timeline, the first timeout is for
	  current_frame_num == 1 (Notably it isn't 0 since there is a delay
	  before the first timeout signals so re-asserting the starting point
	  would give a longer than average first frame.)
	- For a non looping timeline the last timeout would be for
	  current_frame_num == 10
	- For a looping timeline the timeout for current_frame_num == 10 would      
	  be followed by a timeout for current_frame_num == 1 and frame 0 is
	  considered == frame 10.
	- Asking for a timeline of N frames might better be described as asking    
	  for a timeline of _length_ N.

	Warning: Although I tried to test things, I guess it's quite likely that
	this breaks somthing depending on a specific quirk of the previous
	timeline code.
2008-03-07 01:00:00 +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
0563b9cfaf 2008-02-28 Gwenole Beauchesne <gbeauchesne@splitted-desktop.org>
Signed off by: Emmanuele Bassi <ebassi@openedhand.com>

	* clutter/clutter-group.c (clutter_group_real_lower): Fix to
	actually lower the actor under the 'above' actor. (#822)
2008-03-06 13:39:56 +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
Chris Lord
781661e9c3 * clutter/clutter-model.c: (clutter_model_set_sorting_column):
Don't disable sorting on column 0
2008-03-06 11:44:37 +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
Emmanuele Bassi
57a954b1eb 2008-03-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_do_event): Do not throttle the
	motion events if the per-actor delivery has been disabled.
2008-03-04 16:23:13 +00:00
Øyvind Kolås
9a6dfbdbaa * clutter/pango/pangoclutter-render.c: (draw_glyph): use g_slice_new0
instead of g_slice_new when allocating the glyph_info, avoiding a
branch based on uninitialized memory.
2008-03-04 11:16:05 +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
1bef7d3a1a 2008-02-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.c:
	(clutter_exp_inc_func),	(clutter_exp_dec_func): Clamp the value
	of the alpha function between [0, MAX_ALPHA]. (#800)
2008-02-26 13:57:53 +00:00
Emmanuele Bassi
b5bcee6c6c 2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (emit_event): Fix the last commit
	which inverted a condition.
2008-02-25 16:50:50 +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
Tomas Frydrych
db5b80465a 2008-02-25 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-texture.c:
	(texture_update_data):
	Set alignment based on actual data rowstride, not the texture
	width.
2008-02-25 11:34:51 +00:00
Tomas Frydrych
a9ff224ba1 2008-02-21 Tomas Frydrych <tf@openedhand.com>
* clutter/x11/clutter-backend-x11.h:
	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-x11.h:
	(clutter_x11_handle_event):
	(clutter_x11_disable_event_retrieval):
	Functions to allow to hook into external XEvent retrieval (for
	example when using clutter with gtk); NB: this API is tentative.
2008-02-21 15:18:14 +00:00
Emmanuele Bassi
4dfe577fba 2008-02-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-event-x11.c (event_translate): Ignore
	PropertyNotify events if they don't match our window.

	* clutter/x11/clutter-stage-x11.c:
	(clutter_stage_x11_request_coords): Chain up to the parent's
	request coords.
2008-02-21 12:45:48 +00:00
Emmanuele Bassi
cbf1b90895 2008-02-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-event-x11.c (event_translate): Ignore
	ConfigureNotify events if we are painting on a foreign window.

	* clutter/x11/clutter-stage-x11.c:
	(clutter_stage_x11_request_coords): Reliquish control of the
	window size, if we are painting on a foreign window. This fixes
	the GtkClutterEmbed widget.
2008-02-21 12:17:01 +00:00
Emmanuele Bassi
6e9c4de9ad 2008-02-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.c (clutter_timeline_set_delay): Relax
	the condition to allow 0 msecs of delay (meaning: no delay).
2008-02-20 17:20:36 +00:00
Tomas Frydrych
1cec9a01f6 2008-02-20 Tomas Frydrych <tf@openedhand.com>
* clutter/Makefile.am:
	Added libclutter_ ... _la_DEPENDENCIES to fix dependency tracking.
2008-02-20 16:00:33 +00:00
Tomas Frydrych
9aba9710c1 2008-02-20 Tomas Frydrych <tf@openedhand.com>
* clutter/x11/clutter-x11.h:
	* clutter/x11/clutter-backend-x11.c:
	(clutter_x11_set_display):
	Function to set X display connection prior to calling
	clutter_init(); stripped loads of trailing space.
2008-02-20 14:16:54 +00:00
Tomas Frydrych
0864743fd1 2008-02-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-marshal.list:
	* clutter/glx/Makefile.am:
	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-backend-glx.h:
	* clutter/glx/clutter-glx.h:
	* clutter/x11/Makefile.am:
	ClutterX11TexturePixmap and ClutterGLXTexturePixmap actors (#713;
	patch by Johan Bilien).
2008-02-20 12:43:54 +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
Chris Lord
015eba286f * clutter/clutter-model.c: (clutter_model_resort):
Don't return when there's no sort function set, leave that to the
        model sub-class
2008-02-19 12:31:50 +00:00
Emmanuele Bassi
68f618ce0b 2008-02-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-list-model.c:
	(clutter_list_model_iter_set_value): Fix a typo in the conversion
	code.
2008-02-18 14:32:57 +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
Matthew Allum
41fb7b6a30 2008-02-15 Matthew Allum <mallum@openedhand.com>
* clutter/pango/pangoclutter-render.c: (draw_glyph):
        More safety checks (#796, Tero Saarni)
2008-02-15 20:22:08 +00:00
Chris Lord
9b780c2716 * clutter/clutter-entry.c:
* clutter/clutter-group.c:
        * clutter/clutter-label.c:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-texture.c:
        More documentation fixes
2008-02-15 17:11:50 +00:00
Chris Lord
ecd62417d2 * clutter/clutter-entry.c: (clutter_entry_class_init):
More documentation fixes
2008-02-15 16:40:26 +00:00
Chris Lord
2c4bdc7636 * clutter/clutter-label.c: (clutter_label_class_init):
More documentation fixes
2008-02-15 16:26:00 +00:00
Chris Lord
94f884f2ef * clutter/clutter-clone-texture.c:
* clutter/clutter-texture.c: (clutter_texture_class_init):
        More documentation fixes
2008-02-15 15:49:44 +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
Matthew Allum
97b9cd92f0 2008-02-15 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_paint_init):
        Remove depth test getting turned on by default (unlike GL backend)
2008-02-15 14:30:45 +00:00
Tomas Frydrych
fa7a114ce8 2008-02-15 Tomas Frydrych <tf@openedhand.com>
* configure.ac:
	* clutter/clutter-version.h.in:
	* build/msvc_2k5/clutter-version.h:
	Removed unused --without-fpu configure option and CLUTTER_NO_FPU
	macro
2008-02-15 13:04:33 +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
4d53cb1037 2008-02-15 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-group.c: (clutter_group_query_coords):
	Disabled new code taking into account actor scale and rotation.
2008-02-15 09:13:58 +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
Chris Lord
aa9e91e261 * clutter/clutter-texture.c: (texture_get_tile_pixbuf),
(clutter_texture_get_pixbuf):
        Fix copying textures to pixbufs for tiled textures and correct #ifndef
        typo

        * clutter/clutter-util.c:
        Amend documentation
2008-02-12 17:17:52 +00:00
Matthew Allum
9c625d187d 2008-02-12 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (texture_get_tile_pixbuf):
        ifdef out 'leaked' GL only API call.
2008-02-12 15:17:28 +00:00
Tomas Frydrych
14de7190d2 2008-02-12 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-texture.c (texture_update_data):
	Fixed incorrect calculation of offset into texture data (needs to
	use width of the texture, not of the updated area).
2008-02-12 13:41:44 +00:00
Tomas Frydrych
161163cf14 2008-02-12 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-texture.c (texture_update_data):
	Fixed incorrect aligment of texture data.
2008-02-12 13:12:31 +00:00
Tomas Frydrych
b40643b86e 2008-02-12 Tomas Frydrych <tf@openedhand.com>
* clutter/x11/clutter-event-x11.c (event_translate):
	Ignore events directed at the stage window once they have been
	passed to the filter functions.
2008-02-12 12:39:22 +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
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
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
Matthew Allum
2bc7289aee 2008-20-10 Matthew Allum <mallum@o-hand.com>
* clutter/osx/clutter-stage-osx.c
        Fix up a couple of typos breaking build.
2008-02-10 13:05:08 +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
143be77205 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Move the nice graph and
	description from the Path behaviour...

	* clutter/clutter-behaviour.c: ... to the main Behaviour class.
2008-02-08 15:39:41 +00:00
Emmanuele Bassi
3c307796a3 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Add a paragraph describing
	the effects of different alpha functions on the path behaviour.
2008-02-08 14:34:58 +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
bcf968bc77 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Reference the newly
	added image showing the effects of different alpha functions
	on the same path behaviour.

	* configure.ac: Find out the prefix of some of the libraries
	we depend upon, so that gtk-doc can fix the references for us.
2008-02-08 13:40:50 +00:00
Matthew Allum
9f6d7aa483 2008-02-08 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Tidy up offscreen code, adding into realize/unrealize.
        Add more safety code.
        Improve documentation.
2008-02-08 10:37:38 +00:00
Emmanuele Bassi
07eb790188 2008-02-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c:
	(resolve_alpha_func): Use a whitelist containing the alpha function
	provided by Clutter, as a fallback in case g_module_open() does not
	work.

	(clutter_script_parse_alpha): Add an explicit warning in case we
	cannot find the alpha function used inside a UI definition.
2008-02-08 10:19:53 +00:00
Tomas Frydrych
60f162b7bf 2008-02-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-group.c:
	(clutter_group_query_coords):
	Take into account the anchor point when calculating the box size.
2008-02-07 18:37: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
Emmanuele Bassi
6b4a9c4df5 2008-02-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-parser.c:
	(clutter_script_get_type_from_symbol),
	(clutter_script_get_type_from_class): Use BIND_LAZY flag
	when looking at the symbols, so we don't load them all up.

	* clutter/clutter-script.c (resolve_alpha_func): Ditto as above.
2008-02-07 14:17:53 +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
a3c79e567c 2008-02-07 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/osx/clutter-stage-osx.c:
        * clutter/sdl/clutter-stage-sdl.c:
        * clutter/x11/clutter-stage-x11.c:
        Add at least somne basic offscreen handling into all backends.
        Remove unused clutter_stage_set_offscreen vfunc. (#549)

        * clutter/clutter-texture.c:
        Minor API doc tweak, noting rowstride source in set_area
2008-02-07 12:55:51 +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
b1615f01a4 2008-02-07 Matthew Allum <mallum@openedhand.com>
* clutter/pango/pangoclutter-render.c:
        Warn if requested glyph is too big for underlying texture cache.
        (see #666)
2008-02-07 10:42:22 +00:00
Matthew Allum
3185947520 2008-02-07 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (texture_upload_data):
        Remove random appearing 'priv->filter_quality =1' (#643)
2008-02-07 10:19:20 +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
Matthew Allum
ccc58efad4 2008-02-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Initial attempt at handling resizing/tranformed source textures.

        * clutter/pango/pangoclutter-render.c: (draw_glyph):
        Guards against freetype returning NULL bitmaps and
        thus causing device by zeros on NVIDIA drivers. (see ml)
2008-02-06 14:39:04 +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
Øyvind Kolås
19e64c65d5 * clutter/clutter-texture.c: removed spurious left over debug printf. 2008-02-05 15:37:52 +00:00
Øyvind Kolås
17f54fd7b8 * clutter/clutter-texture.c: applied modified patch from Gwenole
Beuchesne adressing bug #635. Adressing a buffer overflow in
clutter_texture_get_pixbuf() when tiling is forced.
2008-02-05 14:49:29 +00:00
Emmanuele Bassi
b884bc4dd5 2008-02-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-shader.c (clutter_shader_constructor): Keep the
	constructor line under the 80 columns using a variable.
2008-02-04 22:38:27 +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
5eb9bbc1f3 * clutter/clutter-timeline.c: (clutter_timeline_rewind): updated
documentation to take direction into account.
2008-02-04 14:35:47 +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
f6602ad265 2008-02-02 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-timeline.c:
        Document frame number limits in new-frame signal.

        * clutter/x11/clutter-event-x11.c:
        Remove uneeded error trap (#751)
2008-02-02 23:39:53 +00:00
Matthew Allum
d83442476f 2008-02-01 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
       Disable the depth test and buffer as has some strange side
       effects, mainly on x/y axis rotation with multiple layers at
       same depth (eg rotating text on a bg has very strange
       effect). Seems no clean 100% effective way to fix without other
       odd issues.. So for now move to application to handle and add
       cogl_enable_depth_test() as for custom actors (i.e groups) to
       enable if need be.
2008-02-01 18:14:54 +00:00
Matthew Allum
b14da429e0 2008-02-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (clutter_texture_new_from_actor):
        Fix typo breaking FBO rendering on anything other than a cloned
        texture.
2008-02-01 16:54:48 +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
6bb998f25f * clutter/cogl/gles/cogl.c: (cogl_rectangle_internal): increase size
of GLfixed[] array to make contents fit.
2008-02-01 12:07:23 +00:00
Emmanuele Bassi
f0145e7f83 2008-02-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h: Clean up a bit the flag-related macros.
2008-02-01 11:53:10 +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
Robert Bradford
756d2223da 2008-01-31 Rob Bradford <rob@openedhand.com>
* clutter/glx/clutter-stage-glx.c:
	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-backend-glx.h:
	Fix formatting.
2008-01-31 23:10:30 +00:00
Emmanuele Bassi
adf89a2e17 2008-01-31 Emmanuele Bassi <ebassi@sprite>
* clutter/clutter-timeline.c (clutter_timeline_skip): Don't
	add the frames outside the direction check. (thanks to benoar
	on clutter-list for spotting it)
2008-01-31 21:15:54 +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
d0b0e1bcd4 2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.h:
	* clutter/clutter-entry.c:
	(clutter_entry_set_cursor_position),
	(clutter_entry_get_cursor_position): Rename [gs]et_position()
	to [gs]set_cursor_position(), and avoid method name collisions
	with bindings for high-level languages.

	* clutter/clutter-deprecated.h: Add replacement warnings for the
	renamed methods.
2008-01-31 14:24:04 +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
Robert Bradford
e40ba6e9b7 2008-01-31 Rob Bradford <rob@openedhand.com>
* clutter/x11/clutter-backend-x11-private.h:
	Add missing start to comment

	* clutter/x11/clutter-backend-x11.c:
	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-stage-x11.c:
	* clutter/x11/clutter-x11.h:
	Remove tabs.
2008-01-31 11:24:11 +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
27dfc4e1ec 2008-01-25 Emmanuele Bassi <ebassi@sprite>
* clutter/clutter-group.c (sort_z_order): Invert condition to
	return to the same as in revision 1976.
2008-01-25 21:48:20 +00:00
Emmanuele Bassi
45c040f5c4 2008-01-25 Emmanuele Bassi <ebassi@sprite>
* clutter/clutter-label.c (clutter_label_query_coords): Check
	if the layout logical rectangle size is bigger than the bounding
	box; this usually means that the bounding box changed in one
	point and the label private allocation needs to be
	updated. (#724)
2008-01-25 21:41:50 +00:00
Emmanuele Bassi
985fa0c6b3 2008-01-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/Makefile.am: Add the generated clutter-x11 pkg-config
	file to CLEANFILES, to pass distcheck.

	* Makefile.am:
	* clutter/Makefile.am: Tweak up the Makefiles.

	* README:
	* NEWS: Release 0.5.4

	* configure.ac: Post-release bump to 0.5.5
2008-01-25 19:48:26 +00:00
Emmanuele Bassi
21e55bf635 2008-01-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-group.c: Use a shorter Z order sorting function,
	avoiding the checks.
2008-01-25 18:06:11 +00:00
Øyvind Kolås
8f6fad06ee * clutter/clutter-shader.c: added documentation strings for
ClutterShader.
2008-01-25 17:20:33 +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
25b0e6df23 2008-01-21 Emmanuele Bassi,,, <ebassi@sprite>
* clutter/clutter-behaviour-scale.c:
	(clutter_behaviour_scale_set_property),
	(clutter_behaviour_scale_class_init): Fix stupid typo in the
	y-scale-end property declaration. (#720)
2008-01-21 21:54:37 +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
Emmanuele Bassi
689f026cb5 2008-01-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-scale.c: Use separate variables for
	storing the scale boundaries; apparently, using arrays broke
	the python bindings. (#720)
2008-01-21 15:06:12 +00:00
Matthew Allum
b9d1cb9612 2008-01-21 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-group.c:
        Make sure unrealizing a group also unrealizes children.

        * clutter/glx/clutter-stage-glx.c:
        Chain up to group unrealize to make sure textures get unrealized
        when changing context (see #718)

        * clutter/clutter-texture.c:
        Formatting cleanups
2008-01-21 11:39:23 +00:00
Emmanuele Bassi
92954a76a7 2008-01-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (generate_enter_leave_events): Do not
	take the explicit reference, and let clutter_event_copy() do it
	for us. (#714, Neil Roberts)
2008-01-19 10:33:31 +00:00
Emmanuele Bassi
5b40709270 2008-01-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.c (clutter_event_copy): Take an extra
	reference on the related actor in ClutterEventCrossing that we
	explicitly unref in clutter_event_free(). (#714, Neil Roberts)
2008-01-19 10:30:29 +00:00
Emmanuele Bassi
94fb3f0c6a 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_do_event): Check the
	return value of the ::event signal for the CLUTTER_DELETE
	event type.

	* clutter/clutter-stage.c (clutter_stage_event): Emit the
	::event signal when receiving the CLUTTER_DELETE event; this
	allows to intercept the user's closing of the stage window.
2008-01-18 18:08:37 +00:00
Tomas Frydrych
c9aa5f1b1a 2007-01-18 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.h:
	Added missing proto for clutter_fixed_qdivx().
2008-01-18 12:21:40 +00:00
Tomas Frydrych
e833356561 2007-01-18 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.h:
	* clutter/clutter-fixed.c:
	Added CLUTTER_QDIV() for 64-bit division (bug 564, patch by
	Gwenole Beauchesne).
2008-01-18 12:17:41 +00:00
Emmanuele Bassi
a68067b06c 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.h: Add a gunichar field for the Unicode
	representation of the key. (#555)
2008-01-18 11:58:16 +00:00
Emmanuele Bassi
cbddf6aa1a 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h:
	* clutter/clutter-script.h:
	* clutter/clutter-stage.h:
	* clutter/clutter-units.h: Documentation fixes and additions.
2008-01-18 11:25:47 +00:00
Emmanuele Bassi
683cdf4cc1 2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add ClutterBehaviourOpacity accessors.

	* clutter/clutter-behaviour-opacity.h:
	* clutter/clutter-behaviour-opacity.c:
	(clutter_behaviour_opacity_set_bounds),
	(clutter_behaviour_opacity_get_bounds): Add accessors for the
	opacity-start and opacity-end properties.

	* clutter/clutter-behaviour-scale.h: Fix the argument name to
	avoid complaints by gtk-doc.
2008-01-18 11:02:34 +00:00
Emmanuele Bassi
02e542eb9f 2008-01-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-scale.c:
	(clutter_behaviour_scale_set_gravity): Notify on the right property
	name.
2008-01-17 14:44:43 +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
e2f72ae557 2008-01-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/cogl.h: Rename COGLhandleARB to COGLhandle.

	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/cogl/gl/cogl.c: Update GL implementation of COGL.

	* clutter/cogl/gles/cogl-defines.h:
	* clutter/cogl/gles/cogl.c: Update GLES implementation of COGL.

	* clutter/clutter-shader.c: Fix ClutterShader to use the new
	COGLhandle type instead of COGLhandlerARB.
2008-01-16 10:38:05 +00:00
Emmanuele Bassi
454b6011b6 2008-01-16 Emmanuele Bassi <ebassi@openedhand.com>
Define COGLhandleARB. (patch by Johan Bilien)

	* clutter/cogl/gles/cogl-defines.h: Define COGLhandleARB on
	GLES as well (using GLuint)

	* clutter/cogl/gles/cogl.c: Use COGLhandleARB.
2008-01-16 10:02:56 +00:00
Emmanuele Bassi
756ea6693f 2008-01-14 Tommi Komulainen <tommi.komulainen@iki.fi>
reviewed by: Emmanuele Bassi  <ebassi@openedhand.com>

	* clutter/osx/clutter-event-osx.c (_clutter_event_osx_put):
	Initialize ClutterEvent structure with zeroes (#672)

	The 'source' member was uninitialized and being referenced in
	clutter_do_event leading to crash.
2008-01-14 13:59:27 +00:00
Emmanuele Bassi
eba7612388 2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.c (timeline_timeout_func): Fix
	check if the last frame was reached by skipping a frame (#654,
	Johan Bilien)
2008-01-14 12:02:28 +00:00
Emmanuele Bassi
dd5bad99d2 2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-shader.c: Use correct format string for
	gssize. (#695, Tommi Komulainen)
2008-01-14 11:56:35 +00:00
Emmanuele Bassi
db990ccac8 2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/gl/cogl.c (cogl_get_proc_address): Implement non-GLX
	version using GModule and looking up the symbol from the running
	process. It should work when linked to library providing the
	requested function. (#696, Tommi Komulainen)
2008-01-14 11:52:04 +00:00
Emmanuele Bassi
ccc4ad400b 2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add clutter_model_insertv()

	* clutter/clutter-model.[ch] (clutter_model_insertv): Add a vector
	based insertion API, for language bindings
2008-01-14 10:13:35 +00:00
Emmanuele Bassi
3b0c46dd28 2008-01-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.c (clutter_effect_rotate): Make the
	rotate effect work on the passed axis, instead of hardcoding
	the X axis. (#700, Neil Roberts)
2008-01-12 11:05:05 +00:00
Øyvind Kolås
063386c1e2 Added COGLhandleARB since the underlying type on OSX is void*,
patch from Tommi Komulainen <tommi.komulainen@iki.fi>, (#694)
* clutter/cogl/gl/cogl-defines.h.in: Added COGLhandleARB typedef.
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/clutter-shader.c: Use COGLhandleARB instead of COGLint when
referring to program or shader handles.
2008-01-10 09:55:44 +00:00
Emmanuele Bassi
f32911c519 2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter.h:
	* clutter/clutter-list-model.[ch]: Complete the ClutterModelDefault
	to ClutterListModel rename by renaming the source files
2008-01-09 14:40:31 +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
e85d5eab84 2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.c:
	(clutter_model_default_new),
	(clutter_model_default_newv): Move the constructors in the
	right file

	* clutter/clutter-model-private.h: Add a private header for
	the ClutterModel implementations

	* clutter/clutter-model.c:
	(clutter_model_check_type),
	(clutter_model_set_n_columns),
	(clutter_model_set_column_type): Mark as private to Clutter,
	not static to ClutterModel

	* clutter/Makefile.am: Add clutter-model-private.h
2008-01-09 14:18:53 +00:00
Emmanuele Bassi
a6c7ce7117 2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c:
	(clutter_label_ensure_layout): Fix the ClutterUnits to Pango
	scale conversion.
2008-01-09 11:00:54 +00:00
Emmanuele Bassi
6fdeda0e8f 2008-01-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.c:
	(clutter_model_appendv),
	(clutter_model_prependv): Fix the columns length pre-condition
2008-01-08 14:12:11 +00:00
Emmanuele Bassi
164cb1d18a 2008-01-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.[ch]: Remove the ClutterModelDefault
	iterator symbols from the public API; the iterator implementation
	is a detail of the default ClutterModel class

	* clutter.symbols: Update
2008-01-07 17:35:07 +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
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
7649df9632 2008-01-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.c:
	(clutter_model_default_get_iter_at_row),
	(clutter_model_default_insert_row): Fix off-by-one errors

	(clutter_model_default_class_init):
	(clutter_model_default_remove_row): Move the actual removal of the
	row to...

	(clutter_model_default_row_removed): ... the signal class handler
	of ::row-removed; this way, signal handlers connected to
	::row-removed will get a valid iterator, while signal handlers
	connected to ::row-removed with the AFTER flag will get an updated
	model
2008-01-02 12:15:10 +00:00
Tomas Frydrych
6ffd3b42d5 2007-12-31 Tomas Frydrych <tf@openedhand.com>
* configure.ac:
	* clutter/Makefile.am:
	Added -no-undefined to libtool LDFLAGS for mingw/SDL backend, to
	allow building of shared libraries for win32.
2007-12-31 14:52:17 +00:00
Emmanuele Bassi
2db2de021f 2007-12-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c:
	(clutter_texture_unrealize): Do not read the pixels back if the
	texture is being destroyed
2007-12-28 15:34:24 +00:00
Emmanuele Bassi
9becd34a37 2007-12-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.c:
	(clutter_model_real_get_n_rows), (clutter_model_class_init),
	(clutter_model_get_n_rows): Provide a default implementation of
	the get_n_rows() method, so that subclasses do not strictly need
	to override it
2007-12-28 15:33:20 +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
60e14ae728 2007-12-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-enum-types.c.in: Fix the template
2007-12-25 11:41:10 +00:00
Emmanuele Bassi
09a2f0733a 2007-12-24 16:24:26 +00:00
Emmanuele Bassi
87a9232d8a 2007-12-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.c:
	* clutter/clutter-event.c:
	* clutter/clutter-stage.c: Intern more strings using the I_() macro

	* clutter/clutter-enum-types.c.in: Call g_intern_static_string()
	in the enum types template
2007-12-24 14:52:41 +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
24b24f0d53 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h: Remove the unused ::set_depth() and
	::get_depth() virtual functions. (#674, Murray Cumming)
2007-12-21 17:18:49 +00:00
Emmanuele Bassi
e3ebfdb14b 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-group.c:
	* clutter/clutter-group.h: Add the clutter_group_add() convenience
	function; it's now "undeprecated" and implemented as a macro

	* clutter/clutter-stage.h: Add clutter_stage_add() as a convenience
	macro

	* clutter/cogl/cogl.h: Include just the needed headers instead
	of the whole clutter.h; this avoids rebuild cogl when not needed
2007-12-21 16:04:39 +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
935e3c1b4e 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c:
	(clutter_label_ensure_layout): Avoid rounding errors in the layout
	computing when switching between Clutter units and Pango units.
2007-12-21 13:18:19 +00:00
Øyvind Kolås
06fe42dde9 * clutter/clutter-texture.[ch]: (bug #675) added
clutter_texture_set_area_from_rgb_data, sharing some of the
initialization infrastructure with clutter_texture_set_from_rgb_data.
2007-12-20 14:26:07 +00:00
Emmanuele Bassi
41c9528b4d 2007-12-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-container.c:
	(clutter_container_lower_child): Fix interface method call
	to actually call ClutterContainer::lower. (#670, Gwenole
	Beauchesne)
2007-12-20 10:44:28 +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
Tomas Frydrych
263d8ea5a0 2007-12-19 Tomas Frydrych <tf@openedhand.com>
* clutter/Makefile.am:
	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/pango/pangoclutter-render.c:
	* configure.ac:
	Fixes to allow cross-compilation with mingw (patch by Neil
	Roberts).
	Removed trailing whitespace.
2007-12-19 16:16:10 +00:00
Øyvind Kolås
bf66f7a3ec * clutter/clutter-main.c: (generate_enter_leave_events): synthesize
enter event (without related) and corresponding leave event when the
actor the cursor is over has been destroyed.
* clutter/clutter-event.c: (clutter_event_free): only unref the
related_actor when it actually is set.
2007-12-18 13:03:45 +00:00
Emmanuele Bassi
b14bdfe2bb 2007-12-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c:
	(unset_motion_last_actor),
	(generate_enter_leave_events): Attach a callback to the destroy
	signal on the last motion actor, so if it goes away while the
	pointer is in the middle of it we can unset the pointer.

	* clutter/clutter-private.h: Store the last motion actor inside
	the global context.
2007-12-18 10:49:29 +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
Tomas Frydrych
967710c836 2007-12-17 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-rotate.c:
	Clamping of start and end angles to <0, 360).
2007-12-17 17:16:49 +00:00
Emmanuele Bassi
c4e9f32034 2007-12-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Clarify the equivalence
	between the upper and lower bounds of the ClutterAlpha and
	the position in the path. (#634)
2007-12-17 15:56:35 +00:00
Emmanuele Bassi
b728858cc3 2007-12-17 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c: Mention the fact that a ClutterTexture
	will scale its contents to fit inside the requested bounding
	box. (#661)
2007-12-17 15:51:30 +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
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
Matthew Allum
9a2a4ef7b3 2007-12-14 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl-defines.h.in:
        * clutter/cogl/gles/cogl-defines.h:
        Add CLUTTER_COGL_HAS_GL/GLES defines
2007-12-14 12:36:45 +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
6e61c0a999 2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.c:
	(clutter_model_get_sorting_column): Fix wrong type check.
2007-12-10 16:42:21 +00:00
Emmanuele Bassi
81e908f9fb 2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.[ch]: Allow unsorting the model (passing
	-1 as the sorting column)

	(clutter_model_iter_get_valist): Do not initialise twice che
	return value.
2007-12-10 16:22:05 +00:00
Emmanuele Bassi
002adaf305 2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.c (clutter_model_iter_get_value): Initialise
	the passed GValue like the other getters do.
2007-12-10 16:02:46 +00:00
Emmanuele Bassi
be8fdbe5c1 2007-12-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.h:
	* clutter/clutter-model.c:
	(clutter_model_append_value),
	(clutter_model_prepend_value),
	(clutter_model_insert_value): Add a _value() variant for the
	insertion methods, for use of the language bindings.

	(clutter_model_append), 
	(clutter_model_prepend),
	(clutter_model_insert): Do not return a boolean: insertion should
	never fail unless for a programming error, in which case we have
	plenty of warnings.
2007-12-10 15:08:53 +00:00
Emmanuele Bassi
b4bc9f8320 2007-12-10 Emmanuele Bassi,,, <ebassi@sprite>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_angle_tilt),
	(clutter_behaviour_ellipse_get_angle_tiltx),
	(clutter_behaviour_ellipse_set_tilt): Fix a double conversion
	that was messing up the returned results. (#665)
2007-12-10 12:00:08 +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
a4234ab4cf 2007-12-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_set_angle_start):
	(clutter_behaviour_ellipse_set_angle_end):
	(clutter_behaviour_ellipse_set_angle_tilt):
	(clutter_behaviour_ellipse_set_tilt):
	Removed strayed degree -> ClutterAngle conversions left over from
	API changes.

	(clutter_behaviour_ellipse_set_angle_tiltx):
	Removed stray printf.
2007-12-07 11:00:01 +00:00
Tomas Frydrych
57d523c276 2007-12-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	Fixed tilt setters and getters.
2007-12-07 07:48:57 +00:00
Tomas Frydrych
58142d7ee7 2007-12-06 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.c:
	* clutter/clutter-fixed.h:
	(clutter_sqrti):
	Added extra iteration to the Newton-Rapson algorithm for argumens
	lesser than 342 to improve precission.
2007-12-06 16:21:48 +00:00
Emmanuele Bassi
dad823f123 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c:
	(clutter_set_motion_events_frequency): Never allow the motion
	events devlivery frequency to exceed the default frame rate.
2007-12-06 12:38:04 +00:00
Emmanuele Bassi
6fae4bcfc9 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.[ch]: Use gssize, size we allow -1
	as a length (meaning "use the whole string").

	(json_parser_load_from_data): Use the passed length instead of
	using strlen() all the time.

	* clutter/clutter-script.[ch]: Ditto as above.
2007-12-06 11:25:16 +00:00
Emmanuele Bassi
6cbdff7452 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/pangoclutter-render.c: Hush a compiler warning
	by removing a unused variable.
2007-12-06 10:55:41 +00:00
Emmanuele Bassi
40df4dee2b 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c (clutter_label_ensure_layout): If the
	label has a requested size, force it when ensuring the layout.
2007-12-06 10:49:46 +00:00
Matthew Allum
8e44f0613f 2007-12-05 Matthew Allum <mallum@openedhand.com>
* clutter/pango/pangoclutter-render.c:
        Prefer rendering with npots textures over pots textures if
        available (essentially makes applying shaders easier)
        Also convert some float to fixed.
2007-12-05 21:41:43 +00:00
Emmanuele Bassi
4ff25a291c 2007-12-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.h: Rearrange declarations.

	* clutter/clutter-score.c: More documentation in the long
	description of the ClutterScore section.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add the CLUTTER_DEBUG_SHADER flag,
	for debugging the shader calls.

	* clutter/clutter-feature.h: Fix the documentation of the
	feature flags.

	* clutter/Makefile.am: Remove trailing whitespace.
2007-12-05 21:15:19 +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
dabe850551 2007-12-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.c: Better document ClutterScore
	and its API.
2007-12-04 16:56:53 +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
094c5f77b8 * clutter/clutter-shader.c: (bind_glsl_shader): use gchar instead of
GLcharARB.
2007-12-04 09:13:06 +00:00
Øyvind Kolås
4de11937e6 * clutter/clutter-shader.[ch]: do not include GL.h. 2007-12-03 17:14:49 +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
Øyvind Kolås
ace69e71b3 * clutter/glx/clutter-stage-glx.c: for extra sanity, set
stage_x11->xvisinfo = NULL after XFree. Makes using the root window
as foreign window possible.
2007-12-03 16:16:41 +00:00
Øyvind Kolås
3def17d9d2 * clutter/clutter-timeline.c: (clutter_timeline_get_delta): return the
number of milliseconds passed between new-frame events instead of
since new-frame events, thus making sure that the sum of _get_delta's
returned for all new-frame events is equal to total time elapsed.
2007-11-30 17:07:08 +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
640b9aa07b 2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.h: Complete the documentation of
	the ClutterModelClass structure members.
2007-11-30 13:22:03 +00:00
Emmanuele Bassi
9628df5ca9 2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.h:
	* clutter/clutter-timeline.c
	(timeline_timeout_func),
	(clutter_timeline_get_delta): Add a function for retrieving
	the number of frames and the time (in milliseconds) elapsed
	since the last timeline ::new-frame signal. This can be useful
	for implementing a physics engine or just for knowing how if
	and how many frames have been skipped.
2007-11-30 13:20:15 +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
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
Matthew Allum
aebf79829a 2007-11-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-main.c: (generate_enter_leave_events):
        Minor formatting tweak.
        * configure.ac:
        Typo fix from Damien Lespiau (via mailing list)
2007-11-28 23:57:26 +00:00
Emmanuele Bassi
9800eb0639 2007-11-28 Emmanuele Bassi <ebassi@openedhand.com>
Add more introspection capabilities to the base model class

	* clutter/clutter-model.h:
	* clutter/clutter-model.c:
	(clutter_model_finalize): Do no leak the column types array.

	(clutter_model_get_n_columns): Function for getting the number
	of columns inside a model.

	(clutter_model_set_names): Add API for setting the names of the
	columns.

	(clutter_model_get_column_name),
	(_model_get_column_type): Add API for getting each column's name
	and the default implementation for ClutterModel.

	(clutter_model_get_column_type),
	(_model_get_iter_at_row): Add API for getting each column's type
	and the default implementation for ClutterModel.

	* clutter.symbols: Add ClutterModel and ClutterModelIter symbols,
	and keep the symbols file sorted.
2007-11-28 18:04:24 +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
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
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
04afb1066c 2007-11-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.[ch]: Add clutter_effect_template_construct()
	function, for language bindings that need to set the alpha function
	but cannot call the clutter_effect_template_new() ctor themselves.
2007-11-28 10:27:33 +00:00
Tomas Frydrych
55d53acc8f 2007-11-27 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
        * clutter/clutter-behaviour-ellipse.h:
	(clutter_behaviour_ellipse_get_angle_startx):
	(clutter_behaviour_ellipse_set_angle_startx):
	(clutter_behaviour_ellipse_get_angle_endx):
	(clutter_behaviour_ellipse_set_angle_endx):
	(clutter_behaviour_ellipse_get_angle_tiltx):
	(clutter_behaviour_ellipse_set_angle_tiltx):
	Changed to take and return angles in degrees represented as
	ClutterFixed.
2007-11-27 12:34:28 +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
69bc9516f9 2007-11-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-stage-x11.c:
	(clutter_stage_x11_set_cursor_visible): Restore the XFixes usage,
	as it now seems to be have been fixed.
2007-11-26 12:10:20 +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
b0446d66fe 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.h: Add more documentation.
2007-11-23 17:07:46 +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
7c7b9d0568 2007-11-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/x11/clutter-stage-x11.c: Chain up the hide and show
	to the parent's implementation.
2007-11-23 13:07:04 +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
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
Emmanuele Bassi
8039922802 2007-11-22 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c (clutter_label_new_full): Set the
	terminating NULL which was removed when applying patch for
	fixing #606. (#645, Gwenole Beauchesne)
2007-11-22 13:41:00 +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
Matthew Allum
24d43aee02 2007-11-21 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_fog_set):
        Minor fixes for fog on GLES.
2007-11-21 12:30:50 +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
Øyvind Kolås
08f841304a reverted accidental commit 2007-11-20 17:06:23 +00:00
Øyvind Kolås
80ef0db622 reverted accidental commit 2007-11-20 17:05:23 +00:00
Øyvind Kolås
4320c354a3 * clutter/clutter-main.c: (clutter_do_event): avoid computing source
of events if it is already set (for synthetic events.)
* clutter/clutter-event.c: Add more information to the documentation
of clutter_event_put.
2007-11-20 17:03:53 +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
Emmanuele Bassi
6cb35639e7 2007-11-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c (clutter_texture_init): Set filter-quality
	value to 1, to fix the regression caused when applying the patch for
	buf #616.
2007-11-20 15:45:59 +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
531be399b7 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-bspline.c:
	* clutter/clutter-behaviour-depth.c:
	* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behaviour-rotate.c:
	* clutter/clutter-behaviour-scale.c: Fix gtk-doc short description.
2007-11-19 16:35:46 +00:00
Emmanuele Bassi
75d047ed4d Do not forget files when committing 2007-11-19 16:35:11 +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
Emmanuele Bassi
976df38630 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.c (timeline_timeout_func): Do not emit the
	::new-frame signal twice for the last frame. (#531)
2007-11-19 15:25: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
Emmanuele Bassi
521162a01c 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.[ch]: Constify the color argument
	for the ClutterLabel ctor. (#604)
2007-11-19 00:02:13 +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
fd0e52848b 2007-11-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model.c: Add gtk-doc section for
	ClutterModelIter

	* clutter/clutter-script.h: Fix argument name.

	* clutter/x11/clutter-x11.h:
	* clutter/x11/clutter-event-x11.c:
	* clutter/x11/clutter-backend-x11.c: Document functions and
	types.
2007-11-18 15:41:47 +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
3c0897a102 * clutter/clutter-main.c: (emit_event): renamed from deliver_event,
(emit_pointer_event): utility function to emit pointer event signals
(which takes pointer grab into account).
(emit_keyboard_event): utility function to emit keyboard event signals
(which takes keyboard grab into account).
(clutter_do_event): use the above utility functions, also reindented
the source.
2007-11-16 13:41:07 +00:00
Øyvind Kolås
3b4f603368 * clutter/clutter-main.[ch]: added clutter_grab_keyboard,
clutter_ungrab_keyboard and clutter_get_keyboard_grab, in
clutter_do_event deliver keyboard related events only to the
actor with the keyboard grab if a grab exists.
* clutter/clutter-private.h: added keyboard_grab_actor to context.
* tests/test-grab.c: added testing for testing the keyboard grab.
2007-11-15 18:00:24 +00:00
Emmanuele Bassi
c640b05182 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c:
	(clutter_texture_request_coords), (clutter_texture_class_init),
	(clutter_texture_init): Unset :sync-size if explicitly setting
	the texture size. (#616)
2007-11-15 17:38:40 +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
Øyvind Kolås
d060b3bdd7 fixing commited conflict due to interrupted commit 2007-11-15 17:34:49 +00:00
Øyvind Kolås
36c6189405 * clutter/clutter-main.c: (generate_enter_leave_events),
(clutter_do_event): moved the generation of enter/leave events
to a utility function.
2007-11-15 17:32:09 +00:00
Øyvind Kolås
266315c486 * clutter/clutter-main.c: (generate_enter_leave_events),
(clutter_do_event): moved the generation of enter/leave events
to a utility function.
2007-11-15 17:30:30 +00:00
Neil J. Patel
35cecde0c8 2007-11-15 Neil J. Patel <njp@o-hand.com>
* clutter/clutter-model.c:
	Added some more examples to the documentation, plus explained how the
	iters work internally.
2007-11-15 17:10:12 +00:00
Øyvind Kolås
53ec33f34c * clutter/clutter-main.[ch]: added clutter_grab_pointer,
clutter_ungrab_pointer and clutter_get_pointer_grab, in
clutter_do_event deliver pointer related events only to the
actor with the pointer grab if a grab exists.
* clutter/clutter-private.h: added pointer_grab_actor to context.
* tests/Makefile.am:
* tests/test-grab.c: added test for testing the pointer grab.
2007-11-15 17:08:48 +00:00
Emmanuele Bassi
0d082df3a5 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.[ch]: Add ClutterTimeline:direction
	property, defining the direction (forward or backward) of the
	timeline.

	* tests/test-timeline.c: Test the direction property.

	* clutter.symbols: Update exported symbols
2007-11-15 17:03:55 +00:00
Emmanuele Bassi
768d85dcea 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.h:
	* clutter/clutter-effect.c:
	(clutter_effect_template_new_for_duration): Add a simple constructor
	for implicitly creating a ClutterTimeline with a given duration.
2007-11-15 15:38:04 +00:00
Emmanuele Bassi
960619b9e3 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Update with the new public symbols

	* clutter/clutter-script.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.c:
	(parse_signals), (json_object_end),
	(signal_info_free), (object_info_free): Parse the "signals"
	member for GObjects.

	(clutter_script_connect_signals),
	(clutter_script_connect_signals_full): Add new API for autoconnecting
	signal handlers using the UI definition files.

	* tests/test-script.c:
	* tests/test-script.json: Test signal autoconnection.
2007-11-15 15:24:43 +00:00
Matthew Allum
3607a470aa 2007-11-15 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/eglx/Makefile.am:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-backend-egl.h:
        * clutter/eglx/clutter-eglx.h:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/eglx/clutter-stage-egl.h:
        * clutter/glx/Makefile.am:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-event-glx.c:
        * clutter/glx/clutter-glx.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        * clutter/x11/Makefile.am:
        * clutter/x11/clutter-backend-x11-private.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-stage-x11.h:
        * clutter/x11/clutter-x11.h:
        Create a new X11 backend class of which EGL and GLX 'real' backends
        then subclass. Effectively shares all X11 code between both backends
        avoids code duplication and brings many missing features to EGL X
        backend. Requires some cleanup and testing. (#518)

        * clutter/cogl/gles/cogl.c: (cogl_color):
        Add define to use color4ub only if configure finds it.
        If not fall back to old code.

        * configure.ac:
        Drop support for vincent checks.
        Drop sdles backend.
        Specifically check for color4ub call.
2007-11-15 14:45:27 +00:00
Neil J. Patel
70e09ab9df 2007-11-15 Neil J. Patel <njp@o-hand.com>
* clutter/Makefile.am:
	* clutter/clutter-model.c: 
	* clutter/clutter-model.h:
	* clutter/clutter.h:
	* tests/Makefile.am:
	* tests/test-model.c:
	Merged ClutterModel, which closes #443.
2007-11-15 10:02:25 +00:00
Emmanuele Bassi
baad0f5b0d 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-clone-texture.c (set_parent_texture): Hide the
	clone texture only if it was visible, and show it again if we
	are adding a visible texture.

	* tests/test-script.json: Test the CloneTexture actor.
2007-11-14 13:36:31 +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
bbf57ee461 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cutter-deprecated.h: Don't let everyone know from where
	we have stolen^Wtaken inspiration for the deprecation warnings.
2007-11-14 11:00:01 +00:00
Øyvind Kolås
e4deda095c * clutter/clutter-behaviour-bspline.[ch]:
Replaced clutter_behaviour_bspline_append with
clutter_behaviour_bspline_append_knots. Fixes bug #582.
* clutter/clutter-deprecated.h: added deprecation macro reflecting the
API change.
2007-11-13 14:12:51 +00:00
Øyvind Kolås
99370d1e0c * clutter/Makefile.am:
* clutter/clutter.h: include clutter-deprecated.h
* clutter/clutter-deprecated.h: added file containing macros that
provides more meaningful errors when compiling clutter using code that
uses deprecated functions.
2007-11-13 14:06:19 +00:00
Øyvind Kolås
0dee5eaac3 Renamed all properties of behaviours (and related
functions/variables/parameters)
to match the pattern something-start, something-end. Fixes bug #577.
* clutter/clutter-behaviour-depth.c:
* clutter/clutter-behaviour-depth.h:
* clutter/clutter-behaviour-ellipse.c:
* clutter/clutter-behaviour-ellipse.h:
* clutter/clutter-behaviour-path.c: 
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-behaviour-rotate.h:
* clutter/clutter-behaviour-scale.c:
* clutter/clutter-behaviour-scale.h:
* clutter/clutter-effect.c: 
* clutter/clutter-effect.h:
* clutter/clutter-script.c:
* tests/test-depth.c: 
* tests/test-script.c:
2007-11-13 13:21:56 +00:00
Øyvind Kolås
95338ba67b * clutter/clutter-event.h: made ClutterEventAny have a source field,
rearanged other structs to have source in the same position.
* clutter/clutter-event.c: (clutter_event_get_source): modified to use
the any event.
(clutter_event_free): removed unused variable.
* clutter/clutter-main.c: (deliver_event), (clutter_do_event): reduced
amount of code. As well as deliver button-release events to the stage.
2007-11-12 19:12:02 +00:00
Robert Bradford
222b012014 2007-11-08 Rob Bradford <rob@openedhand.com>
* clutter/glx/clutter-glx.h:
	Include <X11/Xutil.h> needed for the definition of XVisualInfo.
2007-11-08 21:36:14 +00:00
Robert Bradford
6997c45f84 2007-11-08 Rob Bradford <rob@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_color):
	Switch over to using glColor4ub in the GLES backend. It's available in
	the header file but missing in the reference manual.
2007-11-08 21:23:53 +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
Tomas Frydrych
3b07be19ba 2007-11-06 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-fixed.h:
	Added CLUTTER_SQRTI_ARG_MAX, CLUTTER_SQRTI_5_PERCENT,
	CLUTTER_SQRTI_10_PERCENT expressing clutter_sqrti limits.
	Stripped trailing whitespace.

        * clutter/clutter-fixed.c:
	(clutter_sqrti):
	Updated documentation, stripped trailing whitespace.

        * clutter/clutter-behaviour-path.c:
	(node_distance):
	Use clib sqrt if clutter_sqrti() precission would be worse than
	10%.
	Stripped trailing whitespace.
2007-11-06 15:46:23 +00:00
Emmanuele Bassi
9461dd216b 2007-11-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-layout.h: Add commodity macros to test for
	a specific layout flag in one line.
2007-11-06 14:45:11 +00:00
Emmanuele Bassi
7ee405a8b0 2007-11-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-box.c (clutter_box_dispose): Call unparent()
	on the children, instead of destroy(), to avoid a double free
	and a crash when destroying a ClutterBox.
2007-11-06 14:36:28 +00:00
Emmanuele Bassi
b5afa2e6ec 2007-11-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c: Break the references in ::dispose,
	and free the resources in ::finalize.
2007-11-06 14:35:22 +00:00
Øyvind Kolås
9047f9d2bc * clutter/clutter-container.[ch]: removed find_child_by_id method
from interface (and all implementations of it) since this
functionality is now implemented using a global hash.
* clutter/clutter-box.c: 
* clutter/clutter-group.c:
2007-11-05 17:12:11 +00:00
Emmanuele Bassi
8fde26cd81 2007-11-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c: Do not keep ownership of the
	pixbufs we load.
2007-11-01 17:53:10 +00:00
Øyvind Kolås
60a66695c6 * clutter/clutter-main.c: (_clutter_do_pick): disable dithering
when painting in pick mode.
2007-10-31 15:38:18 +00:00
Matthew Allum
ce0dd69b09 2007-10-31 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-score.c:
        Various minor improvements to ClutterScore.
2007-10-31 14:50:34 +00:00
Emmanuele Bassi
4b0139ce0e 2007-10-30 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-layout.c: Fix documentation, with regards to
	the containers handling of the children implementing the
	ClutterLayout interface.
2007-10-30 22:12:01 +00:00
Emmanuele Bassi
6fd7fbf460 2007-10-29 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac:
	* clutter/cogl/gl/cogl-defines.h.in: The OS X backend has a funny
	OpenGL header location, so it basically did break every application
	including clutter/cogl.h because the GL header inclusion depended
	on symbols defined into Clutter's config.h. Now, we define the
	GL header into the configure template and use it to create the
	cogl-defines.h file cogl.h includes.
2007-10-29 16:50:34 +00:00
Emmanuele Bassi
92d4481a68 2007-10-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: Enable parsing of negative numbers;
	GScanner splits negative numbers into two tokens, so we need to
	special case them.
2007-10-29 16:45:25 +00:00
Emmanuele Bassi
6e5cded500 2007-10-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c: Add the :filename and :filename-set
	properties, to retrieve the path of the currently parsed file (if
	:filename-set is TRUE) from the ClutterScriptable implementations.
2007-10-29 15:57:59 +00:00
Matthew Allum
307305187a 2007-10-28 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-effect.c:
        Small doc fix (#584)
2007-10-28 21:57:04 +00:00
Emmanuele Bassi
d42153dc69 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c:
	(json_scanner_msg_handler): Set the GError to be returned by
	the parsing functions into the GScanner error message handler.

	(json_parser_object): Return the symbol token in case we have
	a parse error after the member name.

	(json_parser_load_from_data): Propagate the error set in the
	message handler, if any.

	* clutter/json/json-node.c (json_node_free): Unref the objects
	only if are set, to avoid a couple of needless criticals we
	get on error.

	* tests/test-script.json: More properties.
2007-10-27 19:49:39 +00:00
Emmanuele Bassi
35132fb5de 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.[ch]: Slight API change in the
	clutter_script_get_objects() function: now it takes
	object name/object return location pairs and returns the
	number of objects found and returned.

	* tests/test-script.c: Exercise the clutter_script_get_objects()
	function.
2007-10-27 19:08:59 +00:00
Emmanuele Bassi
ae7463cccf 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-rectangle.c (clutter_rectangle_paint): Use
	CGL_ENABLE_BLEND flag instead of CGL_BLEND value. (#580,
	Gwenole Beauchesne)
2007-10-27 12:26:12 +00:00
Emmanuele Bassi
f36bee599c 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.c (clutter_color_to_string): Update the
	documentation for the format of the returned string, and remove
	the note: now clutter_color_parse() can parse the string this
	function returns.
2007-10-27 12:14:18 +00:00
Emmanuele Bassi
cdb495d49a 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/pangoclutter-render.c: Last usage of guint
	replaced with COGLuint. (Tommi Komulainen)
2007-10-27 12:01:51 +00:00
Matthew Allum
737ac37f27 2007-10-26 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl-defines.h:
        * clutter/cogl/gles/cogl-defines.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        Switch from use of guint to COGLuint. Avoids problems when
        guint != GLuint on some platforms, i.e OSX.
        (Tommi Komulainen, #526)

        * clutter/Makefile.am:
        * clutter/osx/Makefile.am:
        * clutter/osx/clutter-backend-osx.c:
        * clutter/osx/clutter-backend-osx.h:
        * clutter/osx/clutter-event-osx.c:
        * clutter/osx/clutter-osx.h:
        * clutter/osx/clutter-stage-osx.c:
        * clutter/osx/clutter-stage-osx.h:
        * configure.ac:
        Add initial Cocoa/OSX Backend (by Tommi Komulainen, see #526)
2007-10-26 22:06:45 +00:00
Emmanuele Bassi
b7b7c60e5f 2007-10-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c: Add a :x-align property for aligning
	the text in the entry, in case the actor is wider than the
	text it shows.
2007-10-26 15:56:17 +00:00
Emmanuele Bassi
7b6f602956 2007-10-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c: Add a --clutter-default-fps run-time
	switch and CLUTTER_DEFAULT_FPS environment variable support for
	setting the default frame-rate at run-time.
2007-10-26 15:47:39 +00:00
Emmanuele Bassi
6ab8c4d28a 2007-10-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.h:
	* clutter/clutter-script.c: Add a ::get_type_from_name() virtual
	function for bindings to override. The current implementation
	calls g_type_from_name() and our lazy class resolver.

	* clutter.symbols: Update.

	* doc/reference/clutter-sections.txt: Update.
2007-10-26 09:05:06 +00:00
Emmanuele Bassi
736bbfb713 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Reverse the list of
	parsed knots, to preserve the real ordering after prepending
	them (thanks to Øyvind for spotting this).

	* clutter/clutter-behaviour-bspline.c: Ditto as above.
2007-10-25 20:06:48 +00:00
Emmanuele Bassi
5a260b7ac3 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-parser.c: Unset the GValue when
	getting a ClutterUnit from a JSON node.
2007-10-25 15:14:06 +00:00
Emmanuele Bassi
7b242370f0 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-bspline.c: Implement the
	ClutterScriptableIface to parse the custom "knots" property.
2007-10-25 15:05:19 +00:00
Emmanuele Bassi
adb5d0275f 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/cogl.h: Do not include <clutter/clutter.h>.
2007-10-25 14:43:55 +00:00
Emmanuele Bassi
6738114bc2 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-path.c: Implement the
	ClutterScriptableIface to parse the custom "knots" property.
2007-10-25 14:42:15 +00:00
Emmanuele Bassi
33ef32d7cd 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c (clutter_texture_set_property): Do
	not try to set NULL pixbufs.
2007-10-25 14:37:41 +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
6c01499abf 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter.h:
	* clutter/clutter-scriptable.[ch]: Add the ClutterScriptable
	interface; by implementing this interface, a class can
	override the UI definition parsing and transform complex data
	types into GObject properties, or allow custom properties.

	* clutter/clutter-script.c:
	* clutter/clutter-script-parser.c:
	* clutter/clutter-script-private.h: Rearrange the code and
	use the ClutterScriptable interface to parse and build the
	custom properties. This cleans up the code and also it makes
	it more reliable (the complex type parsing is now done using
	the target type and not just the name of the property).
2007-10-25 14:34:54 +00:00
Emmanuele Bassi
9c38eead46 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-json.h: Header for including the JSON
	parsing and data types.

	* clutter/json/json-types.h: Add JSON_NODE_VALUE_TYPE() macro.

	* clutter/json/Makefile.am: Install the JSON headers into a
	private location. This might change in the future, and might
	also cause collisions if you're using JSON-GLib and Clutter
	at the same time, so be warned.
2007-10-25 14:32:29 +00:00
Emmanuele Bassi
eec01b6e73 Check width in ClutterLabel::request_coords
If we get a size requisition, and we have ellipsization active,
check if we are getting less space than what the layout needs
and recompute the width.
2007-10-22 15:47:07 +00:00
Emmanuele Bassi
509799fa0c Change the clutter_color_from_string() format
The format should be "%02x%02x%02x%02x" because we use guint8 for each
component, and not guint16. The string before was completely broken.
2007-10-22 15:46:56 +00:00
Emmanuele Bassi
e937961870 2007-10-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c (clutter_entry_paint): Fixed off by
	one error. (#566, Gwenole Beauchesne)
2007-10-19 10:15:57 +00:00
Øyvind Kolås
373da11329 * clutter/clutter-timeline.c: (clutter_timeline_set_duration):
rearranged arithemetic to allow specifying duration with sub second
precision (also enables durations smaller than one second).
2007-10-18 13:47:21 +00:00
Emmanuele Bassi
f1105807fb 2007-10-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.h:
	* clutter/clutter-script.c: Allow id-less objects: as long
	as they have a "type" member, a unique id will be provided.

	(json_object_end): Add merge id to the object information
	structure.

	(apply_behaviours), (add_children): Keep the unresolved
	objects around.

	(construct_stage), (clutter_script_construct_object): If an
	object has unresolved children or behaviours try resolving
	them when we ask for it.

	(json_parse_end), (clutter_script_ensure_objects): Ensure
	that the objects are fully constructed as best as we can when
	finished parsing.

	(object_info_free), (remove_by_merge_id):
	(clutter_script_unmerge_objects): Remove objects under the
	same merge id returned by the loading functions. (Fixes
	bug #558)
2007-10-18 12:31:07 +00:00
Matthew Allum
1ccbe04505 2007-10-18 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-score.c:
        * clutter/clutter-score.h:
        * tests/test-score.c:
        Implement more ClutterScore functionality.
2007-10-17 23:03:38 +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
Øyvind Kolås
1a80c688fe * clutter/pango/pangoclutter-render.c: (tc_get): Provide for blank
rows/columns of pixels between adjecant glyphs in the texture cache to
avoid bilinear interpolation spillage at edges of glyphs.
2007-10-16 19:14:52 +00:00
Øyvind Kolås
a7fb3a78d2 * clutter/clutter-main.c: (clutter_do_event): allow motion events
only delivered to stage to be chaugt in the capture phase as well
as the bubbling phase.
2007-10-16 16:35:02 +00:00
Emmanuele Bassi
143a5937e2 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-object.c: Automatically transform every
	delimiter into an underscore.

	* clutter/clutter-script.c: Implement the "parent_texture"
	property translation for ClutterCloneTextures, using the
	passed id of the parent texture.
2007-10-16 14:40:00 +00:00
Emmanuele Bassi
f6c83a224e 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.[ch]: Added ClutterTimeline:duration,
	a property for setting the duration of a timeline in milliseconds.
	The property comes with accessors and a new constructor. The
	frame rate used is the default value.

	* clutter/clutter-private.h:
	* clutter/clutter-main.[ch]: Add clutter_get_default_frame_rate()
	and clutter_set_default_frame_rate(); these two functions control
	the default frame rate to be used when creating timelines. Currently
	is set to 60 frames-per-second.
2007-10-16 13:41:34 +00:00
Emmanuele Bassi
5737a8b79a 2007-10-16 Emmanuele bassi <ebassi@openedhand.com>
* clutter/clutter-color.c: Copy the alpha when shading.
2007-10-16 09:39:15 +00:00
Tomas Frydrych
f8de77ac92 2007-10-16 Tomas Frydrych <tf@o-hand.com>
* clutter.symbols:
	Added a bunch of missing symbols.
	
	* clutter/clutter-script.c:
	* json/json-node.c:
	Use g_slice_new0 instead of g_slice_new to avoid passing garbage to functions.
	
	* tests/test-threads.c:
	Replaced non-portable sleep() with g_usleep().
2007-10-16 08:34:16 +00:00
Tomas Frydrych
922a7e4d21 2007-10-15 Tomas Frydrych <tf@o-hand.com>
* clutter/cogl/gl/cogl-defines.h:
	* clutter/cogl/gl/cogl.c:
	Fixed up GL include for windows.
2007-10-15 19:19:42 +00:00
Matthew Allum
dd99f024bf 2007-10-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        More events documentation.

        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        Add synthetic flag and make put_event use it
        (via modded patch from pippin)

        * clutter/clutter-main.c: (clutter_do_event):
        dont use put event anymore when pushing enter/leave events.
2007-10-15 16:50:59 +00:00
Emmanuele Bassi
2a891520fa 2007-10-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/Makefile.am: Compile with the debug flags, if
	set.
2007-10-15 09:09:04 +00:00
Emmanuele Bassi
12b9b3bbfc 2007-10-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Add a :depth property, so we can
	set the initial depth of an actor inside the UI definition
	files.
2007-10-12 12:42:54 +00:00
Emmanuele Bassi
abc529aaec 2007-10-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (construct_timline),
	(parse_member_to_property): Transfer ownership of the
	implicit timelines to the behaviour, so that they get
	unreferenced when the behaviour is destroyed.

	(parse_member_to_property): Reverse the list of children
	and behaviours.
2007-10-12 09:43:27 +00:00
Tomas Frydrych
174bd04b49 2007-10-12 Tomas Frydrych <tf@o-hand.com>
Portability fixes:

	* clutter/clutter-private.h:
	Bracket #include "unistd.h" with #ifdef HAVE_UNISTD_H

	* clutter/clutter-fixed.c:
	Use "", not <> for inclusion of local files.

	(clutter_sqrtx): forward declare local variables.

	* clutter/clutter-debug.h:
	Added non-gcc (c99) implementation of variadic debug macros for
	when not compiling with gcc.

	* clutter/pango/pangoclutter-render.c:
	Fixed some strange uses of CLUTTER_NOTE() + stripped trailing
	whitespace.
2007-10-12 09:39:41 +00:00
Tomas Frydrych
abd6832dd9 2007-10-12 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-backend.c:
        * clutter/clutter-behaviour-depth.c:
        * clutter/clutter-box.c:
        * clutter/clutter-clone-texture.c:
        * clutter/clutter-container.c:
        * clutter/clutter-entry.c:
        * clutter/clutter-feature.c:
        * clutter/clutter-fixed.c:
        * clutter/clutter-group.c:
        * clutter/clutter-hbox.c:
        * clutter/clutter-label.c:
        * clutter/clutter-layout.c:
        * clutter/clutter-media.c:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-score.c:
        * clutter/clutter-script.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-texture.c:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeout-pool.c:
        * clutter/clutter-vbox.c:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-event-glx.c:
        * clutter/json/json-array.c:
        * clutter/json/json-generator.c:
        * clutter/json/json-node.c:
        * clutter/json/json-object.c:
        * clutter/json/json-parser.c:
        * clutter/sdl/clutter-backend-sdl.c:
        * clutter/sdl/clutter-event-sdl.c:
        * clutter/sdl/clutter-stage-sdl.c:

	Fixedup config.h inclusion (must always be bracketed with #ifdef
	HAVE_CONFIG_H).
2007-10-12 08:17:00 +00:00
Tomas Frydrych
422c725a47 2007-10-11 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-entry.c:
	Avoid using C++ reserverd words to name variables.
2007-10-11 15:07:36 +00:00
Øyvind Kolås
914c930cee Improve the quality of text when the scale it is shown at screen is
smaller than the original, seems to work well down to about a scale
of 50%.
* clutter/pango/pangoclutter-fontmap.c:
(pango_clutter_font_map_default_substitute): turn off hinting.
* clutter/pango/pangoclutter-render.c: request linear filtering
instead of nearest neighbour when scaling down.
* tests/test-text.c: replaced test with a a test that renders a sample
grid with various pixel sizes and scales for visual inspection of
text rendering quality.
2007-10-11 12:18:01 +00:00
Emmanuele Bassi
52065e88bc 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-backend-glx.c: Fix documentation of the
	filter function API.

	* clutter/clutter-score.c:
	* clutter/clutter-effect.c:
	* clutter/clutter-actor.c: Documentation fixes.

	* clutter/clutter-actor.h: Automatically typecast to ClutterActor
	when setting/checking flags.
2007-10-10 16:02:54 +00:00
Emmanuele Bassi
261bc4c4f5 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Beautify the ClutterActor documentation.
2007-10-10 14:51:25 +00:00
Emmanuele Bassi
717a82303a 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Remove the ::event-after signal:
	three event layers to connect to seems a bit overkill.

	(clutter_actor_event): Return FALSE, not TRUE by default,
	as g_signal_emit() will change the return value if no
	handlers are connected

	* clutter/clutter-stage.c: Emit ::notify when we change
	the fullscreen property.

	* clutter/clutter-script.c: Add more documentation for the
	definition format and keywords.

	(translate_property): Collapse the G_TYPE_ENUM and G_TYPE_FLAGS
	cases into one, to simplify the code.

	* tests/test-script.c: Test enumeration conversion by using
	a value different from the default.
2007-10-10 14:29:29 +00:00
Matthew Allum
6216ce659c 2007-10-10 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-event.c:
        * clutter/clutter-main.c:
        * tests/test-events.c:
        Add basic W3 DOM  event 'capture' like functionality.
2007-10-10 13:04:34 +00:00
Emmanuele Bassi
a4b7abd18e 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Parse flags like we parse enums.
2007-10-10 13:01:09 +00:00
Emmanuele Bassi
8b55030c14 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-types.h:
	* clutter/json/json-array.c:
	* clutter/json/json-object.c: Resync with the upstream copy
	of JSON-GLib; add json_object_remove_member() and
	json_array_remove_element() and fix the g_hash_table_get_keys()
	replacement for GLib 2.12.

	* clutter/clutter-script.c: Clean up the complex properties
	parsing code.
2007-10-10 12:51:51 +00:00
Emmanuele Bassi
704aa0c6d7 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (json_object_end): Add "type_func"
	to the list of attributes we skip.
2007-10-10 10:44:45 +00:00
Emmanuele Bassi
7aa52af5dd 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: Use the commodity JsonNode API
	and accept bare values as root nodes.

	* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Unreference the created objects
	only if they are top-levels, like ClutterBehaviour and
	ClutterTimelines. Actors have floating references, so we
	just transfer ownership to their containers, and the stage
	is owned by the backend. Add the "type_func" key to the
	object definition, so the user can supply its own GType
	function if the class name doesn't follow the GObject rules.
	Document the ClutterScript public API.
2007-10-10 10:42:19 +00:00
Matthew Allum
8faf9b9964 2007-10-10 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        Add missing enter/leave event signals

        * clutter/clutter-main.c: (clutter_do_event):
        Set time in crossing events.
        Protect against do_pick() failing.
2007-10-09 23:45:49 +00:00
Emmanuele Bassi
475fcc64a7 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (resolve_alpha_func): Fix the
	ClutterAlphaFunc resolution function.
2007-10-09 20:04:23 +00:00
Emmanuele Bassi
b0569d0f27 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (clutter_script_get_object): Construct
	the requested object if it hasn't been already. This allows
	referencing objects within the same snippet.

	* tests/test-script.c: Declare a timeline and use it inside
	multiple behaviours; apply multiple behaviours to various
	actors, then retrieve the timeline to start it when the test
	runs.
2007-10-09 16:21:04 +00:00
Emmanuele Bassi
0d7184db20 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Allow applying behaviours directly
	inside the UI definition data.

	* tests/test-script.c: Test the "behaviours" member.
2007-10-09 15:11:01 +00:00
Robert Bradford
9e3f1e0d4c 2007-10-09 Rob Bradford <rob@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_dispose):
	Call eglTerminate() on the display when the backend is disposed of.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_realize):
	Don't use the createNativeWindow() call, it's not generic EGL.
2007-10-09 13:56:29 +00:00
Emmanuele Bassi
ac9aa06fcf 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.h:
	* clutter/clutter-script.c: Add licensing information to
	the newly added files.

	* clutter/clutter-script.c: Support creating behaviours with
	ClutterScript. ClutterAlpha objects are implicit, but
	timelines can be both explicit objects using their id or
	implicit objects. Make the property resolution and translation
	more robust. Support the pixbuf property.

	* tests/test-script.c: Test the newly added features.

	* docs/reference/clutter-docs.sgml:
	* docs/reference/clutter-sections.txt: Add ClutterScript.
2007-10-09 13:29:03 +00:00
Emmanuele Bassi
d0e46914c1 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.h: Add deprecation guards around
	CLUTTER_FIXED_INT().
2007-10-09 13:24:52 +00:00
Emmanuele Bassi
1016f27ca8 Fix typo in GLib version check 2007-10-09 12:10:11 +00:00
Emmanuele Bassi
98841e2be8 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c: Parse ClutterMargin and ClutterPadding
	properties from arrays or integers (assume pixels).
2007-10-08 16:48:22 +00:00
Emmanuele Bassi
76dd06bc7b 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Allow defining childrens for every
	container actor inside the UI definition files.
2007-10-08 16:25:10 +00:00
Matthew Allum
34a40de3c5 2007-10-08 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-private.h:
        * clutter/clutter-main.c:
        Add a hash to global clutter context mapping all parented actor
        id's to actors.
        Add clutter_get_actor_by_id() call.
        Convert picking machinery to use above.
        (performance/simpler composite actor creation)

        * clutter/clutter-stage.c: (clutter_stage_fullscreen),
        (clutter_stage_unfullscreen), (clutter_stage_event):
        Only set the fullscreen property on stage state fullscreen event(#545)
        Experimental as could be painful to implement on non X backends.
2007-10-08 16:18:33 +00:00
Emmanuele Bassi
9e81870d0b 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (json_parse_end):
	* clutter/json/json-object.c (json_object_get_members): Replace
	the GLib 2.14 API with the equivalent code for GLib < 2.14.

	* configure.ac: Revert the dependency bump.
2007-10-08 15:18:31 +00:00
Emmanuele Bassi
adcfc6d130 Fix includes in ClutterScript 2007-10-08 15:04:13 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00
Matthew Allum
bc13e907cc 2007-10-03 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        * clutter/clutter-private.h:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/glx/clutter-event-glx.c:
        * clutter/sdl/clutter-event-sdl.c:
        Remove seperate double/triple click events and replace with
        a click_count member.
        Move calculating click counts from backend to do_event()
        Initial implementation of ENTER/LEAVE events.

        * tests/test-events.c:
        Add code to test above.

        * tests/test-behave.c:
        Sync with newer API.

        * clutter/clutter-score.c:
        Silence a warning.
2007-10-03 09:28:16 +00:00
Emmanuele Bassi
4189c66a21 2007-10-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-fixed.h: Add CLUTTER_FIXED_TO_INT() and
	deprecate CLUTTER_FIXED_INT(), for symmetry with
	CLUTTER_FIXED_FROM_INT().

	* clutter/clutter-alpha.c:
	* clutter/clutter-behaviour-depth.c:
	* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-fixed.h: Use CLUTTER_FIXED_TO_INT().
2007-10-02 14:53:32 +00:00
Emmanuele Bassi
db0ed63c93 2007-10-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_get_size): Implement
	get_size() as a wrapper around clutter_actor_query_coords()
	instead of calling g_object_get() twice.

	(clutter_actor_init): Initialise the box in one call.
2007-10-02 14:45:40 +00:00
Emmanuele Bassi
090c1d11b4 2007-10-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Remove the ::event-after signal
	class handler, as it's not meant to be overridden by sub-classes.

	(clutter_actor_class_init):
	Make every event-related signal return a boolean: return TRUE
	in a signal handler to block the emission. The value is accumulated
	automatically by the signal API.

	(clutter_actor_event): If ::event returns TRUE, skip to emitting
	::event-after. Return the value accumulated by the signal emission
	chain.

	* clutter/clutter-private.h: Rename _clutter_boolean_accumlator().

	* clutter/clutter-main.c (clutter_do_event): If clutter_actor_event()
	returns TRUE then stop the event emission chain from child to parent.

	* clutter/clutter-stage.c (clutter_stage_event): Behave like
	clutter_actor_event().

	(clutter_stage_get_key_focus),
	(clutter_stage_set_key_focus): Avoid a nasty circular reference
	issue: if the actor passed to set_key_focus is NULL then the stage
	has the key focus.

	* tests/test-events.c: Update the events test with the API
	changes.
2007-10-02 14:03:36 +00:00
Tomas Frydrych
5b4b51ba7a 2007-10-01 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-actor.c:
	(clutter_actor_set_scale_with_gravityx):
	Use CLUTTER_QMUL for better precission (#532, patch by Gwenole
	Beauchesne).

	* clutter/clutter-color.c:
	(clutter_color_to_hlsx):
	Added missing CLUTTER_INT_TO_FIXED conversion (#544, patch by Neil
	Roberts).
2007-10-01 15:26:09 +00:00
Neil J. Patel
b5b613000c 2007-10-01 Neil J. Patel <njp@o-hand.com>
Patch by: Tommi Komulainen <tommi.komulainen@iki.fi>

	* clutter/clutter-entry.c: (clutter_entry_delete_text):
	Fix characters vs. bytes inconsistency (#520).
2007-10-01 13:44:33 +00:00
Matthew Allum
956f6b6238 2007-09-30 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-event.h:
        Removed unused POINTER_ENTER and POINTER_LEAVE states. (#546)
        * clutter/clutter-stage.c: (clutter_stage_fullscreen),
        (clutter_stage_unfullscreen):
        Only Change fullscreen prop if the backend implements fullscreen
        methods. (#545)
2007-09-30 22:27:52 +00:00
Øyvind Kolås
d93230d1bf 2007-09-28 Øyvind Kolås <pippin@openedhand.com>
* clutter/clutter-container.[ch]: added
	clutter_container_find_child_by_name.
2007-09-28 14:52:54 +00:00
Øyvind Kolås
99c97b3337 2007-09-28 Øyvind Kolås <pippin@openedhand.com>
* clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_realize):
	removed unused variable perspective.
	* tests/test-events.c: (main): added CLUTTER_STAGE() cast.
	* tests/test-threads.c: include unistd.h for sleep().
2007-09-28 11:03:21 +00:00
Øyvind Kolås
f7a426587c * clutter/clutter-label.c: (clutter_label_ensure_layout): avoid
calling pango_layout_set_text|markup before we've got any text.
2007-09-28 10:54:42 +00:00
Matthew Allum
ff81b9fcd2 2007-09-27 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-clone-texture.c:
        * clutter/clutter-rectangle.c:
        Include config.h in all c files (#524, Tommi Komulainen)
2007-09-27 22:20:30 +00:00
Matthew Allum
cf48841f2b 2007-09-27 Matthew Allum <mallum@openedhand.com>
Merge from stable.

        * clutter/clutter-behaviour-path.c: (path_alpha_to_position)
        Fix uninitialized variable (#480, Gwenole Beauchesne)
2007-09-27 22:15:25 +00:00
Matthew Allum
5ab0ed5a00 2007-09-27 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        Further event tweaks;
        - Ref the event actor source
        - Protect against off stage events (button releases)
        - Move more into ClutterEventAny
        - Add a click count to button event (as yet unused)
        - Minor cleanups

        * clutter/clutter-actor.c:
        Make scale x/y a property.

        * clutter/clutter-private.h:
        Remove _clutter_actor_apply_modelview*

        * clutter/eglx/clutter-backend-egl.c:
        Warning cleanup

        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/sdl/clutter-stage-sdl.c:
        Avoid setting viewport directly, but set sync flag.

        * clutter/pango/pangoclutter-render.c: (draw_glyph):
        Minor cleanups.

        * clutter/Makefile.am:
        * tests/Makefile.am:
        * tests/test-score.c
        * clutter/clutter.h:
        * clutter/clutter-score.h:
        * clutter/clutter-score.c:
        Add very initial (broken) ClutterScore implementation.
2007-09-27 21:38:38 +00:00
Ross Burton
bc7b1b3a16 2007-09-25 Ross Burton <ross@openedhand.com>
Merge from stable.
	
	* clutter/clutter-group.c:
	Optimise sort_z_order.
2007-09-25 13:22:24 +00:00
Emmanuele Bassi
c7ff2b7651 2007-09-17 Emmanuele Bassi <ebassi@openedhand.com>
Merge from stable

	* clutter/eglnative/clutter-event-egl.c:
	Flag every device click after the first as motion events
	instead of button presses. (#505, Shreyas Srinivasan)
2007-09-17 11:34:03 +00:00
Matthew Allum
f5483054fc 2007-09-10 Matthew Allum <mallum@openedhand.com>
Port from stable branch.

        * clutter/eglnative/clutter-event-egl.c: (clutter_event_dispatch):
        Only declare tsevent if we have tslib (#498, Robert Bragg)
2007-09-10 09:16:33 +00:00
Emmanuele Bassi
f2e1d852bb 2007-09-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.c: Remove stray include <gdk-pixbuf-xlib.h>
	in ClutterStage: the code requesting it was moved in the backends.
2007-09-06 10:37:24 +00:00
Emmanuele Bassi
b60c049e54 Fix the ClutterRectangle border drawing
Apply a patch from Neil Roberts (bug 488) for fixing the drawing of the
rectangle border, by not overdrawing the rectangle on the border and by
doing the correct check on the border colour.
2007-08-31 11:58:20 +00:00
Matthew Allum
e812b0d875 2007-08-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-effect.c: (clutter_effect_template_set_property):
        Add missing break statement. Whoops.
2007-08-29 22:32:47 +00:00
Matthew Allum
818a667836 2007-08-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-main.c: (_clutter_do_pick):
        Call glFinish before reading pixels
        * clutter/eglx/clutter-stage-egl.c: (clutter_stage_egl_realize):
        Add missing read surface in making context current.
        Above fixes via Kate Alhola.

        * clutter/glx/clutter-glx.h:
        Add missing filter funcs so there actually exported
2007-08-29 19:11:18 +00:00
Matthew Allum
1ceaf04ac7 2007-08-24 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-event.h:
        * clutter/clutter-main.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-event-glx.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        Add initial support for stage state events.
        Fix fullscreening for an already mapped stage.

        * tests/test-events.c:
        Print out info from the above. Blue button now toggles
        fullscreen.

        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        Add a setting for templates to ref or clone underlying
        timelines. (As to improve sync issues like those in foofone)

        * tests/test-timeline.c:
        Also add completed signals.

        * clutter/cogl/gles/cogl.c: (cogl_texture_image_2d):
        * configure.ac:
        Forward port from stable branch. RGB Image fixes gles
        and check for lower case libgles_cm.
2007-08-24 15:12:52 +00:00
Tomas Frydrych
e0f609e8aa Fixed rotation around x axis (bug 486).
* clutter/clutter-actor.c:
(_clutter_actor_apply_modelview_transform):
2007-08-24 06:19:06 +00:00
Emmanuele Bassi
46a3a0bec6 2007-08-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-private.h:
	* clutter/clutter-event.c: Revert the event queue ordering
	commit.

	* clutter/eglx/clutter-event-egl.c:
	* clutter/glx/clutter-event-glx.c:
	* clutter/sdl/clutter-event-sdl.c: Update backends.
2007-08-23 12:47:25 +00:00
Tomas Frydrych
a40f50fffa Fixed CCW rotation in rotate behaviour (bug 483); fixed overall path length calculation for angles > 360 in rotate and ellipse. 2007-08-22 10:33:26 +00:00
Emmanuele Bassi
fa7eb4e5a8 Remove the threads locking in the dispatchers destruction notification
The GLib main loop allows destroying sources while still in the dispatcher
function, so whether the Clutter threading lock is being held or not is
actually unpredictable by the library. This might be fixed in GLib, so we
just do what GTK+ does for the time being and wait.

See bug: http://bugzilla.gnome.org/show_bug.cgi?id=459555
2007-08-22 10:12:15 +00:00
Emmanuele Bassi
00142fdb62 Return event coordinates for 3BUTTON_PRESS events
The switch() in clutter_event_get_coords() wasn't returning the coordinates
for the 3 button press events, thus those events never reached the actors.
2007-08-21 15:48:51 +00:00
Emmanuele Bassi
59f4df5dfd Correctly initialise the multiple clicks variables 2007-08-21 15:48:44 +00:00
Emmanuele Bassi
9d61c5c856 Check for pending events from the tail of the events queue
When checking for pending events we need to look from the tail of the
list backwards.
2007-08-21 15:48:37 +00:00
Emmanuele Bassi
277d86f654 Preserve ordering when placing synthetic events in the queue
When we are in the the event translation function sometimes we need to
synthesise events: the double and triple click events are synthetic events
placed on the queue after a sequence of events has been received, for
instance.

Until now, the events were placed on the queue after the translation from
the native events was successful. This led to a loss of ordering because
we put the synthesised event on the queue before the last event that
triggered it.

This patch puts the events on the queue before translating them, with a
"pending" flag set; if the translation sequence is completed then the flag
is removed - otherwise the event is removed from the queue altogether. The
queue manipulation functions have been modified to ignore the "pending"
flag when looking for events.

This patch also adds a private structure overlayed on the ClutterEvent
struct so that we can extend the events with private data without exposing
it in the public API.
2007-08-21 15:48:13 +00:00
Emmanuele Bassi
886f47c94c Document ClutterStage properties
Add missing documentation for the ClutterStage properties and enable the
properties and signals in the gtk-doc API reference.
2007-08-21 15:47:51 +00:00
Tomas Frydrych
b1c040ce19 Fixes for 64-bit platforms; use of SSE builtin when available (patches by Gwenole Beauchesne). 2007-08-21 09:25:09 +00:00
Emmanuele Bassi
155c22b93a 2007-08-20 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am:
	* clutter/clutter-enum-types.h.in:
	* clutter/clutter-enum-types.c.in: Use template files for
	glib-mkenums; this makes the Makefile template a bit more
	clean and the enum types generation more customisable (e.g.
	when GLib 2.14 has been released, we can use g_once_init_enter()
	and g_once_init_leave() to have thread-safe GType functions
	for the enum types as well).
2007-08-20 20:16:15 +00:00