profile/ivi/clutter.git
13 years agoInitialize color masks lazily
Kristian Høgsberg [Mon, 27 Sep 2010 17:25:50 +0000 (13:25 -0400)]
Initialize color masks lazily

When we don't use a window system drawable, we can't query the color
masks at context initialization time.  Do it lazily so we're sure to have
a current context with a valid framebuffer.

13 years agoWhen unparenting an actor, remove queued redraws for all descendants
Robert Bragg [Thu, 14 Oct 2010 15:19:55 +0000 (16:19 +0100)]
When unparenting an actor, remove queued redraws for all descendants

We need to make sure that redraws queued for actors on a stage are for
actors actually in the stage. So in clutter_actor_unparent() descend
through the children and remove redraws. Just removing the actor itself
isn't good enough since an entire hierarchy can be removed from the
stage without breaking it up into individual actors.

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

This is based on an original patch from Owen Taylor who debugged the
root cause of this bug; thanks.

13 years agostage: handle unclipped redraw following clipped
Robert Bragg [Thu, 30 Sep 2010 17:42:40 +0000 (18:42 +0100)]
stage: handle unclipped redraw following clipped

In the case that an unclipped redraw of an actor is queued after a
clipped we should update any existing ClutterStageQueueRedrawEntry
so entry->has_clip = FALSE and free the previous clip.

13 years agoconform: Start cleaning up the conformance test suite
Emmanuele Bassi [Tue, 12 Oct 2010 16:31:15 +0000 (17:31 +0100)]
conform: Start cleaning up the conformance test suite

Re-order the units into a sensible list, with basic tests at the
beginning, and per-class tests at the end - with Cogl last.

Also, start renaming the unit functions from test_<foo> to <foo>,
so that the executable wrappers and the reports have sensible names.

13 years agoconform: Implement TEST_CONFORM_TODO() correctly
Emmanuele Bassi [Tue, 12 Oct 2010 16:11:52 +0000 (17:11 +0100)]
conform: Implement TEST_CONFORM_TODO() correctly

The TODO() macro for adding new tests to the test suite has always meant
to be implemented like the TODO block in Test::More, i.e. a test that is
assumed to fail, and which warns if it unexpectedly succeeds.

Since GTest lacks the expressivity of Test::More, the implementation
just verifies that the tests marked as TODO actually fail, and will fail
if they happen to succeed - at which point the developer will have to
change the macro to SIMPLE or SKIP.

13 years agoconform: Save the revision and date inside the test report
Emmanuele Bassi [Tue, 12 Oct 2010 14:43:42 +0000 (15:43 +0100)]
conform: Save the revision and date inside the test report

Even if gtester-report doesn't use that information (yet), we should
store the revision of Clutter that generated the report, and the date in
which the test suite was ran.

13 years agoconstraints: Remove unused variable
Emmanuele Bassi [Tue, 12 Oct 2010 14:43:27 +0000 (15:43 +0100)]
constraints: Remove unused variable

13 years agotests: Generate the stub scripts using sed
Neil Roberts [Mon, 11 Oct 2010 15:16:45 +0000 (16:16 +0100)]
tests: Generate the stub scripts using sed

Instead of trying to run ./test-conformance with the -l option to
generate a list of available tests it now runs sed on the
test-conform-main.c file instead. Running the generated executable is
a pain for cross-compiling so it would be nice to avoid it unless it's
absolutely necessary. Although you could tell people who are cross
compiling to just disable the conformance tests, this seems a shame
because they could still be useful along with the wrappers for example
if the cross compile is built to a shared network folder where the
tests can be run on the actual device.

The sed script is a little more ugly than it could be because it tries
to avoid using the GNU extensions '\+' and '\|'.

The script ends up placing restrictions on the format of the C file
because the tests must all be listed on one line each. There is now a
comment to explain this. Hopefully the trade off is worth it.

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

13 years agotests: Re-enable the test-anchors conformance test
Neil Roberts [Tue, 12 Oct 2010 13:43:10 +0000 (14:43 +0100)]
tests: Re-enable the test-anchors conformance test

This test was disabled in b5d58213. The commit message doesn't mention
this so I'm guessing it was a mistake. In any case the test appears to
work now anyway so it should be re-enabled.

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

13 years agotest-flow-layout: Track stage size by default
Emmanuele Bassi [Tue, 12 Oct 2010 13:53:20 +0000 (14:53 +0100)]
test-flow-layout: Track stage size by default

Instead of requiring a special command line switch.

13 years agobind-constraint: Use ::queue-relayout
Emmanuele Bassi [Tue, 12 Oct 2010 13:09:47 +0000 (14:09 +0100)]
bind-constraint: Use ::queue-relayout

Instead of using the allocation-changed signal, use the queue-relayout
signal on the source to queue a relayout on the actor to which the
BindConstraint has been attached to.

The ::allocation-changed signal is not always enough, given that a
BindConstraint can use the position as well as the size of an actor to
drive the allocation of another; in this regard, it's much similar
to a ClutterClone, which requires a notification on every change, even
potential, and not just real ones, given the short-circuiting done
inside ClutterActor.

13 years agoconstraints: Do not check for :enabled
Emmanuele Bassi [Tue, 12 Oct 2010 13:09:17 +0000 (14:09 +0100)]
constraints: Do not check for :enabled

ClutterActor will do it for us.

13 years agoactor: Use an explicit check for NULL
Emmanuele Bassi [Tue, 12 Oct 2010 13:08:07 +0000 (14:08 +0100)]
actor: Use an explicit check for NULL

Follow the coding style, and don't use the implicit C boolean
equivalence for NULL pointers.

13 years agoactor: Queue a relayout when adding/removing constraints
Emmanuele Bassi [Tue, 12 Oct 2010 13:07:27 +0000 (14:07 +0100)]
actor: Queue a relayout when adding/removing constraints

Constraints change the way an actor is allocated; this warrants a
relayout.

13 years agoactor: Check CluterActorMeta:enabled
Emmanuele Bassi [Tue, 12 Oct 2010 13:04:21 +0000 (14:04 +0100)]
actor: Check CluterActorMeta:enabled

Instead of delegating the check for the ActorMeta:enabled property to
the sub-classes of ClutterActorMeta, ClutterActor can do the check prior
to using the ClutterActorMeta instances.

13 years agoactor: Add debugging note for allocation changes
Emmanuele Bassi [Tue, 12 Oct 2010 13:04:05 +0000 (14:04 +0100)]
actor: Add debugging note for allocation changes

13 years agoactor-box: Split out ActorBox into its own file
Emmanuele Bassi [Mon, 11 Oct 2010 14:57:22 +0000 (15:57 +0100)]
actor-box: Split out ActorBox into its own file

clutter-actor.c is getting way too large, so splitting it up wherever
possible makes sense.

13 years agovertex: Register progress function
Emmanuele Bassi [Mon, 11 Oct 2010 14:52:50 +0000 (15:52 +0100)]
vertex: Register progress function

This allows animating properties storing a ClutterVertex.

13 years agogeometry: Register a progress function
Emmanuele Bassi [Mon, 11 Oct 2010 14:44:09 +0000 (15:44 +0100)]
geometry: Register a progress function

This allows animating properties storing a ClutterGeometry.

13 years agoactor-box: Register a progress function
Emmanuele Bassi [Mon, 11 Oct 2010 14:20:25 +0000 (15:20 +0100)]
actor-box: Register a progress function

So that we can animate properties storing ClutterActorBox.

13 years agoscript: Fix annotation for get_object()'s return value
Emmanuele Bassi [Mon, 11 Oct 2010 14:07:06 +0000 (15:07 +0100)]
script: Fix annotation for get_object()'s return value

13 years agointerval: Remove special casing for ClutterColor
Emmanuele Bassi [Mon, 11 Oct 2010 14:06:11 +0000 (15:06 +0100)]
interval: Remove special casing for ClutterColor

ClutterColor registers a progress function on type initialization, so we
don't need to special case it any more.

13 years agocolor: Add Color.interpolate() method
Emmanuele Bassi [Mon, 11 Oct 2010 14:04:54 +0000 (15:04 +0100)]
color: Add Color.interpolate() method

The interpolate() method does what it says on the tin: it interpolates
between two colors using the given factor.

ClutterColor uses it to register a progress function for Intervals.

13 years agocogl-texture-2d-sliced: Use the smallest possible waste
Neil Roberts [Tue, 5 Oct 2010 16:17:53 +0000 (17:17 +0100)]
cogl-texture-2d-sliced: Use the smallest possible waste

When picking a size for the last slice in a texture, Cogl would always
pick the biggest power of two size that doesn't create too much
waste and is less than or equal to the previous slice size. However
this can end up creating a texture that is bigger than needed if there
is a smaller power of two.

For example, if the maximum waste is 127 (the current default) and we
try to create a texture that is 257 pixels wide it will decide that
the next power of two (512) is too much waste (255) so it will create
the first slice at 256 pixels wide. Then we only have 1 pixel left to
allocate but Cogl would pick the next smaller size that has a small
enough waste which is 128. But of course 1 is already a power of two
so that's redundantly oversized by 127.

This patch fixes it so that whenever it finds a size that would be big
enough, instead of using exactly that it picks the next power of two
up from the size we need to fill.

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

13 years agoWhitespace alignment fixes
Emmanuele Bassi [Mon, 11 Oct 2010 12:52:09 +0000 (13:52 +0100)]
Whitespace alignment fixes

13 years agopaint-volume: Add arguments checks
Emmanuele Bassi [Mon, 11 Oct 2010 12:51:12 +0000 (13:51 +0100)]
paint-volume: Add arguments checks

In some cases we access the arguments in public functions without, or
prior to checking the arguments.

13 years agoClutterClone: Handle clone_source == NULL for get_paint_volume()
Owen W. Taylor [Thu, 7 Oct 2010 20:00:47 +0000 (16:00 -0400)]
ClutterClone: Handle clone_source == NULL for get_paint_volume()

It's valid to have a ClutterClone without a clone source; in this
case the paint volume is empty.

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

13 years agoclone: Remove unnecessary G_UNLIKELY macros
Emmanuele Bassi [Mon, 11 Oct 2010 12:32:26 +0000 (13:32 +0100)]
clone: Remove unnecessary G_UNLIKELY macros

A Clone:source property might be NULL, and we should not penalize
performance when we can just bail out early, because that would kind of
defeat the point.

13 years agodocs: Update the README
Emmanuele Bassi [Mon, 11 Oct 2010 11:00:18 +0000 (12:00 +0100)]
docs: Update the README

Add a minimal building reference, and point to git-bz for filing
patches to Bugzilla.

13 years agoosx: Compilation fixes
Emmanuele Bassi [Sun, 10 Oct 2010 08:31:55 +0000 (09:31 +0100)]
osx: Compilation fixes

Replace deprecated symbols with the correct ones.

13 years agobox-layout: Plug a memory leak
Emmanuele Bassi [Fri, 8 Oct 2010 12:29:49 +0000 (13:29 +0100)]
box-layout: Plug a memory leak

Similar to commit 4724be167f19fe58cb38179e6f3b34b6797ff639 for
TableLayout.

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

13 years agoPlug a memory leak in clutter-table-layout
Neil Roberts [Wed, 6 Oct 2010 15:01:03 +0000 (16:01 +0100)]
Plug a memory leak in clutter-table-layout

Whenever the allocation is changed on a child of a ClutterTableLayout
and animations are not in effect then it would store a copy of the
allocation in the child meta data. However it was not freeing the old
copy of the allocation so it would end up with a small leak.

Instead of just changing it to free the old value this patch makes it
store the allocation inline in the meta data struct because it seems
that the size of an actor box is already quite small compared to the
size of the meta data struct so it is probably not worth having a
separate allocation for it. To detect the case when there has not yet
been an allocation a separate boolean is used instead of storing NULL.

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

13 years agoautogen.sh: libtool 2.4 has been released
Emmanuele Bassi [Thu, 7 Oct 2010 17:01:53 +0000 (18:01 +0100)]
autogen.sh: libtool 2.4 has been released

13 years agopo: Update French localization
Damien Lespiau [Thu, 7 Oct 2010 11:17:33 +0000 (12:17 +0100)]
po: Update French localization

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agopo: Update Indonesian localization
Andika Triwidada [Tue, 5 Oct 2010 16:23:37 +0000 (17:23 +0100)]
po: Update Indonesian localization

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agopo: Add French localization
Damien Lespiau [Tue, 5 Oct 2010 16:22:56 +0000 (17:22 +0100)]
po: Add French localization

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agoclutter.modules: Update Cairo and Pixman
Emmanuele Bassi [Tue, 5 Oct 2010 13:30:01 +0000 (14:30 +0100)]
clutter.modules: Update Cairo and Pixman

13 years agotexture: Fix the typos in the blurbs and make them not end with '.'
Damien Lespiau [Tue, 5 Oct 2010 07:35:19 +0000 (08:35 +0100)]
texture: Fix the typos in the blurbs and make them not end with '.'

All the nifty things you discover when translating strings not exposed
to anyone. First the clutter-wide record of the number of typos in one
string. Second, ClutterTexture happened to have the only property blurbs
ending with a '.', remove them.

13 years agotext: Rename the nick of the position property "Cursor Position"
Damien Lespiau [Tue, 5 Oct 2010 07:25:06 +0000 (08:25 +0100)]
text: Rename the nick of the position property "Cursor Position"

the "position" property of ClutterText is really the position of the
cursor. Rename the nick accordingly not to confuse it with the position
of the actor itself and be consistent with all the other cursor-related
properties.

13 years agocogl: Use Cogl (not COGL) consistently
Damien Lespiau [Tue, 5 Oct 2010 07:03:19 +0000 (08:03 +0100)]
cogl: Use Cogl (not COGL) consistently

If I remember correctly, Robert wants to name Cogl, Cogl (not COGL) so
start by having a consistent naming in the code.

13 years agobin-layer: Fix the property blurbs
Damien Lespiau [Tue, 5 Oct 2010 06:44:49 +0000 (07:44 +0100)]
bin-layer: Fix the property blurbs

The descriptions for the 'y-align' and 'x-align' properties talk about a
layer and a layer manager. It seems that these properties are the
alignement factors relative to the BinLayout, so document them
accordingly.

13 years agobox-layout: Fix missing spaces in the blurbs of vertical and homogeneous
Damien Lespiau [Mon, 4 Oct 2010 17:35:13 +0000 (18:35 +0100)]
box-layout: Fix missing spaces in the blurbs of vertical and homogeneous

13 years agodeform-effect: Fix Horiontal/Horizontal typo
Damien Lespiau [Mon, 4 Oct 2010 16:20:30 +0000 (17:20 +0100)]
deform-effect: Fix Horiontal/Horizontal typo

13 years agobuild: Fix the release-message target
Emmanuele Bassi [Mon, 4 Oct 2010 14:47:53 +0000 (15:47 +0100)]
build: Fix the release-message target

Generate the SHA256 checksum file during release-upload and then copy it
to the build directory.

13 years agopo: Add Indonesian localization
Andika Triwidada [Mon, 4 Oct 2010 14:43:54 +0000 (15:43 +0100)]
po: Add Indonesian localization

13 years agopo: Update Polish localization
Piotr Drąg [Mon, 4 Oct 2010 14:43:16 +0000 (15:43 +0100)]
po: Update Polish localization

13 years agoPost-release version bump to 1.5.3
Emmanuele Bassi [Mon, 4 Oct 2010 14:20:44 +0000 (15:20 +0100)]
Post-release version bump to 1.5.3

13 years agoRelease Clutter 1.5.2 (snapshot)
Emmanuele Bassi [Mon, 4 Oct 2010 13:53:55 +0000 (14:53 +0100)]
Release Clutter 1.5.2 (snapshot)

13 years agocogl-x11: Trap glXDestroyPixmap()
Emmanuele Bassi [Mon, 4 Oct 2010 13:12:21 +0000 (14:12 +0100)]
cogl-x11: Trap glXDestroyPixmap()

There are ordering issues in the pixmap destruction with current and
past X11 server, Mesa and dri2. Under some circumstances, an X pixmap
might be destroyed with the GLX pixmap still referencing it, and thus
the X server will decide to destroy the GLX pixmap as well; then, when
Cogl tries to destroy the GLX pixmap, it gets BadDrawable errors.

Clutter 1.2 used to trap + sync all calls to glXDestroyPixmap(), but
then we assumed that the ordering issue had been solved. So, we're back
to square 1.

I left a Big Fat Comment™ right above the glXDestroyPixmap() call
referencing the bug and the reasoning behind the trap, so that we don't
go and remove it in the future without checking that the issue has been
in fact solved.

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

13 years agoFixing cally.pc.in and moving include headers to previous directory
Alejandro Piñeiro [Mon, 4 Oct 2010 00:17:40 +0000 (02:17 +0200)]
Fixing cally.pc.in and moving include headers to previous directory

After commit 8dd8fbdb some errors appear if you try work directly
against cally:

 * cally.pc.in removed some elements. After install clutter, doing
   pkg-config --cflags cally-1.0
   fails due missing winsys

 * cally headers were moved from clutter-1.0/cally to
   clutter-1.0/clutter/cally.  Applications using it (yes I know,
   nobody is officially using it) would require to:
    * Change their include.
    * Add directly a dependency to cally, in order to use the cally.pc
      file with the correct directory include.

Note: Take into account that accessibility support still works (ie:
clutter_get_accessibility_enabled). This bug only prevents
applications to work directly against cally (ie: create a CallyActor
subclass)

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agoeffect: Fix up the class ABI
Emmanuele Bassi [Mon, 4 Oct 2010 10:30:32 +0000 (11:30 +0100)]
effect: Fix up the class ABI

Landing the paint-box branch accidentally added two slots to the
ClutterEffectClass vtable, plus the get_paint_volume() function
pointer. This is an ABI break from 1.4.

13 years agoactor-box: Constify arguments for union
Emmanuele Bassi [Mon, 4 Oct 2010 10:27:16 +0000 (11:27 +0100)]
actor-box: Constify arguments for union

The input arguments for clutter_actor_box_union() should be constified,
since they will not be modified by the function.

13 years agodocs: Fix the annotations of ActorClass
Emmanuele Bassi [Mon, 4 Oct 2010 10:26:46 +0000 (11:26 +0100)]
docs: Fix the annotations of ActorClass

13 years agobuild: Add -xobjective-c to the fruity backend section
Emmanuele Bassi [Mon, 4 Oct 2010 09:52:36 +0000 (10:52 +0100)]
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.

13 years agodocs: Remove TODO
Emmanuele Bassi [Mon, 4 Oct 2010 09:44:00 +0000 (10:44 +0100)]
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.

13 years agobuild: Remove redundant EXTRA_DISTs
Emmanuele Bassi [Mon, 4 Oct 2010 08:09:13 +0000 (09:09 +0100)]
build: Remove redundant EXTRA_DISTs

The files for the backend that we conditionally compile are
automatically added to the dist process by automake.

13 years agodocs: Add unused symbols to the Clutter API reference
Emmanuele Bassi [Mon, 4 Oct 2010 08:08:07 +0000 (09:08 +0100)]
docs: Add unused symbols to the Clutter API reference

13 years agobuild: Unconditionally add GLES2 shaders to EXTRA_DIST
Emmanuele Bassi [Mon, 4 Oct 2010 07:57:29 +0000 (08:57 +0100)]
build: Unconditionally add GLES2 shaders to EXTRA_DIST

13 years agobuild: Generate a stub announcement email when releasing
Emmanuele Bassi [Sun, 3 Oct 2010 16:21:10 +0000 (17:21 +0100)]
build: Generate a stub announcement email when releasing

13 years agodocs: Update the RELEASING checklist
Emmanuele Bassi [Sun, 3 Oct 2010 15:37:41 +0000 (16:37 +0100)]
docs: Update the RELEASING checklist

13 years agobuild: Only generate bzip2 tarballs
Emmanuele Bassi [Sun, 3 Oct 2010 15:13:02 +0000 (16:13 +0100)]
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.

13 years agobuild: Dist every backend file
Emmanuele Bassi [Sun, 3 Oct 2010 15:10:44 +0000 (16:10 +0100)]
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.

13 years agocontainer: Do not emit a signal in the class handler
Emmanuele Bassi [Sun, 3 Oct 2010 14:28:14 +0000 (15:28 +0100)]
container: Do not emit a signal in the class handler

Yes, I am that stupid.

13 years agointrospection: Skip Script.connect_signals_full()
Emmanuele Bassi [Sun, 3 Oct 2010 14:16:41 +0000 (15:16 +0100)]
introspection: Skip Script.connect_signals_full()

It's meant to be used by language bindings, not by applications.

13 years agocontainer: Fix the marshaller for ::child-notify
Emmanuele Bassi [Sun, 3 Oct 2010 14:12:01 +0000 (15:12 +0100)]
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.

13 years agobuild: Automate the release process
Emmanuele Bassi [Sun, 3 Oct 2010 13:53:14 +0000 (14:53 +0100)]
build: Automate the release process

13 years agodocs: Update the coding style
Emmanuele Bassi [Sun, 3 Oct 2010 10:02:56 +0000 (11:02 +0100)]
docs: Update the coding style

Resynchronize with gtk+'s coding style document, since they switched to
ours.

13 years agoUpdate zh_CN translation.
Aron Xu [Thu, 30 Sep 2010 07:20:05 +0000 (15:20 +0800)]
Update zh_CN translation.

Signed-off-by: Aron Xu <aronxu@gnome.org>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agocontainer: Add child_notify() wrapper
Emmanuele Bassi [Thu, 30 Sep 2010 13:58:23 +0000 (14:58 +0100)]
container: Add child_notify() wrapper

The child_notify() virtual function on ClutterContainer does not have a
wrapper for implementations to call.

13 years agocontainer: Implement ::child-notify
Emmanuele Bassi [Thu, 30 Sep 2010 12:11:05 +0000 (13:11 +0100)]
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.

13 years agobuild: Add more metadata to the introspection files
Emmanuele Bassi [Thu, 30 Sep 2010 11:43:10 +0000 (12:43 +0100)]
build: Add more metadata to the introspection files

13 years agocookbook: Remove unused variable from the animator example
Emmanuele Bassi [Thu, 30 Sep 2010 11:32:08 +0000 (12:32 +0100)]
cookbook: Remove unused variable from the animator example

13 years agobuild: Make Cally.gir depend on Cogl.gir
Emmanuele Bassi [Thu, 30 Sep 2010 11:31:28 +0000 (12:31 +0100)]
build: Make Cally.gir depend on Cogl.gir

Since Cally's introspection data depends on it.

13 years agoMerge remote branch 'elliot/events-buttons'
Emmanuele Bassi [Thu, 30 Sep 2010 11:24:32 +0000 (12:24 +0100)]
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

13 years agointrospection: Update to changed variables for header file names
Colin Walters [Wed, 29 Sep 2010 17:18:03 +0000 (13:18 -0400)]
introspection: Update to changed variables for header file names

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agoactor: sync entry has_clip member to clip state
Ray Strode [Wed, 29 Sep 2010 22:43:30 +0000 (18:43 -0400)]
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>
13 years agoactor: don't ignore clip for clipped redraws
Robert Bragg [Thu, 30 Sep 2010 10:18:23 +0000 (11:18 +0100)]
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

13 years agotest-pixmap: add timeout to draw arcs on pixmap
Robert Bragg [Thu, 30 Sep 2010 01:37:24 +0000 (02:37 +0100)]
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.

13 years agox11-tfp: Implement get_paint_volume virtual
Robert Bragg [Thu, 30 Sep 2010 01:00:24 +0000 (02:00 +0100)]
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

13 years agomaterial: tweak dot file debug code
Robert Bragg [Fri, 24 Sep 2010 00:01:33 +0000 (01:01 +0100)]
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.

13 years agocookbook: Add recipe about handling button events
Elliot Smith [Thu, 30 Sep 2010 10:12:14 +0000 (11:12 +0100)]
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.

13 years agowin32: Fix the CLUTTER_* keysym macros
Neil Roberts [Wed, 29 Sep 2010 16:04:25 +0000 (17:04 +0100)]
win32: Fix the CLUTTER_* keysym macros

In 4ee05f8e21d the namespace for the clutter keysym macros were
changed to CLUTTER_KEY_* but the win32 events backend was still
referring to the old names.

13 years agocookbook: Example of using button press and release events
Elliot Smith [Tue, 28 Sep 2010 15:53:30 +0000 (16:53 +0100)]
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.

13 years agocookbook: Example of ClutterClickAction
Elliot Smith [Tue, 28 Sep 2010 15:37:26 +0000 (16:37 +0100)]
cookbook: Example of ClutterClickAction

Example of handling clicks on an actor; part of the recipe on
handling button events.

13 years agocookbook: Example of simple handling of button events
Elliot Smith [Mon, 27 Sep 2010 15:36:16 +0000 (16:36 +0100)]
cookbook: Example of simple handling of button events

Added an example showing how to examine the content
of a ClutterButtonEvent in a signal handler.

13 years agoWrap g_object_class_install_properties()
Emmanuele Bassi [Thu, 30 Sep 2010 09:29:00 +0000 (10:29 +0100)]
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.

13 years agostage: Add more checks on the stage window retrieval
Emmanuele Bassi [Thu, 30 Sep 2010 09:27:10 +0000 (10:27 +0100)]
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.

13 years agobuild: Use platform detection to add -no-undefined
Emmanuele Bassi [Wed, 29 Sep 2010 16:32:57 +0000 (17:32 +0100)]
build: Use platform detection to add -no-undefined

Instead of relying on the flavour passed to the configure script.

13 years agomodules: Use the stable branch of json-glib
Emmanuele Bassi [Wed, 29 Sep 2010 15:46:06 +0000 (16:46 +0100)]
modules: Use the stable branch of json-glib

13 years agocogl-texture-2d-sliced: Don't create the slice textures twice
Neil Roberts [Wed, 29 Sep 2010 14:40:22 +0000 (15:40 +0100)]
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.

13 years agoBump up dependency of json-glib to 0.12.0
Emmanuele Bassi [Wed, 29 Sep 2010 15:05:55 +0000 (16:05 +0100)]
Bump up dependency of json-glib to 0.12.0

New stable release.

13 years agoRemove the internal copy of JSON-GLib
Emmanuele Bassi [Wed, 22 Sep 2010 11:56:33 +0000 (12:56 +0100)]
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.

13 years agoMerge branch 'wip/non-recursive'
Emmanuele Bassi [Wed, 29 Sep 2010 14:55:58 +0000 (15:55 +0100)]
Merge branch 'wip/non-recursive'

* wip/non-recursive:
  build: Start moving to a non-recursive layout

13 years agomodules: Fix up mesa module
Emmanuele Bassi [Wed, 29 Sep 2010 14:44:51 +0000 (15:44 +0100)]
modules: Fix up mesa module

13 years agomodules: Add mesa and wayland to the moduleset
Emmanuele Bassi [Wed, 29 Sep 2010 14:23:53 +0000 (15:23 +0100)]
modules: Add mesa and wayland to the moduleset

13 years agoactor: don't dirty pick buffer in _real_queue_redraw
Robert Bragg [Fri, 24 Sep 2010 01:24:36 +0000 (02:24 +0100)]
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.

13 years agoactor: Adds private _clutter_actor_traverse API
Robert Bragg [Sun, 12 Sep 2010 23:33:23 +0000 (00:33 +0100)]
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.

13 years agoactor: Adds private _clutter_actor_get_n_children
Robert Bragg [Sun, 12 Sep 2010 22:49:02 +0000 (23:49 +0100)]
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)

13 years agoactor: explicitly track children in clutter-actor.c
Robert Bragg [Sun, 12 Sep 2010 22:31:39 +0000 (23:31 +0100)]
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.

13 years agodebug: fix blue outlines for paint-volumes debug opt
Robert Bragg [Sat, 11 Sep 2010 01:48:18 +0000 (02:48 +0100)]
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.