profile/ivi/clutter.git
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.

14 years ago[script] Clean up the ad hoc parsing code in Actor
Emmanuele Bassi [Wed, 26 Aug 2009 15:49:45 +0000 (16:49 +0100)]
[script] Clean up the ad hoc parsing code in Actor

The old parsing code still assumed we had integers for pixels
and floating point values for percentages; this is not the case
anymore.

14 years ago[script] Convert double to float when parsing
Emmanuele Bassi [Wed, 26 Aug 2009 15:48:32 +0000 (16:48 +0100)]
[script] Convert double to float when parsing

The default floating point type for JSON is double precision; this means
that we need to conver to single precision when setting a property with
type G_TYPE_FLOAT.

14 years ago[tests] Add a Group actor unit
Emmanuele Bassi [Tue, 25 Aug 2009 16:55:51 +0000 (17:55 +0100)]
[tests] Add a Group actor unit

We need to test that the depth sorting of ClutterGroup works correctly
in case we wish to change the data structure that stores the children,
and do so without changing the default behaviour.

14 years ago[group] Use floating point in sort_z_order
Øyvind Kolås [Tue, 25 Aug 2009 16:32:42 +0000 (17:32 +0100)]
[group] Use floating point in sort_z_order

14 years ago[docs] Add Interval get_type function
Emmanuele Bassi [Tue, 25 Aug 2009 11:39:40 +0000 (12:39 +0100)]
[docs] Add Interval get_type function

The get_type() function for ClutterInterval is missing from the
known GObject types, so gtk-doc doesn't know that it has to
introspect it for hierarchy, properties and signals.

14 years agoFix the warnings for Animation::update_interval()
Emmanuele Bassi [Tue, 25 Aug 2009 11:18:32 +0000 (12:18 +0100)]
Fix the warnings for Animation::update_interval()

The bindings for update_interval() were copied from bind().

14 years ago[animation] Add Animation::update()
Emmanuele Bassi [Tue, 25 Aug 2009 11:16:41 +0000 (12:16 +0100)]
[animation] Add Animation::update()

Currently, to update a property inside an animation you have to
get the interval for that property and then call the set_final_value()
method.

We can provide a simpler, bind()-like method for the convenience of
the developers that just validates everything and then calls the
Interval.set_final_value().

14 years ago[cogl-texture] Set GL_PACK_ROW_LENGTH when downloading texture data
Neil Roberts [Mon, 24 Aug 2009 11:50:57 +0000 (12:50 +0100)]
[cogl-texture] Set GL_PACK_ROW_LENGTH when downloading texture data

Otherwise the rowstride passed in from an application is not used
correctly so you can not download to an area with a much larger
rowstride.

14 years ago[glx] Perform more checks before calling glXMakeCurrent
Emmanuele Bassi [Fri, 21 Aug 2009 11:05:52 +0000 (12:05 +0100)]
[glx] Perform more checks before calling glXMakeCurrent

Right now we just check for a NULL stage before calling glXMakeCurrent().

We can, though, get a valid stage without an implementation attached to
it while we are disposing a stage after a CLUTTER_DELETE event, since the
events processing is performed on a vblank-locked basis.

14 years agoAdd ::queue-relayout signal to ClutterActor for ClutterClone
Owen W. Taylor [Sat, 8 Aug 2009 01:16:04 +0000 (21:16 -0400)]
Add ::queue-relayout signal to ClutterActor for ClutterClone

ClutterClone bases its preferred size on the preferred size of
the source actor, so it needs to invalid its cached preferred
size when the preferred size of the source actor changes.

In order for this to work, we need to have notification when
the size of the source actor changes, so add a ::queue-relayout
signal to ClutterActor.

Then connect to this from ClutterClone and queue a relayout
on the clone when a relayout is queued on the source.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoRevert "[cogl] Allow Cogl to create NPOT textures for GLES2"
Robert Bragg [Thu, 20 Aug 2009 11:53:32 +0000 (12:53 +0100)]
Revert "[cogl] Allow Cogl to create NPOT textures for GLES2"

This reverts commit 3c47a3beb51462ef8af1070b75123660059e97d0.

Of course I remembered just after pushing the patch why we hadn't done
this before :-) If you look in the glsl spec:
http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.24.pdf
Section 3.7.10 Texture Completeness and Non-Power-Of-Two Textures
you can see GLES 2.0 doesn't support mipmaps for npot textures.

There is possibly some way we could support this in Cogl but at least
it's not as simple as or-ing in the feature flag, sadly.

14 years ago[cogl] Allow Cogl to create NPOT textures for GLES2
Robert Bragg [Thu, 20 Aug 2009 11:15:21 +0000 (12:15 +0100)]
[cogl] Allow Cogl to create NPOT textures for GLES2

The core GLES2 API supports NPOT textures, i.e. there is no extension as for
OpenGL, so we now add COGL_FEATURE_TEXTURE_NPOT to the feature flags in
_cogl_features_init.

Thanks to Gordon Williams for spotting this.

14 years ago[cogl] %.c: %.glsl codegen: use BUILT_SOURCES var + fix stringify.sh
Robert Bragg [Wed, 19 Aug 2009 14:38:25 +0000 (15:38 +0100)]
[cogl] %.c: %.glsl codegen: use BUILT_SOURCES var + fix stringify.sh

Don't let stringify.sh write to the $srcdir + use the BUILT_SOURCES var in
Makefile.am so as to ensure all .c.  and .h files get generated from their
corresponding .glsl files before building other targets.

14 years agoCheck timeline direction when forcing final state
Jonas Bonn [Wed, 19 Aug 2009 13:14:10 +0000 (13:14 +0000)]
Check timeline direction when forcing final state

If the timeline is running backwards, the completed signal handler should
set the final state from the interval's initial value.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoUse AM_SILENT_RULES if automake >= 1.11 is installed
Emmanuele Bassi [Mon, 10 Aug 2009 10:45:44 +0000 (12:45 +0200)]
Use AM_SILENT_RULES if automake >= 1.11 is installed

Fixes bug:

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

Based on a patch by: Javier Jardón <javierjc1982@gmail.com>

14 years ago[pango-display-list] Don't premultiply the colour twice
Neil Roberts [Tue, 18 Aug 2009 17:07:37 +0000 (18:07 +0100)]
[pango-display-list] Don't premultiply the colour twice

When rendering a glyph run from a texture we were premultiplying the
colour once in display_list_render() and then again in
display_list_render_texture(). This was causing the color to come out
wrong. This fixes bug #1775.

Thanks to Pierre-Luc Beaudoin for reporting.

14 years ago[cogl-material] Fix some brackets in _layer_flush_gl_sampler_state
Robert Bragg [Tue, 18 Aug 2009 15:13:13 +0000 (16:13 +0100)]
[cogl-material] Fix some brackets in _layer_flush_gl_sampler_state

The wrong part of an expression was bracketed in the test to determine
when a new texture matrix needed to be loaded which resulted in the
first pass through _cogl_material_layer_flush_gl_sampler_state
not uploading any user matrix.

14 years ago[docs] texture_polygon() is called polygon()
Emmanuele Bassi [Tue, 18 Aug 2009 10:11:29 +0000 (11:11 +0100)]
[docs] texture_polygon() is called polygon()

Remove the mentions to the old name of cogl_polygon().

14 years ago[build] Nothing can be prepended to QUIET_* rules
Emmanuele Bassi [Mon, 17 Aug 2009 22:27:22 +0000 (23:27 +0100)]
[build] Nothing can be prepended to QUIET_* rules

Move the LD_LIBRARY_PATH override after the QUIET_GEN rule and
unbreak the typelib compilation.

14 years ago[text] move_word_backward/forward fixes
Jussi Kukkonen [Sun, 16 Aug 2009 21:00:35 +0000 (00:00 +0300)]
[text] move_word_backward/forward fixes

clutter_text_move_word_backward/forward() calls did not use the
start argument consistently. Also, clutter_text_move_word_forward()
bound check checked the wrong end.

Fixes #1765

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[text] Don't interpret the unicode value when the control modifier is on
Neil Roberts [Mon, 17 Aug 2009 16:43:42 +0000 (17:43 +0100)]
[text] Don't interpret the unicode value when the control modifier is on

When a letter key is pressed with the control key held down one of
three things will happen :-

a) If the stage is embedded within a GtkClutterEmbed the unicode value
   will be filled from gdk_keyval_to_unicode. This will be the same
   value as if control was not pressed (so Ctrl+V will be 'v').

b) If the stage is not in a GtkClutterEmbed and Clutter is running on
   the X11 backend then it will try to fill in the unicode value from
   XLookupString. This *will* take into account the control so the
   unicode value will represent a control character (Ctrl+V will be
   '\x16').

c) Most other backends will not bother to fill in the unicode
   value. Therefore clutter_keysym_to_unicode will be used which also
   does not take into account the control key (so Ctrl+V will be 'v').

For cut and paste to work in Nbtk, the control keys need to bubble up
to the parent NbtkEntry container. This works fine for 'b' but not 'a'
and 'c'.

This patch makes ClutterText always allow the event to bubble if the
key is not handled by the binding pool and the control modifier is
down.

Ideally ClutterText would always get a unicode value that takes into
account the modifiers but this is probably best left up to the input
methods.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoSet LD_LIBRARY_PATH when running g-ir-compiler
Owen W. Taylor [Mon, 17 Aug 2009 17:57:18 +0000 (13:57 -0400)]
Set LD_LIBRARY_PATH when running g-ir-compiler

g-ir-compiler currently opens the library for the .gir it is compiling;
to make that work we need to set LD_LIBRARY_PATH before running
g-ir-compiler to include .libs.

(I think this may have been working earlier because there was a
hack that substituted .so with .la and tried opening that; that
works for the incorrect libclutter-glx-1.0.so but not for the
correct libclutter-glx-1.0.so.0)

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

14 years agoFull fix for the G-I support in Clutter
Owen W. Taylor [Mon, 17 Aug 2009 14:41:27 +0000 (15:41 +0100)]
Full fix for the G-I support in Clutter

Update the sed hack for the shared library to be more robust.

Remove the --shared-library command line argument from g-ir-scanner,
as no distribution will ever ship the .la files. This effectively
reverts commit 68f8a98cfbf70e2b7bfcda7831907633eb08ca50.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoSpecify the shared library for g-ir-compile
Götz Waschk [Mon, 17 Aug 2009 13:21:42 +0000 (14:21 +0100)]
Specify the shared library for g-ir-compile

Use the --shared-library option to specify the shared object to link
against when compiling the typelib from the GIR data.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoUpdate Clutter to use G-I 0.6.4
Götz Waschk [Mon, 17 Aug 2009 13:12:21 +0000 (14:12 +0100)]
Update Clutter to use G-I 0.6.4

Following bug #1762, the syntax of g-ir-scanner was changed in
gobject-introspection, so Clutter does not build anymore with 0.6.4.

See the bugzilla bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=591669

GObject-Introspection now uses a different mechanism to extract the
SONAME when building the gir file and it needs the libtool archive as
option.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years ago[docs] Update the requirements section
Emmanuele Bassi [Mon, 17 Aug 2009 09:27:13 +0000 (10:27 +0100)]
[docs] Update the requirements section

14 years ago[units] Do not be locale-dependant on string conversion
Emmanuele Bassi [Fri, 14 Aug 2009 14:59:29 +0000 (15:59 +0100)]
[units] Do not be locale-dependant on string conversion

When dumping a ClutterUnits structure to a string we are using a bare
g_strdup_printf(), which unfortunately is locale dependant. So, for
instance, a type of CLUTTER_UNIT_EM and a value of 42 are stringified
as:

        C:      42.00 em
        en_GB   42.00 em
        it_IT   42,00 em
        fr_FR   42,00 em

This would not be a problem -- clutter_units_from_string() allows both
'.' and ',' as fractionary part delimiters. The test suite, on the
other hand, does not know that, and it checks for exact matches with
the C locale.

Calling setlocale(LC_ALL,"C") at the beginning of the conformance test
suite is not a good idea, because it would prevent external testing; and
it's a lame cop out from doing exactly what we have to do -- pick a format
and stick with it.

Like other platforms, languages and frameworks before us, we opt to
be less liberal in what we create; so, we choose to always stringify
ClutterUnits with fractionary parts using '.' as the delimiter.

Fixes bug:

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