1
0
Fork 0
Commit graph

455 commits

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