profile/ivi/clutter.git
13 years agocookbook: Mentioned the animation in the sample code
Elliot Smith [Wed, 11 Aug 2010 16:14:09 +0000 (17:14 +0100)]
cookbook: Mentioned the animation in the sample code

Put in comments to make it clear where the animation
for the mouse scroll is coming from in the sample code.

13 years agocookbook: Included video of the scroll example running
Elliot Smith [Wed, 11 Aug 2010 16:12:42 +0000 (17:12 +0100)]
cookbook: Included video of the scroll example running

Inlined the video of the mouse scroll example code running
to the docbook file for events.

13 years agocookbook: Made stage slightly smaller for scroll event example
Elliot Smith [Wed, 11 Aug 2010 16:11:29 +0000 (17:11 +0100)]
cookbook: Made stage slightly smaller for scroll event example

Reduced the size of the stage to make for a smaller video.

13 years agocookbook: Added video showing scrollable actor
Elliot Smith [Wed, 11 Aug 2010 16:10:45 +0000 (17:10 +0100)]
cookbook: Added video showing scrollable actor

13 years agocookbook: Added walk through of code example for mouse scroll
Elliot Smith [Wed, 11 Aug 2010 15:54:28 +0000 (16:54 +0100)]
cookbook: Added walk through of code example for mouse scroll

Modified the mouse scroll example to fit better with the tutorial
walkthrough.

Added a stepped walkthrough of the scrollable actor code
example.

13 years agocookbook: Fixed link to example in mouse scroll recipe
Elliot Smith [Wed, 11 Aug 2010 13:41:42 +0000 (14:41 +0100)]
cookbook: Fixed link to example in mouse scroll recipe

13 years agocookbook: Simplified full scroll example
Elliot Smith [Wed, 11 Aug 2010 13:39:22 +0000 (14:39 +0100)]
cookbook: Simplified full scroll example

Removed the layout and box to simplify the scrollable
actor example.

13 years agocookbook: Improved wording and formatting in mouse scroll intro.
Elliot Smith [Wed, 11 Aug 2010 10:14:54 +0000 (11:14 +0100)]
cookbook: Improved wording and formatting in mouse scroll intro.

13 years agocookbook: Handle all possible mouse scroll directions
Elliot Smith [Wed, 11 Aug 2010 10:10:53 +0000 (11:10 +0100)]
cookbook: Handle all possible mouse scroll directions

Added empty cases for MOUSE_SCROLL_LEFT and MOUSE_SCROLL_RIGHT
to the scroll-event signal handler in the example code.

13 years agocookbook: Build mouse scroll example with cookbook
Elliot Smith [Wed, 11 Aug 2010 10:09:04 +0000 (11:09 +0100)]
cookbook: Build mouse scroll example with cookbook

13 years agocookbook: Cleaned up redundant comments in code example
Elliot Smith [Wed, 11 Aug 2010 10:03:37 +0000 (11:03 +0100)]
cookbook: Cleaned up redundant comments in code example

Removed comments which are only relevant in my local build
environment.

13 years agocookbook: Added xmlns for XInclude to events docbook file
Elliot Smith [Wed, 11 Aug 2010 10:03:02 +0000 (11:03 +0100)]
cookbook: Added xmlns for XInclude to events docbook file

13 years agocookbook: Added basic mouse scroll recipe
Elliot Smith [Wed, 11 Aug 2010 09:34:49 +0000 (10:34 +0100)]
cookbook: Added basic mouse scroll recipe

Added a recipe explaining the basics of mouse scroll events.

13 years agocolorize-effect: Do not inherit from ShaderEffect
Emmanuele Bassi [Wed, 11 Aug 2010 16:43:15 +0000 (17:43 +0100)]
colorize-effect: Do not inherit from ShaderEffect

See commits:

  7daeb217 blur-effect: Do not inherit from ShaderEffect
  1ec57743 desaturate-effect: Do not inherit from ShaderEffect

We might avoid using shaders at all in the future for simple effects.

13 years agoeffects: Check before using the cogl_shader_* API
Emmanuele Bassi [Wed, 11 Aug 2010 16:25:17 +0000 (17:25 +0100)]
effects: Check before using the cogl_shader_* API

Since BlurEffect and DesaturateEffect are using the shader API
implicitly and not using ClutterShaderEffect, we need to check if the
underlying GL implementation supports the GLSL shading language and warn
if not.

13 years agodrag-action: Capture stage leave
Emmanuele Bassi [Wed, 11 Aug 2010 13:42:56 +0000 (14:42 +0100)]
drag-action: Capture stage leave

If we are dragging, we don't want the drag handle to emit a
::leave-event even if the pointer left the stage.

13 years agodesaturate-effect: Do not inherit from ShaderEffect
Emmanuele Bassi [Wed, 11 Aug 2010 13:19:48 +0000 (14:19 +0100)]
desaturate-effect: Do not inherit from ShaderEffect

Hide the fact that we're using a fragment shader, in case we're able in
the future to use a material layer combine function when painting the
offscreen target texture.

13 years agoblur-effect: Do not inherit from ShaderEffect
Emmanuele Bassi [Wed, 11 Aug 2010 12:05:42 +0000 (13:05 +0100)]
blur-effect: Do not inherit from ShaderEffect

We might want to switch the BlurEffect from a box-blur to a
super-sampling of the texture target, in order to make it cheap(er).
If we inherit from ShaderEffect, though, we're setting in stone the
fact that we are going to use a fragment shader for blurring.

Since there is not parametrization of the blur, the code necessary
to implement effect is pretty small, and we can use the Cogl API
directly.

13 years agoshader-effect: Attach the program to the target material
Emmanuele Bassi [Wed, 11 Aug 2010 12:58:29 +0000 (13:58 +0100)]
shader-effect: Attach the program to the target material

Instead of calling cogl_program_use() around the paint_target()
chain-up, we can use the newly added API in CoglMaterial to attach
user-defined shaders to the offscreen target material.

13 years agotest-drag: Fix the page curl angle
Emmanuele Bassi [Wed, 11 Aug 2010 12:53:02 +0000 (13:53 +0100)]
test-drag: Fix the page curl angle

13 years agostage: Fix the user-resizable property enumeration id
Emmanuele Bassi [Wed, 11 Aug 2010 11:40:22 +0000 (12:40 +0100)]
stage: Fix the user-resizable property enumeration id

13 years agoactor: Use box origin instead of direct access
Emmanuele Bassi [Wed, 11 Aug 2010 10:39:24 +0000 (11:39 +0100)]
actor: Use box origin instead of direct access

13 years agoMerge branch 'wip/table-layout'
Emmanuele Bassi [Wed, 11 Aug 2010 10:32:44 +0000 (11:32 +0100)]
Merge branch 'wip/table-layout'

* wip/table-layout:
  Add ClutterTableLayout, a layout showing children in rows and columns
  box-layout: Use allocate_align_fill()
  bin-layout: Migrate to allocate_align_fill()
  actor: Add allocate_align_fill()
  test-flow-layout: Use BindConstraints

13 years agoAdd ClutterTableLayout, a layout showing children in rows and columns
José Dapena Paz [Thu, 18 Mar 2010 16:02:31 +0000 (17:02 +0100)]
Add ClutterTableLayout, a layout showing children in rows and columns

A TableLayout is a layout manager that allocates its children in rows
and columns. Each child is assigned to a cell (or more if a cell span
is set).

The supported child properties are:

  • x-expand and y-expand: if this cell with try to allocate the
    available extra space for the table.
  • x-fill and y-fill: if the child will get all the space available in
    the cell.
  • x-align and y-align: if the child does not fill the cell, then
    where the child will be aligned inside the cell.
  • row-span and col-span: number of cells the child will allocate for
    itself.

Also, the TableLayout has row-spacing and col-spacing for specifying
the space in pixels between rows and between columns.

We also include a simple test of the layout manager, and the
documentation updates.

The TableLayout was implemented starting from MxTable and
ClutterBoxLayout.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agobox-layout: Use allocate_align_fill()
Emmanuele Bassi [Tue, 10 Aug 2010 21:20:38 +0000 (22:20 +0100)]
box-layout: Use allocate_align_fill()

Remove duplicated code, and use the newly added actor method to compute
the child allocation based on alignment and fill.

13 years agobin-layout: Migrate to allocate_align_fill()
Emmanuele Bassi [Tue, 10 Aug 2010 16:43:26 +0000 (17:43 +0100)]
bin-layout: Migrate to allocate_align_fill()

Now that we have the code in ClutterActor itself.

13 years agoactor: Add allocate_align_fill()
Emmanuele Bassi [Tue, 10 Aug 2010 16:40:01 +0000 (17:40 +0100)]
actor: Add allocate_align_fill()

Layout managers are using the same code to allocate a child while taking
into consideration:

  • horizontal and vertical alignment
  • horizontal and vertical fill
  • the preferred minimum and natural size, depending
    on the :request-mode property
  • the text direction for the horizontal alignment
  • an offset given by the fixed position properties

Given the amount of code involved, and the amount of details that can go
horribly wrong while copy and pasting such code in various classes - let
alone various projects - Clutter should provide an allocate() variant
that does the right thing in the right way. This way, we have a single
point of failure.

13 years agotest-flow-layout: Use BindConstraints
Emmanuele Bassi [Tue, 10 Aug 2010 16:43:56 +0000 (17:43 +0100)]
test-flow-layout: Use BindConstraints

If we want to fit the FlowLayout to the Stage size we should use the
BindConstraint API instead of a watcher on ::allocation-changed.

13 years agoConditionally use g_object_notify_by_pspec
Neil Roberts [Mon, 21 Jun 2010 09:20:32 +0000 (10:20 +0100)]
Conditionally use g_object_notify_by_pspec

This adds a wrapper macro to clutter-private that will use
g_object_notify_by_pspec if it's compiled against a version of GLib
that is sufficiently new. Otherwise it will notify by the property
name as before by extracting the name from the pspec. The objects can
then store a static array of GParamSpecs and notify using those as
suggested in the documentation for g_object_notify_by_pspec.

Note that the name of the variable used for storing the array of
GParamSpecs is obj_props instead of properties as used in the
documentation because some places in Clutter uses 'properties' as the
name of a local variable.

Mose of the classes in Clutter have been converted using the script in
the bug report. Some classes have not been modified even though the
script picked them up as described here:

json-generator:

 We probably don't want to modify the internal copy of JSON

behaviour-depth:
rectangle:
score:
stage-manager:

 These aren't using the separate GParamSpec* variable style.

blur-effect:
win32/device-manager:

 Don't actually define any properties even though it has the enum.

box-layout:
flow-layout:

  Have some per-child properties that don't work automatically with
  the script.

clutter-model:

  The script gets confused with ClutterModelIter

stage:

  Script gets confused because PROP_USER_RESIZE doesn't match
  "user-resizable"

test-layout:

  Don't really want to modify the tests

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

13 years agocookbook: Added recipe for non-rectangular actor
Elliot Smith [Tue, 10 Aug 2010 10:02:17 +0000 (11:02 +0100)]
cookbook: Added recipe for non-rectangular actor

Added a new recipe for creating a non-rectangular
actor using ClutterPath (aka "shaped pick") and
the Cogl primitives API.

Also cleaned up XML alignment in the actors.xml
file.

13 years agoAlways bind a new texture to unit 1 when necessary
Owen W. Taylor [Mon, 9 Aug 2010 19:06:35 +0000 (15:06 -0400)]
Always bind a new texture to unit 1 when necessary

The special handling for texture unit 1 caught the case where unit
1 was changed for transient purposes, but didn't properly handle
the case where the actual non-transient texture was different between
two materials with no transient binding in between.

If the actual texture has changed when flushing, mark unit 1 as dirty
and needing a rebind.

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

13 years agoclutter.modules: Add Cluttersmith
Emmanuele Bassi [Mon, 9 Aug 2010 18:56:00 +0000 (19:56 +0100)]
clutter.modules: Add Cluttersmith

13 years agoclutter.modules: Mx moved to clutter-project.org
Emmanuele Bassi [Mon, 9 Aug 2010 18:55:42 +0000 (19:55 +0100)]
clutter.modules: Mx moved to clutter-project.org

13 years agoSilence a compiler warning
Emmanuele Bassi [Mon, 9 Aug 2010 18:38:23 +0000 (19:38 +0100)]
Silence a compiler warning

13 years agoMerge remote branch 'elliot/cookbook-layouts-introduction'
Emmanuele Bassi [Mon, 9 Aug 2010 16:44:42 +0000 (17:44 +0100)]
Merge remote branch 'elliot/cookbook-layouts-introduction'

* elliot/cookbook-layouts-introduction:
  cookbook: Added layout introduction and "stacking actors" recipe
  cookbook: Added layouts.xml to the list of XML files
  cookbook: Added layouts section and introduction

13 years agogitignore: Ignore test-cogl-shader-{arbfp,glsl}
Damien Lespiau [Thu, 5 Aug 2010 14:55:12 +0000 (15:55 +0100)]
gitignore: Ignore test-cogl-shader-{arbfp,glsl}

Fear the out of tree builds!

13 years agotests-interactive: Adds a test-cogl-shader-glsl.c
Robert Bragg [Thu, 5 Aug 2010 14:18:39 +0000 (15:18 +0100)]
tests-interactive: Adds a test-cogl-shader-glsl.c

This is based on test-shader.c but is solely implemented with the
cogl_program/shader APIs instead of the clutter shader APIs.

13 years agotests/interactive: Adds a test-cogl-shader-arbfp.c
Robert Bragg [Thu, 5 Aug 2010 14:20:49 +0000 (15:20 +0100)]
tests/interactive: Adds a test-cogl-shader-arbfp.c

This tests the ARBfp support for cogl_program and cogl_shader using the
shaders Chris Lord adapted from test-shader when he was experimenting
with adding ARBfp support to clutter back in 2008 (See:
http://bugzilla.clutter-project.org/show_bug.cgi?id=1049)

13 years agocogl: Allow setting ARBfp source on a CoglShader
Robert Bragg [Wed, 4 Aug 2010 16:53:51 +0000 (17:53 +0100)]
cogl: Allow setting ARBfp source on a CoglShader

This makes CoglProgram/Shader automatically detect when the user has
given an ARBfp program by checking for "!!ARBfp1.0" at the beginning of
the user's source.

ARBfp local parameters can be set with cogl_program_uniform_float
assuming you pass a @size of 4 (all ARBfp program.local parameters
are vectors of 4 floats).

This doesn't expose ARBfp environment parameters or double precision
local parameters.

13 years agocogl: Adds a COGL_FEATURE_SHADERS_ARBFP feature flag
Robert Bragg [Thu, 5 Aug 2010 09:59:03 +0000 (10:59 +0100)]
cogl: Adds a COGL_FEATURE_SHADERS_ARBFP feature flag

This adds a public feature flag for ARBfp so developers can determine if
the cogl API supports ARBfp or not.

13 years agomaterial: Add cogl_material_{get,set}_user_program
Robert Bragg [Thu, 5 Aug 2010 09:46:54 +0000 (10:46 +0100)]
material: Add cogl_material_{get,set}_user_program

Previously we had an internal only _cogl_material_set_user_program to
redirect legacy usage of cogl_program_use() through CoglMaterial. This
instead makes the API public because until we implement our planned
"snippet" framework we need a stop-gap solution for using shaders in
Cogl.

The plan is to also support ARBfp with the cogl_program/shader API so
this API will also allow clutter-gst to stop using direct OpenGL calls
that conflict with Cogl's state tracking.

13 years agomaterial: chain up in layer_pre_change_notify
Robert Bragg [Sun, 8 Aug 2010 12:54:07 +0000 (13:54 +0100)]
material: chain up in layer_pre_change_notify

A change to a layer is also going to be a change to its owning material
so we have to chain up in _cogl_material_layer_pre_change_notify and
call _cogl_material_pre_change_notify. Previously we were only
considering if the owning material was referenced in the journal but
that ignores that it might also have dependants. We no longer need to
flush the journal directly in layer_pre_change_notify.

13 years agomaterial: unlink old layer from owner when replacing
Robert Bragg [Sun, 8 Aug 2010 13:26:45 +0000 (14:26 +0100)]
material: unlink old layer from owner when replacing

In _cogl_material_layer_pre_change_notify when we see that a layer has
dependants and it can't be modified directly then we allocate a new
layer. In this case we also have to link the new layer to its required
owner. If the immutable layer we copied had the same owner though we
weren't unlinking that old layer.

13 years agomaterial: fix initialization of sparse properties
Robert Bragg [Sun, 8 Aug 2010 12:41:15 +0000 (13:41 +0100)]
material: fix initialization of sparse properties

In _cogl_material_pre_change_notify we need to identify if it's a sparse
property being changed and if so initialize the state group if the given
material isn't currently the authority for it.

Previously we were unconditionally calling
_cogl_material_initialize_state which would e.g. NULL the layer
differences list of a material each time a layer change was notified.

It would also call _cogl_material_initialize_state for non-sparse
properties which should always be valid at this point so the function
has been renamed to _cogl_material_initialize_sparse_state to make this
clearer with a corresponding g_return_if_fail check.

13 years agomaterial: fix copying of material layer differences
Robert Bragg [Sun, 8 Aug 2010 12:09:27 +0000 (13:09 +0100)]
material: fix copying of material layer differences

This fixes how we copy layer differences in
_cogl_material_copy_layer_differences.

We were making a redundant g_list_copy of the src differences and then
iterating the src list calling _cogl_material_add_layer_difference for
each entry which would double the list length, but the initial copy
directly referenced the original layers which wasn't correct.

Also we were initializing dest->n_layers before copying the layer
differences but the act of copying the differences will re-initialize
n_layers to 0 when adding the first layer_difference since it will
trigger a layer_pre_change_notify and since the dest material isn't yet
a STATE_LAYERS authority the state group is initialized before allowing
the change.

13 years agomaterial: don't dereference layer->texture directly
Robert Bragg [Sun, 8 Aug 2010 12:05:40 +0000 (13:05 +0100)]
material: don't dereference layer->texture directly

In _cogl_material_texture_storage_change_notify we were potentially
dereferencing layer->texture without checking first that it is the
authority of texture state. We now use
_cogl_material_layer_get_texture() instead.

13 years agomaterial: Improve the dot file debugging code
Robert Bragg [Sun, 8 Aug 2010 13:09:26 +0000 (14:09 +0100)]
material: Improve the dot file debugging code

This improve the dot file output available when calling
_cogl_debug_dump_materials_dot_file. The material graph now directly
points into the layer graph and the layers now show the texture unit
index.

13 years agocookbook: Added layout introduction and "stacking actors" recipe
Elliot Smith [Thu, 5 Aug 2010 15:46:36 +0000 (16:46 +0100)]
cookbook: Added layout introduction and "stacking actors" recipe

Expanded the layout introduction and added a recipe about
stacking actors using ClutterBinLayout, with two examples.

13 years agocookbook: Added layouts.xml to the list of XML files
Elliot Smith [Thu, 5 Aug 2010 12:43:23 +0000 (13:43 +0100)]
cookbook: Added layouts.xml to the list of XML files

Make sure layouts.xml is included for make dist.

13 years agocookbook: Added layouts section and introduction
Elliot Smith [Tue, 3 Aug 2010 10:00:19 +0000 (11:00 +0100)]
cookbook: Added layouts section and introduction

13 years agoglx: Depend on libdrm
Emmanuele Bassi [Mon, 9 Aug 2010 10:29:03 +0000 (11:29 +0100)]
glx: Depend on libdrm

DRM is available on more platforms than Linux (e.g. kFreeBSD), but
Clutter currently FTBFS there because of not being an alternative to
the __linux__ code (where it should be HAVE_DRM).

Instead of copying the DRM data structures, we should use libdrm when
falling back to directly requesting to wait for the vblank.

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

Based on a patch by: Emilio Pozuelo Monfort <pochu27@gmail.com>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agolayout-manager: Do not emit layout-changed on thaw
Emmanuele Bassi [Mon, 9 Aug 2010 10:06:44 +0000 (11:06 +0100)]
layout-manager: Do not emit layout-changed on thaw

When thawing a LayoutManager, do not emit the ::layout-changed signal
since it might still be in the middle of a relayout.

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

13 years agoanimator: Remove redundant parenthesis
Emmanuele Bassi [Mon, 9 Aug 2010 07:50:18 +0000 (08:50 +0100)]
animator: Remove redundant parenthesis

13 years agoanimator: Improve the key value copy
Emmanuele Bassi [Sun, 8 Aug 2010 18:18:46 +0000 (19:18 +0100)]
animator: Improve the key value copy

Use the same code used elsewhere in Clutter when dealing with values
that can be copied or transformed.

13 years agostate: Return a boolean when getting the key value
Emmanuele Bassi [Sun, 8 Aug 2010 18:17:14 +0000 (19:17 +0100)]
state: Return a boolean when getting the key value

Since the copy might fail, we should return a boolean value and not just
warn on the console - similarly to what ClutterAnimator does.

13 years agoclutter.modules: Fix UProf id
Emmanuele Bassi [Sun, 8 Aug 2010 12:48:51 +0000 (13:48 +0100)]
clutter.modules: Fix UProf id

13 years agoclutter.modules: Fix the uprof repository
Emmanuele Bassi [Fri, 6 Aug 2010 18:33:21 +0000 (19:33 +0100)]
clutter.modules: Fix the uprof repository

UProf has moved.

13 years agotext: Do not set the markup unconditionally
Emmanuele Bassi [Fri, 6 Aug 2010 16:04:37 +0000 (17:04 +0100)]
text: Do not set the markup unconditionally

When setting :use-markup we always pass the contents of the Text actor
to clutter_text_set_markup_internal(); if string contains any markup,
this ends up being parsed and used - even when :use-markup is set to
FALSE.

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

13 years agocogl-material: Unref the texture when reverting authority
Neil Roberts [Fri, 6 Aug 2010 15:41:41 +0000 (16:41 +0100)]
cogl-material: Unref the texture when reverting authority

When the texture is set on a layer so that it is back to the parent's
texture it would clear the texture change flag but it wouldn't unref
the texture. The free function for a material layer does not unref the
texture if the change flag is cleared so the texture would end up
leaking. This happens for ClutterTexture because it disposes the
texture by setting layer 0 of the material to COGL_INVALID_HANDLE
which ends up the same as the default material.

13 years agocookbook: Make the table of content have a depth of 2
Damien Lespiau [Fri, 6 Aug 2010 14:39:01 +0000 (15:39 +0100)]
cookbook: Make the table of content have a depth of 2

Instead of showing Problem/Solution/Discussion for each recipe, let's
just show the title of those recipes.

13 years agocookbook: Remove the note about indenting <xi:include>
Damien Lespiau [Fri, 6 Aug 2010 11:30:06 +0000 (12:30 +0100)]
cookbook: Remove the note about indenting <xi:include>

It's not necessary now to special case the indentation of includes as
the XSLT for the cookbook strips leading and trailing space automaticaly
for us.

13 years agocookbook: Close a tag, making xsltproc happier
Damien Lespiau [Thu, 5 Aug 2010 12:21:52 +0000 (13:21 +0100)]
cookbook: Close a tag, making xsltproc happier

A </function> tag was not closed.

13 years agocookbook: Add a recipe on how to create sub-textures
Damien Lespiau [Thu, 5 Aug 2010 09:58:42 +0000 (10:58 +0100)]
cookbook: Add a recipe on how to create sub-textures

Fiddle with Cogl textures to create a new ClutterTexture that only
displays a rectangular region of a bigger ClutterTexture.

13 years agocookbook: Strip leading and trailing space inside programlisting
Damien Lespiau [Thu, 5 Aug 2010 18:50:29 +0000 (19:50 +0100)]
cookbook: Strip leading and trailing space inside programlisting

It's a XSL FAQ to be able to chomp text nodes and we just have to copy
and paste a XSLT 1.0 solution from:
  http://dpawson.co.uk/xsl/sect2/N8321.html#d11325e833

Let's then empower our cookbook customization layer to chomp text nodes,
children of programlisting.

13 years agocookbook: Add text.xml to the list of XML files
Damien Lespiau [Tue, 3 Aug 2010 21:26:14 +0000 (22:26 +0100)]
cookbook: Add text.xml to the list of XML files

text.xml was feeling lonely and forgotten, that's fixed now.

13 years agocookbook: Add the source XML files as dependencies in the Makefile rules
Damien Lespiau [Tue, 3 Aug 2010 20:02:23 +0000 (21:02 +0100)]
cookbook: Add the source XML files as dependencies in the Makefile rules

The generated cookbook files (either HTML or PDF) do not only depend on
clutter-cookbok.xml but also on all the chapters that compose the
cookbook. Add this dependency to the Makefile rules to have make rebuild
the book when a chapter changes.

Since XML_FILES is now the list of source files, move recipe-template.xml
to EXTRA_DIST.

13 years agomaterial: only deference layer->texture for authority
Robert Bragg [Fri, 6 Aug 2010 13:12:22 +0000 (14:12 +0100)]
material: only deference layer->texture for authority

In _cogl_material_layer_pre_paint we were mistakenly dereferencing the
layer->texture member for the passed layer instead of dereferencing the
texture state authority which was causing crashes in some cases.

13 years agolayout-manager: Freeze ::layout-changed when creating LayoutMeta
Emmanuele Bassi [Thu, 5 Aug 2010 17:10:22 +0000 (18:10 +0100)]
layout-manager: Freeze ::layout-changed when creating LayoutMeta

LayoutMeta instances are created lazily. If an actor is added to a
container with a layout manager then the first time the layout manager
might be creating the LayoutMeta instance could be during the allocation
cycle caused by calling clutter_actor_show(). When a LayoutMeta is
instantiated for the first time, a list of properties can be set - and
this might lead to the emission of the ::layout-changed signal. The
signal is, most typically, going to cause a relayout to be queued, and a
warning will be printed on the terminal.

We should freeze the emission of the ::layout-changed signal during the
creation of the LayoutMeta instances, and thaw it after that.

13 years agobin-layout: Add a text to the test
Emmanuele Bassi [Thu, 5 Aug 2010 16:22:50 +0000 (17:22 +0100)]
bin-layout: Add a text to the test

We have a rectangle, a cairo texture and a texture. Let's go add a text
actor as well.

13 years agotexture: Update the request mode depending on the size
Emmanuele Bassi [Thu, 5 Aug 2010 15:19:51 +0000 (16:19 +0100)]
texture: Update the request mode depending on the size

If a Texture has been set to:

  • keep its size synchronized with the image data
  • maintain the aspect ratio of the image data

then it should also change its request mode depending on the orientation
of the image data, so that layout managers have a fighting chance of
sizing it correctly.

13 years agotexture: Make the :filename property readable
Emmanuele Bassi [Thu, 5 Aug 2010 14:29:54 +0000 (15:29 +0100)]
texture: Make the :filename property readable

UI builders and other tools are be interested in the file used to load
the image data.

13 years agoPost-release version bump to 1.3.11
Emmanuele Bassi [Thu, 5 Aug 2010 12:06:38 +0000 (13:06 +0100)]
Post-release version bump to 1.3.11

13 years agoRelease 1.3.10
Emmanuele Bassi [Wed, 4 Aug 2010 11:38:53 +0000 (12:38 +0100)]
Release 1.3.10

13 years agocookbook: Fix the text-shadow recipe
Emmanuele Bassi [Thu, 5 Aug 2010 10:41:25 +0000 (11:41 +0100)]
cookbook: Fix the text-shadow recipe

Fill out the recipe and add more comments to the example code.

13 years agopo: Remove the requirement for LINGUAS and ChangeLog
Emmanuele Bassi [Wed, 4 Aug 2010 11:47:16 +0000 (12:47 +0100)]
po: Remove the requirement for LINGUAS and ChangeLog

We don't use ChangeLogs and the LINGUAS file is replaced by the
AS_ALL_LINGUAS m4 macro.

13 years agoosx: Fixed stage resize policy
Roman Kudiyarov [Tue, 3 Aug 2010 14:12:12 +0000 (21:12 +0700)]
osx: Fixed stage resize policy

Added initialization of minimum window size property on Cocoa
side. This property works when user change window size by mouse
dragging. But when size is changed by clutter_actor_set_size this
property will not help and was added another check in
clutter_stage_osx_resize. Also osx_get_geometry was refactoried
because it returns incorrect values in many cases but now size is
saved in [Window reshape] in requisition_width/height and this value
will be returned in any case to frontend.

13 years agotest: Fixed test-rotate for osx platfom
Roman Kudiyarov [Wed, 4 Aug 2010 05:08:50 +0000 (12:08 +0700)]
test: Fixed test-rotate for osx platfom

There was a bug in clutter-shader-effect. We have to set to zero new object
of type GValue before we can use it in g_value_init.

13 years agoosx: added resolution initialization in backend
Roman Kudiyarov [Thu, 29 Jul 2010 14:59:46 +0000 (21:59 +0700)]
osx: added resolution initialization in backend

It's important step of initialization because all features calls from
font rendering libs based on this parameter. By default it equals to
-1 and test-text-cache test crashes in this case.

13 years agoosx: Fixed warnings in osx event implementation
Roman Kudiyarov [Sat, 24 Jul 2010 04:54:19 +0000 (11:54 +0700)]
osx: Fixed warnings in osx event implementation

13 years agoAdded willResize delegate for osx stage.
Roman Kudiyarov [Fri, 23 Jul 2010 05:16:23 +0000 (12:16 +0700)]
Added willResize delegate for osx stage.

By default a clutter stage is not user resizable and this delegate
controls this option while resizing the stage.

13 years agoFixed lack of reaction for keyboard events after showing stage on osx.
Roman Kudiyarov [Fri, 23 Jul 2010 04:25:40 +0000 (11:25 +0700)]
Fixed lack of reaction for keyboard events after showing stage on osx.

Trick with hiding view while showing the stage affects on responder
chain. The main view ceases to be first responder and we should
manually set first responder.

13 years agoFixed incorrect size return in osx stage if stage resizable by user.
Roman Kudiyarov [Thu, 22 Jul 2010 06:51:37 +0000 (13:51 +0700)]
Fixed incorrect size return in osx stage if stage resizable by user.

For some reasons width&height was equal to 1 if flag user-resizable
was true.

13 years agoosx: Added size initialization for stage
Roman Kudiyarov [Wed, 21 Jul 2010 16:22:57 +0000 (23:22 +0700)]
osx: Added size initialization for stage

After stage creation it's size can be changed by user and it should be
taken into account in clutter_stage_osx_realize.

13 years agotest: fixed uninitialized variable in test-cogl-point-sprites
Roman Kudiyarov [Mon, 19 Jul 2010 15:53:49 +0000 (22:53 +0700)]
test: fixed uninitialized variable in test-cogl-point-sprites

13 years agoosx: Fixed problem with freezing application while checking behaviour.
Roman Kudiyarov [Mon, 19 Jul 2010 13:46:55 +0000 (20:46 +0700)]
osx: Fixed problem with freezing application while checking behaviour.

Problem was in incorrect application initialization.
[NSApplication sharedApplication] should be call in backend init(not
in init stage). It doesn't require any data and only makes a
connection to window server.

13 years agoosx: Fixed bug with creating context twice.
Roman Kudiyarov [Fri, 16 Jul 2010 12:46:17 +0000 (19:46 +0700)]
osx: Fixed bug with creating context twice.

We should assign context and pixel_format vars to null to avoid
multiple context creation.

13 years agoosx: added create_context function in backend
Roman Kudiyarov [Fri, 16 Jul 2010 12:19:13 +0000 (19:19 +0700)]
osx: added create_context function in backend

Cleanup clutter_backend_osx_post_parse function and move context
initialization to clutter_backend_osx_create_context. The OpenGL pixel
format attributes were taken as is. Also move bringing application to
foreground in clutter_stage_osx_realize, it seems there is best place
for it.

13 years agoosx: Implemented hide cursor backend implementation
Roman Kudiyarov [Thu, 15 Jul 2010 12:04:28 +0000 (19:04 +0700)]
osx: Implemented hide cursor backend implementation

Add implementation for hide cursor in stage. Also added using this
feature in test-animator.

13 years agoAdded .DS_Store and test logs messages to git ignore
Roman Kudiyarov [Thu, 15 Jul 2010 09:32:59 +0000 (16:32 +0700)]
Added .DS_Store and test logs messages to git ignore

13 years agoosx: Added missed function declaration for stage
Roman Kudiyarov [Thu, 15 Jul 2010 09:27:16 +0000 (16:27 +0700)]
osx: Added missed function declaration for stage

Added empty functions for cursor and window resize functional with
notes FIXME and also they are added to iface.

13 years agoosx: Remove drawing call while showing stage and add viewport init
Roman Kudiyarov [Thu, 15 Jul 2010 09:00:29 +0000 (16:00 +0700)]
osx: Remove drawing call while showing stage and add viewport init

Viewport didn't initialized before OGL drawing and it causes crash on
assert so added viewport initalization to
clutter_stage_osx_realize. Also showing the stage causes drawing
function but other part of the system(in particular conformance tests)
don't expect it and aren't ready at this moment.

13 years agoosx: Fixed crash while features initialization
Roman Kudiyarov [Thu, 15 Jul 2010 08:46:04 +0000 (15:46 +0700)]
osx: Fixed crash while features initialization

Clearing current context couses incorrect work of glGetString function
and all next GL functions that use it work incorrectly.

13 years agoglx: Add more debugging notes
Emmanuele Bassi [Tue, 3 Aug 2010 16:53:58 +0000 (17:53 +0100)]
glx: Add more debugging notes

Should help debug the GLX visual selection.

13 years agodocs: Further clarifications
Emmanuele Bassi [Tue, 3 Aug 2010 15:48:53 +0000 (16:48 +0100)]
docs: Further clarifications

Mention the XFixes extension for compositors using input regions to let
events "pass through" the stage.

Thanks to: Robert Bragg <robert@linux.intel.com>

13 years agodocs: Clarify the event retrieval disable behaviour
Emmanuele Bassi [Tue, 3 Aug 2010 15:30:04 +0000 (16:30 +0100)]
docs: Clarify the event retrieval disable behaviour

When we disable the event retrieval, we now just disable the X11 event
source, not the event selection. We need to make that clear to
applications, especially compositors, which might expect complete
control over the selection.

13 years agoglx: Unconditionally select X11/GLX events
Emmanuele Bassi [Tue, 3 Aug 2010 15:11:52 +0000 (16:11 +0100)]
glx: Unconditionally select X11/GLX events

Currently, we select input events and GLX events conditionally,
depending on whether the user has disabled event retrieval.

We should, instead, unconditionally select input events even with event
retrieval disabled because we need to guarantee that the Clutter
internal state is maintained when calling clutter_x11_handle_event()
without requiring applications or embedding toolkits to select events
themselves. If we did that, we'd have to document the events to be
selected, and also update applications and embedding toolkits each time
we added a new mask, or a new class of events - something that's clearly
not possible.

See:

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

for the rationale of why we did conditional selection. It is now clear
that a compositor should clear out the input region, since it cannot
assume a perfectly clean slate coming from us.

See:

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

for an example of things that break if we do conditional event
selection on GLX events. In that specific case, the X11 server ≤ 1.8
always pushed GLX events on the queue, even without selecting them; this
has been fixed in the X11 server ≥ 1.9, which means that applications
like Mutter or toolkit integration libraries like Clutter-GTK would stop
working on recent Intel drivers providing the GLX_INTEL_swap_event
extension.

This change has been tested with Mutter and Clutter-GTK.

13 years agoMerge remote branch 'elliot/cookbook-animations-rotating'
Emmanuele Bassi [Tue, 3 Aug 2010 14:44:46 +0000 (15:44 +0100)]
Merge remote branch 'elliot/cookbook-animations-rotating'

* elliot/cookbook-animations-rotating:
  cookbook: Added recipe for animated rotation of an actor
  cookbook: Add explanation about including code samples
  cookbook: Make filename used in video example consistent
  cookbook: Add example code for animated rotation

13 years agocogl-program: gles2: bind programs lazily as for GL
Robert Bragg [Fri, 23 Jul 2010 09:12:39 +0000 (10:12 +0100)]
cogl-program: gles2: bind programs lazily as for GL

This makes the gles2 cogl_program_use consistent with the GL version by
not binding the program immediately and instead leaving it to
cogl-material.c to bind the program when actually drawing something.

13 years agogles2: Have CoglProgram track uniforms per program
Robert Bragg [Tue, 8 Jun 2010 22:06:50 +0000 (23:06 +0100)]
gles2: Have CoglProgram track uniforms per program

Previously custom uniforms were tracked in _CoglGles2Wrapper but as part
of a process to consolidate the gl/gles2 shader code it seems to make
sense for this state to be tracked in the CoglProgram object instead.

http://bugzilla.o-hand.com/show_bug.cgi?id=2179

13 years agocogl-shader: unifies the driver/{gl,gles} shader files
Robert Bragg [Mon, 2 Aug 2010 20:40:55 +0000 (21:40 +0100)]
cogl-shader: unifies the driver/{gl,gles} shader files

The per driver implementations of cogl-shader.c had become almost
identical we now have a single cogl/cogl-shader.c instead.