profile/ivi/clutter.git
14 years agoUpdate ignore file
Emmanuele Bassi [Sun, 18 Oct 2009 16:15:04 +0000 (17:15 +0100)]
Update ignore file

14 years agobuild: De-nest the JSON from the introspection rules
Emmanuele Bassi [Sun, 18 Oct 2009 16:12:12 +0000 (17:12 +0100)]
build: De-nest the JSON from the introspection rules

The JSON conditional rules can be moved outside the introspection
conditional ones to avoid a nested check, as all the JSON rules do
is setting up variables that may or may not be used.

14 years agobuild: Use QUIET_GEN when building ClutterJson GIR
Emmanuele Bassi [Sun, 18 Oct 2009 16:11:42 +0000 (17:11 +0100)]
build: Use QUIET_GEN when building ClutterJson GIR

14 years agobuild: Fix up the GIR generation rules
Emmanuele Bassi [Sun, 18 Oct 2009 16:00:24 +0000 (17:00 +0100)]
build: Fix up the GIR generation rules

The rules for generating Clutter's introspection data are
still referencing the old COGL layout.

14 years agobuild: Add CPPFLAGS for the g-ir-scanner command line
Emmanuele Bassi [Fri, 16 Oct 2009 23:30:37 +0000 (00:30 +0100)]
build: Add CPPFLAGS for the g-ir-scanner command line

When I moved all CPP flags to AM_CPPFLAGS from the INCLUDES directive
I forgot that g-ir-scanner needs those defines as well.

14 years ago[cogl-primitives] Split the journal out from cogl-primitives.c
Robert Bragg [Wed, 16 Sep 2009 13:01:57 +0000 (14:01 +0100)]
[cogl-primitives] Split the journal out from cogl-primitives.c

The Journal can be considered a standalone component, so even though
it's currently only used to log quads, it seems better to split it
out into its own file.

14 years ago[test-backface-culling] Check that inverted tex coords don't affect culling
Robert Bragg [Sun, 6 Sep 2009 20:47:46 +0000 (21:47 +0100)]
[test-backface-culling] Check that inverted tex coords don't affect culling

The additional check draws another front facing rectangle but this time with
the texture coords flipped on the x axis.  The code that handles sliced
textures in cogl-primitives.c makes some suspicious changes to the geometry
when the texture coords are inverted.

14 years ago[cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced
Robert Bragg [Wed, 23 Sep 2009 14:11:55 +0000 (15:11 +0100)]
[cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced

When we implement atlas textures we will probably want to use the spans API
to handle texture repeating so it doesn't make sense to leave the code in
cogl-texture-2d-sliced.c.  Since it's a standalone set of data structures
and algorithms it also seems reasonable to split out from cogl-texture.

14 years ago[cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced
Vladimir Nadvornik [Sun, 30 Aug 2009 10:36:11 +0000 (12:36 +0200)]
[cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced

cogl-texture-2d-sliced provides an implementation of CoglTexture and this
seperation lays the foundation for potentially supporting atlas textures,
pixmap textures (as in GLX_EXT_texture_from_pixmap) and fast-path
GL_TEXTURE_{1D,2D,3D,RECTANGLE} textures in a maintainable fashion.

14 years ago[cogl-texture] Seal CoglTexture internals from cogl-primitives.c
Robert Bragg [Wed, 16 Sep 2009 10:56:17 +0000 (11:56 +0100)]
[cogl-texture] Seal CoglTexture internals from cogl-primitives.c

cogl-primitives.c was previously digging right into CoglTextures so it could
manually iterate the texture slices for texturing quads and polygons and
because we were missing some state getters we were lazily just poking into
the structures directly.

This adds some extra state getter functions, and adds a higher level
_cogl_texture_foreach_slice () API that hopefully simplifies the way in
which sliced textures may be used to render primitives.  This lets you
specify a rectangle in "virtual" texture coords and it will call a given
callback for each slice that intersects that rectangle giving the virtual
coords of the current slice and corresponding "real" texture coordinates for
the underlying gl texture.

At the same time a noteable bug in how we previously iterated sliced
textures was fixed, whereby we weren't correctly handling inverted texture
coordinates.  E.g.  with the previous code if you supplied texture coords of
tx1=100,ty1=0,tx2=0,ty2=100 (inverted along y axis) that would result in a
back-facing quad, which could be discarded if using back-face culling.

14 years ago[docs] switch gl_handle+gl_target docs for cogl_texture_new_from_foreign
Robert Bragg [Thu, 30 Jul 2009 11:06:02 +0000 (12:06 +0100)]
[docs] switch gl_handle+gl_target docs for cogl_texture_new_from_foreign

The descriptions for gl_handle and gl_target were inverted.

Thanks to Young-Ho Cha for spotting that.

Signed-off-by: Robert Bragg <robert@linux.intel.com>
14 years ago[cogl] move clutter/pango to clutter/cogl/pango
Robert Bragg [Wed, 29 Jul 2009 16:21:07 +0000 (17:21 +0100)]
[cogl] move clutter/pango to clutter/cogl/pango

As part of the re-organisation of Cogl; move clutter/pango to be part of the
cogl sub-project.

14 years agoIntial Re-layout of the Cogl source code and introduction of a Cogl Winsys
Robert Bragg [Tue, 28 Jul 2009 01:02:02 +0000 (02:02 +0100)]
Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys

As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.

Currently this is the structure I'm aiming for:
cogl/
    cogl/
<put common source here>
winsys/
   cogl-glx.c
   cogl-wgl.c
driver/
    gl/
    gles/
os/ ?
    utils/
cogl-fixed
cogl-matrix-stack?
        cogl-journal?
        cogl-primitives?
    pango/

The new winsys component is a starting point for migrating window system
code (i.e.  x11,glx,wgl,osx,egl etc) from Clutter to Cogl.

The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.

Overview of the planned structure:

* The winsys/ API is the API that binds OpenGL to a specific window system,
  be that X11 or win32 etc.  Example are glx, wgl and egl. Much of the logic
  under clutter/{glx,osx,win32 etc} should migrate here.

* Note there is also the idea of a winsys-base that may represent a window
  system for which there are multiple winsys APIs.  An example of this is
  x11, since glx and egl may both be used with x11.  (currently only Clutter
  has the idea of a winsys-base)

* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
  representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
  GLES 1.1 (fixed funciton) and 2.0 (fully shader based)

* Everything under cogl/ should fundamentally be supporting access to the
  GPU.  Essentially Cogl's most basic requirement is to provide a nice GPU
  Graphics API and drawing a line between this and the utility functionality
  we add to support Clutter should help keep this lean and maintainable.

* Code under utils/ as suggested builds on cogl/ adding more convenient
  APIs or mechanism to optimize special cases. Broadly speaking you can
  compare cogl/ to OpenGL and utils/ to GLU.

* clutter/pango will be moved to clutter/cogl/pango

How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"

Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps

As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.

14 years agoMake the CoglContext structure a bit more maintainable
Robert Bragg [Tue, 28 Jul 2009 00:34:33 +0000 (01:34 +0100)]
Make the CoglContext structure a bit more maintainable

This moves most of cogl-context.{c.h} to cogl/common with some driver
specific members now living in a CoglContextDriver struct.  Driver specific
context initialization and typedefs now live in
cogl/{gl,gles}/cogl-context-driver.{c,h}

Driver specific members can be found under ctx->drv.stuff

14 years agoImprove cogl-texture maintainability by moving 90% into cogl/common
Robert Bragg [Mon, 27 Jul 2009 23:37:11 +0000 (00:37 +0100)]
Improve cogl-texture maintainability by moving 90% into cogl/common

This splits the limited components that differed between
cogl/{gl,gles}/cogl-texture.c into new {gl,gles}/cogl-texture-driver.c files
and the rest that can now be shared into cogl/common/cogl-texture.c

14 years ago[stage-egl] support fallbacks in clutter_stage_egl_realize
Robert Bragg [Thu, 20 Aug 2009 10:54:41 +0000 (11:54 +0100)]
[stage-egl] support fallbacks in clutter_stage_egl_realize

Most of clutter_stage_egl_realize was renamed to
_clutter_stage_egl_try_realize which now takes a cookie indicating which
fallback number should tried next.  clutter_stage_egl_realize now keeps
trying to realize with successive fallback numbers until it succeeds or runs
out of fallbacks.

The only fallback supported for now is for hardware with no stencil buffer
support.

14 years ago[x11 backend] remove data duplicated between backends and stages
Robert Bragg [Mon, 3 Aug 2009 13:50:10 +0000 (14:50 +0100)]
[x11 backend] remove data duplicated between backends and stages

Make backends the canonical point of reference for the xdisplay, the xscreen
number, the x root window and the xvisinfo for creating foreign stages.

14 years ago[glx backend] white space fixes
Robert Bragg [Fri, 31 Jul 2009 19:39:28 +0000 (20:39 +0100)]
[glx backend] white space fixes

Simply removes lots of trailing white spaces

14 years ago[glx backend] use FBConfigs instead of Visuals for GL context creation
Robert Bragg [Fri, 31 Jul 2009 16:07:10 +0000 (17:07 +0100)]
[glx backend] use FBConfigs instead of Visuals for GL context creation

This replaces calls to the old (glx 1.2) functions glXChooseVisual,
glXCreateContext, glXMakeCurrent with the 1.3+ fbconfig varients
glXChooseFBConfig, glXCreateNewContext, glXMakeContextCurrent.

14 years ago[backends] Remove the idea of offscreen stages from all backends
Robert Bragg [Fri, 31 Jul 2009 17:34:51 +0000 (18:34 +0100)]
[backends] Remove the idea of offscreen stages from all backends

The only backend that tried to implement offscreen stages was the GLX backend
and even this has apparently be broken for some time without anyone noticing.

The property still remains and since the property already clearly states that
it may not work I don't expect anyone to notice.

This simplifies quite a bit of the GLX code which is very desireable from the
POV that we want to start migrating window system code down to Cogl and the
simpler the code is the more straight forward this work will be.

In the future when Cogl has a nicely designed API for framebuffer objects then
re-implementing offscreen stages cleanly for *all* backends should be quite
straightforward.

14 years ago[build] more Makefile.am.{enums,marshal} fixes for out of tree builds
Robert Bragg [Fri, 16 Oct 2009 16:15:47 +0000 (17:15 +0100)]
[build] more Makefile.am.{enums,marshal} fixes for out of tree builds

for the marshal files $(srcdir) was getting prefixed twice since my last
commit (2cc88f1140) since it was already being prefixed including
Makefile.am.  The problem with prefixing it in the includer file though is
that the Make variable substitutions like :.list=.h mean we end up
generating into the $(srcdir).  This removes the prefix added in
clutter/Makefile.am

We were also missing a $(srcdir) prefix when setting EXTRA_DIST

14 years agoSimple coding style fix for commit c5551184
Emmanuele Bassi [Fri, 16 Oct 2009 14:57:21 +0000 (15:57 +0100)]
Simple coding style fix for commit c5551184

14 years agoMerge branch 'bug-1846'
Emmanuele Bassi [Fri, 16 Oct 2009 14:55:05 +0000 (15:55 +0100)]
Merge branch 'bug-1846'

* bug-1846:
  Fix warning message in the ParamSpec validation

14 years agoMerge branch 'bug-1845'
Emmanuele Bassi [Fri, 16 Oct 2009 14:55:04 +0000 (15:55 +0100)]
Merge branch 'bug-1845'

* bug-1845:
  Add a warning when ClutterInterval can't compute progress

14 years agoFix warning message in the ParamSpec validation
Damien Lespiau [Mon, 12 Oct 2009 16:05:05 +0000 (17:05 +0100)]
Fix warning message in the ParamSpec validation

When validating a new GValue against the ClutterParamSpecUnits, we issue
a warning when the units do not match with both the new value and the
unit we expect to have. Unfortunately we were printing the unit of the
new value twice and not the unit of the ParamSpec.

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

14 years agoAdd a warning when ClutterInterval can't compute progress
Damien Lespiau [Mon, 12 Oct 2009 15:45:39 +0000 (16:45 +0100)]
Add a warning when ClutterInterval can't compute progress

This is really useful when trying to animate GTypes that haven't
registered any progress function. Instead of silently not working it
will warn the developer.

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

14 years agoAdd ClutterInterval integration
Damien Lespiau [Mon, 12 Oct 2009 15:28:10 +0000 (16:28 +0100)]
Add ClutterInterval integration

To be able to animate CLUTTER_TYPE_UNITS properties we need to register
the GType and its progress function against the ClutterInterval code.

The two ClutterUnits defining the interval can use different units, the
resulting unit will always be in pixels, so calculating a progress
between 10px and 4cm is valid.

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

14 years agounits: Cache the pixels value inside Units
Emmanuele Bassi [Fri, 16 Oct 2009 14:25:37 +0000 (15:25 +0100)]
units: Cache the pixels value inside Units

When computing the pixels value of a ClutterUnits value we should
be caching the value to avoid recomputing for every call of
clutter_units_to_pixels(). We already have a flag telling us to
return the cached value, but we miss the mechanism to evict the
cache whenever the Backend settings affecting the conversion, that
is default font and resolution, change.

In order to implement the eviction we can use a "serial"; the
Backend will have an internal serial field which we retrieve and
put inside the ClutterUnits structure (we split one of the two
64 bit padding fields into two 32 bit fields to maintain ABI); every
time we call clutter_units_to_pixels() we compare the units serial
with that of the Backend; if they match and pixels_set is set to
TRUE then we just return the stored pixels value. If the serials
do not match then we unset the pixels_set flag and recompute the
pixels value.

We can verify this by adding a simple test unit checking that
by changing the resolution of ClutterBackend we get different
pixel values for 1 em.

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

14 years agotext: Notify :position when it changes
Emmanuele Bassi [Fri, 16 Oct 2009 13:22:15 +0000 (14:22 +0100)]
text: Notify :position when it changes

The :position property is not notified when changed.

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

14 years ago[text] NULL-ify strings to avoid double-frees
Emmanuele Bassi [Sat, 19 Sep 2009 08:19:06 +0000 (09:19 +0100)]
[text] NULL-ify strings to avoid double-frees

14 years ago[text] Do not apply unset preedit attributes
Emmanuele Bassi [Sat, 19 Sep 2009 08:18:06 +0000 (09:18 +0100)]
[text] Do not apply unset preedit attributes

The pre-edit attributes are optional and thus should only be applied
if they have been set to avoid assertion failures.

14 years ago[text] Add pre-edit string to ClutterText
Emmanuele Bassi [Wed, 9 Sep 2009 11:15:23 +0000 (12:15 +0100)]
[text] Add pre-edit string to ClutterText

Input Methods require to be able to set a "pre-edit string", that is
a string that it's just displayed into the Text actor without being
committed to the actor's buffer. The string might require custom Pango
attributes, and an update of the cursor position.

14 years ago[build] fix Makefile.am.{enums,marshal} to support out of tree builds
Robert Bragg [Thu, 15 Oct 2009 18:12:34 +0000 (19:12 +0100)]
[build] fix Makefile.am.{enums,marshal} to support out of tree builds

Out of tree builds were broken in commit 46b736f42e1165 since we didn't
explicitly use $(srcdir) to find the input files for glib-mkenums and
glib-genmarshal.

14 years agobuild: Clean up main Makefile.am
Emmanuele Bassi [Tue, 13 Oct 2009 18:27:03 +0000 (19:27 +0100)]
build: Clean up main Makefile.am

14 years agobuild: Move marshallers and enum types rules out
Emmanuele Bassi [Tue, 13 Oct 2009 16:27:19 +0000 (17:27 +0100)]
build: Move marshallers and enum types rules out

The rules to create signal marshallers and enumeration GTypes are
usually copied and pasted all over different projects, though they
are pretty generic and, given a little bit of parametrization, can
be put in separate Makefile.am files and included whenever needed.

14 years agodocs: Allow XInclude fallback for the annotation glossary
Emmanuele Bassi [Tue, 13 Oct 2009 16:00:15 +0000 (17:00 +0100)]
docs: Allow XInclude fallback for the annotation glossary

14 years agodocs: Make StageManager a public class
Emmanuele Bassi [Sat, 10 Oct 2009 12:52:46 +0000 (13:52 +0100)]
docs: Make StageManager a public class

The StageManager API is useful to track the stages of an application.
It will also be useful when we land the modules API.

14 years agostage/manager: Set :default-stage as read-only
Emmanuele Bassi [Sat, 10 Oct 2009 12:51:47 +0000 (13:51 +0100)]
stage/manager: Set :default-stage as read-only

The StageManager:default-stage property should be read-only, since
the default stage is owned by Clutter itself.

14 years agostage/manager: Deprecate set_default_stage()
Emmanuele Bassi [Sat, 10 Oct 2009 12:50:25 +0000 (13:50 +0100)]
stage/manager: Deprecate set_default_stage()

The set_default_stage() method of StageManager should not be used
by application code; technically, nothing in Clutter uses it, and
StageManager's API is not considered public anyway.

14 years ago[actor] Unset the IN_DESTRUCTION flag when leaving ::destroy()
Damien Lespiau [Fri, 9 Oct 2009 16:18:34 +0000 (17:18 +0100)]
[actor] Unset the IN_DESTRUCTION flag when leaving ::destroy()

The IN_DESTRUCTION flag is set around the unrealization and disposal of
the actor in clutter_actor_destroy() but is never unset (it's set twice
instead).

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agotext: Make the :text property not set the :use-markup one
Emmanuele Bassi [Wed, 7 Oct 2009 20:44:17 +0000 (21:44 +0100)]
text: Make the :text property not set the :use-markup one

Currently, setting the :text property has the side-effect of
setting the :use-markup property to FALSE. This prevents
constructing a Text actor, or setting its properties, like:

  g_object_set (text,
                "use-markup", TRUE,
                "text", some_string,
                NULL);

as the ordering becomes important. Unfortunately, the ordering
of the properties cannot be enforced with ClutterScript or
with language bindings.

The documentation of the clutter_text_set_text() method should
be expanded to properly specify that the set_text() method will
change the :use-markup property to FALSE as a side effect.

14 years agodocs: Add the "clipping" section to the COGL API reference
Emmanuele Bassi [Wed, 7 Oct 2009 16:35:11 +0000 (17:35 +0100)]
docs: Add the "clipping" section to the COGL API reference

All the clip-related API in COGL is missing from the API reference
because the cogl-clipping section is not included inside the main
index file.

14 years ago[units] Ensure we don't have ponies
Damien Lespiau [Wed, 7 Oct 2009 16:09:41 +0000 (17:09 +0100)]
[units] Ensure we don't have ponies

The documentation states we should not parse ponies. Even with those
with exclamation marks.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[path] Add GValue transform functions from and to G_TYPE_STRING
Damien Lespiau [Mon, 5 Oct 2009 23:49:40 +0000 (00:49 +0100)]
[path] Add GValue transform functions from and to G_TYPE_STRING

Transform functions allow the use of g_value_transform() to cast
GValues. It's very handy to have casts to and from G_TYPE_STRING as it
allows generic serialization and parsing of GTypes.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[units] Add support for centimeters
Damien Lespiau [Tue, 6 Oct 2009 16:47:34 +0000 (17:47 +0100)]
[units] Add support for centimeters

The only tricky part of the patch is to remember that 1cm is 10mm.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[units] Be more strict in the grammar we are parsing
Damien Lespiau [Tue, 6 Oct 2009 11:02:15 +0000 (12:02 +0100)]
[units] Be more strict in the grammar we are parsing

Current parsing of units has a number of shortcomings:
  * a number followed by trailing space (without any unit specified) was
    not recognized,
  * "5 emeralds" was parsed as 5em,
  * the way we parse the digits after the separator makes us lose
    precision for no good reason (5.0 is parsed as 5.00010014...f which
    makes g_assert_cmpfloat() fail)

Let's define a stricter grammar we can recognize and try to do so. The
description is in EBNF form, removing the optional <> which is a pain
when having to write DocBook, and using '' for the terminal symbols.

Last step, add more ClutterUnits unit test to get a better coverage of
the grammar we want to parse.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agocolor: Measure the string just once when parsing
Emmanuele Bassi [Wed, 7 Oct 2009 12:00:57 +0000 (13:00 +0100)]
color: Measure the string just once when parsing

Instead of measuring the color hexadecimal string for each case, just
measure it once and then use a switch() to go to the right case.

14 years ago[color] allow alpha to be omitted when converting to color from string
Thomas Wood [Wed, 7 Oct 2009 11:27:38 +0000 (12:27 +0100)]
[color] allow alpha to be omitted when converting to color from string

Parse #rgb and #rrggbb in addition to forms with the alpha channel
specified. This allows conversion of colour strings from documents such as
CSS where the alpha channel is not specified when using '#' notation.

This patch also adds the relevant conformance test.

14 years ago[clutter-id-pool] Also warn if the ID refers to a deleted actor
Neil Roberts [Wed, 7 Oct 2009 10:31:44 +0000 (11:31 +0100)]
[clutter-id-pool] Also warn if the ID refers to a deleted actor

We should also warn if the glReadPixels happens to generate an ID that
is within the range of the ID array but no longer points to an
existing actor.

14 years ago[clutter-id-pool] Fix the check for out-of-range IDs
Neil Roberts [Wed, 7 Oct 2009 11:46:43 +0000 (12:46 +0100)]
[clutter-id-pool] Fix the check for out-of-range IDs

If id == the length of the array then it is also invalid and could
cause a crash.

14 years agoRevert "[color] allow alpha to omitted when converting from strings"
Thomas Wood [Wed, 7 Oct 2009 11:15:26 +0000 (12:15 +0100)]
Revert "[color] allow alpha to omitted when converting from strings"

This reverts commit eb8daac4b0726c1d9925bbbaeed7a8f39007da21.

The original commit was incorrect and pushed accidentally.

14 years ago[color] add a note to the documentation to specify the values of the alpha
Thomas Wood [Wed, 7 Oct 2009 10:40:41 +0000 (11:40 +0100)]
[color] add a note to the documentation to specify the values of the alpha

The alpha channel is fully opaque at 255 and fully transparent at 0.

14 years ago[color] allow alpha to omitted when converting from strings
Thomas Wood [Wed, 7 Oct 2009 10:38:08 +0000 (11:38 +0100)]
[color] allow alpha to omitted when converting from strings

Parse #rgb and #rrggbb in addition to forms with the alpha channel
specified. This allows conversion of colour strings from documents such as
CSS where the alpha channel is not specified when using '#' notation.

14 years ago[path] MOVE_TO and LINE_TO only use a pair of coordinates
Damien Lespiau [Tue, 6 Oct 2009 00:04:50 +0000 (01:04 +0100)]
[path] MOVE_TO and LINE_TO only use a pair of coordinates

The documentation of ClutterPathNode had a small typo and stated that
they use 2 pairs of coordinates.

14 years ago[debug] Guard the use of gdk_pixbuf for pick debugging by #ifdef USE_GDKPIXBUF
Robert Bragg [Mon, 5 Oct 2009 15:46:24 +0000 (16:46 +0100)]
[debug] Guard the use of gdk_pixbuf for pick debugging by #ifdef USE_GDKPIXBUF

gdk is an optional clutter dependency, so the pick buffer debugging option
needs some guards so we don't break, for example, the OSX builds.  This also
adds a comment for the bit fiddling done on the pick colors used to ensure
the pick colors are more distinguished while debugging.  (we swap the
nibbles of each color component so that pick buffers don't just look black.)

14 years ago[sdl] Update the SDL backend to the new StageWindow API
Emmanuele Bassi [Mon, 5 Oct 2009 14:51:28 +0000 (15:51 +0100)]
[sdl] Update the SDL backend to the new StageWindow API

The SDL backend remains experimental and not meant for public
consumption, but at least it compiles and runs successfully.

14 years ago[eglx] Create a StageWindow, not an Actor
Emmanuele Bassi [Mon, 5 Oct 2009 14:53:06 +0000 (15:53 +0100)]
[eglx] Create a StageWindow, not an Actor

The Backend should create a StageWindow instance, not an Actor.

14 years ago[ClutterGroup] Don't take into account the left edges when calculating the size
Neil Roberts [Tue, 29 Sep 2009 11:11:55 +0000 (12:11 +0100)]
[ClutterGroup] Don't take into account the left edges when calculating the size

ClutterGroup previously calculated the size as the distance from the
left edge of the leftmost child to the right edge of the rightmost
child except if there were any chidren left of the origin then the
left edge would be zero.

However the group is always allocated its size relative to its
origin so if all of the children are to the right of the origin then
the preferred size would not be large enough to reach the rightmost
child.

    origin
    β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚Group     β”‚
    β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”
    β”‚ β”‚Child   β”‚ β”‚
    β”‚ β”‚        β”‚ β”‚
    β””β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
      β”‚          β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       group size
      β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’

This patch makes it so the size is always just the rightmost edge.

    origin
    β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚Group       β”‚
    β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚ β”‚Child     β”‚
    β”‚ β”‚          β”‚
    β”‚ β”‚          β”‚
    β”‚ β”‚          β”‚
    β””β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      group size
    β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’

Fixes bug:

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

14 years ago[eglx] Update the EGLX Stage to the new StageWindow API
Emmanuele Bassi [Mon, 5 Oct 2009 13:58:08 +0000 (14:58 +0100)]
[eglx] Update the EGLX Stage to the new StageWindow API

Move the ::realize and ::unrealize implementations over to the
StageWindow instead of using Actor.

14 years agoFix string parsing when no unit is given
Damien Lespiau [Sat, 3 Oct 2009 13:08:33 +0000 (14:08 +0100)]
Fix string parsing when no unit is given

The check should really be on the character pointed by str. Added the
corresponding test case.

14 years agoclutter_value_get_unit() has not be renamed
Damien Lespiau [Sat, 3 Oct 2009 11:15:13 +0000 (12:15 +0100)]
clutter_value_get_unit() has not be renamed

Since the Great Rework of ClutterUnits, functions have been using
'units' not 'unit' in their name. clutter_value_get_unit() is a left
over from a dark age, its declaration and documentation have been
updated but not the symbol itself.

14 years agoMerge branch 'stage-window-object'
Emmanuele Bassi [Mon, 5 Oct 2009 11:37:08 +0000 (12:37 +0100)]
Merge branch 'stage-window-object'

* stage-window-object:
  [x11] Fix Stage user-initiated resize
  [x11] Remove a useless forced paint
  [stage] Rework the Stage implementation class

14 years agoClarify the IdPool warning
Emmanuele Bassi [Mon, 5 Oct 2009 11:34:48 +0000 (12:34 +0100)]
Clarify the IdPool warning

Instead of having an assertion failure with a message of dubious
usefulness, we should probably use a more verbose warning explaining
what is the problem and what might be the cause.

14 years ago[x11] Fix Stage user-initiated resize
Emmanuele Bassi [Mon, 5 Oct 2009 11:24:19 +0000 (12:24 +0100)]
[x11] Fix Stage user-initiated resize

The user-initiated resize is conflicting with the allocated size. This
happens because we change the size of the stage's X Window behind the
back of the size allocation machinery.

Instead, we should change the size of the actor whenever we receive a
ConfigureNotify event to reflect the new size of the actor.

14 years ago[x11] Remove a useless forced paint
Emmanuele Bassi [Mon, 5 Oct 2009 11:21:02 +0000 (12:21 +0100)]
[x11] Remove a useless forced paint

We force the redraw before mapping, in the hope that when a composited
window manager maps the window it will have its contents ready; that is
not going to work: the solution for this problem requires the implementation
of a protocol for compositors, and not a hack.

Moreover, painting before mapping will cause a paint with the wrong
GL viewport size, which is the wrong thing to do on GLX.

14 years ago[docs] Update the "Subclassing Actor" chapter
Emmanuele Bassi [Sun, 27 Sep 2009 10:38:01 +0000 (11:38 +0100)]
[docs] Update the "Subclassing Actor" chapter

The chapter on how to subclass ClutterActor inside the API reference for
Clutter is still using ClutterUnit and referencing to concepts that have
been changed since the document was written.

14 years ago[cogl-debug] avoid warnings when using COGL_NOTE with unbraced else clauses
Robert Bragg [Mon, 27 Jul 2009 23:40:29 +0000 (00:40 +0100)]
[cogl-debug] avoid warnings when using COGL_NOTE with unbraced else clauses

When not building a debug build the compiler was warning about empty
else clauses with no braces due to code like:
  if (blah)
do_foo();
  else
COGL_NOTE (DRAW, "a-wibble");

This simply ensures that even for non debug builds COGL_NOTE will expand to
a single statement.

14 years ago[cogl-vertex-buffer] fix n_components validation for GL's builtin attributes
Robert Bragg [Thu, 24 Sep 2009 16:34:26 +0000 (17:34 +0100)]
[cogl-vertex-buffer] fix n_components validation for GL's builtin attributes

glVertexPointer expects positions with 2, 3 or 4 components, glColorPointer
expects colors with 3 or 4 components and glNormalPointer expects normals
with three components so when adding vertex buffer atributes with the names
"gl_Vertex", "gl_Color" or "gl_Normal" we assert these constraints and print
an explanation to the developer if not met.

This also fixes the previosly incorrect constraint that gl_Normal attributes
must have n_components == 1; thanks to Cat Sidhe for reporting this:

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

14 years ago[debug] Adds a dump-pick-buffers CLUTTER_DEBUG option
Robert Bragg [Thu, 24 Sep 2009 11:49:17 +0000 (12:49 +0100)]
[debug] Adds a dump-pick-buffers CLUTTER_DEBUG option

Now if you export CLUTTER_DEBUG=dump-pick-buffers clutter will write out a
png, e.g.  pick-buffer-00000.png, each time _clutter_to_pick() is called.
It's a rather crude way to debug the picking (realtime visualization in a
second stage would probably be nicer) but it we've used this approach
successfully numerous times when debugging Clutter picking issues so it
makes sense to have a debug option for it.

14 years ago[container] Remove the unused 'object' variable in destroy_child_meta
Neil Roberts [Tue, 22 Sep 2009 16:55:04 +0000 (17:55 +0100)]
[container] Remove the unused 'object' variable in destroy_child_meta

Since commit b2f958a61 this variable is no longer used so it was
causing compiler warnings.

14 years ago[tests] Remove test-entry.c since we don't have a ClutterEntry any more
Robert Bragg [Tue, 22 Sep 2009 10:27:47 +0000 (11:27 +0100)]
[tests] Remove test-entry.c since we don't have a ClutterEntry any more

Removes an unused interactive unit test for the old ClutterEntry actor we
used to have.

14 years ago[backend-egl] fix clutter_backend_egl_get_visual_info to not use Xalloc
Robert Bragg [Thu, 20 Aug 2009 10:53:37 +0000 (11:53 +0100)]
[backend-egl] fix clutter_backend_egl_get_visual_info to not use Xalloc

It looks like the intention was to duplicate an XVisualInfo in such a way
that the pointer could be returned and then later freed using XFree.  But
Xalloc isn't an Xlib counterpart to XFree; Xlib doesn't provide a general
purpose malloc wrapper afik.  By shuffling things about a bit, it was
possible to avoid the need for this hack.

14 years agoAdd a few annotations on Cogl primitives functions
Damien Lespiau [Mon, 21 Sep 2009 14:21:21 +0000 (15:21 +0100)]
Add a few annotations on Cogl primitives functions

By default, float * is considered as an out argument by gobject
introspection which is wrong for quite a few Cogl symbols. Start adding
annotations to fix that for the ones in the "Primitives" gtk-doc
section.

14 years ago[container] cast actor to gobject before calling g_object_set_qdata
Robert Bragg [Mon, 21 Sep 2009 17:12:02 +0000 (18:12 +0100)]
[container] cast actor to gobject before calling g_object_set_qdata

A minor compiler warning fix: in destroy_child_meta we weren't casting the
first argument to g_object_set_qdata to a gobject.

14 years ago[container] unset the child meta qdata on the child, not the container
Øyvind KolΓ₯s [Mon, 21 Sep 2009 14:55:58 +0000 (15:55 +0100)]
[container] unset the child meta qdata on the child, not the container

In the default implementation of container::destroy_child_meta Set child
meta qdata to NULL on the child and not the container, since the child
is the object that owns the data.

14 years ago[container] set the child meta qdata on the child, not the container
Thomas Wood [Mon, 21 Sep 2009 14:40:53 +0000 (15:40 +0100)]
[container] set the child meta qdata on the child, not the container

Set child meta qdata on the child and not the container, since the child is
the object that owns the data.

14 years ago[cogl] Remove CoglContext->journal_vbo{,_len}
Neil Roberts [Thu, 17 Sep 2009 17:29:03 +0000 (18:29 +0100)]
[cogl] Remove CoglContext->journal_vbo{,_len}

The lifetime of the journal VBO is entirely within the scope of the
cogl_journal_flush function so there is no need to store it globally
in the Cogl context. Instead, upload_vertices_to_vbo just returns the
new VBO. cogl_journal_flush stores this in a local variable and
destroys it before returning.

This also fixes an assertion when using the GLES backend which was
caused by nothing initialising the journal_vbo variable.

14 years ago[build] Split out the custom silent rules
Emmanuele Bassi [Wed, 16 Sep 2009 16:43:58 +0000 (17:43 +0100)]
[build] Split out the custom silent rules

The silent rules we use for custom targets should be moved into a
separate Makefile.am that gets included from all the others.

14 years ago[test-cogl-multitexture] Print an error if textures can't be loaded
Robert Bragg [Wed, 16 Sep 2009 16:12:30 +0000 (17:12 +0100)]
[test-cogl-multitexture] Print an error if textures can't be loaded

I just wasted a silly amount time trying to bisect an apparently broken
cogl-test-multitexture until I realized it was just silently failing to load
any textures.

14 years ago[docs] Fix the comment on version bumps
Emmanuele Bassi [Wed, 16 Sep 2009 11:47:46 +0000 (12:47 +0100)]
[docs] Fix the comment on version bumps

14 years ago[gitignore] Add test-preferred-size
Emmanuele Bassi [Wed, 16 Sep 2009 10:57:45 +0000 (11:57 +0100)]
[gitignore] Add test-preferred-size

14 years ago[timeline] Account for clock roll backs between frames
Emmanuele Bassi [Wed, 16 Sep 2009 10:55:04 +0000 (11:55 +0100)]
[timeline] Account for clock roll backs between frames

If the system clock rolls back between two frames then we need
to account for the change, to avoid stopping the timeline.

The best option, since a roll back can be any arbitrary amount
of milliseconds, is to skip a frame.

Fixes bug:

  http://bugzilla.moblin.org/show_bug.cgi?id=3839

14 years ago[cogl-fbo] Disable mipmap filters before calling glCheckFramebufferStatusEXT
Robert Bragg [Tue, 15 Sep 2009 15:27:45 +0000 (16:27 +0100)]
[cogl-fbo] Disable mipmap filters before calling glCheckFramebufferStatusEXT

The framebuffer_object spec isn't clear in defining whether attaching a
texture as a renderbuffer with mipmap filtering enabled while the mipmaps
have not been uploaded should result in an incomplete framebuffer object.
(different drivers make different decisions)

To avoid an error with drivers that do consider this a problem we explicitly
set non mipmapped filters before calling glCheckFramebufferStatusEXT.  The
filters will later be reset when the texture is actually used for rendering
according to the filters set on the corresponding CoglMaterial.

14 years ago[tests] Add preferred size conformance test unit
Emmanuele Bassi [Tue, 15 Sep 2009 10:09:49 +0000 (11:09 +0100)]
[tests] Add preferred size conformance test unit

This unit verifies that an Actor class will invoke the get_preferred_*
virtual functions unless the caching is in effect; it also verifies
that the cached values are correctly evicted.

14 years ago[tests] Add initial sizing conformance test suite
Emmanuele Bassi [Mon, 14 Sep 2009 20:45:51 +0000 (21:45 +0100)]
[tests] Add initial sizing conformance test suite

The size requisition and allocation mechanisms should be thoroughly
tested to avoid unwanted regressions.

For starters, we can test the explicit size setting and the side
effects of calling clutter_actor_set_size().

14 years ago[container] Use a 1:1 mapping between child and ChildMeta
Emmanuele Bassi [Mon, 14 Sep 2009 14:57:31 +0000 (15:57 +0100)]
[container] Use a 1:1 mapping between child and ChildMeta

Since an actor can only be parented to one container we don't need
the extra complications of maintaining a list of ChildMeta objects
attached to an actor in the default implementation of the Container
interface.

14 years ago[docs] Clutter's model implementation is called ClutterListModel
Damien Lespiau [Thu, 10 Sep 2009 12:27:02 +0000 (13:27 +0100)]
[docs] Clutter's model implementation is called ClutterListModel

It was renamed from ClutterModelDefault to ClutterListModel a while
back. Update the reference to this class in ClutterModel documentation.

14 years ago[docs] Add fixxref for Cairo symbols
Emmanuele Bassi [Wed, 9 Sep 2009 15:15:54 +0000 (16:15 +0100)]
[docs] Add fixxref for Cairo symbols

Let gtk-doc resolve the Cairo types and symbols to the installed
Cairo documentation.

14 years ago[docs] Add a Path migration guide
Emmanuele Bassi [Wed, 9 Sep 2009 15:01:07 +0000 (16:01 +0100)]
[docs] Add a Path migration guide

ClutterBehaviourPath has been changed and ClutterBehaviourBspline has
been removed; now we use ClutterPath everywhere we need to describe a
path. This warrants a chapter in the migration guide.

14 years ago[text] implement get_property for "use-markup"
Øyvind KolΓ₯s [Tue, 8 Sep 2009 12:06:51 +0000 (13:06 +0100)]
[text] implement get_property for "use-markup"

14 years ago[stage] Rework the Stage implementation class
Emmanuele Bassi [Thu, 13 Aug 2009 11:34:07 +0000 (12:34 +0100)]
[stage] Rework the Stage implementation class

Instead of using ClutterActor for the base class of the Stage
implementation we should extend the StageWindow interface with
the required bits (geometry, realization) and use a simple object
class.

This require a wee bit of changes across Backend, Stage and
StageWindow, even though it's mostly re-shuffling.

First of all, StageWindow should get new virtual functions:

  * geometry:
    - resize()
    - get_geometry()

  * realization
    - realize()
    - unrealize()

This covers all the bits that we use from ClutterActor currently
inside the stage implementations.

The ClutterBackend::create_stage() virtual function should create
a StageWindow, and not an Actor (it should always have been; the
fact that it returned an Actor was a leak of the black magic going
on underneath). Since we never guaranteed ABI compatibility for
the Backend class, this is not a problem.

Internally to ClutterStage we can finally drop the shenanigans of
setting/unsetting actor flags on the implementation: if the realization
succeeds, for instance, we set the REALIZED flag on the Stage and
we're done.

As an initial proof of concept, the X11 and GLX stage implementations
have been ported to the New World Order(tm) and show no regressions.

14 years ago[docs] Small annotation fixes
Emmanuele Bassi [Mon, 7 Sep 2009 10:44:44 +0000 (11:44 +0100)]
[docs] Small annotation fixes

14 years ago[animation] Move the check for the 'signal::' prefix into a separate function
Neil Roberts [Mon, 7 Sep 2009 10:36:05 +0000 (11:36 +0100)]
[animation] Move the check for the 'signal::' prefix into a separate function

The old code checked whether the property began with 'signal-' and
then checked for 'signal-swapped' and 'signal-after'. This prevented
you from animating a property called for example 'signal-strength'.

The check for the prefix is now in a separate function which also adds
a 'signal-swapped-after' prefix for completeness.

Fixes bug:

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

14 years ago[docs] Add more collateral documentation
Emmanuele Bassi [Thu, 3 Sep 2009 15:51:14 +0000 (16:51 +0100)]
[docs] Add more collateral documentation

* Add the main Glossary for Clutter terms

* Add the annotation glossary, as generated by gtk-doc

* Add the objects index and tree

14 years agoDOT3_RGB[A] cannot be used in a Blend String
Samuel Degrande [Wed, 2 Sep 2009 15:27:22 +0000 (16:27 +0100)]
DOT3_RGB[A] cannot be used in a Blend String

The blend string compiler checks that the syntax of a function name is
[A-Za-z_]*, preventing the use of DOT3_RGB[A].

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[model] Do not attempt to free empty column names
Emmanuele Bassi [Wed, 2 Sep 2009 14:26:33 +0000 (15:26 +0100)]
[model] Do not attempt to free empty column names

The column names are optional - ClutterModel will use the GType name
if there is no user-specified column name. Hence, the ::finalize vfunc
should not try to free an empty column names vector.

Fixes bug:

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

14 years ago[docs] Make sure to document the point-release process
Emmanuele Bassi [Mon, 31 Aug 2009 14:49:39 +0000 (15:49 +0100)]
[docs] Make sure to document the point-release process

Put the documentation right inside configure.ac, lest I forget.

14 years agoTake a reference to the material in clutter_texture_set_cogl_material
Neil Roberts [Wed, 26 Aug 2009 17:28:35 +0000 (18:28 +0100)]
Take a reference to the material in clutter_texture_set_cogl_material

The material is unref'd in clutter_texture_finalize and the
documentation explicitly states that the function will take a ref so
it really should.

14 years agoFix the documentation for clutter_texture_set_cogl_material
Neil Roberts [Wed, 26 Aug 2009 17:24:48 +0000 (18:24 +0100)]
Fix the documentation for clutter_texture_set_cogl_material

The documentation was a copy of the docs for set_cogl_texture so it
was somewhat broken.

14 years ago[tests] Update the script test JSON
Emmanuele Bassi [Wed, 26 Aug 2009 15:50:37 +0000 (16:50 +0100)]
[tests] Update the script test JSON

The test-script.json UI definition still used old types, like
ClutterLabel and ClutterCloneTexture. It should move to the classes
that have replaced them.