profile/ivi/clutter.git
13 years agodocs: Fixes to avoid gtk-doc warnings
Emmanuele Bassi [Tue, 17 Aug 2010 13:54:20 +0000 (14:54 +0100)]
docs: Fixes to avoid gtk-doc warnings

13 years agobuild: Remove dolt remnants
Emmanuele Bassi [Tue, 17 Aug 2010 10:34:35 +0000 (11:34 +0100)]
build: Remove dolt remnants

We don't use Dolt any more, since we depend on libtool 2.2.

13 years agodocs: Add :keep-aspect-ratio behaviour to the notes
Emmanuele Bassi [Mon, 16 Aug 2010 15:33:32 +0000 (16:33 +0100)]
docs: Add :keep-aspect-ratio behaviour to the notes

13 years agotexture: Default square textures to height-for-width
Emmanuele Bassi [Mon, 16 Aug 2010 14:56:49 +0000 (15:56 +0100)]
texture: Default square textures to height-for-width

Square textures should have a preferred geometry request set to
height-for-width, as it is the default for Clutter itself.

13 years agoPost-release version bump to 1.3.13
Emmanuele Bassi [Mon, 16 Aug 2010 12:37:57 +0000 (13:37 +0100)]
Post-release version bump to 1.3.13

13 years agoRelease Clutter 1.3.12 (developers snapshot)
Emmanuele Bassi [Mon, 16 Aug 2010 12:23:43 +0000 (13:23 +0100)]
Release Clutter 1.3.12 (developers snapshot)

13 years agobuild: Fix distcheck errors
Emmanuele Bassi [Mon, 16 Aug 2010 12:23:10 +0000 (13:23 +0100)]
build: Fix distcheck errors

13 years agobuild: Use maintainer-clean for the ignore files removal
Emmanuele Bassi [Sun, 15 Aug 2010 17:42:54 +0000 (18:42 +0100)]
build: Use maintainer-clean for the ignore files removal

Instead of distclean.

13 years agoRevert "build: Distclean generated ignore files"
Emmanuele Bassi [Sun, 15 Aug 2010 17:33:10 +0000 (18:33 +0100)]
Revert "build: Distclean generated ignore files"

Git ignore files are not dist'ed, so it's pointless to remove them on
distclean.

This reverts commit f14587aadc428e5743d2b30e2a9f4bf51f1d1e05.

13 years agobuild: Rule for quick publishing of the cookbook
Emmanuele Bassi [Sat, 14 Aug 2010 07:53:18 +0000 (08:53 +0100)]
build: Rule for quick publishing of the cookbook

Just call `make publish`.

13 years agobuild: Autogenerate more ignore files
Emmanuele Bassi [Sat, 14 Aug 2010 07:43:16 +0000 (08:43 +0100)]
build: Autogenerate more ignore files

The tests/accessibility, tests/micro-bench and the examples directory
in the coobook create a lot of non-installed binaries. Since we know who
they are, and we ignore them, we can auto-generate the ignore files as
well.

The rest of Clutter is covered by the main ignore file.

13 years agobuild: Distclean generated ignore files
Emmanuele Bassi [Fri, 13 Aug 2010 17:35:35 +0000 (18:35 +0100)]
build: Distclean generated ignore files

13 years agobuild: Make test-conform depend on Makefile changes
Emmanuele Bassi [Fri, 13 Aug 2010 17:32:10 +0000 (18:32 +0100)]
build: Make test-conform depend on Makefile changes

13 years agobuild: Autogenerate interactive/.gitignore
Emmanuele Bassi [Fri, 13 Aug 2010 17:31:44 +0000 (18:31 +0100)]
build: Autogenerate interactive/.gitignore

Exactly like we did for conform/.gitignore

13 years agobuild: Generate the conformance/.gitignore file
Emmanuele Bassi [Fri, 13 Aug 2010 17:22:12 +0000 (18:22 +0100)]
build: Generate the conformance/.gitignore file

Since we are generating a lot of files that we should ignore, we should
generate the Git ignore file as well.

13 years agobuild: Split up the test-conformance SOURCES
Emmanuele Bassi [Fri, 13 Aug 2010 17:15:01 +0000 (18:15 +0100)]
build: Split up the test-conformance SOURCES

Having different sections should make it easier to add new test units to
the build.

13 years agoclutter.modules: Remove deps on gir-repository
Emmanuele Bassi [Fri, 13 Aug 2010 17:14:10 +0000 (18:14 +0100)]
clutter.modules: Remove deps on gir-repository

Keep it in the moduleset, but don't let Clutter depend on it.

13 years agoRevert "clutter.modules: Remove deps on gir-repository"
Emmanuele Bassi [Fri, 13 Aug 2010 17:12:43 +0000 (18:12 +0100)]
Revert "clutter.modules: Remove deps on gir-repository"

This reverts commit 0ce9cf730b2a8c3b3ac4786afee0579a3795fd9e.

The commit contained unrelated changes

13 years agoclutter.modules: Remove deps on gir-repository
Emmanuele Bassi [Fri, 13 Aug 2010 17:09:28 +0000 (18:09 +0100)]
clutter.modules: Remove deps on gir-repository

Keep it in the moduleset, but don't let Clutter depend on it.

13 years agoclutter.modules: Add a gtk2 module for gtk+ 2.x
Emmanuele Bassi [Fri, 13 Aug 2010 17:00:23 +0000 (18:00 +0100)]
clutter.modules: Add a gtk2 module for gtk+ 2.x

Mx (and others) depend on gtk+ 2.x, and not on gtk+ 3.x.

13 years agoanimator: Plug some leaks
Emmanuele Bassi [Fri, 13 Aug 2010 15:32:27 +0000 (16:32 +0100)]
animator: Plug some leaks

13 years agomaterial: Implements weak materials
Robert Bragg [Mon, 9 Aug 2010 15:01:17 +0000 (16:01 +0100)]
material: Implements weak materials

Weak materials are ones that don't take a reference on their parent and
they are associated with a callback that notifies when the material is
destroyed, because its parent was freed or modified.

More details can be found at:
http://wiki.clutter-project.org/wiki/CoglDesign/CoglMaterial

For now the concept is internal only but the plan is to make this public
at some point once we have tested the design internally.

13 years agostate: Plug some memory leakage
Emmanuele Bassi [Fri, 13 Aug 2010 11:12:59 +0000 (12:12 +0100)]
state: Plug some memory leakage

Thanks to Valgrind, test-state-base now reports 0 bytes definitely lost.

13 years agoMerge remote branch 'elliot/cookbook-events-mouse-scroll'
Emmanuele Bassi [Thu, 12 Aug 2010 17:29:08 +0000 (18:29 +0100)]
Merge remote branch 'elliot/cookbook-events-mouse-scroll'

* elliot/cookbook-events-mouse-scroll:
  cookbook: Cleaning up grammar and wording in mouse scroll recipe
  cookbook: Added more explanation about setting y coord on scrollable
  cookbook: Mentioned the animation in the sample code
  cookbook: Included video of the scroll example running
  cookbook: Made stage slightly smaller for scroll event example
  cookbook: Added video showing scrollable actor
  cookbook: Added walk through of code example for mouse scroll
  cookbook: Fixed link to example in mouse scroll recipe
  cookbook: Simplified full scroll example
  cookbook: Improved wording and formatting in mouse scroll intro.
  cookbook: Handle all possible mouse scroll directions
  cookbook: Build mouse scroll example with cookbook
  cookbook: Cleaned up redundant comments in code example
  cookbook: Added xmlns for XInclude to events docbook file
  cookbook: Added basic mouse scroll recipe

13 years agodocs: Update the build instructions in the reference
Neil Roberts [Thu, 12 Aug 2010 16:03:16 +0000 (17:03 +0100)]
docs: Update the build instructions in the reference

This removes all references to SDL in the build instructions as the
backend is no longer available.  The OpenGL version required is only
1.2 not 1.4. The Windows build instructions were out of date and have
been replaced with a link to the wiki instead.

13 years agoRemove last uses of cogl_program_uniform*
Emmanuele Bassi [Thu, 12 Aug 2010 16:06:29 +0000 (17:06 +0100)]
Remove last uses of cogl_program_uniform*

Following the commits:

  c03544da - clutter-shader: use cogl_program_set_uniform_xyz API
  a26119b5 - tests: Remove use of cogl_program_use

Remove the users of cogl_program_uniform_* and cogl_program_use() in the
shader-based effects.

13 years agobuild/mingw/README: Replace with a link to the wiki
Neil Roberts [Thu, 12 Aug 2010 15:56:28 +0000 (16:56 +0100)]
build/mingw/README: Replace with a link to the wiki

The build instructions for MinGW have been moved to the wiki.

13 years agocogl-shader: get_info_log should always use strdup
Robert Bragg [Thu, 12 Aug 2010 09:43:22 +0000 (10:43 +0100)]
cogl-shader: get_info_log should always use strdup

In the case where there is no error log for arbfp we were returning a
"" string literal. The other paths were using g_strdup to return a
string that could be freed with g_free. This makes the arbfp path return
g_strdup ("") instead.

13 years agocogl-shader: correctly #ifdef guard an if else block
Robert Bragg [Thu, 12 Aug 2010 09:40:39 +0000 (10:40 +0100)]
cogl-shader: correctly #ifdef guard an if else block

There are quite a few if {} else {} blocks for dealing with arbfp else
glsl and the first block is guarded with #ifdef HAVE_COGL_GL. In this
case though the #endif was before the else so it wouldn't compile for
gles.

13 years agomaterial-glsl: #include "cogl-shader-private.h"
Robert Bragg [Thu, 12 Aug 2010 09:37:55 +0000 (10:37 +0100)]
material-glsl: #include "cogl-shader-private.h"

We need to include cogl-shader-private.h to have the
COGL_SHADER_TYPE_GLSL define. When building for opengl this wasn't
noticed probably because some other header indirectly includes this
file. It was a problem when building for gles2 though.

13 years agotests: Remove use of cogl_program_use
Robert Bragg [Wed, 11 Aug 2010 18:39:41 +0000 (19:39 +0100)]
tests: Remove use of cogl_program_use

The removes the use of cogl_program_use which has been deprecated and
instead of using the cogl_program_uniform functions we now use the
cogl_program_set_uniform methods.

13 years agoclutter-shader: use cogl_program_set_uniform_xyz API
Robert Bragg [Wed, 11 Aug 2010 18:32:09 +0000 (19:32 +0100)]
clutter-shader: use cogl_program_set_uniform_xyz API

Instead of using the deprecated cogl_program_uniform_xyz functions we
now use the cogl_program_set_uniform methods. It looks like this should
also fix a problem with clutter-shader too in that previously we weren't
calling cogl_program_use before cogl_program_uniform_xyz so setting
uniforms would only work while the shader is enabled.

13 years agocogl-program: Adds use_uniform_xyz methods
Robert Bragg [Wed, 11 Aug 2010 18:18:14 +0000 (19:18 +0100)]
cogl-program: Adds use_uniform_xyz methods

Instead of exposing an API that provides an OpenGL state machine style
where you first have to bind the program to the context using
cogl_program_use() followed by updating uniforms using
cogl_program_uniform_xyz we now have uniform setter methods that take an
explicit CoglHandle for the program.

This deprecates cogl_program_use and all the cogl_program_uniform
variants and provides the following replacements:
    cogl_program_set_uniform_1i
    cogl_program_set_uniform_1f
    cogl_program_set_uniform_int
    cogl_program_set_uniform_float
    cogl_program_set_uniform_matrix

13 years agointrospection: Use the --quiet flag conditionally
Damien Lespiau [Thu, 12 Aug 2010 14:36:04 +0000 (10:36 -0400)]
introspection: Use the --quiet flag conditionally

--quiet has been added to g-ir-scanner in the 0.9.1 cycle. We really
want to be able to compile clutter with 0.6.14 to be able to reuse
gir files that are distributed in current distributions.

Use the INTROSPECTION_SCANNER_ARGS (previously unused) variable to
convey --quiet when necessary.

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

13 years agoclutter.modules: cluttersmith depends on gjs and clutter-gtk
Neil Roberts [Thu, 12 Aug 2010 13:59:03 +0000 (14:59 +0100)]
clutter.modules: cluttersmith depends on gjs and clutter-gtk

This adds dependencies on gjs and clutter-gtk to cluttersmith. There
was no module listed for gjs so this is added from the jhbuild gnome
module list.

13 years agoRemove test-random-text from the interactive .gitignore
Neil Roberts [Thu, 12 Aug 2010 13:37:27 +0000 (14:37 +0100)]
Remove test-random-text from the interactive .gitignore

13 years agoUpdate the micro-bench Git ignore file
Emmanuele Bassi [Thu, 12 Aug 2010 12:48:35 +0000 (13:48 +0100)]
Update the micro-bench Git ignore file

13 years agobuild: Add simple scripts for setting up jhbuild
Emmanuele Bassi [Thu, 12 Aug 2010 12:46:58 +0000 (13:46 +0100)]
build: Add simple scripts for setting up jhbuild

Use the same script also used by gnome-shell to set up the system
dependencies for building Clutter (and its dependencies) using jhbuild.

13 years agocookbook: Cleaning up grammar and wording in mouse scroll recipe
Elliot Smith [Thu, 12 Aug 2010 09:16:56 +0000 (10:16 +0100)]
cookbook: Cleaning up grammar and wording in mouse scroll recipe

13 years agocogl-atlas: Verify that the chosen initial size is supported
Neil Roberts [Thu, 12 Aug 2010 08:59:58 +0000 (09:59 +0100)]
cogl-atlas: Verify that the chosen initial size is supported

CoglAtlas chooses a fairly large default initial size of either
512x512 or 1024x1024 depending on the texture format. There is a
chance that this size will not be supported on some platforms which
would be catastrophic for the glyph cache because it would mean that
it would always fail to put any glyphs in the cache so text wouldn't
work. To fix this the atlas code now checks whether the chosen initial
size is supported by the texture driver and if not it will get halved
until it is supported.

13 years agocogl-atlas: Use _cogl_texture_driver_size_supported
Neil Roberts [Thu, 12 Aug 2010 08:08:30 +0000 (09:08 +0100)]
cogl-atlas: Use _cogl_texture_driver_size_supported

Previously when creating a new rectangle map it would try increasingly
larger texture sizes until GL_MAX_TEXTURE_SIZE is reached. This is bad
because it queries state which should really be owned by the texture
driver. Also GL_MAX_TEXTURE_SIZE is often a conservative estimate so
larger texture sizes can be used if the proxy texture is queried
instead.

13 years agocogl-rectangle-map: Record largest gap rather than the remaining space
Neil Roberts [Wed, 11 Aug 2010 14:08:00 +0000 (15:08 +0100)]
cogl-rectangle-map: Record largest gap rather than the remaining space

Previously each node in the rectangle map tree would store the total
remaining space in all of its children to use as an optimization when
adding nodes. With this it could skip an entire branch of the tree if
it knew there could never be enough space for the new node in the
branch. This modifies that slightly to instead store the largest
single gap. This allows it to skip a branch earlier because often
there would be a lot of small gaps which would add up to enough a
space for the new rectangle, but the space can't be used unless it is
in a single node.

The rectangle map still needs to keep track of the total remaining
space for the whole map for the debugging output so this has been
added back in to the CoglRectangleMap struct. There is a separate
debugging function to verify this value.

13 years agocogl-atlas: Try the next size when there would be less than 6% waste
Neil Roberts [Fri, 6 Aug 2010 17:42:43 +0000 (18:42 +0100)]
cogl-atlas: Try the next size when there would be less than 6% waste

Previously when the atlas needs to be migrated it would start by
trying with the same size as the existing atlas if there is enough
space for the new texture. However even if the atlas is completely
sorted there will always be some amount of waste so when the atlas
needs to grow it would usually end up redundantly trying the same size
when it is very unlikely to fit. This patch changes it so that there
must be at least 6% waste available after the new texture is added
otherwise it will start with the next atlas size.

13 years agocogl-atlas: Add some more debugging notes
Neil Roberts [Fri, 6 Aug 2010 17:42:01 +0000 (18:42 +0100)]
cogl-atlas: Add some more debugging notes

This adds some debugging notes which report when the atlas is trying
various sizes.

13 years agocogl-rectangle-map: Use a GArray for the stack
Neil Roberts [Fri, 6 Aug 2010 16:40:52 +0000 (17:40 +0100)]
cogl-rectangle-map: Use a GArray for the stack

When iterating over the rectangle map a stack is used to implement a
recursive algorithm. Previously this was slice allocating a linked
list. Now it uses a GArray which is retained with the rectangle map to
avoid frequent allocations which is a little bit faster.

13 years agocogl-rectangle-map: Store the remaining space per node
Neil Roberts [Fri, 6 Aug 2010 15:13:20 +0000 (16:13 +0100)]
cogl-rectangle-map: Store the remaining space per node

Previously the remaining space was managed as part of the
CoglRectangleMap struct. Now it is stored per node so that at any
point in the hierarchy we can quickly determine how much space is
remaining in all of the node's children. That way when adding a
rectangle we can miss out entire branches more quickly if we know that
there is no way the new rectangle would fit in that branch.

This also adds a function to recursively verify the cached state in
the nodes such as the remaining space and the number of
rectangles. This function is only called when the dump-atlas-image
debug flag is set because it is potentially quite slow.

13 years agocogl-atlas: Increase the default minimum texture size
Neil Roberts [Fri, 6 Aug 2010 10:44:39 +0000 (11:44 +0100)]
cogl-atlas: Increase the default minimum texture size

When initially creating a texture it would start with a minimum size
of 256x256. This increases the size so that it would try to match 1MB
of memory.

13 years agocogl-pango: Use a CoglAtlas to maintain the glyph cache
Neil Roberts [Wed, 4 Aug 2010 17:05:21 +0000 (18:05 +0100)]
cogl-pango: Use a CoglAtlas to maintain the glyph cache

The glyph cache is now stored in a CoglAtlas structure instead of the
custom atlasing code. This has the advantage that it can share code
with the main texture atlas and that it supports reorganizing the
atlas when it becomes full. Unlike the texture atlas, the glyph cache
can use multiple atlases which would be neccessary if the maximum
texture size is reached and we need to create a second
texture. Whenever a display list is created it now has to register a
callback with the glyph cache so that the display list can be
recreated whenever any of the atlases are reorganized. This is needed
because the display list directly stores texture coordinates within
the atlas texture and they would become invalid when the texture is
moved.

The ensure_glyphs_for_layout now works in two steps. First it reserves
space in the atlas for all of the glyphs. The atlas is created with
the DISABLE_MIGRATION flag so that it won't actually copy any textures
if any rearranging is needed. Whenever the position is updated for a
glyph then it is marked as dirty. After space for all of the glyphs
has been reserved it will iterate over all dirty glyphs and redraw
them using Cairo. The rendered glyph is then stored in the texture
with a sub texture update.

The glyphs need to all be set at the right location before starting to
create the display list because the display list stores the texture
coordinates of the glyph. If any of the glyphs were moved around then
the parts of the display list that was created already would become
invalid. To make this work, ensure_glyphs_for_layout is now always
called before rendering a layout or a layout line.

13 years agocogl-atlas: Support multiple formats and clearing the texture
Neil Roberts [Thu, 5 Aug 2010 12:24:02 +0000 (13:24 +0100)]
cogl-atlas: Support multiple formats and clearing the texture

_cogl_atlas_new now has two extra parameters to specify the format of
the textures it creates as well as a set of flags to modify the
behavious of the atlas. One of the flags causes the new textures to be
cleared and the other causes migration to avoid actually copying the
textures. This is needed to use CoglAtlas from the pango glyph cache
because it needs to use COGL_PIXEL_A_8 and to clear the textures as it
does not fill in the gaps between glyphs. It needs to avoid copying
the textures so that it can work on GL implementations without FBO
support.

13 years agocogl-atlas-texture: Split out the atlas data structure
Neil Roberts [Mon, 2 Aug 2010 15:29:10 +0000 (16:29 +0100)]
cogl-atlas-texture: Split out the atlas data structure

Instead of storing a pointer to the CoglRectangleMap and a handle to
the atlas texture in the context, there is a now a separate data
structure called a CoglAtlas to manage these two. The context just
contains a pointer to this. The code to reorganise the atlas has been
moved from cogl-atlas-texture.c to cogl-atlas.c

13 years agocogl: Add an internal utility to maintain a list of callback functions
Neil Roberts [Wed, 4 Aug 2010 16:59:06 +0000 (17:59 +0100)]
cogl: Add an internal utility to maintain a list of callback functions

This adds an internal CoglCallbackList type which is just a GSList of
of function pointers along with a data pointer to form a
closure. There are functions to add and remove items and to invoke the
list of functions. This could be used in a number of places in Cogl.

13 years agocogl-atlas: Rename to CoglRectangleMap
Neil Roberts [Mon, 2 Aug 2010 14:24:03 +0000 (15:24 +0100)]
cogl-atlas: Rename to CoglRectangleMap

This simply renames CoglAtlas to CoglRectangleMap without making any
functional changes. The old 'CoglAtlas' is just a data structure for
managing unused areas of a rectangle and it doesn't neccessarily have
to be used for an atlas so it wasn't a very good name.

13 years agotest-random-text: Convert to a micro-benchmark
Neil Roberts [Thu, 5 Aug 2010 16:54:18 +0000 (17:54 +0100)]
test-random-text: Convert to a micro-benchmark

test-random-text is moved to the micro-bench directory. It now prints
out the time taken to draw every 10 frames.

13 years agotest-text-perf: Add a wider range of characters
Neil Roberts [Thu, 5 Aug 2010 16:27:23 +0000 (17:27 +0100)]
test-text-perf: Add a wider range of characters

Instead of just using the latin alphabet, this adds digits and some
other alphabets to increase the range of glyphs used.

13 years agotest-text-perf: Scale the text if the settings will not fit
Neil Roberts [Thu, 5 Aug 2010 16:06:45 +0000 (17:06 +0100)]
test-text-perf: Scale the text if the settings will not fit

If the font size or the number of characters causes the label not to
fit on the stage, instead of aborting it will now scale the labels so
that it fits within one of the dimensions. This makes it easier to
test with large glyph sizes.

13 years agocogl-material: Compare whether textures are equal by their GL handle
Neil Roberts [Thu, 12 Aug 2010 08:11:28 +0000 (09:11 +0100)]
cogl-material: Compare whether textures are equal by their GL handle

Textures within a layer were compared for equality by comparing their
texture handle. However this means that sub textures and atlas
textures which may be internally using the same GL handle would not be
batched together. Instead it now tries to determine the underlying GL
handle using either the slice override or _cogl_texture_get_gl_texture
and then compares those.

13 years agocookbook: Added more explanation about setting y coord on scrollable
Elliot Smith [Thu, 12 Aug 2010 09:05:27 +0000 (10:05 +0100)]
cookbook: Added more explanation about setting y coord on scrollable

Added some extra explanation, referencing the sample code, to
try to make the scrollable actor example easier to follow. Basically
demonstrates the principles described in the paragraph about
setting the y coordinate for the scrollable actor, but using actual
numbers.

13 years agocogl-atlas-texture: Accept formats with different component orders
Neil Roberts [Wed, 5 May 2010 15:45:21 +0000 (16:45 +0100)]
cogl-atlas-texture: Accept formats with different component orders

When filtering on allowed formats for atlas textures, it now masks out
the BGR and AFIRST bits in addition to the premult bit. That way it
will accept RGB and RGBA formats in any component order.

In theory it could also accept luminance and alpha-only textures but I
haven't added this because presumably if the application has requested
these formats then it has some reason not to use a full RGB or RGBA
texture and we should respect that.

13 years agobuild: Make the introspection generation quiet (again)
Emmanuele Bassi [Thu, 12 Aug 2010 08:03:58 +0000 (09:03 +0100)]
build: Make the introspection generation quiet (again)

13 years agodrag-action: Capture ENTER when dragging
Emmanuele Bassi [Thu, 12 Aug 2010 07:53:06 +0000 (08:53 +0100)]
drag-action: Capture ENTER when dragging

This completes commit 9ab83cebf.

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.