Commit Graph

5235 Commits

Author SHA1 Message Date
Emmanuele Bassi
45b6d7d47a docs: Fix the annotations of ActorClass 2010-10-04 11:26:46 +01:00
Emmanuele Bassi
bdb24701f0 build: Add -xobjective-c to the fruity backend section
Like we do for the Quartz backend, we should turn on the -xobjective-c
compiler flag for the Fruity backend.

This does not mean that the backend actually works.
2010-10-04 10:52:36 +01:00
Emmanuele Bassi
db5e33d4a5 docs: Remove TODO
Clutter has long since moved all the RFE and roadmap tracking to
Bugzilla. The TODO is just a relic of an ancient past, where men
were real men, women were real women, and fuzzy little creatures
from Alpha Centauri were fuzzy little creatures from Alpha Centauri.
2010-10-04 10:44:00 +01:00
Emmanuele Bassi
0cf2f50ba6 build: Remove redundant EXTRA_DISTs
The files for the backend that we conditionally compile are
automatically added to the dist process by automake.
2010-10-04 09:09:13 +01:00
Emmanuele Bassi
7728ea951b docs: Add unused symbols to the Clutter API reference 2010-10-04 09:08:07 +01:00
Emmanuele Bassi
a29623e838 build: Unconditionally add GLES2 shaders to EXTRA_DIST 2010-10-04 08:57:29 +01:00
Emmanuele Bassi
ba09e9c6df build: Generate a stub announcement email when releasing 2010-10-03 17:21:10 +01:00
Emmanuele Bassi
df5702e463 docs: Update the RELEASING checklist 2010-10-03 16:37:41 +01:00
Emmanuele Bassi
2ed2b7eb83 build: Only generate bzip2 tarballs
Don't generate both bz2 and gz tarballs: we only use the former anyway,
and the latter just adds time for distcheck to complete.

The gz tarball will be generated by the remote installation scripts when
publishing the release.
2010-10-03 16:13:02 +01:00
Emmanuele Bassi
939333b4f2 build: Dist every backend file
All backend files should be present in the tarball generated by `make
dist`, to allow building Clutter on different platforms.
2010-10-03 16:10:44 +01:00
Emmanuele Bassi
6df136ae7c container: Do not emit a signal in the class handler
Yes, I am that stupid.
2010-10-03 15:28:14 +01:00
Emmanuele Bassi
e8d3ab4fd3 introspection: Skip Script.connect_signals_full()
It's meant to be used by language bindings, not by applications.
2010-10-03 15:16:41 +01:00
Emmanuele Bassi
19b93a94ae container: Fix the marshaller for ::child-notify
The marshaller was defined as OBJECT,OBJECT,PARAM but the signal
definition used only two arguments. Since the signal never worked
and we never got any report about it, nobody could be possibly
using the ::child-notify signal.
2010-10-03 15:12:01 +01:00
Emmanuele Bassi
96db215ed3 build: Automate the release process 2010-10-03 14:54:36 +01:00
Emmanuele Bassi
87bb089b57 docs: Update the coding style
Resynchronize with gtk+'s coding style document, since they switched to
ours.
2010-10-03 11:02:56 +01:00
Aron Xu
c4668f04f7 Update zh_CN translation.
Signed-off-by: Aron Xu <aronxu@gnome.org>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-30 15:36:59 +01:00
Emmanuele Bassi
7ac84cf7a3 container: Add child_notify() wrapper
The child_notify() virtual function on ClutterContainer does not have a
wrapper for implementations to call.
2010-09-30 14:58:23 +01:00
Emmanuele Bassi
fc344fb93a container: Implement ::child-notify
Since we added child properties to the Container interface we made a
guarantee that the ::child-notify signal would be emitted whenever a
property was set using clutter_container_child_set*().

We were lying.

The child_notify virtual function was not implemented, and the signal
was never emitted.

We also used a G_LIKELY() macro while checking for non-NULL on a
function pointer that was by default set to NULL, thus making the
setting of child properties far less efficient than needed.
2010-09-30 13:11:05 +01:00
Emmanuele Bassi
18ff73c244 build: Add more metadata to the introspection files 2010-09-30 12:43:10 +01:00
Emmanuele Bassi
6a95457b3f cookbook: Remove unused variable from the animator example 2010-09-30 12:32:08 +01:00
Emmanuele Bassi
fde6efc690 build: Make Cally.gir depend on Cogl.gir
Since Cally's introspection data depends on it.
2010-09-30 12:31:28 +01:00
Emmanuele Bassi
c202156794 Merge remote branch 'elliot/events-buttons'
* elliot/events-buttons:
  cookbook: Add recipe about handling button events
  cookbook: Example of using button press and release events
  cookbook: Example of ClutterClickAction
  cookbook: Example of simple handling of button events
2010-09-30 12:24:32 +01:00
Colin Walters
077a5b4c34 introspection: Update to changed variables for header file names
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-30 12:10:02 +01:00
Ray Strode
32d647ddd1 actor: sync entry has_clip member to clip state
The clutter stage has a list of entries of actors waiting to be redrawn.
Each entry has a "clip" ClutterPaintVolume member which represents which
how much of the actor needs to get redrawn.  It's possible for there to
be no clip associated with the entry.  In this case, the clip member is
invalid, the has_clip member should be set to false.

This commit fixes a bug where the has_clip member was not being
initially, explicitly set to false for new entries, and not being
explicitly set to false in the event the clip associated with the entry
is freed.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2350

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2010-09-30 11:54:07 +01:00
Robert Bragg
fba6335291 actor: don't ignore clip for clipped redraws
In all the changes made recently to how we handle redraws and adding
support for paint-volumes we stopped looking at explicit clip regions
passed to _clutter_actor_queue_redraw_with_clip.

In _clutter_actor_finish_queue_redraw we had started always trying to
clip the redraw to the paint-volume of the actor, but forgot to consider
that the user may have already determined the clip region for us!

Now we first check if the given clip != NUll and if so we don't need to
calculate the paint-volume of the actor.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2349
2010-09-30 11:44:12 +01:00
Robert Bragg
471659ed4b test-pixmap: add timeout to draw arcs on pixmap
As a convenient test that clipped redraws are working correctly in
response to X pixmap damage this updates test-pixmap to have a repeating
1 second timeout that draws arcs on the pixmap.
2010-09-30 11:44:12 +01:00
Robert Bragg
18e3273fb1 x11-tfp: Implement get_paint_volume virtual
One of the later changes made on the paint volume branch before merging
with master was to make paint volumes opt in only since we couldn't make
any safe assumptions about how custom actors may constrain their
painting. We added very conservative implementations for the existing
Clutter actors - including for ClutterTexture which
ClutterX11TexturePixmap is a sub-class of - but we were conservative to
the extent of explicitly checking the GType of the actor so we would
avoid making any assumptions about sub-classes. The upshot was that we
neglected to implement the get_paint_volume vfunc for
ClutterX11TexturePixmap.

This patch provides an implementation that simply reports the actor's
allocation as its paint volume. Also unlike for other core actors it
doesn't explicitly check the GType so we are assuming that all existing
sub-classes of ClutterX11TexturePixmap constrain their drawing to the
actor's transformed allocation. If anyone does want to draw outside the
allocation in future sub-classes, then they should also provide an
updated get_paint_volume implementation.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2349
2010-09-30 11:44:12 +01:00
Robert Bragg
83eb5ab88c material: tweak dot file debug code
When using the debug function _cogl_debug_dump_materials_dot_file to
write a dot file representing the sparse graph of material state we now
only show a link between materials and layers when the material directly
owns that layer reference (i.e. just those referenced in
material->layer_differences) This makes it possible to see when
ancestors of a material are being deferred too for layer state.

For example when looking at the graph if you see that a material has an
n_layers of 3 but there is only a link to 2 layers, then you know you
need to look at it's ancestors to find the last layer.
2010-09-30 11:44:12 +01:00
Elliot Smith
cb191ff6f1 cookbook: Add recipe about handling button events
Recipe covers adding handlers for button-press-event and
button-release-event signals on actors, and how to
examine the content of a ClutterButtonEvent via API functions.

The discussion section explains about click count
(the criteria for how clicks get counted, including
distance and time settings); how button numbers are reported;
and how to use ClutterClickAction as an alternative
for press + release in certain scenarios.
2010-09-30 11:12:14 +01:00
Neil Roberts
d8a9026b84 win32: Fix the CLUTTER_* keysym macros
In 4ee05f8e21 the namespace for the clutter keysym macros were
changed to CLUTTER_KEY_* but the win32 events backend was still
referring to the old names.
2010-09-30 10:59:40 +01:00
Elliot Smith
94439e5526 cookbook: Example of using button press and release events
A longer example of using button press and release events
to draw rectangles with random colors.
2010-09-30 10:48:07 +01:00
Elliot Smith
0cda6c006b cookbook: Example of ClutterClickAction
Example of handling clicks on an actor; part of the recipe on
handling button events.
2010-09-30 10:48:07 +01:00
Elliot Smith
fc9ecdf82e cookbook: Example of simple handling of button events
Added an example showing how to examine the content
of a ClutterButtonEvent in a signal handler.
2010-09-30 10:48:07 +01:00
Emmanuele Bassi
f753b0c4a1 Wrap g_object_class_install_properties()
GObject ≥ 2.26.0 added a nice convenience call for installing properties
from an array of GParamSpec. Since we're already storing all GParamSpec
in an array in order to use them with g_object_notify_by_pspec(), this
turns out nicely for us.

Since we do not depend on GLib 2.26 (yet), we need to provide a simple
private wrapper that implements the fall back to the default
g_object_class_install_property() call.

ClutterDragAction has been converted as a proof of concept.
2010-09-30 10:33:24 +01:00
Emmanuele Bassi
f090c3ea49 stage: Add more checks on the stage window retrieval
During destruction, the StageWindow implementation associated to a Stage
might be NULL. We need to add more checks for a) the IN_DESTRUCTION flag
being set and b) the StageWindow pointer being NULL. Otherwise, we will
get warnings during the destruction of the Stage.
2010-09-30 10:27:10 +01:00
Emmanuele Bassi
52c4d6fa0c build: Use platform detection to add -no-undefined
Instead of relying on the flavour passed to the configure script.
2010-09-29 17:32:57 +01:00
Emmanuele Bassi
7aaef8abee modules: Use the stable branch of json-glib 2010-09-29 16:46:36 +01:00
Neil Roberts
a278a1f940 cogl-texture-2d-sliced: Don't create the slice textures twice
Both of the cogl_texture_2d_sliced_new functions called the
slices_create function which creates the underlying GL
textures. However this was also called by init_base so the textures
would end up being created twice. This would make it leak the GL
textures and the arrays which point to them.
2010-09-29 16:14:34 +01:00
Emmanuele Bassi
54f5e168ec Bump up dependency of json-glib to 0.12.0
New stable release.
2010-09-29 16:05:55 +01:00
Emmanuele Bassi
66b0c1969c Remove the internal copy of JSON-GLib
The internal copy of JSON-GLib was meant to go away right after the 1.0
release, given that JSON-GLib was still young and relatively unknown.

Nowadays, many projects started depending on this little library, and
distributions ship it and keep it up to date.

Keeping a copy of JSON-GLib means keeping it up to date; unfortunately,
this would also imply updating the code not just for the API but for the
internal implementations.

Starting with the 1.2 release, Clutter preferably dependend on the
system copy; with the 1.4 release we stopped falling back automatically.
The 1.6 cycle finally removes the internal copy and requires a copy of
JSON-GLib installed on the target system in order to compile Clutter.
2010-09-29 15:57:28 +01:00
Emmanuele Bassi
e36cc40a49 Merge branch 'wip/non-recursive'
* wip/non-recursive:
  build: Start moving to a non-recursive layout
2010-09-29 15:55:58 +01:00
Emmanuele Bassi
0f22e922e3 modules: Fix up mesa module 2010-09-29 15:44:51 +01:00
Emmanuele Bassi
e072d797b1 modules: Add mesa and wayland to the moduleset 2010-09-29 15:28:26 +01:00
Robert Bragg
42f6364cac actor: don't dirty pick buffer in _real_queue_redraw
Since re-working how redraws are queued it is no longer necessary to
dirty the pick buffer in _clutter_actor_real_queue_redraw since this
should now reliably be handled in _clutter_stage_queue_actor_redraw.
2010-09-29 15:13:01 +01:00
Robert Bragg
51fca9d968 actor: Adds private _clutter_actor_traverse API
This adds two internal functions relating to explicit traversal of the
scenegraph:
_clutter_actor_foreach_child
_clutter_actor_traverse

_clutter_actor_foreach_child just iterates the immediate children of an
actor, and with a new ClutterForeachCallback type it allows the
callbacks to break iteration early.

_clutter_actor_traverse traverses the given actor and all of its
decendants. Again traversal can be stopped early if a callback returns
FALSE.

The first intended use for _clutter_actor_traverse is to maintain a
cache pointer to the stage for all actors. In this case we will need to
update the pointer for all descendants of an actor when an actor is
reparented in any way.
2010-09-29 15:13:01 +01:00
Robert Bragg
9a1abbc713 actor: Adds private _clutter_actor_get_n_children
This adds a private getter to query the number of children an actor has.
One use planned for this API is to avoid calling get_paint_volume on
such actors. (It's not clear what the best semantics for
get_paint_volume are for actors with children, so we are considering
leaving the semantics undefined for the initial clutter 1.4 release)
2010-09-29 15:13:01 +01:00
Robert Bragg
239d83f952 actor: explicitly track children in clutter-actor.c
We now explicitly track the list of children each actor has in a private
GList. This gives us a reliable way to know how many children an actor
has - even for composite actors that don't implement the container
interface. This also will allow us to directly traverse the scenegraph
in a more generalized fashion. Previously the scenegraph was
more-or-less represented implicitly according the implementation of
paint methods.
2010-09-29 15:13:01 +01:00
Robert Bragg
b3edd3e922 debug: fix blue outlines for paint-volumes debug opt
When using the CLUTTER_PAINT=paint-volumes debug option we try and show
when a paint volume couldn't be determined by drawing a blue outline of
the allocation instead. There was a typo though and instead we were
drawing an outline the size of the stage instead of for the given actor.
This fixes that and removes a FIXME comment relating to the blue outline
that is now implemented.
2010-09-29 15:13:00 +01:00
Robert Bragg
1a8d577168 clone: Implement get_paint_volume virtual
To allow Clutter to queue clipped redraws when a clone actor changes we
need to be able to report a paint volume for clone actors. This patch
makes ClutterClones query the paint volume of their source actor and
masquerade it as their own volume.
2010-09-29 15:13:00 +01:00
Robert Bragg
f6ba69f82d Revert "actor: don't immediately queue redraw when queuing relayout"
This reverts commit ca44c6a7d8abe9f2c548bee817559ea8adaa7a80.

In reality there are probably lots of actors that depend on the exact
semantics as they are documented so this change isn't really acceptable.
For example when the font changes in ClutterText we only queue a
relayout, and since it's possible that the font will have the same size
and the actor won't get a new allocation it wouldn't otherwise queue a
redraw.

Since queue_redraw requests now get deferred until just before a paint
run it is actually no longer a problem to queue the redraw here.
2010-09-29 15:13:00 +01:00