2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
authorEmmanuele Bassi <ebassi@openedhand.com>
Tue, 10 Jun 2008 17:07:52 +0000 (17:07 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Tue, 10 Jun 2008 17:07:52 +0000 (17:07 +0000)
commit473d0e9fc3cd99935b6e1ddf181752bd8703ee92
treea0065cd74f0d1cdc02177f4689dc73152e2a8a88
parentfb613411c8f65742fe3a90538409b5f82df85d27
2008-06-10  Emmanuele Bassi  <ebassi@openedhand.com>

Bug #815 - Split up request, allocation, and paint box

* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)

* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.

* clutter/clutter-deprecated.h: Add deprecated and replaced
API.

* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.

* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.

* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.

* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.

* clutter/clutter-private.h: Add new Stage private API.

* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().

* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.

* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.

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

* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.

* tests/Makefile.am: Add the layout manager test case.

* tests/test-opacity.c: Update.

* tests/test-project.c: Update.

* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
19 files changed:
ChangeLog
clutter/clutter-actor.c
clutter/clutter-actor.h
clutter/clutter-clone-texture.c
clutter/clutter-deprecated.h
clutter/clutter-entry.c
clutter/clutter-group.c
clutter/clutter-label.c
clutter/clutter-main.c
clutter/clutter-main.h
clutter/clutter-private.h
clutter/clutter-rectangle.c
clutter/clutter-stage.c
clutter/clutter-texture.c
clutter/x11/clutter-stage-x11.c
tests/Makefile.am
tests/test-layout.c [new file with mode: 0644]
tests/test-opacity.c
tests/test-project.c