Commit Graph

566 Commits

Author SHA1 Message Date
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
Emmanuele Bassi
ffbf7b64ab 2007-08-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-box.c: Rename a variable to fix a compiler
	warning.
2007-08-09 13:24:42 +00:00
Emmanuele Bassi
5bf83b3f0a 2007-08-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse:
	(clutter_behaviour_ellipse_get_tiltx): Remove useless
	"Return" in the API documentation.
2007-08-08 23:23:18 +00:00
Emmanuele Bassi
fae203c1ea 2007-08-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeout-pool.c: Fix sorting of the pool
	when inserting and removing timeout sources. (#449, Neil
	Roberts)
2007-08-08 21:36:16 +00:00
Emmanuele Bassi
705f47783a 2007-08-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_get_timestamp): Remove
	the microseconds remainder, which is mostly useless. (#447)
2007-08-08 13:24:43 +00:00
Emmanuele Bassi
1639b7d0b8 2007-08-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_get_timestamp): Return the
	correct number of microseconds (#447, Neil Roberts)
2007-08-08 11:22:45 +00:00
Emmanuele Bassi
4befcd0a64 Merge clutter.git/threading branch 2007-08-08 10:20:14 +00:00
Emmanuele Bassi
0176d1c8a8 Protect the G_DISABLE_CAST_CHECKS define
When compiling with cast checks already disabled there's no need to
redefine this symbol.
2007-08-07 14:21:10 +00:00
Emmanuele Bassi
fffdeb64c7 Do not mask the y1 symbol exported by math.h
Do you ever wonder what would happen if glibc were a serious library
and not the joke it actually is?
2007-08-07 14:12:58 +00:00
Emmanuele Bassi
b8d6f3aaab Do not mask index in ClutterEntry 2007-08-07 14:07:39 +00:00
Emmanuele Bassi
f57edd70d3 Even more documentation fixes 2007-08-07 14:03:58 +00:00
Emmanuele Bassi
790ef05b46 More documentation fixes 2007-08-07 14:03:30 +00:00
Emmanuele Bassi
9686266fd3 Documentation fixes 2007-08-07 14:03:08 +00:00
Matthew Allum
3a8cc2226b 2007-08-07 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
        Add a documentation note regarding ellipse setting
        the applied actors position.
2007-08-07 12:17:15 +00:00
Matthew Allum
363faccfd5 2007-08-07 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-fixed.c:
        * clutter/clutter-fixed.h:
        Add documentation.

        * clutter/cogl/gl/cogl.c: (cogl_perspective):
        Remove CFX_* shortened macros
2007-08-07 11:35:22 +00:00
Emmanuele Bassi
70c43c5a11 Remove unused clutter_threads_enter() and clutter_threads_leave()
The threads_enter() and threads_leave() functions are no-ops because Clutter
is not thread-aware nor thread-safe. Leaving them in is a source of confusion
so we just remove them.

Update the NEWS and the README files with the release notes.
2007-08-06 20:46:54 +00:00
Emmanuele Bassi
e548b53936 Add descriptions to ClutterBox and subclasses
Final touches to the ClutterBox implementation.
2007-08-06 19:37:55 +00:00
Emmanuele Bassi
0705948690 Match arguments, to make gtk-doc happy 2007-08-06 19:37:46 +00:00
Emmanuele Bassi
cc80f3bb68 Add NULL-check on the padding in clutter_box_pack() 2007-08-06 19:37:26 +00:00
Emmanuele Bassi
5c8d18e619 Add default padding to ClutterBox
To avoid using a ClutterPadding each time you add an actor to a ClutterBox
when you want the same padding around each child, you can now set the
default padding. The API is pixel-based, since it's a commodity function,
and will affect only clutter_box_pack_defaults().
2007-08-06 19:37:15 +00:00
Emmanuele Bassi
fb6d01cd76 Port ClutterVBox to the new ClutterBox implementation
Like ClutterHBox, ClutterVBox now takes into account the per-child
padding and the per-box margin.
2007-08-06 19:37:00 +00:00
Emmanuele Bassi
6005c0849d Port ClutterHBox to the new ClutterBox implementation
ClutterHBox now uses the padding associated to each packed child and uses
the margin associated to the box.
2007-08-06 19:36:43 +00:00
Emmanuele Bassi
a55cea7b2b Initialise the box allocation
We need the allocation to be < 0 for the subclasses to compute it
correctly the first time.
2007-08-06 19:36:39 +00:00
Emmanuele Bassi
54b77d12cd Update the ClutterBox API and structure
ClutterBox is meant to work like the HTML boxing model: it has a margin and
a backgrdound color, and every child actor is added with a pack type and a
padding. The ClutterBoxChild structure holds the child actor, the padding,
the packing type and the allocated coordinates for the actor.
2007-08-06 19:36:27 +00:00
Matthew Allum
b3c8ff186c 2007-08-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Correct set pixbuf property as GDK_TYPE_PIXBUF
        (fix via Neil Roberts)
2007-08-06 12:48:13 +00:00
Matthew Allum
7949cfe30a 2007-08-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-depth.c:
        Modify to work like all other behvaiours in not forcing
        increasing order in behaviour 'limits'. (#436)
        Rename limit min/max props to start/end.

        * tests/test-depth.c:
        Simplify test-case to work with above change and
        without multiple ramps

        * clutter/clutter-behaviour-rotate.c:
        Handle CW rotation when end > start and similar for CCW just
        like ellipse behaviour.
2007-08-05 23:13:27 +00:00
Matthew Allum
e1d439f9c9 2007-08-05 Matthew Allum <mallum@openedhand.com>
* README:
        * clutter/clutter-actor.c:
        Document show/hide_all behaviour correctly.
2007-08-05 13:37:49 +00:00
Emmanuele Bassi
f13707632c 2007-08-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-depth.c: Fix typo in the description.
2007-08-05 09:46:01 +00:00
Emmanuele Bassi
679ce128e4 2007-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-depth.c: Clarify the depth behaviour
	even more in the description used by the API reference.
2007-08-04 09:42:01 +00:00
Emmanuele Bassi
46506cb93e 2007-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-depth.c: Clarify that what drives
	the movement along the Z axis is the ClutterAlpha object (we
	don't have the luxury of a rollover like the opacity does);
	so, if you want to go from 0 to -100 you have to use a
	decreasing function, just as well if you want to go from 100
	to 0. Using a min-depth of 100 and a max-depth of 0 and an
	increasing function is undefined behaviour.

	* tests/Makefile.am:
	* tests/test-depth.c: Add a test case for the depth behaviour.
2007-08-04 08:59:18 +00:00
Emmanuele Bassi
7cd4ee0517 2007-08-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c (clutter_actor_set_opacity): Queue
	a redraw when setting the opacity of an actor.
2007-08-04 07:55:55 +00:00
Emmanuele Bassi
f32dca44e2 2007-08-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_angle_tilt): Avoid recursion
	by fixing a typo.

	(clutter_behaviour_ellipse_get_angle_begin),
	(clutter_behaviour_ellipse_get_angle_end): Correct the angles
	here too.

2007-08-03  Emmanuele Bassi  <ebassi@openedhand.com>
2007-08-03 15:40:11 +00:00
Emmanuele Bassi
ac5ca04fa5 2007-08-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_property): Do not forget to
	correct the angles when returning them.
2007-08-03 15:18:43 +00:00
Tomas Frydrych
b368f1833a added direction paramenter to clutter_behaviour_ellipse_new (), made direction to be respected, unclamped angle values 2007-08-03 09:52:52 +00:00
Emmanuele Bassi
4ccfc2daa2 2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	* clutter/eglx/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c: Set the default resolution
	as 96.0 dpi for every backend (we already were under this
	assumption anyway, and this makes it easier to change this
	setting per-backend).

	* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter.h: Allow setting the resolution
	for the PangoClutterFontMap object and provide the implementation
	for the PangoFcFontMap::get_resolution() virtual function. This
	allows to set the resolution of the PangoContext when retrieving
	it.

	* clutter/clutter-label.c (clutter_label_init): Set the
	resolution of the font map with the one the backend gives us.

	* clutter/clutter-entry.c (clutter_entry_init): Ditto.
2007-08-02 09:58:18 +00:00
Emmanuele Bassi
337571a805 2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.c (clutter_color_subtract): Invert the
	operands and match what the function says it does.
2007-08-02 07:40:58 +00:00
Matthew Allum
a6a998e4d8 2007-08-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-color.c: (clutter_color_from_pixel):
        Fix typo in alpha channel extraction (#434)
2007-08-01 22:09:33 +00:00
Emmanuele Bassi
fbadfa1a6b 2007-08-01 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Add floating-point variant of the
	clutter_actor_get_r[xyz]angx() functions.
2007-08-01 13:11:43 +00:00
Emmanuele Bassi
4170d7cc43 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-stage.[ch]: Fix clutter_stage_set_user_resizable()
	name, and add a getter for the property.

	* clutter/glx/clutter-stage-glx.c: Use the accessor, not
	g_object_get() to retrieve the value of the resizable property.
2007-07-31 17:01:52 +00:00
Emmanuele Bassi
6145261040 Fix previous commit 2007-07-31 16:53:17 +00:00
Emmanuele Bassi
dd93a0a13c 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.[ch]: Add clutter_backend_set_resolution()
	and clutter_backend_get_resolution(); backends should use the former
	to set the resolution of the display when initialising, while actors
	should use the latter when sizing themselves depending on the
	resolution or the font size.

	* clutter/glx/clutter-backend-glx.c: Set the resolution as 96 dpi
	as a default and query the X server when opening the display.

	* clutter/clutter-entry.c: Drop the hardcoded dpi value and use
	clutter_backend_get_resolution() to compute the default size.
2007-07-31 10:38:23 +00:00
Emmanuele Bassi
cae72ec419 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c (clutter_entry_init): Set the default
	size of the entry based on the size of the default font. (#414).
2007-07-31 08:28:17 +00:00
Emmanuele Bassi
4c5e32ad05 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/sdl/clutter-backend-sdl.c: Fix a typo in
	clutter_backend_sdl_get_features() (#426, Pan Bohui)
2007-07-31 07:58:35 +00:00
Tomas Frydrych
936fea0b37 Fixed invalid assumption about z cooordiance in calculation of
tilt in y axis.
2007-07-30 16:09:40 +00:00
Tomas Frydrych
2cc4a23820 Fixed incorrect order of modelview matrix stacking while calculating actor vertices. 2007-07-30 07:27:14 +00:00
Matthew Allum
459e8a0a9d 2007-07-30 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-backend.h:
        Remove #if 0's old backend_api
        (generating uneeded documentation)
2007-07-29 23:24:13 +00:00
Matthew Allum
0151f842d7 2007-07-30 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c:
        Fix re-relisation for large tiled textures.
        * tests/test-textures.c: (main):
        Add a show/hide to trigger above (see #442)
2007-07-29 22:55:04 +00:00
Emmanuele Bassi
249ada48bc 2007-07-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-types.h: Document ClutterGravity enumeration
	and remove the only incomplete symbol of the api reference. Now
	we are up to 79% documented symbols.
2007-07-29 09:19:37 +00:00
Emmanuele Bassi
84050c842c 2007-07-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-media.c: Document ClutterMedia signals;
	replace the implementation of clutter_media_set_filename() with
	something a wee bit more robust (and portable) than a sprintf().
2007-07-29 09:11:57 +00:00
Emmanuele Bassi
0d287fc4d4 2007-07-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c: Documentation
	fixes; kill some indirections; freeze the notification
	queue when (potentially) emitting multiple notify
	signals.

	* clutter/clutter-alpha.h: Remove the unused macro
	CLUTTER_TYPE_SMOOTHSTEP.
2007-07-29 08:54:24 +00:00
Emmanuele Bassi
ad64200aa7 2007-07-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Use GInitiallyUnowned
	as the parent structure in the ClutterActor structure
	definition; somehow, this has escaped everyone attention
	in one year and a half. Luckily, GInitiallyUnowned is
	as big as GObject.
	 
	 (clutter_actor_get_abs_position_units),
	 (clutter_actor_get_abs_position): Check parameters.

	 * clutter/clutter-texture.h: Unmangle the flags enum
	 type declaration, so that dumb parsers like h2defs.py
	 are not fooled.

	 * clutter/clutter-behaviour-ellipse.[ch]:
	 * clutter/clutter-effect.c: Fix some documentation
	 issues and make gtk-doc happy.
2007-07-28 17:11:39 +00:00
Tomas Frydrych
aed6a0cbe2 pruned ClutterBehaviourEllipse api 2007-07-27 13:44:42 +00:00
Tomas Frydrych
e17173edb4 ClutterBehaviourEllipse: allow tilt in all three axis 2007-07-27 08:18:41 +00:00
Matthew Allum
e0e27baf35 2007-07-26 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-feature.h:
        Add new stage feature flags and document.

        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/sdl/clutter-backend-sdl.c:
        Set new feature flags.

        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        Add a 'user_resizeable' setting to the backend and implement
        for glx backend.
2007-07-26 20:08:09 +00:00
Emmanuele Bassi
5724178685 Miscellaneous fixes to make gtk-doc scanner happy 2007-07-26 15:14:45 +00:00
Emmanuele Bassi
6033f7e2e3 Add missing documentation
Document ClutterGravity, ClutterRotateAxis and ClutterRotateDirection.
2007-07-26 15:05:41 +00:00
Tomas Frydrych
de27074b48 cleanup some trailing whitespace 2007-07-26 13:48:58 +00:00
Tomas Frydrych
43854a3e0a fixed ClutterBehaviourEllipse angle setters; updated ChangeLog 2007-07-26 13:48:50 +00:00
Tomas Frydrych
f1b27d9e1b added direction property to ClutterBehaviourEllipse 2007-07-26 13:48:44 +00:00
Emmanuele Bassi
b7e063c3ce Add a header for common types to avoid inclusion hell
This patch adds clutter-types.h, a header file containing some common
structures and enums, shared by different objects.
2007-07-26 13:13:23 +00:00
Emmanuele Bassi
7c29e3edbe Do not forget to initialise the priv pointer 2007-07-26 13:13:19 +00:00
Neil J. Patel
c1e84a8f3a 2007-07-26 Neil J. Patel <njp@o-hand.com>
* clutter/clutter-entry.c: (offset_to_bytes),
	(clutter_entry_ensure_cursor_position),
	(clutter_entry_new_with_text), (clutter_entry_new),
	(clutter_entry_insert_unichar), (clutter_entry_delete_chars):
	Fixed utf8 support so it actually works now, for both inserting and deleting
	chars.
	Fixed positioning of cursor for utf8 chars. Both GString and Pnago need
	bytes (not documented!) for string manipulation, so making sure all values
	were bytes and not char positions fixed the issue.
	Set a default size of 50x50 for the entry, otherwise no chars can be seen
	if the size is not set after creation (which confuses the developer).
2007-07-26 11:31:50 +00:00
Emmanuele Bassi
6b00d10549 Check for 0 frames per seconds
ClutterTimeline with zero frames per seconds are not allowed as well.
2007-07-26 11:28:30 +00:00
Emmanuele Bassi
34a119f8a7 Do not allow zero as number of frames in ClutterTimeline
A timeline with no frames is not valid, so we simply disallow setting
ClutterTimeline:num-frames to 0.
2007-07-26 11:28:25 +00:00
Emmanuele Bassi
454e493197 Fix various compiler warnings
Most of these fixes are simple symbol shadowing issues, like index and the
braindead y0 and y1 extern symbols exported by math.h on GNU libc systems.

There is a masking issue in ClutterTexture which should be checked; I ran
the tests and everything looked fine.

The rest are just unused variables.
2007-07-26 11:04:04 +00:00
Matthew Allum
73ff6900d0 2007-07-25 Matthew Allum <mallum@openedhand.com>
* Makefile.am:
        * HACKING:
        Add with initial notes on coding bits and bobs.

        * clutter/clutter-behaviour-scale.c:
        Doc fixes.

        * clutter/clutter-event.c: (clutter_event_put):
        Doc fixes.

        * clutter/glx/clutter-stage-glx.c:
        Disable wm user resizing of stage (At least for now)
        Doc fixes.
2007-07-25 22:09:53 +00:00
Tomas Frydrych
5b92cc21cb fixed endianness issue in fast fp conversions 2007-07-25 18:34:05 +00:00
Tomas Frydrych
2c97bdf456 added --disable-fast-fp-converions configure option 2007-07-25 18:17:13 +00:00
Emmanuele Bassi
a57acd0275 2007-07-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.[ch]: Ouch, clutter_label_get_alignment()
	returns a PangoAlignment, not a boolean.
2007-07-25 14:25:01 +00:00
Emmanuele Bassi
06c5bf1199 2007-07-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviour.c: Rename clutter_behaviour_clear()
	to clutter_behaviour_remove_all() to avoid method clashes in
	bindings.
2007-07-25 13:12:24 +00:00
Emmanuele Bassi
c72ab1f081 2007-07-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-bspline.c: Kill off some deep pointer
	indirections; use CLUTTER_NOTE() instead of ifdeffed out g_debug();
	add checks in every public entry point; move some initialisations
	of private data structures out of the constructor and into the
	init function, where they belong.
2007-07-25 12:54:30 +00:00
Matthew Allum
c27b00d7ef 2007-07-25 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-rotate.c:
        * clutter/clutter-behaviour-rotate.h:
        Split 'center' prop into 3 seperate props for each axis.
        Use clutter_behaviour_actors_foreach() rather than
        clutter_behaviour_get_actors() to avoid copying list.
        Call fixed point rotation funcs internally.

        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        Add new simple rotation based effect funcs.
2007-07-25 12:17:44 +00:00
Emmanuele Bassi
b43f0994ca 2007-07-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h: Include clutter-behaviour-depth.h
2007-07-25 10:36:19 +00:00
Emmanuele Bassi
403f0bdb2f 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-rotate.[ch]: Add a center property
	for the center or rotation; implement the set_bounds() methods.
2007-07-24 22:32:37 +00:00
Emmanuele Bassi
3db49c4f12 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglx/clutter-backend-egl.c:
	* clutter/eglnative/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c: Destroy the stage in every
	backend.
2007-07-24 19:03:04 +00:00
Emmanuele Bassi
107f6112cd 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-backend-glx.c: Destroy the stage, don't
	just unref it.
2007-07-24 18:59:25 +00:00
Emmanuele Bassi
5f9944fd84 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c: Add debug markers.
2007-07-24 17:39:40 +00:00
Emmanuele Bassi
a87ede2e12 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.[ch]: Add a ClutterTextureError
	to be returned by the loader functions; use the GObject API
	to allocate the private data structure instead of managing it
	ourselves; add documentation.
2007-07-24 17:38:35 +00:00
Emmanuele Bassi
a37f537cd0 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
	* clutter/clutter-box.h:
	* clutter/clutter-stage.c: Documentation fixes.
2007-07-24 17:34:06 +00:00
Matthew Allum
8e749f599d 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl-defines.h:
        Add  CGL_UNSIGNED_INT_8_8_8_8_REV (for big endian machines)
2007-07-24 16:50:34 +00:00
Matthew Allum
23c50938da 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl-defines.h:
        Another GL_TEXTURE_RECTANGLE_ARB related fix (#404)
2007-07-24 16:42:50 +00:00
Matthew Allum
7ae707faf5 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-backend.c:
        Minor build fixes (#413)
2007-07-24 16:22:29 +00:00
Emmanuele Bassi
8725ad7e60 2007-07-24 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-effect.h:
	* clutter/clutter-effect.c: Add a secondary constructor for
	ClutterEffectTemplate, for use of the bindings.
2007-07-24 16:18:52 +00:00
Matthew Allum
2bf94df497 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gles/cogl.c: (cogl_get_bitmasks):
        Fix typo calling glGetIntegerv rather than glGetInteger
2007-07-24 12:17:42 +00:00
Matthew Allum
86b869259e 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl.c: (cogl_get_features):
        learn to use cpp properly.
2007-07-24 12:06:52 +00:00
Matthew Allum
e8c091573c 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-media.c: (clutter_media_base_init):
        Remove #if 0! signal - assume causing issues with binding generation.
        (#407)

        * clutter/cogl/gl/cogl.c:
        Check GL_TEXTURE_RECTANGLE_ARB and GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB
        are defined in gl.h (#404)
2007-07-24 12:04:24 +00:00
Matthew Allum
8076d5c218 2007-07-24 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_realize):
        Create stage window with correct depth/visual. Via patch from
        Robert Bragg (#409).
2007-07-24 09:56:07 +00:00
Matthew Allum
e227bf70e2 2007-07-23 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (texture_render_to_gl_quad),
        (clutter_texture_paint):
        Dont be over aggressive in throwing criticals for unrealized
        textures. Doesn't make sense for sub classes. (#403)
2007-07-23 17:02:52 +00:00
Emmanuele Bassi
3648488017 2007-07-22 Emmanuele Bassi <ebassi@openedhand.com>
Two small fixes for correctly debugging the deinitialisation
	phase of the backend:

	* clutter/glx/clutter-backend-glx.c: Remove the event source
	after we unref the main stage.

	* clutter/glx/clutter-stage-glx.c: Add a mark at the end of the
	unrealize call (the perl bindings seem to crash before we reach
	this point).
2007-07-22 22:40:18 +00:00
Emmanuele Bassi
049f2feedc 2007-07-22 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c: Remove pointer indirections;
	add sanity checks on the public entry points; make all the public
	properties floating point (where needed) andconvert them to fixed
	point internally. (Partial fix for #389)
2007-07-22 22:35:45 +00:00
Emmanuele Bassi
fe11263b84 2007-07-22 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.[ch]: Rename ClutterBehaviour::apply
	and ClutterBehaviour::remove to ClutterBehaviour::applied and
	ClutterBehaviour::removed respectively, and emit them when the
	behaviour has been applied (or does no longer apply) to an actor.

	(clutter_behaviour_dispose), (clutter_behaviour_finalize),
	(clutter_behaviour_class_init): Move the actor removal to the
	::dispose virtual function, and remove the ::finalize one;
	document the missing properties and signals.

	(clutter_behaviour_clear): Add function to clear a behaviour:
	every actor will be unreffed and the ClutterBehaviour::removed
	signal will be emitted.
2007-07-22 22:30:47 +00:00
Matthew Allum
9157740741 2007-07-21 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-event.c:
        Correct  clutter_event_get_state () return type. Fixes #398

        * clutter/glx/clutter-stage-glx.c:
        Disable use XFixes cursor visibility funcs. Appears to have issues
        on feisty X Server at least. Fallback should work generally better.

        Fix non offscreen clutter_stage_snapshot to also rotate read pixel
        data to correct orientation.
2007-07-21 16:48:11 +00:00
Emmanuele Bassi
097c177824 Rename minimum and maximum depth properties of the depth behaviour
To follow the other simple behaviours, the ClutterBehaviourDepth:min-depth
and ClutterBehaviourDepth:max-depth properties have been renamed to
ClutterBehaviourDepth:depth-start and ClutterBehaviourDepth:depth-end
respectively.
2007-07-13 14:11:49 +00:00
Matthew Allum
410f40b578 2007-07-12 Matthew Allum <mallum@openedhand.com>
* clutter/eglnative/clutter-event-egl.c: (clutter_event_dispatch):
        Avoid sending too many events which are just pressure changes.
2007-07-12 11:30:56 +00:00
Matthew Allum
8fcfa9e2db 2007-07-12 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c: (clutter_actor_paint):
        * clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos):
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c: (cogl_get_viewport):
        * clutter/cogl/gles/cogl.c: (cogl_get_viewport):
        Based on patch from Pan Bohui, See;
        http://bugzilla.openedhand.com/show_bug.cgi?id=390

        * TODO:
        More misc updates.
2007-07-12 10:15:19 +00:00
Emmanuele Bassi
c2345a5337 Fully revert opacity checks 2007-07-11 12:01:03 +00:00
Emmanuele Bassi
191d667a7c Revert last fix 2007-07-11 11:43:02 +00:00
Emmanuele Bassi
847846923e Further fix 2007-07-11 11:41:01 +00:00
Emmanuele Bassi
0b03e393f3 2007-07-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-opacity.c:
	Don't check direction in opacity.
2007-07-11 11:37:32 +00:00
Tomas Frydrych
f605136c39 improvements to ClutterBehaviourEllipse 2007-07-11 07:16:21 +00:00
Matthew Allum
071719ffa4 2007-07-09 Matthew Allum <mallum@openedhand.com>
* TODO:
        Updates.
        * clutter/clutter-stage.c:
        * clutter/glx/clutter-stage-glx.c:
        Fix cursor visibility property.
        Force a repaint before mapping to attempt to avoid flicker.
2007-07-09 22:59:52 +00:00
Richard Purdie
eeef27ca66 Add tslib support to eglnative backend. 2007-07-09 22:25:26 +00:00
Richard Purdie
69cc294cea Tweaks to the eglnative backend. 2007-07-09 21:59:01 +00:00
Richard Purdie
87d163db5c Make the backend add_option function optional. 2007-07-09 21:56:06 +00:00
Emmanuele Bassi
588c4504a1 Handle opacity inversion in ClutterBehaviourOpacity
Always make sure that the opacity is a positive integer, even if the
start and end opacities are inverted.

Also, use the correct integer-to-pointer casts, as the opacity is an
unsigned integer.
2007-07-09 21:39:03 +00:00
Emmanuele Bassi
350bb347d8 Add ClutterBehaviourDepth
ClutterBehaviourDepth is a simple behaviour that controls the depth
property of a set of actors.
2007-07-09 21:38:43 +00:00
Matthew Allum
817cdbe2be 2007-07-06 Matthew Allum <mallum@openedhand.com>
* clutter/eglx/Makefile.am:
        * clutter/eglx/clutter-egl.h:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        Rename clutter-egl.h -> clutter-eglx.h

        * NEWS:
        * README:
        Add info re EGL split.
2007-07-06 14:08:03 +00:00
Matthew Allum
051a76c155 2007-07-06 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/eglnative/Makefile.am:
        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglnative/clutter-backend-egl.h:
        * clutter/eglnative/clutter-egl.h:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglnative/clutter-stage-egl.h:
        * clutter/eglx/Makefile.am:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-egl.h:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * configure.ac:
        Add a new 'native' EGL backend for non X based EGL's
        (i.e on framebuffer).
        Rename old backend to 'eglx' and namespace public funcs with this.

        * clutter/pango/pangoclutter-private.h:
        Add extra checks for expected defines.
2007-07-06 13:56:01 +00:00
Matthew Allum
bbdcf5542b 2007-07-06 Matthew Allum <mallum@openedhand.com>
* NEWS:
        * README:
        Updates for upcoming 0.3.1 release.
        * clutter/egl/Makefile.am:
        * clutter/egl/clutter-backend-egl.c:
        * clutter/egl/clutter-backend-egl.h:
        * clutter/egl/clutter-egl.h:
        * clutter/egl/clutter-event-egl.c:
        * clutter/egl/clutter-stage-egl.c:
        * clutter/egl/clutter-stage-egl.h:
        * configure.ac:
        Move egl -> eglx
2007-07-06 11:40:59 +00:00
Matthew Allum
7ea9e2bcbb 2007-07-06 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-box.c: (clutter_box_pick):
        Call clutter_box_paint rather than actor paint method avoiding
        infinte loop (Fixes test-boxes crasher).

        * clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_unrealize):
        Trap the X calls to avoid potential X errors.
2007-07-06 09:22:43 +00:00
Tomas Frydrych
038f79f4bc fixed clutter_goup_query_coords() to shrink if appropriate 2007-07-05 13:52:19 +00:00
Emmanuele Bassi
b66593374d Add synchronise support to the GLX backend
This patch adds a command line switch to make every X call synchronous.
It's only useful for debugging purposes, so it will not be displayed when
calling a Clutter application with --help.
2007-07-05 11:05:46 +00:00
Emmanuele Bassi
61db350ca4 2007-07-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-rectangle.c: Fix off-by-border-width bug
	in the border creation of a ClutterRectangle.
2007-07-05 10:06:08 +00:00
Tomas Frydrych
cbf2830e5f added CLUTTER_FLOAT_TO_UINT 2007-07-04 15:30:44 +00:00
Emmanuele Bassi
d7caae7f6a 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/*: Loads of fixes for the API reference.
2007-07-04 14:00:41 +00:00
Emmanuele Bassi
0d1777426d Fix the iteration in clutter_group_remove_all()
When iterating on a list while changing it, it's a good idea to keep
pointers around to avoid dirty access bugs.
2007-07-04 12:29:50 +00:00
Emmanuele Bassi
82860b5d5a Use the right argument naming for alpha functions
The name of the argument in the header must match the name in the
function implementation, for gtk-doc to work properly.
2007-07-04 12:29:44 +00:00
Emmanuele Bassi
436df772a4 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_redraw): Move the stage
	paint init call from the main redraw function...

	* clutter/clutter-stage.c (clutter_stage_paint): ... to the
	ClutterActor::paint() overridden method in ClutterStage.
2007-07-04 09:36:44 +00:00
Emmanuele Bassi
271b13cde3 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter.h:
	* clutter/Makefile.am: ClutterBackend is marked as public API,
	so install the clutter-backend.h header and include it when
	including clutter.h.
2007-07-04 09:34:24 +00:00
Emmanuele Bassi
da8bad5e03 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.[ch]: Various fixes to ClutterEntry:
	fix code style issues; add documentation for the various
	properties; add ClutterEntry:entry-padding property, for controlling
	the text padding (until we have style properties separated from
	the object properties); notify property changes; free resources
	in the ::finalize method; rename clutter_entry_add() to
	clutter_entry_insert_unichar(), and clutter_entry_remove() to
	clutter_entry_delete_chars() - for bindings and for matching the
	insert_text() and delete_text() existing methods; add a getter
	method for the max-length property.
2007-07-04 09:33:04 +00:00
Emmanuele Bassi
11775a16f0 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Use the right get_type() function
	name for ClutterVertex, and add the CLUTTER_TYPE_VERTEX macro.
2007-07-04 09:17:10 +00:00
Tomas Frydrych
b9e486f587 use ClutterVertex to pass parameters into clutter_actor_apply_transform_to_point() 2007-07-02 09:21:58 +00:00
Emmanuele Bassi
1e36656622 Remove stray debug message
This patch removes a stray g_print() added for debugging purposes, which
also produces a compiler warning.
2007-07-01 16:46:07 +00:00
Emmanuele Bassi
500d7482b6 Documentation fixes
Various fixes in the API reference build and text.
2007-07-01 16:44:24 +00:00
Emmanuele Bassi
255edd4e26 Clean up ClutterEffect
Make ClutterEffectTemplate use a pointer to the private data to avoid
a type check each time it dereferences the ClutterEffectTemplatePrivate
structure pointer.

Clean up the header file for parsing purposes.

Add a description for the gtk-doc reference.
2007-07-01 10:29:34 +00:00
Neil J. Patel
52b5bad316 2007-06-29 Neil J. Patel <njp@o-hand.com>
* clutter/clutter-entry.c: (clutter_entry_handle_key_event),
	(clutter_entry_add), (clutter_entry_remove):
	Check if unichar == 0, and if so, return, as it will cause a delete in
	the GString.
2007-06-29 17:18:13 +00:00
Matthew Allum
fda8a1d948 2007-06-29 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-texture.c: (texture_upload_data):
        Fix a SEGV for GL ES textures.

        * clutter/cogl/gles/cogl.c: (cogl_setup_viewport):
        Tweak default z_camera for 60 degrees like GL.

        * clutter/egl/clutter-backend-egl.c::
        * clutter/egl/clutter-stage-egl.c:
        Fix edpy usage (thanks to Kaj Gronholm).
2007-06-29 11:54:31 +00:00
Tomas Frydrych
9958a1e6d2 Fixed box calculation in clutter_group_query_coords() 2007-06-29 10:46:12 +00:00
Tomas Frydrych
1677e9d263 fixed crash in clutter_group_raise / _lower() 2007-06-28 15:18:20 +00:00
Matthew Allum
ca450782cb 2007-06-28 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl.c: (cogl_setup_viewport):
        Improve fixed z_camera value for defualt perspective.
        Appears pixel perfect on ATI and Intel at least
2007-06-28 09:38:42 +00:00
Tomas Frydrych
4bb51a4787 renamed clutter_actor_project_* functions 2007-06-27 15:10:52 +00:00
Tomas Frydrych
e10a0ad025 clutter_actor_project_point(): separated input from output parameters 2007-06-27 15:10:42 +00:00