profile/ivi/clutter.git
14 years agomodel: Let get_n_columns() return a sane value
Emmanuele Bassi [Wed, 17 Mar 2010 17:14:08 +0000 (17:14 +0000)]
model: Let get_n_columns() return a sane value

If you call get_n_columns() during the instance initialization phase but
before set_name()/set_types() have been called, you'll get a (guint) -1.
This is less than ideal.

If columns haven't been initialized we should just return 0, which was
the intent of the API since the beginning.

Based on a patch by: Bastian Winkler <buz@netbuz.org>

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agomodel: Add a comment on the n_columns field type
Emmanuele Bassi [Tue, 16 Mar 2010 18:57:28 +0000 (18:57 +0000)]
model: Add a comment on the n_columns field type

To avoid another bug report like:

  http://bugzilla.openedhand.com/show_bug.cgi?id=2017

with a patch that gets applied without a proper review, resulting in a
bug like:

  http://bugzilla.openedhand.com/show_bug.cgi?id=2032

I should probably add a comment on why on earth we're using an integer
as the n_columns member of the ClutterModelPrivate structure, and why it
is important that it is initialized as -1.

14 years agoRevert "model: Use guint for the n_columns field"
Emmanuele Bassi [Tue, 16 Mar 2010 18:53:24 +0000 (18:53 +0000)]
Revert "model: Use guint for the n_columns field"

The int storage, and the initial value of -1, is used as a guard when
subclassing ClutterListModel to allow the sub-class to call
clutter_model_set_names() and clutter_model_set_types().

This reverts commit c274118a8f7ed18e5bc703e614a9ea0a7cdb553c.

14 years agoBranch master for 1.3
Emmanuele Bassi [Tue, 16 Mar 2010 10:44:40 +0000 (10:44 +0000)]
Branch master for 1.3

14 years agoPost-release version bump to 1.2.3
Emmanuele Bassi [Mon, 15 Mar 2010 16:40:50 +0000 (16:40 +0000)]
Post-release version bump to 1.2.3

14 years agoRelease 1.2.2
Emmanuele Bassi [Mon, 15 Mar 2010 16:25:46 +0000 (16:25 +0000)]
Release 1.2.2

14 years agoUpdate NEWS file
Emmanuele Bassi [Mon, 15 Mar 2010 16:04:34 +0000 (16:04 +0000)]
Update NEWS file

14 years agoReturn and warn if a handle's refcount is <= 0
Colin Walters [Fri, 12 Mar 2010 22:39:27 +0000 (17:39 -0500)]
Return and warn if a handle's refcount is <= 0

This makes it more likely consumers notice invalid unreferences.
GObject has the same assertion.

http://bugzilla.openedhand.com/show_bug.cgi?id=2029

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agomodel: Use guint for the n_columns field
Bastian Winkler [Tue, 2 Mar 2010 08:26:57 +0000 (09:26 +0100)]
model: Use guint for the n_columns field

clutter_model_get_n_columns is supposed to return a guint, so the
n_columns field needs to be a guint with the initial value set to 0.

http://bugzilla.openedhand.com/show_bug.cgi?id=2017

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agocogl-texture-2d: Determine format before checking texture support
Neil Roberts [Wed, 10 Mar 2010 00:37:52 +0000 (16:37 -0800)]
cogl-texture-2d: Determine format before checking texture support

When entering cogl_texture_2d_new_from_bitmap the internal format can
be COGL_PIXEL_FORMAT_ANY. This was causing _cogl_texture_2d_can_create
to use an invalid GL format type. Mesa apparently ignores this but it
was causing errors when Cogl is compiled with debugging under NVidia.

http://bugzilla.openedhand.com/show_bug.cgi?id=2026

14 years agoFix checks for out-of-bounds coordinates and repeats
Owen W. Taylor [Mon, 1 Mar 2010 21:49:04 +0000 (16:49 -0500)]
Fix checks for out-of-bounds coordinates and repeats

Add a return result from CoglTexture.transform_quad_coords_to_gl(),
so that we can properly determine the nature of repeats in
the face of GL_TEXTURE_RECTANGLE_ARB, where the returned
coordinates are not normalized.

The comment "We also work out whether any of the texture
coordinates are outside the range [0.0,1.0]. We need to do
this after calling transform_coords_to_gl in case the texture
backend is munging the coordinates (such as in the sub texture
backend)." is disregarded and removed, since it's actually
the virtual coordinates that determine whether we repeat,
not the GL coordinates.

Warnings about disregarded layers are used in all cases where
applicable, including for subtextures.

http://bugzilla.openedhand.com/show_bug.cgi?id=2016

Signed-off-by: Neil Roberts <neil@linux.intel.com>
14 years agotest-paint-wrapper: Request ARGB visuals on GLX
Emmanuele Bassi [Wed, 10 Mar 2010 00:25:26 +0000 (00:25 +0000)]
test-paint-wrapper: Request ARGB visuals on GLX

If we are on GLX we have to request ARGB visuals, otherwise Clutter will
not do it by itself.

14 years agoFix argb initialisation.
José Dapena Paz [Mon, 8 Mar 2010 14:37:36 +0000 (15:37 +0100)]
Fix argb initialisation.

Fix clutter initialisation if argb visuals are enabled, setting a border
color on creating the dummy window. This should avoid BadMatch happening
when the depth of the root window visual is not the same of the depth
of the argb visual.

http://bugzilla.openedhand.com/show_bug.cgi?id=2011

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoactor: Remove some double indirection
Emmanuele Bassi [Sun, 7 Mar 2010 23:46:59 +0000 (23:46 +0000)]
actor: Remove some double indirection

Use an intermediate variable to avoid a double indirection when accessing
the instance private data structure.

14 years agojson: Improve strictness of the JSON parser
Emmanuele Bassi [Sun, 7 Mar 2010 20:54:33 +0000 (20:54 +0000)]
json: Improve strictness of the JSON parser

Backport of the upstream JSON-GLib commit that improved the strictness
of JsonParser.

The original upstream commit is:

  29881f03468db08bfb404cfcd5b61b4cdc419a87

14 years agoAdd test-cogl-texture-rectangle to the ignore file
Emmanuele Bassi [Fri, 5 Mar 2010 11:39:32 +0000 (11:39 +0000)]
Add test-cogl-texture-rectangle to the ignore file

14 years agoeglnative: Connect StageWindow.show and .hide
Emmanuele Bassi [Fri, 5 Mar 2010 08:48:52 +0000 (08:48 +0000)]
eglnative: Connect StageWindow.show and .hide

The show() and hide() methods of the StageWindow interface are
implemented but not assigned when initializing the interface
vtable.

14 years agodocs: Update the HACKING.backends file
Emmanuele Bassi [Wed, 3 Mar 2010 18:17:15 +0000 (18:17 +0000)]
docs: Update the HACKING.backends file

The create_context() and ensure_context() sections should be more clear
on the role of the functions, and their eventual caveats, like being
called multiple times.

14 years agoAdd a conformance test for rectangle textures
Neil Roberts [Tue, 2 Mar 2010 15:18:00 +0000 (15:18 +0000)]
Add a conformance test for rectangle textures

The test creates a GL_TEXTURE_RECTANGLE_ARB texture using
cogl_texture_new_from_foreign and confirms that rendering it works
correctly. If the rectangle texture extension isn't available then
this test always succeeds.

http://bugzilla.openedhand.com/show_bug.cgi?id=2015

14 years agoCoglTexture2DSliced: Handle TEXTURE_RECTANGLE_ARB
Owen W. Taylor [Mon, 1 Mar 2010 19:04:20 +0000 (14:04 -0500)]
CoglTexture2DSliced: Handle TEXTURE_RECTANGLE_ARB

In _cogl_texture_2d_sliced_foreach_sub_texture_in_region(), don't
assert that the target is GL_TEXTURE_2D; instead conditionalize
normalization on the target.

http://bugzilla.openedhand.com/show_bug.cgi?id=2015

14 years agoeglnative: Don't create a context if there already is one
Neil Roberts [Wed, 3 Mar 2010 18:08:33 +0000 (18:08 +0000)]
eglnative: Don't create a context if there already is one

If the EGL context is already created then we shouldn't try to create
another one. This was causing problems where one context would be
created from calling _clutter_feature_init and the other was created
from _clutter_backend_get_features. Cogl would set up its state using
the first context and then assume the state was still valid when the
second context became used so blending was not working correctly.

http://bugzilla.openedhand.com/show_bug.cgi?id=2020

14 years agox11-texture-pixmap: Move signal handler override
Emmanuele Bassi [Wed, 3 Mar 2010 17:46:53 +0000 (17:46 +0000)]
x11-texture-pixmap: Move signal handler override

The signal handling override for the ::queue-damage-redraw should be
done in the class initialization function, not in the instance one.

14 years agoUpdate stb_image.c
Emmanuele Bassi [Wed, 3 Mar 2010 17:02:51 +0000 (17:02 +0000)]
Update stb_image.c

Upstream "released" 1.18.

14 years agoanimator: compare floating point values with an epsilon
Øyvind Kolås [Wed, 3 Mar 2010 15:45:43 +0000 (15:45 +0000)]
animator: compare floating point values with an epsilon

Direct comparisons with doubles are error prone.

14 years agoanimator: fix a crash in clutter_animator_compute_value
Øyvind Kolås [Wed, 3 Mar 2010 15:46:19 +0000 (15:46 +0000)]
animator: fix a crash in clutter_animator_compute_value

Fix a crasher when there is only one key in the animator.

14 years agoeglnative: Compilation fixes
Emmanuele Bassi [Wed, 3 Mar 2010 15:31:01 +0000 (15:31 +0000)]
eglnative: Compilation fixes

We should include <errno.h>, if we plan to use errno.

Why, yes: I am that stupid.

14 years agodocs: Fix gtk-doc annotation for ClutterStageManageClass
Emmanuele Bassi [Wed, 3 Mar 2010 10:49:34 +0000 (10:49 +0000)]
docs: Fix gtk-doc annotation for ClutterStageManageClass

Remove the semi-colon and use a colon for declaring the type.

14 years agobox: Fix allow-none annotation
Emmanuele Bassi [Wed, 3 Mar 2010 10:47:42 +0000 (10:47 +0000)]
box: Fix allow-none annotation

The syntax for allowing NULL is "allow-none", not "allow none".

14 years agoPost-release version bump to 1.2.1
Emmanuele Bassi [Tue, 2 Mar 2010 19:41:44 +0000 (19:41 +0000)]
Post-release version bump to 1.2.1

14 years agoRelease 1.2.0 (stable)
Emmanuele Bassi [Tue, 2 Mar 2010 18:03:23 +0000 (18:03 +0000)]
Release 1.2.0 (stable)

14 years agoUpdate the NEWS file
Emmanuele Bassi [Tue, 2 Mar 2010 18:03:13 +0000 (18:03 +0000)]
Update the NEWS file

14 years agobuild: Include test-script-model.json
Emmanuele Bassi [Tue, 2 Mar 2010 19:17:28 +0000 (19:17 +0000)]
build: Include test-script-model.json

The Model conformance test for ClutterScript parsing requires the file
to be inside the dist.

14 years agobuild: Add test-animator-3.json to EXTRA_DIST
Emmanuele Bassi [Tue, 2 Mar 2010 19:29:22 +0000 (19:29 +0000)]
build: Add test-animator-3.json to EXTRA_DIST

14 years agoconformance: Use g_assert_no_error() if available
Emmanuele Bassi [Tue, 2 Mar 2010 19:09:20 +0000 (19:09 +0000)]
conformance: Use g_assert_no_error() if available

GLib 2.20 has a nice g_assert() wrapper which will print out the GError
if it's not NULL.

14 years agoclutter-actor: Initialize with the identity matrix in get_transform
Neil Roberts [Tue, 2 Mar 2010 18:30:31 +0000 (18:30 +0000)]
clutter-actor: Initialize with the identity matrix in get_transform

The documentation and name of the get_transformation_matrix function
implies that 'matrix' is purely an out parameter. However it wasn't
initializing the matrix before calling the 'apply_transform' virtual
so it was basically just a wrapper for the virtual. The virtual
assumes the matrix parameter is in/out and applies the actor's
transformation on top of any existing transformations. This causes
unexpected semantics that are inconsistent with the documentation.

14 years agotext-field: Cast GString->len to integer before printing
Emmanuele Bassi [Tue, 2 Mar 2010 17:47:13 +0000 (17:47 +0000)]
text-field: Cast GString->len to integer before printing

The compiler will warn on 64bit architectures when using %d for
printing a gsize field.

http://bugzilla.openedhand.com/show_bug.cgi?id=2019

14 years agoglx tfp: make clutter_glx_texture_pixmap_update_area cheap
Robert Bragg [Tue, 2 Mar 2010 14:04:54 +0000 (14:04 +0000)]
glx tfp: make clutter_glx_texture_pixmap_update_area cheap

This changes clutter_glx_texture_pixmap_update_area so it defers the
call to glXBindTexImageEXT until our pre "paint" signal handler which
makes clutter_glx_texture_pixmap_update_area cheap to call.

The hope is that mutter can switch to reporting raw damage updates to
ClutterGLXTexturePixmap and we can use these to queue clipped redraws.

14 years agoAdds initial clipped redraw support to Clutter
Robert Bragg [Mon, 30 Nov 2009 17:47:55 +0000 (17:47 +0000)]
Adds initial clipped redraw support to Clutter

A new (internal only currently) API, _clutter_actor_queue_clipped_redraw
can be used to queue a redraw along with a clip rectangle in actor
coordinates. This clip rectangle propagates up to the stage and clutter
backend which may optionally use the information to optimize stage
redraws. The GLX backend in particular may scissor the next redraw to
the clip rectangle and use GLX_MESA_copy_sub_buffer to present the stage
subregion.

The intention is that any actors that can naturally determine the bounds
of updates should queue clipped redraws to reduce the cost of updating
small regions of the screen.

Notes:
» If GLX_MESA_copy_sub_buffer isn't available then the GLX backend
  ignores any clip rectangles.

» queuing multiple clipped redraws will result in the bounding box of
  each clip rectangle being used.

» If a clipped redraw has a height > 300 pixels then it's promoted into
  a full stage redraw, so that the GPU doesn't end up blocking too long
  waiting for the vsync to reach the optimal position to avoid tearing.

  » Note: no empirical data was used to come up with this threshold so
    we may need to tune this.

» Currently only ClutterX11TexturePixmap makes use of this new API. This
  is done via a new "queue-damage-redraw" signal that is emitted when
  the pixmap is updated. The default handler queues a clipped redraw
  with the assumption that the pixmap is being painted as a rectangle
  covering the actors transformed allocation. If you subclass
  ClutterX11TexturePixmap and change how it's painted you now also
  need to override the signal handler and queue your own redraw.

  Technically this is a semantic break, but it's assumed that no one
  is currently doing this.

This still leaves a few unsolved issues with regards to optimizing sub
stage redraws that need to be addressed in further work so this can only
be considered a stepping stone a this point:

» Because we have no reliable way to determine if the painting of any
  given actor is being modified any optimizations implemented using
  _clutter_actor_queue_redraw_with_clip must be overridable by a
  subclass, and technically must be opt-in for existing classes to avoid
  a change in semantics. E.g. consider that a user connects to the paint
  signal for ClutterTexture and paints a circle instead of a rectangle.
  In this case any original logic to queue clipped redraws would be
  incorrect.

» Currently only the implementation of an actor has enough information
  with which to queue clipped redraws. E.g. It is not possible for
  generic code in clutter-actor.c to queue a clipped redraw when hiding
  an actor because actors have no way to report a "paint box". (remember
  actors can draw outside their allocation and actors with depth may
  also be projected outside of their allocation)

  » The current plan is to add a actor_class->get_paint_cuboid()
    virtual so actors can report a bounding cube for everything they
    would draw in their current state and use that to queue clipped
    redraws against the stage by projecting the paint cube into stage
    coordinates.

» Our heuristics for promoting clipped redraws into full redraws to
  avoid blocking the GPU while we wait for the vsync need improving:

  » vsync issues aren't relevant for redirected/composited applications
    so they should use different heuristics. In this case we instead
    need to trade off the cost of blitting when using glXCopySubBuffer
    vs promoting to a full redraw and flipping instead.

14 years agoanimator: s/clutter_animator_run/clutter_animator_start/
Øyvind Kolås [Tue, 2 Mar 2010 17:03:03 +0000 (17:03 +0000)]
animator: s/clutter_animator_run/clutter_animator_start/

This is consistent with choice of words in clutter_timeline_start and
makes the API less surprising.

14 years agocogl debug: Adds missing guards around debug cogl_args[]
Robert Bragg [Tue, 2 Mar 2010 02:07:40 +0000 (02:07 +0000)]
cogl debug: Adds missing guards around debug cogl_args[]

commit 511e5ceb516dc accidentally removed the #ifdef COGL_ENABLE_DEBUG
guards around the "cogl-debug" and "cogl-no-debug" cogl_args[] which
this patch restores.

14 years agoflow-layout: Provide a preferred size
Emmanuele Bassi [Tue, 2 Mar 2010 15:08:01 +0000 (15:08 +0000)]
flow-layout: Provide a preferred size

The FlowLayout fails to provide a preferred size in case no sizing is
specified on one axis. It should, instead, have the preferred size of
the sum of its children, depending on the orientation property.

http://bugzilla.openedhand.com/show_bug.cgi?id=2013

14 years agobuild: Require libtool >= 2.2.6
Emmanuele Bassi [Tue, 2 Mar 2010 13:32:46 +0000 (13:32 +0000)]
build: Require libtool >= 2.2.6

Update the configure.ac to use the LT_INIT() instead of the deprecated
AC_PROG_LIBTOOL. This also allows us to depend on a specific libtool
version, namely one that doesn't thoroughly suck.

14 years agoanimator: restore accidentally removed break
Øyvind Kolås [Tue, 2 Mar 2010 12:38:51 +0000 (12:38 +0000)]
animator: restore accidentally removed break

In 505e5966 a break statement was removed by accident, causing the
animator to enter infinite loops if no initial key is present.

14 years agoMerge branch 'eglnative-update'
Emmanuele Bassi [Tue, 2 Mar 2010 12:25:45 +0000 (12:25 +0000)]
Merge branch 'eglnative-update'

* eglnative-update:
  eglnative: Add CLUTTER_FB_DEVICE
  eglnative: Update implementation

14 years agoeglnative: Add CLUTTER_FB_DEVICE
Emmanuele Bassi [Mon, 1 Mar 2010 11:38:41 +0000 (11:38 +0000)]
eglnative: Add CLUTTER_FB_DEVICE

Some EGL drivers for embedded devices require a specific framebuffer
device to be opened and passed to eglCreateWindowSurface(). Since it's
optional, we can provide an environment variabled called
CLUTTER_FB_DEVICE that can be used to specify the path of the device
to be opened.

http://bugzilla.openedhand.com/show_bug.cgi?id=1997

14 years agoeglnative: Update implementation
Emmanuele Bassi [Sat, 27 Feb 2010 09:42:42 +0000 (09:42 +0000)]
eglnative: Update implementation

Update the EGL native framebuffer backend to be 1.2-ready:

  » create the EGL context and the surface inside the create_context()
    implementation so that a context is always available

  » simplify the StageWindow implementation

  » clean up old code

http://bugzilla.openedhand.com/show_bug.cgi?id=1997

14 years agoFall back in _cogl_texture_2d_new_from_bitmap()
Owen W. Taylor [Mon, 1 Mar 2010 18:54:03 +0000 (13:54 -0500)]
Fall back in _cogl_texture_2d_new_from_bitmap()

Just like _cogl_texture_2d_new_with_size(),
_cogl_texture_2d_new_from_bitmap() needs to check if an unsliced
texture can be created at the given size, or if hardware
limitations prevent this.

http://bugzilla.openedhand.com/show_bug.cgi?id=2014

Signed-off-by: Neil Roberts <neil@linux.intel.com>
14 years agodocs: Documentation fixes
Emmanuele Bassi [Tue, 2 Mar 2010 09:53:55 +0000 (09:53 +0000)]
docs: Documentation fixes

Let's see if we can get a 100% coverage for Clutter too.

14 years agocogl: Support any format in cogl_read_pixels
Neil Roberts [Mon, 1 Mar 2010 18:08:41 +0000 (18:08 +0000)]
cogl: Support any format in cogl_read_pixels

cogl_read_pixels() no longer asserts that the format passed in is
RGBA_8888 but instead accepts any format. The appropriate GL enums for
the format are passed to glReadPixels so OpenGL should be perform a
conversion if neccessary.

It currently assumes glReadPixels will always give us premultiplied
data. This will usually be correct because the result of the default
blending operations for Cogl ends up with premultiplied data in the
framebuffer. However it is possible for the framebuffer to be in
whatever format depending on what CoglMaterial is used to render to
it. Eventually we may want to add a way for an application to inform
Cogl that the framebuffer is not premultiplied in case it is being
used for some special purpose.

If the requested format is not premultiplied then Cogl will convert
it. The tests have been changed to read the data as premultiplied so
that they won't be affected by the conversion. Picking in Clutter has
been changed to use COGL_PIXEL_FORMAT_RGB_888 because it doesn't need
the alpha component. clutter_stage_read_pixels is left unchanged
because the application can't specify a format for that so it seems to
make most sense to store unpremultiplied values.

http://bugzilla.openedhand.com/show_bug.cgi?id=1959

14 years agoDo not overwrite the initial key, making ease-in work as expected.
Øyvind Kolås [Mon, 1 Mar 2010 18:35:01 +0000 (18:35 +0000)]
Do not overwrite the initial key, making ease-in work as expected.

Fixes bug #2008, where a property with ease-in would jump instead of
start at the properties initial value.

14 years agoanimator: Remove redundant declaration in header file
Bastian Winkler [Mon, 1 Mar 2010 16:00:41 +0000 (17:00 +0100)]
animator: Remove redundant declaration in header file

clutter_animator_property_set_interpolation was declared twice in
clutter-animator.h

http://bugzilla.openedhand.com/show_bug.cgi?id=2012

14 years agodocs: Add Animator.compute_value()
Emmanuele Bassi [Mon, 1 Mar 2010 17:47:52 +0000 (17:47 +0000)]
docs: Add Animator.compute_value()

The clutter_animator_compute_value() has been added to the API, but it
is missing from the API reference.

14 years agodocs: Fix syntax error in Model's documentation
Emmanuele Bassi [Mon, 1 Mar 2010 17:45:00 +0000 (17:45 +0000)]
docs: Fix syntax error in Model's documentation

A missing opening quote sign is breaking gtk-doc for ClutterModel.

14 years agoMerge branch 'stage-min-size-rework'
Emmanuele Bassi [Mon, 1 Mar 2010 15:37:12 +0000 (15:37 +0000)]
Merge branch 'stage-min-size-rework'

* stage-min-size-rework:
  docs: Update minimum size accessors
  actor: Use the TOPLEVEL flag instead of a type check
  [stage] Use min-width/height props for min size

14 years agoprofile: avoid segfault generating reports with no stats
Robert Bragg [Fri, 26 Feb 2010 09:44:29 +0000 (09:44 +0000)]
profile: avoid segfault generating reports with no stats

The clutter-profile.c print_report() code would crash if no stats had
been gathered because uprof would return NULL for the "Redrawing" timer
which we then dereferenced.

This changes the code to start by checking for the "Mainloop",
"Redrawing" and "Do Pick" timers and if none are present it returns
immediately without generating any report.

14 years agobuild: Fixes out of tree builds
Robert Bragg [Fri, 26 Feb 2010 09:48:43 +0000 (09:48 +0000)]
build: Fixes out of tree builds

When building the gobject introspection data the build wasn't able to
find clutter/clutter-json.h so this adds $(top_builddir) to INCLUDES.

14 years agoRemove mentions of the FSF address
Emmanuele Bassi [Mon, 1 Mar 2010 12:56:10 +0000 (12:56 +0000)]
Remove mentions of the FSF address

Since using addresses that might change is something that finally
the FSF acknowledge as a plausible scenario (after changing address
twice), the license blurb in the source files should use the URI
for getting the license in case the library did not come with it.

Not that URIs cannot possibly change, but at least it's easier to
set up a redirection at the same place.

As a side note: this commit closes the oldes bug in Clutter's bug
report tool.

http://bugzilla.openedhand.com/show_bug.cgi?id=521

14 years agobuild: Remove unused checks on platform functions
Emmanuele Bassi [Mon, 1 Mar 2010 11:12:16 +0000 (11:12 +0000)]
build: Remove unused checks on platform functions

There is no need for us to check for low-level functions and header
files, especially since we haven't been checking the results until
now. This makes cross-compiling slightly more bearable.

14 years agoactor: Call unparent() in destroy
Emmanuele Bassi [Sun, 28 Feb 2010 10:59:29 +0000 (10:59 +0000)]
actor: Call unparent() in destroy

If the actor is an internal child of another actor then we should call
unparent() when destroying it, like clutter_actor_reparent() does;
otherwise we'll leak the actor, since the parent holds a reference to
it.

http://bugzilla.openedhand.com/show_bug.cgi?id=2009

14 years agodocs: Update minimum size accessors
Emmanuele Bassi [Sat, 27 Feb 2010 18:56:34 +0000 (18:56 +0000)]
docs: Update minimum size accessors

Expand the documentation for set_minimum_size() and get_minimum_size(),
and add introspection annotations for get_minimum_size().

14 years agoactor: Use the TOPLEVEL flag instead of a type check
Emmanuele Bassi [Sat, 27 Feb 2010 18:24:17 +0000 (18:24 +0000)]
actor: Use the TOPLEVEL flag instead of a type check

We can use the internal private CLUTTER_ACTOR_IS_TOPLEVEL flag, which is
set only on Stages.

14 years ago[stage] Use min-width/height props for min size
Chris Lord [Fri, 26 Feb 2010 18:36:38 +0000 (18:36 +0000)]
[stage] Use min-width/height props for min size

Instead of shadowing these properties with different properties with the
same names on stage, actually use them. Behaviour should be identical,
except the minimum stage size can now be enforced by setting the
min-width/height properties as well as using the set_minimum_size
function.

14 years agodocs: Update --enable-cogl-debug description
Emmanuele Bassi [Fri, 26 Feb 2010 16:43:02 +0000 (16:43 +0000)]
docs: Update --enable-cogl-debug description

The 'no' value is not the default any more. The 'minimum' value is
always the default, regardless of the release status.

14 years agodocs: Unicode-ify NEWS
Emmanuele Bassi [Fri, 26 Feb 2010 15:12:27 +0000 (15:12 +0000)]
docs: Unicode-ify NEWS

14 years agobuild: More options for Automake
Emmanuele Bassi [Fri, 26 Feb 2010 15:00:47 +0000 (15:00 +0000)]
build: More options for Automake

Require automake >= 1.10, and add the following options:

  » dist-bzip2: create a bz2 tarball in the dist process
  » check-news: check that we changed the NEWS file prior to dist,
    to avoid another release without NEWS updates, like 1.1.10

14 years agodevice: When changing the stage, unset the pointer actor
Emmanuele Bassi [Fri, 26 Feb 2010 10:36:17 +0000 (10:36 +0000)]
device: When changing the stage, unset the pointer actor

If we do not unset the Stage we will have stale data, and the Crossing
event when re-entering a Stage will not be emitted, as the actor under
the pointer might be the same as before.

14 years agocogl-vertex-buffer: Add support for unsigned int indices
Neil Roberts [Tue, 23 Feb 2010 14:45:44 +0000 (14:45 +0000)]
cogl-vertex-buffer: Add support for unsigned int indices

This adds a COGL_INDICES_TYPE_UNSIGNED_INT enum value so that unsigned
ints can be used with cogl_vertex_buffer_indices_new.  Unsigned ints
are not supported in core on GLES so a feature flag has also been
added to advertise this. GLES only sets the feature if the
GL_OES_element_index_uint extension is available. It is an error to
call indices_new() with unsigned ints unless the feature is
advertised.

http://bugzilla.openedhand.com/show_bug.cgi?id=1998

14 years agodocs: Document the "columns" syntax for ClutterModel
Emmanuele Bassi [Thu, 25 Feb 2010 23:23:53 +0000 (23:23 +0000)]
docs: Document the "columns" syntax for ClutterModel

Like we do for other classes implementing custom properties, we should
document the syntax of the "columns" scriptable property of ClutterModel.

14 years agoconformance: Use g_test_verbose() for logging
Emmanuele Bassi [Thu, 25 Feb 2010 23:15:59 +0000 (23:15 +0000)]
conformance: Use g_test_verbose() for logging

Protect g_print() calls behind the g_test_verbose() check, to avoid
unwanted output during the conformance test run.

14 years agomodel: Implement ClutterScriptable interface
Bastian Winkler [Thu, 25 Feb 2010 22:47:49 +0000 (23:47 +0100)]
model: Implement ClutterScriptable interface

Allow a ClutterModel to be constructed through the ClutterScript API.
Currently this allows a model to be generated like like this:

{
  "id" : "test-model",
  "type" : "ClutterListModel",
  "columns" : [
    [ "text-column", "gchararray" ],
    [ "int-column", "gint" ],
    [ "actor-column", "ClutterRectangle" ]
  ]
}

where 'columns' is an array containing arrays of column-name,
column-type pairs.

http://bugzilla.openedhand.com/show_bug.cgi?id=2007

14 years agodocs: gtk-doc fixes for Animator
Emmanuele Bassi [Thu, 25 Feb 2010 22:50:38 +0000 (22:50 +0000)]
docs: gtk-doc fixes for Animator

Fix the syntax for:

  → enumeration values
  → return values
  → @since tags

Also, fix the introspection annotations.

14 years agoglx: Clean up sync-to-vblank mechanism discovery
Emmanuele Bassi [Thu, 25 Feb 2010 18:28:37 +0000 (18:28 +0000)]
glx: Clean up sync-to-vblank mechanism discovery

The code has gotten really complicated to follow.

As soon as we have a sync-to-vblank mechanism we should just bail out.

Also, __GL_SYNC_TO_VBLANK (which is used by nVidia) should be assumed
equivalent to a CLUTTER_VBLANK_GLX_SWAP.

14 years agodocs: Add visual cue for Animator's key frames
Emmanuele Bassi [Thu, 25 Feb 2010 17:09:55 +0000 (17:09 +0000)]
docs: Add visual cue for Animator's key frames

We should explain what a "key frame" is for ClutterAnimator, possibly
with some sort of visual cue.

This allows me to demonstrate my poor skills at using Inkscape, as well
as my overall bad taste for graphics design.

14 years agoscript-parser: Remove top-level types list
Emmanuele Bassi [Thu, 25 Feb 2010 14:22:08 +0000 (14:22 +0000)]
script-parser: Remove top-level types list

The top-level types list was comically out of date, and it was only
determining whether the type we were constructing was initially unowned
or a full object. We can safely replace it with a simple type check.

14 years agoscript-parser: Be more strict with "children" members
Emmanuele Bassi [Thu, 25 Feb 2010 14:20:05 +0000 (14:20 +0000)]
script-parser: Be more strict with "children" members

The "children" member for Container definitions should only reference
actors, and warn about any other type.

14 years agoanimator: Add a :timeline property
Emmanuele Bassi [Thu, 25 Feb 2010 14:08:57 +0000 (14:08 +0000)]
animator: Add a :timeline property

It would be useful to be able to share the Timeline across different
animator instances, or with different animation constructs. Also this
allows sharing definitions of Timelines in ClutterScript.

14 years agoanimator: Remove NULL check in remove_key()
Emmanuele Bassi [Thu, 25 Feb 2010 14:02:29 +0000 (14:02 +0000)]
animator: Remove NULL check in remove_key()

The arguments for remove_key() can be NULL, but there is an extraneous
assertion that fails if they are. The pre-conditions should match the
documentation, in this case.

14 years agobox: Let pack_at() create the ChildMeta, if any
Emmanuele Bassi [Thu, 25 Feb 2010 12:45:02 +0000 (12:45 +0000)]
box: Let pack_at() create the ChildMeta, if any

A sub-class of ClutterBox might add ChildMeta support, and since
pack_at() does not go through clutter_container_add_actor(), we
need to manually call the create_child_meta() ourselves.

14 years agocontainer: Expose create and destroy ChildMeta methods
Emmanuele Bassi [Thu, 25 Feb 2010 12:39:24 +0000 (12:39 +0000)]
container: Expose create and destroy ChildMeta methods

It is conceivable that Container implementations might add children
outside of the Container::add() implementation - e.g. for packing at
a specific index. Since the addition (and removal) might happen outside
the common path we need to expose all the API that is implicitly called
by ClutterContainer when adding and removing a child - namely the
ChildMeta creation and destruction.

14 years agotest-cogl-blend-strings: Add some more tests
Neil Roberts [Wed, 24 Feb 2010 23:04:39 +0000 (23:04 +0000)]
test-cogl-blend-strings: Add some more tests

The adds tests for the remaining layer combine functions, the 1 minus
value operator and the TEXTURE_N source. Note however that Cogl
currently fails when parsing a TEXTURE_N source so the test is
commented out.

14 years agogles2: Remove the special wrapper for glBindTexture
Neil Roberts [Wed, 24 Feb 2010 11:13:55 +0000 (11:13 +0000)]
gles2: Remove the special wrapper for glBindTexture

Previously the GLES2 backend needed a special wrapper for
glBindTexture because it needed to know the internal GL format of the
texture in order to correctly implement the GL_MODULATE texture env
mode. When GL_MODULATE is used then the RGB values are taken from the
previous texture layer rather than being fetched from the
texture. However since the material API was added Cogl no longer uses
the GL_MODULATE texture env mode but instead always uses GL_COMBINE.

Compiling the GLES2 backend broke since the more-texture-backends
branch merge because the cogl_get_internal_gl_format function was
removed and there was one place in GLES2 specific code that was using
this to bind the texture.

14 years agocogl-gles2-wrapper: Add support for the layer combine operations
Neil Roberts [Wed, 24 Feb 2010 16:50:32 +0000 (16:50 +0000)]
cogl-gles2-wrapper: Add support for the layer combine operations

The texture layer combine functions are now hard coded to GL_COMBINE
instead of GL_MODULATE. The combine function can be customized with
all the parameters of GL_COMBINE. A shader is generated to implement
the given parameters.

Currently it will try to generate code for the constant color but it
will use a uniform which does not exist.

14 years agogles2: Implement a wrapper for glGetIntegerv(GL_MAX_TEXTURE_UNITS)
Neil Roberts [Wed, 24 Feb 2010 10:42:59 +0000 (10:42 +0000)]
gles2: Implement a wrapper for glGetIntegerv(GL_MAX_TEXTURE_UNITS)

The GLES2 backend for Cogl is failing to compile because
GL_MAX_TEXTURE_UNITS is not defined. Let's define it and provide a
wrapper which uses GL_MAX_TEXTURE_IMAGE_UNITS or
COGL_GLES2_MAX_TEXTURE_UNITS, whichever is the smallest.

14 years agoanimator: handle no initial key
Øyvind Kolås [Thu, 25 Feb 2010 12:30:07 +0000 (12:30 +0000)]
animator: handle no initial key

Fixing the crasher reported in bug #1995.

14 years agoanimator: added clutter_animator_compute_value
Øyvind Kolås [Thu, 25 Feb 2010 11:48:44 +0000 (11:48 +0000)]
animator: added clutter_animator_compute_value

Allow querying the computed values of properties managed by a
ClutterAnimator.

14 years agoanimator: removed bogus arg in keys interpolation accessor
Øyvind Kolås [Thu, 25 Feb 2010 11:28:32 +0000 (11:28 +0000)]
animator: removed bogus arg in keys interpolation accessor

A bogus ClutterInterpolation argument had been carried from
clutter_animator_set_interpolation to clutter_animator_get_interpolation
in copy and paste.

14 years agoanimation: Fix a typo
Emmanuele Bassi [Thu, 25 Feb 2010 12:01:03 +0000 (12:01 +0000)]
animation: Fix a typo

This will teach me to check before compiling a version-dependent branch
that I'm actually using my jhbuild environment and not the system
libraries.

14 years agoConditionally use G_VALUE_COLLECT_INIT() macro
Emmanuele Bassi [Thu, 25 Feb 2010 10:22:36 +0000 (10:22 +0000)]
Conditionally use G_VALUE_COLLECT_INIT() macro

GLib 2.24 (but starting from the 2.23.2 unstable release) added a new
macro for collecting GValues from a va_list.

The newly added G_VALUE_COLLECT_INIT() macro should be used in place
of initializing the GValue and calling G_VALUE_COLLECT(), and improves
the collection performances by avoiding multiple checks, free and
initialization calls.

14 years agoconform: Verify parsing of multiple properties
Emmanuele Bassi [Wed, 24 Feb 2010 16:43:17 +0000 (16:43 +0000)]
conform: Verify parsing of multiple properties

The ClutterAnimator support for parsing multiple properties should be
verified in the conformance test suite.

http://bugzilla.openedhand.com/show_bug.cgi?id=2003

14 years agoanimator: Append parsed animator keys to previously parsed ones
Bastian Winkler [Wed, 24 Feb 2010 15:32:19 +0000 (16:32 +0100)]
animator: Append parsed animator keys to previously parsed ones

Reuse the GSList of the previously parsed property when building a
ClutterAnimator from script, otherwise only the last used property will
be used

http://bugzilla.openedhand.com/show_bug.cgi?id=2003

14 years agoPost-release version bump to 1.1.15
Emmanuele Bassi [Wed, 24 Feb 2010 14:40:22 +0000 (14:40 +0000)]
Post-release version bump to 1.1.15

14 years agoRelease 1.1.14
Emmanuele Bassi [Wed, 24 Feb 2010 14:26:46 +0000 (14:26 +0000)]
Release 1.1.14

14 years agobuild: Use the right headers when enumerating them
Emmanuele Bassi [Wed, 24 Feb 2010 14:23:58 +0000 (14:23 +0000)]
build: Use the right headers when enumerating them

The installed _HEADERS should be the public ones and the enumeration
types; repeating clutter-x11-texture-pixmap.h breaks with automake 1.11
and doesn't strictly make any sense.

http://bugzilla.openedhand.com/show_bug.cgi?id=2002

14 years agoUpdate NEWS file
Emmanuele Bassi [Wed, 24 Feb 2010 14:20:14 +0000 (14:20 +0000)]
Update NEWS file

14 years agofixed layout: Store a back pointer to the Container
Emmanuele Bassi [Wed, 24 Feb 2010 12:23:46 +0000 (12:23 +0000)]
fixed layout: Store a back pointer to the Container

When set_container() is called with a NULL container we cannot use the
passed pointer to unset the CLUTTER_ACTOR_NO_LAYOUT flag. We should
store a back pointer to the container as object data (there's no need
to add a Private data structure in this case) and unset the flag on the
back pointer instead.

14 years agoconformance: Show the Stage to test invariants
Emmanuele Bassi [Wed, 24 Feb 2010 12:09:13 +0000 (12:09 +0000)]
conformance: Show the Stage to test invariants

We need to make the Stage set the MAPPED flag on itself if we want to
verify the MAPPED state. That was always the case - it just worked
before because the Stage was shown at least once.

14 years agobox: Do not short-circuit size negotiation for empty Boxes
Emmanuele Bassi [Wed, 24 Feb 2010 12:08:07 +0000 (12:08 +0000)]
box: Do not short-circuit size negotiation for empty Boxes

The LayoutManager used might decide to have a default allocation or a
default preferred size when empty.

14 years agolayout: allow wider use of the CLUTTER_ACTOR_NO_LAYOUT flag
Robert Bragg [Thu, 11 Feb 2010 11:45:36 +0000 (11:45 +0000)]
layout: allow wider use of the CLUTTER_ACTOR_NO_LAYOUT flag

Previously only ClutterGroup was able to set the CLUTTER_ACTOR_NO_LAYOUT
flag which allows clutter-actor.c to avoid a relayout when showing or
hiding fixed layout containers. Instead of it being the responsibility
of the container to set this flag this patch makes the layout manager
itself decide in the ::set_container method. This way both ClutterBox
and ClutterGroup can take advantage of the optimization.

14 years agodocs: Detail replacement for cogl_check_extension()
Emmanuele Bassi [Wed, 24 Feb 2010 11:28:44 +0000 (11:28 +0000)]
docs: Detail replacement for cogl_check_extension()

The cogl_check_extension() function has been deprecated, but it's easily
replaceable with a simple strstr() call.

14 years agodocs: Update NEWS and README
Emmanuele Bassi [Wed, 24 Feb 2010 11:27:51 +0000 (11:27 +0000)]
docs: Update NEWS and README

The NEWS file was not updated for the 1.1.12 release, so we need to
update it now.

The Release Notes section for Clutter and Cogl also needs some more
entries that escaped previous releases.