profile/ivi/clutter.git
13 years agobuild: Remove unnecessary newline
Emmanuele Bassi [Mon, 20 Sep 2010 10:30:23 +0000 (11:30 +0100)]
build: Remove unnecessary newline

13 years agopo: Update German translation
Frederik Hahne [Mon, 20 Sep 2010 10:23:31 +0000 (11:23 +0100)]
po: Update German translation

13 years agotexture: Add more validation on the material
Emmanuele Bassi [Sat, 18 Sep 2010 07:41:52 +0000 (08:41 +0100)]
texture: Add more validation on the material

If set_cogl_texture() is called after unsetting the Texture's material
then we really want to make a copy of the template.

Also, we should assert more often if the internal state goes horribly
wrong: at least, we'll have a backtrace.

13 years agoFix the ordering of the arguments for clutter_table_layout_set_span
Neil Roberts [Fri, 17 Sep 2010 16:10:39 +0000 (17:10 +0100)]
Fix the ordering of the arguments for clutter_table_layout_set_span

The order of the row_span and column_span arguments was different in
the declaration from that in the definition. This was causing the
gtk-doc to also have the wrong order.

13 years agocogl-object-private.h: Include cogl-debug.h
Neil Roberts [Fri, 17 Sep 2010 16:18:09 +0000 (17:18 +0100)]
cogl-object-private.h: Include cogl-debug.h

If COGL_OBJECT_DEBUG is defined then cogl-object-private.h will call
COGL_NOTE in the ref and unref macros. For this to work the debug
header needs to also be included or COGL_NOTE won't necessarily be
defined.

13 years agodocs: Add sub-classing notes on ActorMeta and Constraint
Emmanuele Bassi [Fri, 17 Sep 2010 13:54:31 +0000 (14:54 +0100)]
docs: Add sub-classing notes on ActorMeta and Constraint

13 years agoflow-layout: Blow the cached preferred size if needed
Emmanuele Bassi [Fri, 17 Sep 2010 11:43:23 +0000 (12:43 +0100)]
flow-layout: Blow the cached preferred size if needed

If the FlowLayout layout manager wasn't allocated the same size it
requested then it should blow its caches and recompute the layout
with the given allocation size.

13 years agoconstraint: Re-implement using update_allocation()
Emmanuele Bassi [Fri, 17 Sep 2010 11:13:29 +0000 (12:13 +0100)]
constraint: Re-implement using update_allocation()

Instead of using the fixed position and size API, use the newly added
update_allocation() virtual function in ClutterConstraint to change the
allocation of a ClutterActor. This allows using constraints inside
layout managers, and also allows Constraints to react to changes in the
size of an actor without causing relayout cycles.

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

13 years agoconstraint: Add ::update_allocation()
Emmanuele Bassi [Fri, 17 Sep 2010 11:09:56 +0000 (12:09 +0100)]
constraint: Add ::update_allocation()

The Constraint should plug directly into the allocation mechanism, and
modify the allocation of the actor to which they are applied to. This is
similar to the mechanism used by the Effect class to modify the paint
sequence of an actor.

13 years agotest-bind: Fix colors and set the name of the boxes
Emmanuele Bassi [Fri, 17 Sep 2010 11:08:52 +0000 (12:08 +0100)]
test-bind: Fix colors and set the name of the boxes

13 years agobuild: Use the power of abs_builddir
Emmanuele Bassi [Fri, 17 Sep 2010 10:40:10 +0000 (11:40 +0100)]
build: Use the power of abs_builddir

When calling test-conformance to get the list of conformance tests.

13 years agobuild: Enable COGL_OBJECT_DEBUG in the debug flags
Emmanuele Bassi [Fri, 17 Sep 2010 10:39:20 +0000 (11:39 +0100)]
build: Enable COGL_OBJECT_DEBUG in the debug flags

The CoglObject debugging code is enabled by a separate flag.

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

13 years agooffscreen-effect: Update handling of transforms
Robert Bragg [Thu, 16 Sep 2010 11:58:42 +0000 (12:58 +0100)]
offscreen-effect: Update handling of transforms

In line with the changes made in f5f066df9ce7 to clean up how Clutter
deals with transformations of actors this patch updates the code in
clutter-offscreen-effect.c. We now query the projection matrix from the
stage instead of the perspective and instead of duplicating the logic to
setup the stage view transform we now use
_clutter_actor_apply_modelview_transform for the stage instead.

13 years agoclutter.modules: Specify the checkoutdir for the gtk2 module
Neil Roberts [Thu, 16 Sep 2010 10:12:51 +0000 (11:12 +0100)]
clutter.modules: Specify the checkoutdir for the gtk2 module

If no checkoutdir is specified then jhbuild seems to use the name of
the module which in this case would be 'gtk+'. This ends up
overwriting the checkout of the master branch of gtk+ and causes all
kinds of build problems. This patch adds a checkoutdir attribute to
the gtk2 module to force it to checkout into the gtk2 directory.

13 years agoPost-release version bump to 1.3.15
Emmanuele Bassi [Wed, 15 Sep 2010 15:46:06 +0000 (16:46 +0100)]
Post-release version bump to 1.3.15

13 years agoRelease Clutter 1.3.14 (developers snapshot)
Emmanuele Bassi [Wed, 15 Sep 2010 15:12:39 +0000 (16:12 +0100)]
Release Clutter 1.3.14 (developers snapshot)

13 years agobuild: Add cogl-debug-options.h
Emmanuele Bassi [Wed, 15 Sep 2010 14:56:42 +0000 (15:56 +0100)]
build: Add cogl-debug-options.h

13 years agodocs: Fix the name of the parameters
Emmanuele Bassi [Wed, 15 Sep 2010 14:35:05 +0000 (15:35 +0100)]
docs: Fix the name of the parameters

13 years agocogl: Make cogl_util_next_p2 internal and fix the documentation
Neil Roberts [Wed, 15 Sep 2010 13:39:05 +0000 (14:39 +0100)]
cogl: Make cogl_util_next_p2 internal and fix the documentation

cogl_util_next_p2 is declared in cogl-util.h which is a private header
so it shouldn't be possible for an application to use it. It's
probably not a function we'd like to export from Cogl so it seems
better to keep it private. This patch renames it to _cogl_util_next_p2
so that it won't be exported from the shared library.

The documentation for the function is also slightly wrong because it
stated that the function returned the next power greater than
'a'. However the code would actually return 'a' if it's already a
power of two. I think the actual behaviour is more useful so this
patch changes the documentation rather than the code.

13 years agocogl-vertex-buffer: Don't always set COGL_MATERIAL_FLUSH_FALLBACK_MASK
Neil Roberts [Wed, 15 Sep 2010 13:07:30 +0000 (14:07 +0100)]
cogl-vertex-buffer: Don't always set COGL_MATERIAL_FLUSH_FALLBACK_MASK

Previously CoglVertexBuffer would always set the flush options flags
to at least contain COGL_MATERIAL_FLUSH_FALLBACK_MASK. The code then
later checks whether any flags are set before deciding whether to copy
the material to implement the overrides. This means that it would
always end up copying the material even if there are no fallback
layers. This patch changes it so that it only sets
COGL_MATERIAL_FLUSH_FALLBACK_MASK if fallback_layers != 0.

13 years agomaterial-arbfp: fix updating params if sharing progs
Robert Bragg [Tue, 14 Sep 2010 19:25:23 +0000 (20:25 +0100)]
material-arbfp: fix updating params if sharing progs

If a single arbfp program is being shared between multiple CoglMaterials
then we need to make sure we update all program.local params when
switching between materials. Previously we had a dirty flag to track
when combine_constant params were changed but didn't take in to account
that different materials sharing the same program may have different
combine constants.

13 years agomaterial-arbfp: Another pass at simplifying the code
Robert Bragg [Tue, 14 Sep 2010 17:50:50 +0000 (18:50 +0100)]
material-arbfp: Another pass at simplifying the code

Previously the backend private state was used to either link to an
authority material or provide authoritative program state. The mechanism
seemed overly complex and felt very fragile. I made a recent comment
which added a lot of documentation to make it easier to understand but
still it didn't feel very elegant.

This patch takes a slightly different approach; we now have a
ref-counted ArbfpProgramState object which encapsulates a single ARBfp
program and the backend private state now just has a single member which
is a pointer to one of these arbfp_program_state objects. We no longer
need to cache pointers to our arbfp-authority and so we can get rid of
a lot of awkward code that ensured these pointers were
updated/invalidated at the right times. The program state objects are
not tightly bound to a material so it will also allow us to later
implement a cache mechanism that lets us share state outside a materials
ancestry. This may help to optimize code not following the
recommendations of deriving materials from templates, avoiding one-shot
materials and not repeatedly modifying materials because even if a
material's ancestry doesn't naturally lead us to shareable state we can
fallback to searching for shareable state using central hash tables.

13 years agomaterial: Adds experimental cogl_material_foreach_layer API
Robert Bragg [Mon, 5 Jul 2010 20:33:26 +0000 (21:33 +0100)]
material: Adds experimental cogl_material_foreach_layer API

This adds a way to iterate the layer indices of the given material since
cogl_material_get_layers has been deprecated. The user provides a
callback to be called once for each layer.

Because modification of layers in the callback may potentially
invalidate any number of the internal CoglMaterialLayer structures and
invalidate the material's layer cache this should be more robust than
cogl_material_get_layers() which used to return a const GList *
pointing directly to internal state.

13 years agomaterial: don't declare backend vtables in headers
Robert Bragg [Tue, 14 Sep 2010 11:13:30 +0000 (12:13 +0100)]
material: don't declare backend vtables in headers

This fixes the material backends to declare their constant vtable in the
c file with a corresponding extern declaration in the header. This
should fix complaints about duplicate symbols seen on OSX.

13 years agomaterial-arbfp: don't recompile for constant changes
Robert Bragg [Mon, 13 Sep 2010 23:33:46 +0000 (00:33 +0100)]
material-arbfp: don't recompile for constant changes

Instead of lazily incorporating combine constants as arbfp PARAM
constants in the source directly we now use program.local parameters
instead so we can avoid repeating codegen if a material's combine
constant is updated. This should be a big win for applications animating
a constant used for example in an animated interpolation, such as
gnome-shell.

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

13 years agomaterial-arbfp: don't redo codegen for texture changes
Robert Bragg [Mon, 13 Sep 2010 23:27:57 +0000 (00:27 +0100)]
material-arbfp: don't redo codegen for texture changes

This makes it so we don't consider LAYER_STATE_TEXTURE changes to affect
the arbfp code. This should avoid a lot of unneeded passes of
code generation for applications modifying the texture for a layer.

13 years agomaterial: make layer/material_pre_changes mutually exclusive
Robert Bragg [Mon, 13 Sep 2010 23:18:02 +0000 (00:18 +0100)]
material: make layer/material_pre_changes mutually exclusive

This makes it so we only notify backends of either a single material
change or a single layer change. Previously all material STATE_LAYERS
changes would be followed by a more detailed layer change.

For backends that perform code generation for fragment processing they
typically need to understand the details of how layers get changed to
determine if they need to repeat codegen. It doesn't help them to report
a material STATE_LAYERS change for all layer changes since it's so
broad, they really need to wait for the layer change to be notified.

What does help though is to report a STATE_LAYERS change for a change in
material->n_layers because they typically do need to repeat codegen in
that case.

13 years agomaterial-arbfp: fixes for how we track private state
Robert Bragg [Mon, 13 Sep 2010 22:52:18 +0000 (23:52 +0100)]
material-arbfp: fixes for how we track private state

This fixes a number of issues relating to how we track the arbfp private
state associated with CoglMaterials. At the same time it adds much more
extensive code documentation to try and make it a bit more approachable.

13 years agomaterial: pass material owner for layer pre changes
Robert Bragg [Mon, 13 Sep 2010 22:05:49 +0000 (23:05 +0100)]
material: pass material owner for layer pre changes

When notifying a backend about a layer being modified we now pass the
layers current owner for reference. NB: Although a layer can indirectly
be referenced by multiple layers, a layer is considered immutable once
it has dependants, so there is only ever one material associated with a
layer being modified. Passing the material pointer to the backends
layer_pre_change callback can be useful for backends that associate
their private state with materials and may need to update that state in
response to layer changes.

13 years agoarbfp: rename get_arbfp_authority clarifying semantics
Robert Bragg [Mon, 13 Sep 2010 21:56:44 +0000 (22:56 +0100)]
arbfp: rename get_arbfp_authority clarifying semantics

This renames the get_arbfp_authority function to
get_arbfp_authority_no_check to clarify that the function doesn't
validate that the authority cache is still valid by looking at the age
of the referenced material. The function should only be used when we
*know* the cache has already been checked.

13 years agomaterial: track if material change is layer change
Robert Bragg [Mon, 13 Sep 2010 20:26:31 +0000 (21:26 +0100)]
material: track if material change is layer change

We now pass a boolean to _cogl_material_pre_change_notify to know when
a material change is as a result of a layer change. We plan to use this
information to avoid notifying the backends about material changes if
they are as a result of layer changes. This will simplify the handling
of state changes in the backends because they can assume that layer and
material changes are mutually exclusive.

13 years agomaterial: Adds _get_layer_combine_constant API
Robert Bragg [Mon, 13 Sep 2010 20:21:09 +0000 (21:21 +0100)]
material: Adds _get_layer_combine_constant API

This adds an internal _cogl_material_get_layer_combine_constant function
so we can query the current layer combine constant back. We should
probably make this a public property getter, but for now we just need
this so we can read the constant in the arbfp backend.

13 years agomaterial: track unit state with arbfp private state
Robert Bragg [Mon, 13 Sep 2010 20:17:30 +0000 (21:17 +0100)]
material: track unit state with arbfp private state

We are going to start tracking more per-texture unit state with arbfp
private state so this adds an internal UnitState type and we allocate an
array of these when setting up a new private state structure. The first
thing that has been moved into this is the sampled boolean to know when
a particular texture unit gets sampled from in the generated arbfp code.

13 years agoEnumeration value should be on the same line
Emmanuele Bassi [Wed, 15 Sep 2010 10:56:59 +0000 (11:56 +0100)]
Enumeration value should be on the same line

The glib-mkenums script is not clever enough to deal with

  FLAGS_VALUE = FLAGS_A |
                FLAGS_B

And since this breaks the enumeration GType and the introspection data,
we cannot really wait for it to be fixed.

See: https://bugzilla.gnome.org/show_bug.cgi?id=629741

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

13 years agocogl-framebuffer: fix leak when popping framebuffer
Robert Bragg [Wed, 1 Sep 2010 14:15:20 +0000 (15:15 +0100)]
cogl-framebuffer: fix leak when popping framebuffer

We were using g_slist_remove_link instead of g_slist_delete_link
resulting in a memory leak. Thanks to Simon Lanzmich for
reporting this bug.

13 years agoInitialize the cogl uprof state in cogl_create_context
Robert Bragg [Mon, 16 Aug 2010 20:11:42 +0000 (21:11 +0100)]
Initialize the cogl uprof state in cogl_create_context

This avoids the use of of gcc constructor and destructor attributes to
initialize the cogl uprof context and optionally print a cogl uprof
report at app exit. We now initialize the uprof context in
cogl_context_create instead.

13 years agojournal: provide more detailed uprof instrumentation
Robert Bragg [Mon, 26 Jul 2010 14:21:18 +0000 (15:21 +0100)]
journal: provide more detailed uprof instrumentation

This adds more timing around key stages of the journal flushing process.

13 years agoprofile: Update to uprof-0.3 dep for --enable-profile
Robert Bragg [Mon, 21 Jun 2010 14:36:46 +0000 (15:36 +0100)]
profile: Update to uprof-0.3 dep for --enable-profile

When building with --enable-profile we now depend on the uprof-0.3
developer release which brings a few improvements:

» It lets us "fix" how we initialize uprof so that instead of using a shared
object constructor/destructor (which was a hack used when first adding
uprof support to Clutter) we can now initialize as part of clutter's
normal initialization code. As a side note though, I found that the way
Clutter initializes has some quite serious problems whenever it
involves GOptionGroups. It is not able to guarantee the initialization
of dependencies like uprof and Cogl. For this reason we still use the
contructor/destructor approach to initialize uprof in Cogl.

» uprof-0.3 provides a better API for adding custom columns when reporting
timer and counter statistics which lets us remove quite a lot of manual
report generation code in clutter-profile.c.

» uprof-0.3 provides a shared context for tracking mainloop timer
statistics. This means any mainloop based library following the same
"Mainloop" timer naming convention can use the shared context and no
matter who ends up owning the final mainloop the statistics will always
be in the same place. This allows profiling of Clutter with an
external mainloop such as with the Mutter compositor.

» uprof-0.3 can export statistics over dbus and comes with an ncurses
based ui to vizualize timer and counter stats live.

The latest version of uprof can be cloned from:
git://github.com/rib/UProf.git

13 years agocogl-framebuffer: Clear the renderbuffer list on failure
Neil Roberts [Mon, 6 Sep 2010 16:18:11 +0000 (17:18 +0100)]
cogl-framebuffer: Clear the renderbuffer list on failure

When try_creating_fbo fails it deletes any intermediate render buffers
that were created. However it doesn't clear the list so I think if it
failed a second time it would try to delete the render buffers
again. This could potentially cause problems if a subsequent fbo is
created because the destructor for the original might delete the
renderbuffers of the new fbo.

13 years agoclone: scale src with apply_transform not cogl_scale
Robert Bragg [Sat, 11 Sep 2010 01:31:03 +0000 (02:31 +0100)]
clone: scale src with apply_transform not cogl_scale

Since a ClutterClone may be allocated a different size than its source
actor we need to apply a scale factor before painting the source actor.
We were manually using cogl_scale to do this in clutter_clone_paint but
really this kind of thing is best handled in an implementation of the
apply_transform virtual so Clutter can be aware of the transform for
other purposes, such as input transformations. Also we want to provide
an implementation of the get_paint_volume virtual where Clutter will
also expect to be able to use the apply_transform virtual to transform
the volume into its parent's coordinate space.

13 years agoglx: Mark stage clip initialized even for NULL user clip
Robert Bragg [Wed, 8 Sep 2010 00:41:01 +0000 (01:41 +0100)]
glx: Mark stage clip initialized even for NULL user clip

If a NULL clip is passed to clutter_stage_glx_add_redraw_clip then we
update the redraw clip to have width of 0, but we weren't setting
stage_glx->initialized_redraw_clip = TRUE. This could result in a full,
unclipped stage redraw being reduced to a clipped redraw.

13 years agoactor: warn if allocating actor not descending from stage
Robert Bragg [Tue, 7 Sep 2010 21:02:23 +0000 (22:02 +0100)]
actor: warn if allocating actor not descending from stage

This adds a verbose warning that will be displayed if
clutter_actor_allocate is passed an actor that isn't a descendent of a
ClutterStage. Layouting should always bubble up from a stage so this
condition is likely to indicate a buggy container that allocating a
child that it has already unparented.

13 years agogeometry: Adds a clutter_geometry_intersects API
Robert Bragg [Tue, 7 Sep 2010 16:00:49 +0000 (17:00 +0100)]
geometry: Adds a clutter_geometry_intersects API

This adds a public function named clutter_geometry_intersects which
determines if two geometries intersect or not returning TRUE if so else
FALSE.

13 years agoactor-box: Correctly clamp to pixel
Emmanuele Bassi [Mon, 16 Aug 2010 15:02:53 +0000 (16:02 +0100)]
actor-box: Correctly clamp to pixel

Use ceilf() to round up the right side of the actor's box, and floorf()
to round down the left side.

13 years agoTry to clean up how we handle actor transformations
Robert Bragg [Tue, 7 Sep 2010 12:10:55 +0000 (13:10 +0100)]
Try to clean up how we handle actor transformations

When building actor relative transforms, instead of using the matrix
stack to combine transformations and making assumptions about what is
currently on the stack we now just explicitly initialize an identity
matrix and apply transforms to that.

This removes the full_vertex_t typedef for internal transformation code
and we just use ClutterVertex.

ClutterStage now implements apply_transform like any other actor now
and the code we had in _cogl_setup_viewport has been moved to the
stage's apply_transform instead.

ClutterStage now tracks an explicit projection matrix and viewport
geometry. The projection matrix is derived from the perspective whenever
that changes, and the viewport is updated when the stage gets a new
allocation. The SYNC_MATRICES mechanism has been removed in favour of
_clutter_stage_dirty_viewport/projection() APIs that get used when
switching between multiple stages to ensure cogl has the latest
information about the onscreen framebuffer.

13 years agoactor: Add _get_stage_internal to clutter-private.h
Robert Bragg [Tue, 7 Sep 2010 10:55:23 +0000 (11:55 +0100)]
actor: Add _get_stage_internal to clutter-private.h

This adds _clutter_actor_get_stage_internal to clutter-private.h since
we plan to use it in clutter-offscreen-effect when preparing to
redirect an actor offscreen.

13 years agoMerge remote branch 'elliot/cookbook-animations-reuse'
Emmanuele Bassi [Mon, 13 Sep 2010 14:51:18 +0000 (15:51 +0100)]
Merge remote branch 'elliot/cookbook-animations-reuse'

* elliot/cookbook-animations-reuse:
  cookbook: Added a recipe for reusing a complex animation
  cookbook: Added id for section in "rotating an actor" recipe
  cookbook: Simplified and clarified example code
  cookbook: Cleaned up the "animations reuse" example
  cookbook: Refactored reusable animation example
  cookbook: Added example for animation reuse recipe

13 years agoRemove trailin enum commas, avoiding C++ warnings.
Murray Cumming [Mon, 13 Sep 2010 14:16:25 +0000 (16:16 +0200)]
Remove trailin enum commas, avoiding C++ warnings.

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

13 years agocookbook: Added a recipe for reusing a complex animation
Elliot Smith [Mon, 13 Sep 2010 13:29:37 +0000 (14:29 +0100)]
cookbook: Added a recipe for reusing a complex animation

This recipe explains how to "reuse" the same animation
definition for different actors, by creating a new
instance of a "rig" (empty container) and animation
for the rig each time the animation is required.

An actor is then re-parented to the rig and animated
using it, rather than being animated directly.

JSON is used to define the rig + animator, to make
creating new instances of them simpler. The recipe
also discusses various caveats around using this
approach, rather than directly animating an actor.

13 years agocookbook: Added id for section in "rotating an actor" recipe
Elliot Smith [Mon, 13 Sep 2010 09:28:16 +0000 (10:28 +0100)]
cookbook: Added id for section in "rotating an actor" recipe

Added an id to a section in the "rotating an actor" recipe,
so that it can be referred to from the "reusing an animation"
recipe.

13 years agocookbook: Simplified and clarified example code
Elliot Smith [Thu, 9 Sep 2010 11:02:02 +0000 (12:02 +0100)]
cookbook: Simplified and clarified example code

Modified the "animation reuse" sample code to provide
a simpler example to explain in the recipe.

Also modified variable names to mirror the names used
for the previous "complex animation" example and added
some more comments, to further simplify and support the
recipe.

13 years agocookbook: Cleaned up the "animations reuse" example
Elliot Smith [Wed, 1 Sep 2010 10:18:15 +0000 (11:18 +0100)]
cookbook: Cleaned up the "animations reuse" example

With some help from pippin, moved variable declarations
into more sensible positions within their functions,
changed a function name, and found a better way
to unref a script once its associated actor has
been destroyed.

13 years agocookbook: Refactored reusable animation example
Elliot Smith [Wed, 1 Sep 2010 09:21:23 +0000 (10:21 +0100)]
cookbook: Refactored reusable animation example

Extracted the animation into its own JSON definition,
then create a new script and get the animation each
time a rectangle is clicked.

Removes the need to reparent onto the background and
copy property values to the rectangle after the animation,
and generally much cleaner.

13 years agocookbook: Added example for animation reuse recipe
Elliot Smith [Tue, 31 Aug 2010 16:42:37 +0000 (17:42 +0100)]
cookbook: Added example for animation reuse recipe

Added an example showing how to reuse a ClutterAnimator
instance to animate multiple actors at different times
using an animatable rig, combined with reparenting.

13 years agocally: fixing public headers
Alejandro Piñeiro [Thu, 22 Jul 2010 11:19:34 +0000 (13:19 +0200)]
cally: fixing public headers

Cally headers were including specific clutter object headers.

This caused a problem including cally.h on a external program.

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

13 years agobuild: Add tesselator to the include paths
Emmanuele Bassi [Mon, 13 Sep 2010 10:31:46 +0000 (11:31 +0100)]
build: Add tesselator to the include paths

13 years agobuild: Generate ClutterJson in the top directory
Emmanuele Bassi [Mon, 13 Sep 2010 01:15:44 +0000 (02:15 +0100)]
build: Generate ClutterJson in the top directory

Instead of doing the shlib trick, build ClutterJson (if needed) inside
the top-level clutter/ directory - similar to a non-recursive layout.

Hopefully, one day, we'll be able to do this with a real non-recursive
layout.

13 years agobuild: List the units inside a file
Emmanuele Bassi [Mon, 13 Sep 2010 01:01:50 +0000 (02:01 +0100)]
build: List the units inside a file

This avoids trying to run test-conformance -l multiple times.

13 years agobuild: Remove gir files from dist
Emmanuele Bassi [Mon, 13 Sep 2010 01:01:21 +0000 (02:01 +0100)]
build: Remove gir files from dist

The introspection data is going to be generated, so it should never be
in the dist.

13 years agobuild: Do not build a noinst library for the tesselator
Emmanuele Bassi [Sun, 12 Sep 2010 18:25:47 +0000 (19:25 +0100)]
build: Do not build a noinst library for the tesselator

Let's try to keep Cogl's build as non-recursive as possible, in the hope
that one day we'll be able to make it fully non-recursive along with the
rest of Clutter.

13 years agocookbook: Use the new CLUTTER_KEY_* symbol constants
Emmanuele Bassi [Fri, 10 Sep 2010 17:21:45 +0000 (18:21 +0100)]
cookbook: Use the new CLUTTER_KEY_* symbol constants

Instead of the deprecated CLUTTER_* ones.

13 years agobuild: Disable deprecated API when building the cookbook examples
Emmanuele Bassi [Fri, 10 Sep 2010 17:21:19 +0000 (18:21 +0100)]
build: Disable deprecated API when building the cookbook examples

Make sure we always use the latest API.

13 years agokeysyms: Update the macros to CLUTTER_KEY_*
Emmanuele Bassi [Fri, 10 Sep 2010 12:41:49 +0000 (13:41 +0100)]
keysyms: Update the macros to CLUTTER_KEY_*

The keysyms defines in clutter-keysyms.h are generated from the X11 key
symbols headers by doing the equivalent of a pass of sed from XK_* to
CLUTTER_*. This might lead to namespace collisions, down the road.
Instead, we should use the CLUTTER_KEY_* namespace.

This commit includes the script, taken from GDK, that parses the X11
key symbols and generates two headers:

  - clutter-keysyms.h: the default included header, with CLUTTER_KEY_*
  - clutter-keysyms-compat.h: the compatibility header, with CLUTTER_*

The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is
not defined - essentially deprecating all the old key symbols.

This does not change any ABI and, assuming that an application or
library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source
compatibility is still guaranteed.

13 years agointrospection: Add full path for the Clutter-1.0 inclusion
Lucas Rocha [Fri, 10 Sep 2010 16:48:12 +0000 (17:48 +0100)]
introspection: Add full path for the Clutter-1.0 inclusion

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agobuild: Disable deprecated API when building Clutter
Emmanuele Bassi [Fri, 10 Sep 2010 13:27:56 +0000 (14:27 +0100)]
build: Disable deprecated API when building Clutter

Make sure we don't use deprecated API internally by adding
CLUTTER_DISABLE_DEPRECATED to the AM_CPPFLAGS.

This requires adding -UCLUTTER_DISABLE_DEPRECATED to the introspection
scanner CFLAGS, otherwise the deprecated API will never be introspected
and the data generated will not be compatible.

13 years agoDo not use deprecated API internally
Emmanuele Bassi [Fri, 10 Sep 2010 13:27:37 +0000 (14:27 +0100)]
Do not use deprecated API internally

13 years agoUpdate the NEWS
Emmanuele Bassi [Fri, 10 Sep 2010 11:24:37 +0000 (12:24 +0100)]
Update the NEWS

13 years agoactor: Add a method for querying key focus
Emmanuele Bassi [Fri, 10 Sep 2010 10:42:11 +0000 (11:42 +0100)]
actor: Add a method for querying key focus

A simple convenience method on Clutter.Actor for checking whether
it has key focus assigned on the Stage to which it belongs.

13 years agoanimation: Allow detaching an animation from an actor
Emmanuele Bassi [Fri, 10 Sep 2010 10:18:53 +0000 (11:18 +0100)]
animation: Allow detaching an animation from an actor

When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.

Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.

The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.

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

13 years agointrospection: Don't look for installed Cogl-1.0.gir
Colin Walters [Thu, 9 Sep 2010 22:01:40 +0000 (23:01 +0100)]
introspection: Don't look for installed Cogl-1.0.gir

If we're depending on an uninstalled .gir, use --include-uninstalled.
We need to explicitly specify Cogl to let the scanner know it's also
uninstalled.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agointrospection: Don't look for installed Clutter-1.0.gir
Colin Walters [Thu, 9 Sep 2010 17:32:13 +0000 (13:32 -0400)]
introspection: Don't look for installed Clutter-1.0.gir

If we're depending on an uninstalled .gir, use --include-uninstalled.

13 years agopo: Update Polish localization
Emmanuele Bassi [Thu, 9 Sep 2010 15:45:51 +0000 (16:45 +0100)]
po: Update Polish localization

13 years agoAdded documentation for alpha parameter in Behaviour constructors.
Chris Kühl [Thu, 9 Sep 2010 14:41:37 +0000 (16:41 +0200)]
Added documentation for alpha parameter in Behaviour constructors.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agocogl-vertex-buffer: Flush the framebuffer state first
Neil Roberts [Thu, 9 Sep 2010 11:15:59 +0000 (12:15 +0100)]
cogl-vertex-buffer: Flush the framebuffer state first

Flushing the framebuffer state can cause some drawing to occur if the
framebuffer has a clip stack which needs the stencil buffer. This was
causing the array pointers set up by enable_state_for_drawing_buffer
to get mangled so it would crash when it hits glDrawArrays. This patch
moves the framebuffer state flush to before it sets up the array
pointers.

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

13 years agobuild: Allow using gettext 0.17
Emmanuele Bassi [Thu, 9 Sep 2010 10:58:03 +0000 (11:58 +0100)]
build: Allow using gettext 0.17

This requires some autotools magic when setting up the environment
through autogen.sh, because autoreconf does not do the right thing
by default.

The correct order for setting up localization is:

  ‣ autopoint
  ‣ aclocal
  ‣ ...

otherwise aclocal will copy the system's gettext.m4 instead of honouring
the version we specified with AM_GNU_GETTEXT_VERSION in configure.ac.

13 years agopo: Update German localization
Emmanuele Bassi [Thu, 9 Sep 2010 10:39:56 +0000 (11:39 +0100)]
po: Update German localization

13 years agoClutterX11TexturePixmap: Fix unbalanced error trapping
Robert Bragg [Wed, 8 Sep 2010 22:33:45 +0000 (23:33 +0100)]
ClutterX11TexturePixmap: Fix unbalanced error trapping

I think this is what commit 2cf140550635 intended to do since it
specifically mentioned cleaning up the trap in
clutter_x11_texture_pixmap_set_pixmap, but although it moved the untrap
to only be done in the case where Pixmap != None it left the position of
the trap itself unchanged. This meant the error trapping wouldn't be
balanced if pixmap == None since the untrap wouldn't be done. We now
only trap and untrap around the XGetGeometry call done when pixmap !=
None.

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

13 years agobuild: Add ClutterX11 introspection generation
Emmanuele Bassi [Wed, 8 Sep 2010 17:27:12 +0000 (18:27 +0100)]
build: Add ClutterX11 introspection generation

13 years agobuild: Add XML files to the ignore blacklist
Emmanuele Bassi [Wed, 8 Sep 2010 16:50:38 +0000 (17:50 +0100)]
build: Add XML files to the ignore blacklist

13 years agox11-texture-pixmap: Do not go through g_object_get()
Emmanuele Bassi [Wed, 8 Sep 2010 16:39:04 +0000 (17:39 +0100)]
x11-texture-pixmap: Do not go through g_object_get()

The pixmap width and height are stored in our own private data
structure; going through g_object_get() is pointless overhead.

13 years agoClean up CoglTexturePixmapX11 first
Owen W. Taylor [Wed, 8 Sep 2010 15:34:58 +0000 (11:34 -0400)]
Clean up CoglTexturePixmapX11 first

With currently distributed versions of Mesa, calling XFreePixmap()
before glxDestroyPixmap() will cause an X error from DRI. So, we
need to make sure that we get rid of the CoglTexturePixmapX11 before
we XFreePixmap().

clutter_x11_texture_pixmap_dispose(): Call
 clutter_x11_texture_pixmap_set_pixmap() instead of using XFreePixmap
 directly so that we leverage the text-clearing hack and destroy
 things in the right order.

clutter_x11_texture_pixmap_set_pixmap(): Don't do a pointless roundtrip
 and trap a pointless error when setting pixmap to None.

clutter_x11_texture_pixmap_set_pixmap(): Free damage resources when
 we are setting Pixmap to None.

clutter_x11_texture_pixmap_set_window(): When setting a new window
 or setting the window to None, immedediately  call
 cluter_x11_texture_pixmap_set_pixmap(). This means that set_window(None)
 immediately will free any referenced resources related to the window.

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

13 years agoAdd caller-allocates annotations
Emmanuele Bassi [Wed, 8 Sep 2010 16:04:21 +0000 (17:04 +0100)]
Add caller-allocates annotations

For ClutterColor, ClutterUnits, ClutterInterval and the Perspective
accessor in ClutterStage.

13 years agoFurther annotation fixes
Emmanuele Bassi [Wed, 8 Sep 2010 15:41:47 +0000 (16:41 +0100)]
Further annotation fixes

13 years agointrospection: Add missing (out) annotations
Owen W. Taylor [Wed, 8 Sep 2010 14:37:58 +0000 (10:37 -0400)]
introspection: Add missing (out) annotations

Comprehensively add (out) annotations to functions parameters
returning int/float/double.

Not handled here: structure out returns like ClutterColor or
ClutterPerspective or GValue that should get (out caller-allocates).

Not handled here: Cogl

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

13 years agoConstify Event accessors and copy method
Emmanuele Bassi [Wed, 8 Sep 2010 14:15:57 +0000 (15:15 +0100)]
Constify Event accessors and copy method

This is still C, but at least we can get some sort of safety net when
using the API correctly.

13 years agopo: Rename the POT file
Emmanuele Bassi [Wed, 8 Sep 2010 13:48:40 +0000 (14:48 +0100)]
po: Rename the POT file

13 years agopo: Add clutter.pot to the repository
Emmanuele Bassi [Wed, 8 Sep 2010 13:40:52 +0000 (14:40 +0100)]
po: Add clutter.pot to the repository

Since we're not using intltool, and since we need to let people on
Transifex generate their translations, we need to add the POT file
to the repository.

13 years agopo: Add italian translation
ElleUca [Wed, 8 Sep 2010 11:44:43 +0000 (12:44 +0100)]
po: Add italian translation

13 years agopo: Update the translation files
Emmanuele Bassi [Wed, 8 Sep 2010 11:25:25 +0000 (12:25 +0100)]
po: Update the translation files

We are finally able to add the properties nicks and blurbs to the list
of translatable strings, for UI builders to use. This means bumping the
list of strings from 20-ish to a whopping 400. Whoopsie.

13 years agoAdd more /po files to the ignore list
Emmanuele Bassi [Wed, 8 Sep 2010 11:25:02 +0000 (12:25 +0100)]
Add more /po files to the ignore list

13 years agobuild: Update autogen.sh
Emmanuele Bassi [Wed, 8 Sep 2010 11:23:50 +0000 (12:23 +0100)]
build: Update autogen.sh

Remove the fix-ups for shave and gtk-doc with libtool 1.5: we don't use
shave any more, and we require libtool 2.2.

Also remove the unnecessary autopoint: we use autoreconf, which calls it
automatically.

13 years agobuild: Bump gettext version
Emmanuele Bassi [Wed, 8 Sep 2010 11:22:58 +0000 (12:22 +0100)]
build: Bump gettext version

Apparently, gettext can only work with the same exact version it's
autogenerated from.

13 years agoIgnore more files under /po
Emmanuele Bassi [Wed, 8 Sep 2010 10:56:06 +0000 (11:56 +0100)]
Ignore more files under /po

13 years agoUpdate ignore files for m4 macros
Emmanuele Bassi [Wed, 8 Sep 2010 10:53:07 +0000 (11:53 +0100)]
Update ignore files for m4 macros

13 years agoAdd Makevars
Emmanuele Bassi [Wed, 8 Sep 2010 10:50:09 +0000 (11:50 +0100)]
Add Makevars

13 years agobuild: Use upstream gettext instead the glib one
Javier Jardón [Tue, 7 Sep 2010 22:35:06 +0000 (00:35 +0200)]
build: Use upstream gettext instead the glib one

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

13 years agointrospection: Fix annotation for clutter_container_get_children()
Owen W. Taylor [Tue, 7 Sep 2010 23:56:42 +0000 (19:56 -0400)]
introspection: Fix annotation for clutter_container_get_children()

(element-type) should have a full name like Clutter.Actor rather than
a non-namespaced name like Actor. gobject-introspection has become
more strict about this with the recent scanner rewrite.

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

13 years agobuild: Update introspection.m4
Emmanuele Bassi [Tue, 7 Sep 2010 20:10:40 +0000 (21:10 +0100)]
build: Update introspection.m4

13 years agobuild: Add escaping in AS_IF()
Emmanuele Bassi [Tue, 7 Sep 2010 15:17:51 +0000 (16:17 +0100)]
build: Add escaping in AS_IF()

Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>

13 years agoMakefile.am.enums: Forgot an AM_V_GEN
Emmanuele Bassi [Tue, 7 Sep 2010 14:23:35 +0000 (15:23 +0100)]
Makefile.am.enums: Forgot an AM_V_GEN