profile/ivi/clutter.git
15 years agoAllow using array of vertices even without textures
Johan Bilien [Fri, 20 Mar 2009 19:22:23 +0000 (19:22 +0000)]
Allow using array of vertices even without textures

It's often nice to be able to draw a batch of vertices, even if these
have no texture coordinates. This add a cogl_rectangles, similar to
cogl_rectangles_with_texture_coords, only without.

15 years agoRemoves a hack in gles/cogl.c that was already fixed in gl/cogl.c
Robert Bragg [Thu, 19 Mar 2009 16:46:07 +0000 (16:46 +0000)]
Removes a hack in gles/cogl.c that was already fixed in gl/cogl.c

It removes the need to cast a CoglMatrix to a float * for transforming
a vertex manually instead of using cogl_matrix_transform_point.

15 years ago[doc] Update the should_pick_paint() documentation
Emmanuele Bassi [Thu, 19 Mar 2009 11:40:13 +0000 (11:40 +0000)]
[doc] Update the should_pick_paint() documentation

The should_pick_paint() method of ClutterActor is not clearly
documented.

15 years ago[glx-texture-pixmap] Don't enable the texture target when binding the texture
Neil Roberts [Thu, 19 Mar 2009 17:54:17 +0000 (17:54 +0000)]
[glx-texture-pixmap] Don't enable the texture target when binding the texture

There's no need to enable the texture target unless it is going to be
used for rendering. Enabling it directly with glEnable calls confuses
Cogl's state caching.

This is a replacement for the patch in bug 1483 which was reverted.

15 years agoRevert "Use COGL to establish GL state for ClutterGLXTexturePixmap"
Neil Roberts [Thu, 19 Mar 2009 17:48:15 +0000 (17:48 +0000)]
Revert "Use COGL to establish GL state for ClutterGLXTexturePixmap"

This reverts commit f9d996a4603bef1f52e32e99f9f69a32b7c823ba.

The change from calling glBindTexture to using the material API with
cogl_material_flush_gl_state does not always work because it doesn't
necessarily leave the active texture unit as GL_TEXTURE0. For example,
if the previously rendered texture was multi-layered then the last
thing cogl_material_flush_gl_state will do is select GL_TEXTURE1 just
to disable it.

15 years ago[actor] use an epsilon whens sanity checking sizes
Øyvind Kolås [Thu, 19 Mar 2009 14:42:50 +0000 (14:42 +0000)]
[actor] use an epsilon whens sanity checking sizes

Clutter was complaining about netural width smaller than minimum widths
(differences around 0.0005) by using an epsilon value of 1e-4 for these
floating point comparisons, these warnings have now been silenced.

15 years ago[docs] Remove unused arguments
Emmanuele Bassi [Wed, 18 Mar 2009 17:07:50 +0000 (17:07 +0000)]
[docs] Remove unused arguments

The documentation for some X11TexturePixmap method does not reflect
the actual API.

15 years ago[docs] Pick up backend-specific API
Emmanuele Bassi [Wed, 18 Mar 2009 17:06:56 +0000 (17:06 +0000)]
[docs] Pick up backend-specific API

The various backend API outside from clutter-x11.h and clutter-win32.h
is documented but not picked up by gtk-doc.

15 years agoRemove usage of the grave accent as quotation mark
Emmanuele Bassi [Tue, 17 Mar 2009 14:12:01 +0000 (14:12 +0000)]
Remove usage of the grave accent as quotation mark

See:

  http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

This should make Thomas happy.

15 years ago[cogl] Apply the fix from 2c1c836417 (Flush matrix before clip planes) to GLES
Robert Bragg [Tue, 17 Mar 2009 00:12:27 +0000 (00:12 +0000)]
[cogl] Apply the fix from 2c1c836417 (Flush matrix before clip planes) to GLES

glClipPlane() is affected by modelview matrix so we need to flush before
calling it.

15 years ago[test-cogl-vertex-buffer] Use clutter_color_from_hls instead of hsl_to_rgb
Robert Bragg [Tue, 17 Mar 2009 00:26:38 +0000 (00:26 +0000)]
[test-cogl-vertex-buffer] Use clutter_color_from_hls instead of hsl_to_rgb

There is no need for a custom hsl to rgb converter since Clutter implements
this logic; originally it wasn't quite as optimal, but that has now been
fixed.

15 years ago[clutter-color] Use a different hls->rgb algorithm + use floating point
Robert Bragg [Tue, 17 Mar 2009 00:01:56 +0000 (00:01 +0000)]
[clutter-color] Use a different hls->rgb algorithm + use floating point

Using test-cogl-vertex-buffer as a test case which is CPU bound due to
hls -> rgb conversions this alternative algorithm looked to be ~10%
faster when tested on an X61s Lenovo.

15 years ago[docs] More information on animation queueing
Emmanuele Bassi [Mon, 16 Mar 2009 18:20:58 +0000 (18:20 +0000)]
[docs] More information on animation queueing

Queuing an animation on an actor cannot be done from within the
::completed signal handler, because we guarantee that the Animation
instance is valid and attached to the actor it animates for the
whole duration of the signal emission chain.

In order to queue animations you have to install an idle handler
on the main loop, and call clutter_actor_animate() inside it.

The documentation should be more clear about this caveat in the
memory management of ClutterAnimations created by the animate()
family of functions.

15 years agoPost-release bump to 0.9.3
Emmanuele Bassi [Mon, 16 Mar 2009 17:09:57 +0000 (17:09 +0000)]
Post-release bump to 0.9.3

15 years ago[release] Release 0.9.2
Emmanuele Bassi [Mon, 16 Mar 2009 16:28:45 +0000 (16:28 +0000)]
[release] Release 0.9.2

15 years agoUpdate release notes
Emmanuele Bassi [Mon, 16 Mar 2009 16:14:12 +0000 (16:14 +0000)]
Update release notes

15 years ago[docs] Ignore the TimeoutInterval internal API
Emmanuele Bassi [Mon, 16 Mar 2009 16:55:48 +0000 (16:55 +0000)]
[docs] Ignore the TimeoutInterval internal API

The TimeoutInterval API is internal, and thus should not be part
of the API reference.

15 years ago[docs] Fix naming of the interval parameter
Emmanuele Bassi [Mon, 16 Mar 2009 16:54:58 +0000 (16:54 +0000)]
[docs] Fix naming of the interval parameter

The interval parameter is now expressed in frames per second and not
in milliseconds.

15 years agoFix release date of 0.9.0
Emmanuele Bassi [Mon, 16 Mar 2009 16:09:05 +0000 (16:09 +0000)]
Fix release date of 0.9.0

15 years ago[cogl] Don't endlessly print the same warning regarding layer fallbacks
Robert Bragg [Mon, 16 Mar 2009 14:58:00 +0000 (14:58 +0000)]
[cogl] Don't endlessly print the same warning regarding layer fallbacks

There are various constraints for when we can support multi-texturing and
when they can't be met we try and print a clear warning explaining why the
operation isn't supported, but we shouldn't endlessly repeat the warning for
every primitive of every frame. This patch fixes that.

15 years ago[tests] Adds an interactive cogl vertex buffer unit test
Robert Bragg [Mon, 16 Mar 2009 12:47:45 +0000 (12:47 +0000)]
[tests] Adds an interactive cogl vertex buffer unit test

The test is a sanity check that dynamic updating of vertex data via the cogl
vertex buffer api works and has reasonable performance. (though it can't be
considered a well designed benchmark since it wastes casual amounts of CPU
time simply choosing pretty colors.)

The code also aims to demonstrate one way of creating, updating and efficiently
drawing a quad mesh structure via the vertex buffer api which could be applied
to lots of different use cases.

15 years ago[cogl-vertex-buffer] fix cogl_vertex_buffer_draw_elements prototype
Robert Bragg [Mon, 9 Mar 2009 10:26:31 +0000 (10:26 +0000)]
[cogl-vertex-buffer] fix cogl_vertex_buffer_draw_elements prototype

This function was renamed a while ago in the .c file from
cogl_vertex_buffer_draw_range_elements  but the corresponding .h and
doc/reference/cogl changes weren't made.

15 years ago[cogl-vertex-buffer] Allow querying back the number of vertices a buffer represents
Robert Bragg [Sat, 28 Feb 2009 17:39:38 +0000 (17:39 +0000)]
[cogl-vertex-buffer] Allow querying back the number of vertices a buffer represents

This may be convenient e.g. at draw time if you are simply drawing all vertices

15 years ago[cogl-vertex-buffer] Add a flush of attribute changes in the *_draw() functions
Robert Bragg [Sat, 28 Feb 2009 17:36:25 +0000 (17:36 +0000)]
[cogl-vertex-buffer] Add a flush of attribute changes in the *_draw() functions

For convenience it is now valid to avoid a seperate call to
cogl_vertex_buffer_submit() and assume that the _draw() calls will do this
for you (though of course if you do this you still need to ensure the
attribute pointers remain valid until your draw call.)

15 years agoCount timeline frames using the FPS instead of an integer interval
Neil Roberts [Mon, 9 Mar 2009 17:12:27 +0000 (17:12 +0000)]
Count timeline frames using the FPS instead of an integer interval

Bug 1495 - Timelines run 4% short

Previously the timelines were timed by calculating the interval
between each frame stored as an integer number of milliseconds so some
precision is lost. For example, requesting 60 frames per second gets
converted to 16 ms per frame which is actually 62.5 frames per
second. This makes the timeline shorter by 4%.

This patch merges the common code for timing from the timeout pools
and frame sources into an internal clutter-timeout-interval file. This
stores the interval directly as the FPS and counts the number of
frames that have been reached instead of the elapsed time.

15 years ago[cogl] Flush matrix before clip planes
Havoc Pennington [Mon, 16 Mar 2009 15:09:33 +0000 (15:09 +0000)]
[cogl] Flush matrix before clip planes

glClipPlane() is affected by modelview matrix so we need to flush
before calling it.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[docs] Bring down the undocumented symbols to 2%
Emmanuele Bassi [Mon, 16 Mar 2009 15:00:55 +0000 (15:00 +0000)]
[docs] Bring down the undocumented symbols to 2%

The usual pre-release documentation blitzing. Most of the remaining
symbols are either COGL or X11 specific, or dummy interface typedefs.

15 years ago[animation] Enhance consistency of the Animation API
Emmanuele Bassi [Mon, 16 Mar 2009 14:16:18 +0000 (14:16 +0000)]
[animation] Enhance consistency of the Animation API

The Animation API should follow this pattern:

  - functions with an Interval as part of the arguments should have
    "interval" inside their name, e.g.:

      clutter_animation_bind_interval
      clutter_animation_update_interval

  - functions dealing with property names should have "property"
    inside their name, e.g.:

      clutter_animation_has_property
      clutter_animation_unbind_property

    - unless -

  - functions dealing with a property and its value should not
    have any modifier, e.g.:

      clutter_animation_bind

The change from update_property() to update_interval() frees up
clutter_animation_update(), to be added at a later date.

15 years ago[docs] Update after Animation API changes
Emmanuele Bassi [Mon, 16 Mar 2009 14:02:09 +0000 (14:02 +0000)]
[docs] Update after Animation API changes

Rename the bind/unbind_property functions, and add the bind_interval,
completed method.

Also, add clutter_actor_get_animation().

15 years ago[docs] Add description of queue_redraw
Emmanuele Bassi [Mon, 16 Mar 2009 14:01:43 +0000 (14:01 +0000)]
[docs] Add description of queue_redraw

15 years ago[tests] Remove unused variables
Emmanuele Bassi [Mon, 16 Mar 2009 12:17:03 +0000 (12:17 +0000)]
[tests] Remove unused variables

The size of the pixmap is passed by the ::size-changed signal, so
we can remove the unused w, h variables and avoid a compiler warning.

15 years ago[actor] Add ::queue-redraw signal
Havoc Pennington [Tue, 17 Feb 2009 17:22:02 +0000 (12:22 -0500)]
[actor] Add ::queue-redraw signal

Bug 1454 - move queue_redraw virtualization to ClutterActor

The ClutterActor::queue-redraw signal allows parent containers to
track whether their children need a redraw.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[actor] Add :clip-to-allocation property
Havoc Pennington [Mon, 16 Mar 2009 11:58:58 +0000 (11:58 +0000)]
[actor] Add :clip-to-allocation property

A common use of setting clip is to keep an actor inside its allocation;
right now to do this you have to set up a callback on notify::allocation.

There's no overhead added by sticking another bit in ClutterActor
clip-to-allocation that will clip painting to the allocation if set.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[animation] Enhance the bind API
Colin Walters [Fri, 6 Mar 2009 04:10:00 +0000 (23:10 -0500)]
[animation] Enhance the bind API

Bug 1419 - Add clutter_animation_bind, rename clutter_animation_bind_interval

This is a different approach from the clutter_actor_animatev
vector variant.  The single call should be even easier on
automatic bindings, since calls can be chained like:

  new Clutter.Animation({object: myactor}).bind("x", 42).bind("y", 43);

Note clutter_animation_bind_property which took a ClutterInterval
is renamed to clutter_animation_bind_interval for clarity, and to
discourage use since there are friendlier APIs about.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[animation] Add Animation getter
Emmanuele Bassi [Mon, 16 Mar 2009 11:31:27 +0000 (11:31 +0000)]
[animation] Add Animation getter

If we are animating an actor using the clutter_actor_animate*() family
of functions we might want to expose a getter for the Animation instance
we are using, to avoid excessing bookkeeping.

15 years ago[animation] Add an emitter for ::completed
Emmanuele Bassi [Mon, 16 Mar 2009 11:30:10 +0000 (11:30 +0000)]
[animation] Add an emitter for ::completed

The ::completed signal requires an emitter in case we want to stop
the animation and safely dispose it inside application code without
breaking invariants.

15 years ago[docs] Clarify Animation memory management
Emmanuele Bassi [Mon, 16 Mar 2009 11:28:29 +0000 (11:28 +0000)]
[docs] Clarify Animation memory management

The memory management of the ClutterAnimation instances should be
heavily documented, given its "automagical" nature, so that other
people might understand it and avoid breaking it in the future.

15 years agoMerge branch 'async-texture-thread-pool'
Øyvind Kolås [Mon, 16 Mar 2009 00:40:27 +0000 (00:40 +0000)]
Merge branch 'async-texture-thread-pool'

15 years ago[clutter-texture] fixed gtk-doc formatting, and init threads in test.
Øyvind Kolås [Thu, 12 Mar 2009 11:48:44 +0000 (11:48 +0000)]
[clutter-texture] fixed gtk-doc formatting, and init threads in test.

Fixed markup to actually work with gtk-doc, also do a g_thread_init
in the test.

15 years ago[cogl-path] Minor fix to gtk-doc
Neil Roberts [Fri, 13 Mar 2009 15:43:19 +0000 (15:43 +0000)]
[cogl-path] Minor fix to gtk-doc

Fix the parameters in cogl_path_curve_to and cogl_path_rel_curve_to to
match the actual names otherwise they won't appear correctly in the
docs.

15 years ago[cogl] Avoid shadowing math.h symbols
Emmanuele Bassi [Fri, 13 Mar 2009 15:28:20 +0000 (15:28 +0000)]
[cogl] Avoid shadowing math.h symbols

As usual, y1 and y2 end up shadowing symbols exported by math.h.

15 years agoAvoid drawing twice if relayout queues a draw
Owen W. Taylor [Thu, 12 Mar 2009 19:33:36 +0000 (15:33 -0400)]
Avoid drawing twice if relayout queues a draw

It's reasonably normal for a relayout of the stage to cause the stage
to be queued for drawing; for this reason we should do the relayout before
we clear stage->update_idle. (But want to clear update_idle() before actually
doing the redraw to handle the corner case where the draw queues another
redraw.)

15 years agoDo not cause more size requisitions than necessary
Emmanuele Bassi [Fri, 13 Mar 2009 14:14:00 +0000 (14:14 +0000)]
Do not cause more size requisitions than necessary

Bug 1499 - clutter_actor_notify_if_geometry_changed causes sync
           layout cycles

Whenever clutter_actor_set_{width,height,x,y,size...} is used, extra
synchronous size requests are triggered in
clutter_actor_notify_if_geometry_changed.

If the get_preferred_width() and get_preferred_height() implementations
are particularly costly (e.g. ClutterText) this will result in a performance
impact.

To avoid excessive allocation or requisition cycles we use the
cached values and flags. If we don't have an allocation, we assume
that we need to notify all the properties; if we don't have a size
requisition we notify only width and height; finally, if we do have
a valid allocation we notify only on the changed values.

15 years ago[deprecated] Add Effect deprecation
Emmanuele Bassi [Thu, 12 Mar 2009 21:11:50 +0000 (21:11 +0000)]
[deprecated] Add Effect deprecation

The ClutterEffect API has been deprecated during 0.9, so it should be
added to the deprecation macros.

15 years agoAdd more deprecation notices
Emmanuele Bassi [Thu, 12 Mar 2009 16:20:42 +0000 (16:20 +0000)]
Add more deprecation notices

Most of the deprecated API does not have an entry inside
clutter-deprecated.h, thus making porting a tad more difficult.

15 years agoChange cogl_path_rectangle and cogl_path_round_rectangle to take x1,y1,x2,y2
Neil Roberts [Fri, 13 Mar 2009 12:20:26 +0000 (12:20 +0000)]
Change cogl_path_rectangle and cogl_path_round_rectangle to take x1,y1,x2,y2

This matches the changes to cogl_rectangle to improve consistency.

15 years ago[README] Small typo fix
Neil Roberts [Fri, 13 Mar 2009 12:02:33 +0000 (12:02 +0000)]
[README] Small typo fix

15 years agoMerge branch 'cogl-client-matrix-stacks'
Robert Bragg [Thu, 12 Mar 2009 18:59:20 +0000 (18:59 +0000)]
Merge branch 'cogl-client-matrix-stacks'

* cogl-client-matrix-stacks:
  Maintain the Cogl assumption that the modelview matrix is normally current
  Finish GLES{1,2} support for client side matrix stacks
  Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
  Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
  Removes need for casting const float * in _cogl_set_clip_planes
  Virtualize GL matrix operations and use a client-side matrix when GL is indirect

15 years agoMaintain the Cogl assumption that the modelview matrix is normally current
Robert Bragg [Thu, 12 Mar 2009 14:16:48 +0000 (14:16 +0000)]
Maintain the Cogl assumption that the modelview matrix is normally current

_cogl_add_path_to_stencil_buffer and _cogl_add_stencil_clip were leaving
the projection matrix current when calling cogl_rectangle which was
upsetting _cogl_current_matrix_state_flush.

15 years agoFinish GLES{1,2} support for client side matrix stacks
Robert Bragg [Thu, 12 Mar 2009 13:34:36 +0000 (13:34 +0000)]
Finish GLES{1,2} support for client side matrix stacks

Adds glFrustum wrappers (GLES only accepts floats not doubles, and GLES2
needs to use our internal cogl_wrap_glFrustumf)

Adds GL_TEXTURE_MATRIX getter code in cogl_wrap_glGetFloatv

Adds a GL_TEXTURE_MATRIX define for GLES2

15 years agoUse Cogl enum when making modelview-matrix current in cogl_{rotate,transform,etc}
Robert Bragg [Thu, 12 Mar 2009 13:32:10 +0000 (13:32 +0000)]
Use Cogl enum when making modelview-matrix current in cogl_{rotate,transform,etc}

My previous patch incorrectly used the GL enum with the _cogl_set_current_matrix
API.

15 years agoExplicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
Robert Bragg [Fri, 6 Mar 2009 03:43:24 +0000 (03:43 +0000)]
Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}

Its not intended that users should use these with any other matrix mode, and
internally we now have the _cogl_current_matrix API if we need to play with
other modes.

15 years agoAvoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
Robert Bragg [Fri, 6 Mar 2009 03:29:51 +0000 (03:29 +0000)]
Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv

If we later add internal flags to CoglMatrix then this code wouldn't
initialize those flags. The ways it's now done adds a redundant copy, but
if that turns out to be something worth optimizing we can look again at
using a cast but adding another way for initializing internal flags.

15 years ago80 char fix
Robert Bragg [Fri, 6 Mar 2009 03:29:35 +0000 (03:29 +0000)]
80 char fix

15 years agoRemoves need for casting (const float *) to (GLfloat *) in _cogl_set_clip_planes
Robert Bragg [Fri, 6 Mar 2009 02:39:24 +0000 (02:39 +0000)]
Removes need for casting (const float *) to (GLfloat *) in _cogl_set_clip_planes

This removes cogl.c:apply_matrix(), and makes cogl.c:project_vertex() use
cogl_matrix_transform_point instead.

15 years agoVirtualize GL matrix operations and use a client-side matrix when GL is indirect
Havoc Pennington [Tue, 24 Feb 2009 18:51:25 +0000 (13:51 -0500)]
Virtualize GL matrix operations and use a client-side matrix when GL is indirect

This is useful because sometimes we need to get the current matrix, which
is too expensive when indirect rendering.

In addition, this virtualization makes it easier to clean up the API in
the future.

15 years ago[clutter-texture] updated documentation.
Øyvind Kolås [Thu, 12 Mar 2009 11:48:44 +0000 (11:48 +0000)]
[clutter-texture] updated documentation.

Rewrote documentation, with the smallest amount of documentation for
load-data-async which is considered a special case of load-async.

15 years agoMerge commit 'origin/async-texture-thread-pool' into async-size
Øyvind Kolås [Thu, 12 Mar 2009 11:18:11 +0000 (11:18 +0000)]
Merge commit 'origin/async-texture-thread-pool' into async-size

15 years ago[clutter-texture] remove load-size-async property
Øyvind Kolås [Thu, 12 Mar 2009 10:38:39 +0000 (10:38 +0000)]
[clutter-texture] remove load-size-async property

Only have load-data-async and load-async properties, both are construct
only and the latter adds the former load-size-async behavior on top of
load-data-async.

15 years ago[clutter-texture] add option to not block on size for loaded images
Øyvind Kolås [Thu, 12 Mar 2009 10:14:40 +0000 (10:14 +0000)]
[clutter-texture] add option to not block on size for loaded images

Added a construct time property to indicate that we do not want
to block on loading images.

15 years ago[tests] Added test-texture-async
Øyvind Kolås [Wed, 11 Mar 2009 18:26:30 +0000 (18:26 +0000)]
[tests] Added test-texture-async

15 years ago[docs] Add a bindings coding practices
Emmanuele Bassi [Thu, 12 Mar 2009 09:29:39 +0000 (09:29 +0000)]
[docs] Add a bindings coding practices

When writing language bindings for Clutter some rules should be
observed to guarantee the same levels of quality across different
bindings.

15 years ago[docs] Reword some of the coding practices
Emmanuele Bassi [Thu, 12 Mar 2009 09:27:39 +0000 (09:27 +0000)]
[docs] Reword some of the coding practices

Update with the new fixed point and units rules. Also, fix the
grammar and clarify what to do with non-static private functions.

15 years ago[tests] Animate the color during easing
Emmanuele Bassi [Wed, 11 Mar 2009 22:12:36 +0000 (22:12 +0000)]
[tests] Animate the color during easing

The easing modes test should also tweak the color to show the
progress of the animation.

15 years ago[animation] Broken fixed:: properties
Geoff Gustafson [Tue, 10 Mar 2009 21:25:37 +0000 (14:25 -0700)]
[animation] Broken fixed:: properties

This commit yesterday:

89e3e3a4cc06c10c2573f3d115c5b03ee4890524
[animation] Add vector variants for ::animate()

broke the "fixed::" attribute on properties in clutter_actor_animate(),
because the fixed:: part is still on the string when it checks to see if
it's a valid property the class knows about.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years agoUpdate shave
Damien Lespiau [Wed, 11 Mar 2009 18:39:10 +0000 (18:39 +0000)]
Update shave

This update fixes a few issues:
  - the use of shave with mingw32 bash on windows,
  - fix the unmangling of libtool names
  - fix build on solaris
  - add an --enable/disable-shave configure option (while still
    defaulting to enabled)

15 years agoAllow NULL for clutter_text_set_text()
Owen W. Taylor [Fri, 27 Feb 2009 16:56:39 +0000 (11:56 -0500)]
Allow NULL for clutter_text_set_text()

As a convenience, if NULL is passed for the text argument of
clutter_text_set_text() (and for consistency,
clutter_text_set_markup()), treat that the same as "".

15 years ago[group] Output the group name when debugging paint
Gordon Williams [Wed, 11 Mar 2009 18:16:21 +0000 (18:16 +0000)]
[group] Output the group name when debugging paint

Bug 1480 - Clutter groups don't output their name when
           CLUTTER_DEBUG=paint

This is a really useful thing to do debugging-wise - as you can see
istantly when (and if) clutter objects are being drawn - as often
there's quite a hierarchy of objects in groups.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years agoAdd (out) annotations for ClutterActor
Owen W. Taylor [Thu, 26 Feb 2009 19:42:19 +0000 (14:42 -0500)]
Add (out) annotations for ClutterActor

Add missing (out) annotations to the doc comments for ClutterActor methods
with multiple return values.

Fix the definition of clutter_actor_get_allocation_vertices() to be
consistent with the declaration and have verts[4] rather than verts[].x

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

15 years ago[text] Insertion of multi-byte characters broken
Raymond Liu [Mon, 9 Mar 2009 06:10:45 +0000 (14:10 +0800)]
[text] Insertion of multi-byte characters broken

Bug 1501 - clutter_text_insert_text not working right with non-onebyte
           character

In clutter_text_insert_text(), the position is expressed in characters, not
in bytes.

Actually, it turns out to be working on bytes, so when there are already
multi-byte character in the text buffer, insert text at the position after
the multi-byte character will not work right.

Also, the position is not updated after the insert work is done.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[text] Crash when multi-byte utf8 text exceeds max_length
Raymond Liu [Wed, 11 Mar 2009 06:35:26 +0000 (14:35 +0800)]
[text] Crash when multi-byte utf8 text exceeds max_length

Bug 1500 - [Patch] clutter_text crash with non one-byte utf8 text exceed
           max_length

In clutter_text_set_text_internal(), when text length in character is greater
than max_length, and there are multi-byte character in it, then the new text
string buffer is not malloc()'ed with right length. This will cause the app to
crash with segmention fault.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
15 years ago[docs] Document the commit message format
Emmanuele Bassi [Wed, 11 Mar 2009 14:01:55 +0000 (14:01 +0000)]
[docs] Document the commit message format

Clutter uses the standard git format for commit messages:

        short description
        <newline>
        long description...

And everyone asking for their patches or trees to be merged upstream
should conform to the same commit messages format, just like they
should conform to the coding style.

15 years ago[docs] Calling g_object_ref() will not dispose an object
Emmanuele Bassi [Wed, 11 Mar 2009 13:55:01 +0000 (13:55 +0000)]
[docs] Calling g_object_ref() will not dispose an object

The right way to dispose a PangoContext is to call g_object_unref(),
not g_object_ref().

15 years ago[color] Fixed HLS to RGB conversion
Emmanuele Bassi [Wed, 11 Mar 2009 13:53:27 +0000 (13:53 +0000)]
[color] Fixed HLS to RGB conversion

The fixed-point values are converted to integers, which obviously
messes up the conversion. Instead, they should be converted to
floating point values before normalizing to bytes for the assignment
to ClutterColor components.

15 years agoRemove use of $(builddir)
Neil Roberts [Tue, 10 Mar 2009 18:28:56 +0000 (18:28 +0000)]
Remove use of $(builddir)

$(builddir) isn't always defined in earlier versions of Automake
(although I can't track down exactly which version it appeared
in). According to the autoconf docs it is "rigorously equal to `.'" so
we might as well not use it.

15 years ago[cogl] Initialize all members of CoglContext
Emmanuele Bassi [Tue, 10 Mar 2009 18:05:08 +0000 (18:05 +0000)]
[cogl] Initialize all members of CoglContext

Some members of CoglContext still escape initialization.

15 years ago[cogl] Initialize boolean flag in CoglContext
Emmanuele Bassi [Tue, 10 Mar 2009 17:53:51 +0000 (17:53 +0000)]
[cogl] Initialize boolean flag in CoglContext

The private CoglContext is created using g_malloc() and not
zeroed; this means we have to initialize the values we are
going to check, to avoid hitting garbage.

Thanks to Tommi Komulainen.

15 years agoFix out of tree builds
Neil Roberts [Tue, 10 Mar 2009 14:40:33 +0000 (14:40 +0000)]
Fix out of tree builds

Commit a383929 added the $(srcdir) prefix to all of the source files
but some files are generated by the configure script and other make
rules so they actually live in $(builddir). Out-of-tree builds
therefore broke.

15 years agoChange the default size of thread pool from 3 to 1
Øyvind Kolås [Tue, 10 Mar 2009 13:00:57 +0000 (13:00 +0000)]
Change the default size of thread pool from 3 to 1

Concurrently decoding three image files can stall animations even on a
dual core system, reducing to 1 concurrent image decoding thread.

15 years ago[animation] Add vector variants for ::animate()
Emmanuele Bassi [Mon, 9 Mar 2009 21:11:40 +0000 (21:11 +0000)]
[animation] Add vector variants for ::animate()

Bug 1438 - Implicit Animation API could use animatev variants

The clutter_actor_animate* family of functions use va_lists to
handle the property/value pairs for the final state of the
animation.

Language bindings have problems with variadic arguments functions,
and usually prefer vector-based API which allow a greater level
of control and conversion from native data types.

For each variadic arguments function in the clutter_actor_animate*
family there should be a vector-based version that takes:

  - the number of property/value pairs
  - a constant array of constant strings
  - an array of GValues

Most of the internal implementation can be refactored from the
current one, thus both the var_args and the vector entry points
share a common implementation of the code; then, both versions
of the API are just loops over a list of arguments.

Based on a patch by: Robert Carr <carrr@rpi.edu>

15 years ago[docs] Update API reference
Emmanuele Bassi [Mon, 9 Mar 2009 18:28:15 +0000 (18:28 +0000)]
[docs] Update API reference

The API reference was still listing some symbols that have been
removed.

15 years ago[docs] Remove ClutterFixed from the documentation
Emmanuele Bassi [Mon, 9 Mar 2009 17:56:48 +0000 (17:56 +0000)]
[docs] Remove ClutterFixed from the documentation

Now that ClutterFixed has finally gone the way of the Dodo, we
can safely remove it from the API reference as well.

15 years ago[cogl] Fix hardcoded paths in the pc file
Emmanuele Bassi [Mon, 9 Mar 2009 17:47:21 +0000 (17:47 +0000)]
[cogl] Fix hardcoded paths in the pc file

The commit 24ce193836 fixed the Clutter pkg-config file. Since
COGL now ships its own, we need to fix that as well.

15 years ago[fixed] Remove ClutterFixed API
Emmanuele Bassi [Mon, 9 Mar 2009 17:36:22 +0000 (17:36 +0000)]
[fixed] Remove ClutterFixed API

Since the switch from fixed point to floating point, and the introduction
of CoglFixed, ClutterFixed has been typedef'd into a float. This makes
ClutterFixed the worst fixed point API ever.

Now that Clutter has been migrated to CoglFixed and gfloat whenever needed,
ClutterFixed can be safely removed.

The only thing that Clutter should still provide is ClutterParamSpecFixed,
for installing fixed point properties into GObject classes.

The ClutterFixed symbols have been entirely removed from the API.

15 years ago[units] Add more conversion functions
Emmanuele Bassi [Mon, 9 Mar 2009 17:35:08 +0000 (17:35 +0000)]
[units] Add more conversion functions

A GValue containing a ClutterUnit should be transformable into a
GValue holding an integer, a floating point value or a fixed point
value.

This means adding more transformation functions when registering
the ClutterUnit GType.

15 years ago[tests] Use floats, not ClutterFixed
Emmanuele Bassi [Mon, 9 Mar 2009 17:34:23 +0000 (17:34 +0000)]
[tests] Use floats, not ClutterFixed

The COGL API expects floats, not ClutterFixed, so we need
to use the right type when calling it.

15 years ago[text] Convert units to the right type
Emmanuele Bassi [Mon, 9 Mar 2009 17:32:15 +0000 (17:32 +0000)]
[text] Convert units to the right type

The COGL API expects a floating point value, so Units should be
converted to floats, not to ClutterFixed.

15 years ago[texture] Fix ClutterFixed usage
Emmanuele Bassi [Mon, 9 Mar 2009 17:31:44 +0000 (17:31 +0000)]
[texture] Fix ClutterFixed usage

Do not use ClutterFixed and its macros inside the Texture.

15 years ago[stage] Coalesce fog and perspective API
Emmanuele Bassi [Mon, 9 Mar 2009 17:24:44 +0000 (17:24 +0000)]
[stage] Coalesce fog and perspective API

The fog and perspective API is currently split in two parts:

  - the floating point version, using values

  - the fixed point version, using structures

The relative properties are using the structure types, since they
are meant to set multiple values at the same time. Instead of
using bare values, the whole API should be coalesced into two
simple calls using structures to match the GObject properties.

Thus:

  clutter_stage_set_fog (ClutterStage*, const ClutterFog*)
  clutter_stage_get_fog (ClutterStage*, ClutterFog*)

  clutter_stage_set_perspective (ClutterStage*, const ClutterPerspective*)
  clutter_stage_get_perspective (ClutterStage*, ClutterPerspective*)

Which supercedes the fixed point and floating point variants.

More importantly, both ClutterFog and ClutterPerspective should
using floating point values, since that's what get passed to
COGL anyway.

ClutterFog should also drop the "density" member, since ClutterStage
only allows linear fog; non-linear fog distribution can be achieved
using a signal handler and calling cogl_set_fog() directly; this keeps
the API compact yet extensible.

Finally, there is no ClutterStage:fog so it should be added.

15 years ago[interval] Update fixed-point handling
Emmanuele Bassi [Mon, 9 Mar 2009 17:08:41 +0000 (17:08 +0000)]
[interval] Update fixed-point handling

Do not use ClutterFixed when dealing with fixed point values. Use
CoglFixed instead.

15 years ago[tests] Test CoglFixed, not ClutterFixed
Emmanuele Bassi [Mon, 9 Mar 2009 17:07:47 +0000 (17:07 +0000)]
[tests] Test CoglFixed, not ClutterFixed

We really want to test the CoglFixed implementation, not the
to-be-deprecated ClutterFixed one.

15 years ago[cogl-fixed] Implement the CoglFixed fundamental GType
Emmanuele Bassi [Mon, 9 Mar 2009 17:06:22 +0000 (17:06 +0000)]
[cogl-fixed] Implement the CoglFixed fundamental GType

The type machinery for CoglFixed should be implemented by COGL
itself, now that COGL exports the GType of its types.

This allows moving most of what ClutterFixed did directly to
CoglFixed where it belongs.

15 years agoMove ClutterTimeline to CoglFixed
Emmanuele Bassi [Mon, 9 Mar 2009 17:05:13 +0000 (17:05 +0000)]
Move ClutterTimeline to CoglFixed

The ClutterTimeline::get_progressx() method should return a
CoglFixed, now that ClutterFixed is being deprecated.

15 years agoMove ClutterBehaviourRotate to CoglFixed
Emmanuele Bassi [Mon, 9 Mar 2009 17:03:37 +0000 (17:03 +0000)]
Move ClutterBehaviourRotate to CoglFixed

Remove the wrong usage of ClutterFixed and use CoglFixed instead
in the API and the implementation.

15 years agoMove ClutterBehaviourEllipse to CoglFixed
Emmanuele Bassi [Mon, 9 Mar 2009 17:03:00 +0000 (17:03 +0000)]
Move ClutterBehaviourEllipse to CoglFixed

Remove the wrong usage of ClutterFixed, and use CoglFixed instead
in the API and the implementation.

15 years agoMove BehaviourScale to CoglFixed
Emmanuele Bassi [Thu, 5 Mar 2009 20:17:11 +0000 (20:17 +0000)]
Move BehaviourScale to CoglFixed

ClutterFixed as a type is going away, superceded by CoglFixed. The
fixed point entry points in the API should be ported to the
CoglFixed type so that they are useful again.

15 years ago[cogl-fixed] Add a double-to-fixed conversion macro
Emmanuele Bassi [Thu, 5 Mar 2009 20:15:00 +0000 (20:15 +0000)]
[cogl-fixed] Add a double-to-fixed conversion macro

Since the conversion of a floating point value to a fixed point
value is already done in double precision we can safely expose
a macro that converts a double precision floating point value to
a CoglFixed one.

15 years ago[docs] Note that grabs are evil
Emmanuele Bassi [Tue, 3 Mar 2009 22:51:17 +0000 (22:51 +0000)]
[docs] Note that grabs are evil

Grabs are an entirely evil way to override the whole event delivery
machinery that Clutter has in place.

A pointer grab can be effectively replaced by a much more reliable
::captured-event signal handler, for instance.

Sometimes, grabs are a necessary evil -- and that is why Clutter
exposes them in the API; that should not fool anyone into thinking
that they should be used unless strictly necessary.

15 years ago[docs] Clarify clutter_actor_animate() behaviour
Emmanuele Bassi [Thu, 26 Feb 2009 15:35:20 +0000 (15:35 +0000)]
[docs] Clarify clutter_actor_animate() behaviour

When calling clutter_actor_animate() on an actor that is being
currently animated the default behaviour is to update the duration
of the animation; the easing mode; update all the common properties;
and finally add the new properties.

This:

  clutter_actor_animate (actor, 500, CLUTTER_LINEAR,
                         "width", 100,
                         "height", 100,
                         NULL);

  clutter_actor_animate (actor, 250, CLUTTER_EASE_IN_CUBIC,
                         "x", 100,
                         "y", 100,
                         "height", 200,
                         NULL);

Is logically equivalent to:

  clutter_actor_animate (actor, 250, CLUTTER_EASE_IN_CUBIC,
                         "x", 100,
                         "y", 100,
                         "width", 100,
                         "height", 200,
                         NULL);

The documentation of the function should be slightly more verbose
in describing the default behaviour.

15 years ago[build] Various fixes for distcheck
Emmanuele Bassi [Sat, 28 Feb 2009 19:13:18 +0000 (19:13 +0000)]
[build] Various fixes for distcheck

The generation of the GObject introspection data has broken
the distcheck phase.

The location of the header and source files should always be
depending on the $(top_srcdir) and $(srcdir) variables,
respectively; the special handling of the COGL API inside the
GIR generation should also take those two variables into
account.