1
0
Fork 0
Commit graph

697 commits

Author SHA1 Message Date
Ø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
Emmanuele Bassi
7ab6f4e338 Relax the CLUTTER_CHECK_VERSION() macro check
The macro should check for a micro version greater or equal to the specified
micro version parameter. Fixes bug 477, patch by Neil Roberts.
2007-08-20 11:54:28 +00:00
Emmanuele Bassi
87d41ca788 Make gtk-doc produce the ClutterTimeline signals 2007-08-20 09:17:23 +00:00
Emmanuele Bassi
92910e3e2f Various fixes to ClutterTimeline
Emit the ClutterTimeline::new-frame signal only if we arrive there with an
active timeout source. Also, make sure to take a reference on the timeout
when emitting signals.

If the timeline is advancing of zero frames, bump it up to one frame. (bug
471, Rob Bradford)

If the user called clutter_timeline_pause() while in the ::new-frame handler
the timeout is removed and the timeline is reset, while the correct behaviour
should be to simply return. (#371, Johan Bilien)

If we skipped the last frames and we ended up over the frame number, emit
the ::new-frame signal with the last frame before emitting the ::completed
signal.

Remove the call to clutter_timeline_stop() when reaching the end of the
timeline: it was used just to remove the timeout source and it emitted the
::paused signal, which doesn't make any sense. Also rewind the timeline
after emitting the ::completed signal, so that calling get_current_frame()
in the ::completed signal handlers still work.
2007-08-19 19:09:20 +00:00
Emmanuele Bassi
c8a0faab73 No need to unref the ClutterAlpha in the effect closure
The ownership of the ClutterAlpha object is transferred to the ClutterBehaviour
used by the effect; we just need to unref the behaviour to make the alpha
object disappear.
2007-08-19 17:06:54 +00:00
Emmanuele Bassi
72ad55f677 Protect the version components 2007-08-19 17:06:41 +00:00
Emmanuele Bassi
5d0e16e2a9 Replace the note in clutter_do_event()
Use an EVENT note and not a SCHEDULER one.
2007-08-19 17:06:37 +00:00
Emmanuele Bassi
1a6deea7a7 Use g_list_insert_sorted() instead of our custom function
The clutter_timeout_pool_insert_sorted() function caused an inversion of
the timeout sources in the pool; this led to a wrong behaviour in the
execution of the timeout functions. See bug 471.

This patch drops clutter_timeout_pool_insert_sorted() in favour of the
standard g_list_insert_sorted(), which produces identical behaviours with
and without the pool.

A new test, written by Rob Bradford, has been added to the regression test
suite in order to identify sorting issues with the timeout pools.
2007-08-19 17:06:22 +00:00
Matthew Allum
5b3f06faac 2007-08-19 Matthew Allum <mallum@openedhand.com>
* clutter/eglx/clutter-event-egl.c: (clutter_event_dispatch):
        Fix clutter_thread typo (Kate Alhola)
2007-08-19 00:03:01 +00:00
Emmanuele Bassi
d0514f4de2 Fix clutter_behaviour_rotate_get_center()
Apply a patch from Neil Roberts (bug 468) that makes the get_center() method
of ClutterBehaviourRotate return the correct tuple of coordinates.

Also, fix some coding style issues and make sure to freeze and thaw the
GObject notification queue when emitting the notify signal on multiple
properties in one method.
2007-08-18 12:39:36 +00:00
Emmanuele Bassi
5cfac975d3 Update the Since version in the API that has been backported
Some of the API landed in trunk has been backported to the stable branch
after testing. This patch updates the Since: tag in the API reference to
reflect the time when the API was first added to a release.
2007-08-18 12:39:30 +00:00
Emmanuele Bassi
d7dc1d7c97 Add checks on the reactive accessors
Check for the parameter in the various "reactive" flag accessors.
2007-08-15 19:50:31 +00:00
Emmanuele Bassi
294ec333b7 Add clutter_effect_depth(), simple wrapper around the depth behaviour
This patch adds a new effect function, wrapping ClutterBehaviourDepth into
clutter_effect_depth().
2007-08-15 19:50:16 +00:00
Emmanuele Bassi
635b84971d Fix for the smoothstep alpha function
When computing the increasing smoothstep alpha value use the right type
for the results, to avoid overflowing the [0, 0xffff] range of the alpha
value.

Also use the right format when printing out the opacity and alpha values
in the opacity behaviour.
2007-08-15 13:29:43 +00:00
Emmanuele Bassi
ab948d577f Rename ClutterContainer raise() and lower() methods to avoid clashes
Language bindings will have problems with raise() and lower() bein in both
ClutterContainer and ClutterActor; hence, this patch renames
clutter_container_raise() and clutter_container_lower() to
clutter_container_raise_child() and clutter_container_lower_child(),
respectively.
2007-08-14 08:01:33 +00:00
Matthew Allum
8ad4dde16b 2007-08-13 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/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/clutter-types.h:
        Initial implementation of actors emmitting event signals (423);
        - Actors set_reactive() to receive mouse events.
          (call clutter_enable_motion_events() for per action motion events)
        - clutter_stage_set_key_focus () to direct key events.
        - Events bubble up to parents (ending at stage)
          (original source identified by clutter_event_get_source())
        TODO:
        - enter/leave notifys for actors.
        - stage specific events - fullscreen
        - grabs

        * tests/test-events.c:
        Extend a little to use new API

        * clutter/cogl/gl/cogl.c:
        * clutter/glx/clutter-backend-glx.c:
        Move get_proc_address into cogl and out of backend.
        (shaders will need it)

        * clutter/clutter-group.c: (clutter_group_real_lower):
        Fix a minor compile warning.

        * TODO:
        Sync up.
2007-08-13 20:48:01 +00:00
Emmanuele Bassi
143005bd79 Implement ::raise(), ::lower() and ::sort_depth_order() in ClutterBox
Provide the implementations of the newly added ClutterContainer virtual
functions inside ClutterBox.
2007-08-13 17:01:30 +00:00
Emmanuele Bassi
ad184c0fe3 Use the sibling to reinsert the actor at the right position
Fix a bug where we used the actor to reposition itself in the group. This
was probably masked by the sort_depth_order() call.
2007-08-13 17:01:25 +00:00
Emmanuele Bassi
adfa359e48 Add more checks to ClutterContainer::raise() and ::lower()
Check that the actors passed are actually children of the container,
as the implementations assume this.
2007-08-13 17:01:12 +00:00
Emmanuele Bassi
a60dcb9889 Make ClutterActor use ClutterContainer methods
Every direct reference to ClutterGroup has been removed, in favour of
ClutterContainer - which is the official way of creating container
actors as of 0.4.
2007-08-13 17:01:07 +00:00
Emmanuele Bassi
27ce96150e Move depth ordering methods from ClutterGroup to ClutterContainer
Since ClutterActor directly calls ClutterGroup methods we need ClutterContainer
to provide them, so that every container actor behaves the same way.

This patch makes ::raise, ::lower and ::sort_depth_order virtual functions
of the ClutterContainer interface, implemented by ClutterGroup.

The documentation has been added and deprecation warnings have been added
as well.
2007-08-13 17:00:58 +00:00
Emmanuele Bassi
9635f60064 Use clutter_container_find_child_by_id() when picking
ClutterStage now uses the newly added clutter_container_find_child_by_id()
function to find the right child in the scenegraph, using the picking id.

This fixes the test-boxes test case.
2007-08-13 17:00:52 +00:00
Emmanuele Bassi
57c0be73cd Implement ClutterContainer::find_child_by_id() in ClutterBox
Iterate (recursively) on the children of a box to find the one with the
given unique id.
2007-08-13 17:00:47 +00:00
Emmanuele Bassi
d9b421de40 Make ::find_child_by_id() a method of ClutterContainer
Finding a child by its ID is a method that should be used by every container
and not only by ClutterGroup. This is needed to actually fix the picking in
ClutterStage.
2007-08-13 17:00:37 +00:00
Matthew Allum
b5cc246f59 2007-08-12 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (texture_upload_data):
        Align texture data correctly for edge tiles.
        (#422 - Neil Roberts)
2007-08-12 21:30:14 +00:00
Emmanuele Bassi
68bbe4cd89 2007-08-12 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeout-pool.c: Fix removing and adding timeouts
	to the timeout pool during a dispatch of a timeout source already
	inside the pool. (#456, based on a patch by Neil Roberts)

	(clutter_timeout_dispatch), (clutter_timeout_pool_dispatch): Hold
	the main Clutter lock in the pool dispatch function, instead of
	the per-timeout dispatch; this guarantees that the ref+unref of
	the single timeouts are done under the main lock.
2007-08-12 13:19:31 +00:00
Matthew Allum
690d01367e 2007-08-11 Matthew Allum <mallum@openedhand.com>
Ported from 0.4 branch.

        * clutter/clutter-texture.c:
        Fix typo in clutter_texture_get_pixbuf (#458, #442?, Neil Roberts).
        Use take_object when getting pixbuf prop to avoid ref leak
2007-08-11 19:28:05 +00:00