Commit Graph

839 Commits

Author SHA1 Message Date
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