profile/ivi/clutter.git
14 years agocookbook: Use the right tag for the screenshot
Emmanuele Bassi [Fri, 16 Jul 2010 16:31:27 +0000 (17:31 +0100)]
cookbook: Use the right tag for the screenshot

Screenshots should be using the <screenshot> tag, not the <figure> one.

14 years agoMerge remote branch 'elliot/cookbook-actor-opacity'
Emmanuele Bassi [Fri, 16 Jul 2010 16:23:36 +0000 (17:23 +0100)]
Merge remote branch 'elliot/cookbook-actor-opacity'

Conflicts:
doc/cookbook/Makefile.am

14 years agocookbook: Add a missing image to the list
Emmanuele Bassi [Fri, 16 Jul 2010 16:20:38 +0000 (17:20 +0100)]
cookbook: Add a missing image to the list

14 years agoMerge remote branch 'elliot/cookbook-include-videos'
Emmanuele Bassi [Fri, 16 Jul 2010 16:13:12 +0000 (17:13 +0100)]
Merge remote branch 'elliot/cookbook-include-videos'

* elliot/cookbook-include-videos:
  cookbook: Tweak so that videos sit inside a paragraph for better spacing
  docs: Note the P_() macro in the HACKING file
  cookbook: Added support for inline video

Conflicts:
doc/cookbook/Makefile.am

14 years agoMerge remote branch 'elliot/cookbook-animation-fading'
Emmanuele Bassi [Fri, 16 Jul 2010 16:12:37 +0000 (17:12 +0100)]
Merge remote branch 'elliot/cookbook-animation-fading'

* elliot/cookbook-animation-fading:
  cookbook: Minor modification to wording to improve clarity
  cookbook: Added recipe for fading actors in/out

14 years agocookbook: Add a recipe for texture reflection
Emmanuele Bassi [Fri, 16 Jul 2010 16:04:31 +0000 (17:04 +0100)]
cookbook: Add a recipe for texture reflection

A common request: how to create a clone of a texture that looks like a
reflection.

14 years agocookbook: Added a recipe about making an actor transparent
Elliot Smith [Thu, 15 Jul 2010 18:47:53 +0000 (19:47 +0100)]
cookbook: Added a recipe about making an actor transparent

Explains how to make an actor transparent so that other actors
are visible through it.

Also explains a bit more generally about opacity and how
it's computed from the actor, container, and color; and how actor
visibility is affected by depth (fog) and depth order.

14 years agocookbook: Minor modification to wording to improve clarity
Elliot Smith [Fri, 16 Jul 2010 11:48:56 +0000 (12:48 +0100)]
cookbook: Minor modification to wording to improve clarity

Text referred to three animation methods, but only provides
examples for two of them; and in future there may be more/fewer
than 3. So I reworded it.

14 years agocookbook: Added recipe for fading actors in/out
Elliot Smith [Fri, 16 Jul 2010 11:34:44 +0000 (12:34 +0100)]
cookbook: Added recipe for fading actors in/out

Added a recipe showing how to fade actors in/out by
animating their opacity property, using both implicit
animations and ClutterState.

14 years agodocbook: Add an introduction to the texture section
Emmanuele Bassi [Fri, 16 Jul 2010 11:01:42 +0000 (12:01 +0100)]
docbook: Add an introduction to the texture section

14 years agopo: Fix the LTR string translation
Emmanuele Bassi [Fri, 16 Jul 2010 10:29:28 +0000 (11:29 +0100)]
po: Fix the LTR string translation

14 years agopo: Remove unused LINGUAS file
Emmanuele Bassi [Fri, 16 Jul 2010 10:23:01 +0000 (11:23 +0100)]
po: Remove unused LINGUAS file

The ALL_LINGUAS variable is generated from the list of po files.

14 years agoAdd pl translations
raven [Fri, 16 Jul 2010 10:18:02 +0000 (11:18 +0100)]
Add pl translations

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoAdd zn_CN translations
happyaron [Fri, 16 Jul 2010 10:17:30 +0000 (11:17 +0100)]
Add zn_CN translations

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agocookbook: Tweak so that videos sit inside a paragraph for better spacing
Elliot Smith [Thu, 15 Jul 2010 16:24:50 +0000 (17:24 +0100)]
cookbook: Tweak so that videos sit inside a paragraph for better spacing

14 years agodocs: Note the P_() macro in the HACKING file
Emmanuele Bassi [Thu, 15 Jul 2010 13:26:16 +0000 (14:26 +0100)]
docs: Note the P_() macro in the HACKING file

14 years agocookbook: Added support for inline video
Elliot Smith [Thu, 15 Jul 2010 12:27:02 +0000 (13:27 +0100)]
cookbook: Added support for inline video

Amended Makefile to copy content of videos directory into
installation directories. Also copies videos and images
into the html/ directory during the build, so that the
built cookbook can be viewed locally (for testing without
having to install).

Added an XSLT template to transform Docbook <inlinemediaobject>
elements into HTML 5 <video> elements, with a fallback to
link to the video displayed for browsers without HTML 5 support.

Added note to "Contributing" appendix explaining how to put
video into a recipe.

14 years agoAdd an internal _cogl_bitmap_new_from_buffer
Neil Roberts [Thu, 15 Jul 2010 12:05:55 +0000 (13:05 +0100)]
Add an internal _cogl_bitmap_new_from_buffer

This function creates a CoglBitmap which internally references a
CoglBuffer. The map and unmap functions will divert to mapping the
buffer. There are also now bind and unbind functions which should be
used instead of map and unmap whenever the data doesn't need to be
read from the CPU but will instead be passed to GL for packing or
unpacking. For bitmaps created from buffers this just binds the
bitmap.

cogl_texture_new_from_buffer now just uses this function to wrap the
buffer in a bitmap rather than trying to bind the buffer
immediately. This means that the buffer will be bound only at the
point right before the texture data is uploaded.

This approach means that using a pixel array will take the fastest
upload route if possible, but can still fallback to copying the data
by mapping the buffer if some conversion is needed. Previously it
would just crash in this case because the texture functions were all
passed a NULL pointer.

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

14 years agoAdd a Cogl debug flag for BITMAP
Neil Roberts [Thu, 15 Jul 2010 12:02:23 +0000 (13:02 +0100)]
Add a Cogl debug flag for BITMAP

CoglBitmap will soon want to report notes as it gets more complicated
so this adds a debug flag for it.

14 years agoTry to avoid copying the GdkPixbuf when it is tightly packed
Neil Roberts [Thu, 15 Jul 2010 10:32:08 +0000 (11:32 +0100)]
Try to avoid copying the GdkPixbuf when it is tightly packed

The docs for GdkPixbuf say that the last row of the image won't
necessarily be allocated to the size of the full rowstride. The rest
of Cogl and possibly GL assumes that we can copy the bitmap with
memcpy(height*rowstride) so we previously would copy the pixbuf data
to ensure this. However if the rowstride is the same as bpp*width then
there is no way for the last row to be under-allocated so in this case
we can just directly upload from the gdk pixbuf. Now that CoglBitmap
can be created with a destroy function we can make it keep a reference
to the pixbuf and unref it during its destroy callback. GdkPixbuf
seems to always pack the image with no padding between rows even if it
is RGB so this should end up always avoiding the memcpy.

The fallback code for when we do have to copy the pixbuf is now
simplified so that it copies all of the rows in a single loop. We only
copy the useful region of each row so this should be safe. The
rowstride of the CoglBitmap is now always allocated to bpp*width
regardless of the rowstride of the pixbuf.

14 years agocogl-bitmap: Encapsulate the CoglBitmap even internally
Neil Roberts [Wed, 7 Jul 2010 17:44:16 +0000 (18:44 +0100)]
cogl-bitmap: Encapsulate the CoglBitmap even internally

The CoglBitmap struct is now only defined within cogl-bitmap.c so that
all of its members can now only be accessed with accessor
functions. To get to the data pointer for the bitmap image you must
first call _cogl_bitmap_map and later call _cogl_bitmap_unmap. The map
function takes the same arguments as cogl_pixel_array_map so that
eventually we can make a bitmap optionally internally divert to a
pixel array.

There is a _cogl_bitmap_new_from_data function which constructs a new
bitmap object and takes ownership of the data pointer. The function
gets passed a destroy callback which gets called when the bitmap is
freed. This is similar to how gdk_pixbuf_new_from_data
works. Alternatively NULL can be passed for the destroy function which
means that the caller will manage the life of the pointer (but must
guarantee that it stays alive at least until the bitmap is
freed). This mechanism is used instead of the old approach of creating
a CoglBitmap struct on the stack and manually filling in the
members. It could also later be used to create a CoglBitmap that owns
a GdkPixbuf ref so that we don't necessarily have to copy the
GdkPixbuf data when converting to a bitmap.

There is also _cogl_bitmap_new_shared. This creates a bitmap using a
reference to another CoglBitmap for the data. This is a bit of a hack
but it is needed by the atlas texture backend which wants to divert
the set_region virtual to another texture but it needs to override the
format of the bitmap to ignore the premult flag.

14 years agocogl-texture-2d-sliced: Store the internal format not image format
Neil Roberts [Wed, 14 Jul 2010 12:21:54 +0000 (13:21 +0100)]
cogl-texture-2d-sliced: Store the internal format not image format

The 'format' member of CoglTexture2DSliced is returned by
cogl_texture_get_format. All of the other backends return the internal
format of the GL texture in this case. However the sliced backend was
returning the format of the image data used to create the texture. It
doesn't make any sense to retain this information because it doesn't
necessarily indicate the format of the actual texture. This patch
changes it to store the internal format instead.

14 years agodocs: Note the P_() macro in the HACKING file
Emmanuele Bassi [Thu, 15 Jul 2010 13:26:16 +0000 (14:26 +0100)]
docs: Note the P_() macro in the HACKING file

14 years agoMark property strings for translation
Emmanuele Bassi [Thu, 3 Jun 2010 11:57:50 +0000 (12:57 +0100)]
Mark property strings for translation

Both the nick and the blurb fields should be translatable, for UI
builders and other introspection-based tools.

14 years agoAdd P_() macro for translating property strings
Emmanuele Bassi [Thu, 3 Jun 2010 11:56:17 +0000 (12:56 +0100)]
Add P_() macro for translating property strings

The P_() macro adds a context for the property nick and blurb. In order
to make xgettext recognize it, we need to drop glib-gettexize inside the
autogen.sh script and ship a modified Makefile.in.in with Clutter.

14 years agobuild: Use AS_ALL_LINGUAS
Emmanuele Bassi [Thu, 3 Jun 2010 11:32:54 +0000 (12:32 +0100)]
build: Use AS_ALL_LINGUAS

The AS_ALL_LINGUAS m4 macro allows configure-time generation of the
ALL_LINGUAS variable from the translations inside po/ instead of using
the LINGUAS file.

14 years agoFixes build with GLX on Mac OS X.
Nate Stedman [Wed, 14 Jul 2010 18:46:23 +0000 (14:46 -0400)]
Fixes build with GLX on Mac OS X.

Moves preprocessor #ifdef __linux_ above else statement, avoiding the
lack of an else block if __linux__ is not defined.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agobuild: Fix include path for Cally's introspection
Emmanuele Bassi [Wed, 14 Jul 2010 23:26:42 +0000 (00:26 +0100)]
build: Fix include path for Cally's introspection

The introspection scanner does not include '.' by default, so it was
always using the installed copy of Clutter-1.0.gir. Which obviously
wouldn't work if we didn't have one.

14 years agogles/cogl-texture-driver.c: Fix the include for cogl-material-private
Neil Roberts [Wed, 14 Jul 2010 16:49:16 +0000 (17:49 +0100)]
gles/cogl-texture-driver.c: Fix the include for cogl-material-private

In ddb9016be4 the GL texture driver backend was changed to include
cogl-material-opengl-private.h instead of cogl-material-private.h.
However the gles texture backend was missed from this so it was giving
a compiler warning about using an undeclared function.

14 years agocogl-texture-3d: Use glTexSubImage3D through an indirect pointer
Neil Roberts [Wed, 14 Jul 2010 16:45:15 +0000 (17:45 +0100)]
cogl-texture-3d: Use glTexSubImage3D through an indirect pointer

glTexSubImage3D was being called directly in cogl-texture-3d.c but the
function is only available since GL version 1.2 so on Windows it won't
be possible to directly link to it. Also under GLES it is only
available conditionally in an extension.

14 years agocogl-texture-3d: Fix the cogl-material-private header include
Neil Roberts [Wed, 14 Jul 2010 15:35:33 +0000 (16:35 +0100)]
cogl-texture-3d: Fix the cogl-material-private header include

In ddb9016be4 the texture backends were changed to include
cogl-material-opengl-private.h instead of cogl-material-private.h.
However the 3D texture backend was missed from this so it was giving a
compiler warning about using an undeclared function.

14 years agocogl-texture-3d: Don't include cogl-texture-2d-private.h
Neil Roberts [Wed, 14 Jul 2010 15:34:36 +0000 (16:34 +0100)]
cogl-texture-3d: Don't include cogl-texture-2d-private.h

I think this was included by a cut-and-paste error as it isn't needed
anywhere in the source.

14 years agomaterial: splits out all the state flushing code
Robert Bragg [Sat, 10 Jul 2010 02:40:47 +0000 (03:40 +0100)]
material: splits out all the state flushing code

This moves the code supporting _cogl_material_flush_gl_state into
cogl-material-opengl.c as part of an effort to reduce the size of
cogl-material.c to keep it manageable.

14 years agomaterial: split the texture unit management out
Robert Bragg [Sat, 10 Jul 2010 01:53:38 +0000 (02:53 +0100)]
material: split the texture unit management out

In general cogl-material.c has become far to large to manage in one
source file. As one of the ways to try and break it down this patch
starts to move some of lower level texture unit state management out
into cogl-material-opengl.c. The naming is such because the plan is to
follow up and migrate the very GL specific state flushing code into the
same file.

14 years agomaterial: copy_differences: handle copying fog state
Robert Bragg [Sat, 10 Jul 2010 00:36:22 +0000 (01:36 +0100)]
material: copy_differences: handle copying fog state

When the support for redirecting the legacy fog state through cogl
material was added in 9b9e764dc, the code to handle copying the fog
state in _cogl_material_copy_differences was missed.

14 years agoAdd a GL_GENERATE_MIPMAP fallback to the texture 2d and 3d backends
Neil Roberts [Tue, 13 Jul 2010 17:41:01 +0000 (18:41 +0100)]
Add a GL_GENERATE_MIPMAP fallback to the texture 2d and 3d backends

The CoglTexture2DSliced backend has a fallback for when the
framebuffer extension is missing so it's not possible to use
glGenerateMipmap. This involves keeping a copy of the upper-left pixel
of the tex image so that we can temporarily enable GL_GENERATE_MIPMAP
on the texture object and do a sub texture update by reuploading the
contents of the first pixel. This patch copies that mechanism to the
2D and 3D backends. The CoglTexturePixel structure which was
previously internal to the sliced backend has been moved to
cogl-texture-private.h so that it can be shared.

14 years agoMerge branch 'wip/xkb-support'
Emmanuele Bassi [Tue, 13 Jul 2010 15:12:14 +0000 (16:12 +0100)]
Merge branch 'wip/xkb-support'

* wip/xkb-support:
  x11: Use XKB to translate keycodes into key symbols
  x11: Use XKB to track the Locks state
  x11: Use XKB detectable auto-repeat
  x11: Add a Keymap ancillary object
  x11: Store the group inside the event platform data
  events: Add platform-data to allocated Events
  build: Check for the XKB extension

14 years agostage: Add the NO_CLEAR_ON_PAINT hint
Emmanuele Bassi [Fri, 16 Apr 2010 14:34:36 +0000 (15:34 +0100)]
stage: Add the NO_CLEAR_ON_PAINT hint

Some apps or some use cases don't need to clear the stage on immediate
rendering GPUs. A media player playing a fullscreen video or a
tile-based game, for instance.

These apps are redrawing the whole screen, so we can avoid clearing the
color buffer when preparing to paint the stage, since there is no
blending with the stage color being performed.

We can add an private set of hints to ClutterStage, and expose accessors
for each potential hint; the first hint is the 'no-clear' one.

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

14 years agoMake the material functions for setting the p wrap mode public
Neil Roberts [Fri, 2 Jul 2010 12:33:06 +0000 (13:33 +0100)]
Make the material functions for setting the p wrap mode public

Now that we have 3D texture support it makes sense to expose the wrap
mode for the p coordinate.

14 years agoRename the third texure coordinate from 'r' to 'p'
Neil Roberts [Mon, 12 Jul 2010 16:01:32 +0000 (17:01 +0100)]
Rename the third texure coordinate from 'r' to 'p'

Using 'r' to name the third component is problematic because that is
commonly used to represent the red component of a vector representing
a color. Under GLSL this is awkward because the texture swizzling for
a vector uses a single letter for each component and the names for
colors, textures and positions are synonymous. GLSL works around this
by naming the components of the texture s, t, p and q. Cogl already
effectively already exposes this naming because it exposes GLSL so it
makes sense to use that naming consistently. Another alternative could
be u, v and w. This is what Blender and Direct3D use. However the w
component conflicts with the w component of a position vertex.

14 years agoAdd a conformance test for 3D textures
Neil Roberts [Thu, 1 Jul 2010 21:05:51 +0000 (22:05 +0100)]
Add a conformance test for 3D textures

This creates a 3D texture with different colors on all of the images
and renders it using a VBO to verify that the texture coordinates can
select all of the images.

14 years agoAdd a Cogl texture 3D backend
Neil Roberts [Thu, 1 Jul 2010 21:04:59 +0000 (22:04 +0100)]
Add a Cogl texture 3D backend

This adds a publicly exposed experimental API for a 3D texture
backend. There is a feature flag which can be checked for whether 3D
textures are supported. Although we require OpenGL 1.2 which has 3D
textures in core, GLES only provides them through an extension so the
feature can be used to detect that.

The textures can be created with one of two new API functions :-

cogl_texture_3d_new_with_size

 and

cogl_texture_3d_new_from_data

There is also internally a new_from_bitmap function. new_from_data is
implemented in terms of this function.

The two constructors are effectively the only way to upload data to a
3D texture. It does not work to call glTexImage2D with the
GL_TEXTURE_3D target so the virtual for cogl_texture_set_region does
nothing. It would be possible to make cogl_texture_get_data do
something sensible like returning all of the images as a single long
image but this is not currently implemented and instead the virtual
just always fails. We may want to add API specific to the 3D texture
backend to get and set a sub region of the texture.

All of those three functions can throw a GError. This will happen if
the GPU does not support 3D textures or it does not support NPOTs and
an NPOT size is requested. It will also fail if the FBO extension is
not supported and the COGL_TEXTURE_NO_AUTO_MIPMAP flag is not
given. This could be avoided by copying the code for the
GL_GENERATE_MIPMAP TexParameter fallback, but in the interests of
keeping the code simple this is not yet done.

This adds a couple of functions to cogl-texture-driver for uploading
3D data and querying the 3D proxy
texture. prep_gl_for_pixels_upload_full now also takes sets the
GL_UNPACK_IMAGE_HEIGHT parameter so that 3D textures can have padding
between the images. Whenever 3D texture is uploading, both the height
of the images and the height of all of the data is specified (either
explicitly or implicilty from the CoglBitmap) so that the image height
can be deduced by dividing by the depth.

14 years agoconfigure: Include gl2ext.h or glext.h under GLES
Neil Roberts [Mon, 12 Jul 2010 13:30:44 +0000 (14:30 +0100)]
configure: Include gl2ext.h or glext.h under GLES

Under big GL, glext.h is included automatically by gl.h. However under
GLES this doesn't appear to happen so it has to be included explicitly
to get the defines for extensions. This patch changes the
clutter_gl_header to be called cogl_gl_headers and it can now take a
space seperated list of multiple headers. This is then later converted
to a list of #include lines which ends up cogl-defines.h. The gles2
and gles1 backends now add their respective ext header to this list.

14 years agoMake a public CoglBitmapError enum
Neil Roberts [Thu, 1 Jul 2010 20:49:16 +0000 (21:49 +0100)]
Make a public CoglBitmapError enum

There are many places in the texture backend that need to do
conversion using the CoglBitmap code. Currently none of these
functions can throw an error but they do return a value to indicate
failure. In future it would make sense if new texture functions could
throw an error and in that case they would want to use a CoglBitmap
error if the failure was due to the conversion. This moves the
internal CoglBitmap error from the quartz backend to be public in
cogl-bitmap.h so that it can be used in this way.

14 years agoRename COGL_ERROR_MISSING_FEATURE to COGL_ERROR_UNSUPPORTED
Neil Roberts [Tue, 13 Jul 2010 11:59:24 +0000 (12:59 +0100)]
Rename COGL_ERROR_MISSING_FEATURE to COGL_ERROR_UNSUPPORTED

We can use this error in more unsupported situations than just when we
have a Cogl feature flag for the error. For example if a non-sliced
texture is created with dimensions that are too large then we could
throw this error. Therefore it seems good to rename to something more
general.

14 years agoMove _cogl_texture_2d_is_pot to cogl-util.h
Neil Roberts [Thu, 1 Jul 2010 10:07:03 +0000 (11:07 +0100)]
Move _cogl_texture_2d_is_pot to cogl-util.h

This function could be used in many places in Cogl so it makes sense
to share it in cogl-util.h as _cogl_util_is_pot().

14 years agocogl-gles2-wrapper: Layers aren't equal if one is enabled and one is not
Neil Roberts [Tue, 13 Jul 2010 12:59:07 +0000 (13:59 +0100)]
cogl-gles2-wrapper: Layers aren't equal if one is enabled and one is not

Previously when comparing whether the settings for a layer are equal
it would only check if one of them was enabled. If so then it would
assume the other one was enabled and continue to compare the texture
environment. Now it also checks whether the enabledness differs.

14 years agox11: Use XKB to translate keycodes into key symbols
Emmanuele Bassi [Tue, 13 Jul 2010 10:54:44 +0000 (11:54 +0100)]
x11: Use XKB to translate keycodes into key symbols

And fall back to XKeycodeToKeysym() if XKB is not available.

14 years agox11: Use XKB to track the Locks state
Emmanuele Bassi [Tue, 13 Jul 2010 08:15:21 +0000 (09:15 +0100)]
x11: Use XKB to track the Locks state

For Caps Lock and Num Lock. Store the state of both in the
platform-specific per-event data structure. No accessors, yet.

14 years agox11: Use XKB detectable auto-repeat
Emmanuele Bassi [Mon, 12 Jul 2010 17:04:03 +0000 (18:04 +0100)]
x11: Use XKB detectable auto-repeat

If we have XKB support then we should be using it to turn on the
detectable auto-repeat; this allows avoiding the peeking trick
that emulates it inside the event handling code.

14 years agox11: Add a Keymap ancillary object
Emmanuele Bassi [Mon, 12 Jul 2010 16:11:30 +0000 (17:11 +0100)]
x11: Add a Keymap ancillary object

We should try to abstract everything that is related with the key mapping
to its own object, to avoid complicating ClutterBackendX11 any further.

14 years agox11: Store the group inside the event platform data
Emmanuele Bassi [Thu, 8 Jul 2010 14:47:18 +0000 (15:47 +0100)]
x11: Store the group inside the event platform data

Now that we have private, per-event platform data, we can start putting
it to good use. The first, most simple use is to store the key group
given the event's modifiers. Since we assume a modern X11, we use XKB
to retrieve it, or we simply fall back to 0 by default.

The data is exposed as a ClutterX11-specific function, within the
sanctioned clutter_x11_* namespace.

14 years agoevents: Add platform-data to allocated Events
Emmanuele Bassi [Mon, 14 Jun 2010 17:01:17 +0000 (18:01 +0100)]
events: Add platform-data to allocated Events

Events allocated by Clutter should have a pointer to platform-specific
data; this would allow backends to add separate structures for holding
ancillary data, whilst retaining the ClutterEvent structure for use on
the stack.

In theory, for Clutter 2.x we might just want to drop Event and use an
opaque structure, or a typed data structure inheriting from
GTypeInstance instead.

14 years agobuild: Check for the XKB extension
Emmanuele Bassi [Mon, 14 Jun 2010 16:29:21 +0000 (17:29 +0100)]
build: Check for the XKB extension

When compiling the X11 backends.

14 years agoPost-release version bump to 1.3.9
Emmanuele Bassi [Mon, 12 Jul 2010 20:43:04 +0000 (21:43 +0100)]
Post-release version bump to 1.3.9

14 years agoRelease 1.3.8
Emmanuele Bassi [Mon, 12 Jul 2010 20:31:15 +0000 (21:31 +0100)]
Release 1.3.8

14 years agoMerge remote branch 'elliot/cookbook-animation-inversion'
Emmanuele Bassi [Mon, 12 Jul 2010 20:25:25 +0000 (21:25 +0100)]
Merge remote branch 'elliot/cookbook-animation-inversion'

* elliot/cookbook-animation-inversion:
  cookbook: Fixed invalid XML tag
  cookbook: Added "inverting an animation" recipe
  docs: Enabled animation section

14 years agoMerge remote branch 'elliot/cookbook-animation-intro'
Emmanuele Bassi [Mon, 12 Jul 2010 20:25:22 +0000 (21:25 +0100)]
Merge remote branch 'elliot/cookbook-animation-intro'

* elliot/cookbook-animation-intro:
  cookbook: Added introduction for animations section
  docs: Enabled animation section

14 years agoMerge remote branch 'elliot/cookbook-consistency'
Emmanuele Bassi [Mon, 12 Jul 2010 20:20:30 +0000 (21:20 +0100)]
Merge remote branch 'elliot/cookbook-consistency'

* elliot/cookbook-consistency:
  cookbook: Fixed typo
  cookbook: Fix build so CSS files get installed
  cookbook: Moved paragraph where it logically belongs
  cookbook: Added some judicious note elements
  cookbook: Added more information for contributors
  cookbook: Link out to docbook site
  cookbook: Made docbook element usage consistent
  cookbook: Additional selectors in CSS stylesheet
  cookbook: Copy the CSS file into the HTML build directory

14 years agostate: swap clutter_state_set_state and clutter_state_warp_to_state
Øyvind Kolås [Mon, 12 Jul 2010 16:34:17 +0000 (17:34 +0100)]
state: swap clutter_state_set_state and clutter_state_warp_to_state

Got the boolean arguments for the old clutter_state_change wrong,
making the methods do the opposite of what they should.

14 years agocookbook: Added introduction for animations section
Elliot Smith [Mon, 12 Jul 2010 16:15:16 +0000 (17:15 +0100)]
cookbook: Added introduction for animations section

Introduces basic concepts (timelines, alphas, frames)
common to different parts of the Clutter animation API.

Gives a high level overview of the three different
approaches to animation (implicit, ClutterAnimator,
ClutterState).

14 years agodocs: Enabled animation section
Elliot Smith [Fri, 9 Jul 2010 10:27:57 +0000 (11:27 +0100)]
docs: Enabled animation section

14 years agocookbook: Fixed invalid XML tag
Elliot Smith [Mon, 12 Jul 2010 15:59:38 +0000 (16:59 +0100)]
cookbook: Fixed invalid XML tag

14 years agocookbook: Added "inverting an animation" recipe
Elliot Smith [Mon, 12 Jul 2010 14:34:23 +0000 (15:34 +0100)]
cookbook: Added "inverting an animation" recipe

Added a new recipe (based on the skeleton in the
animations section of the cookbook) about inverting
an animation by reversing the direction of its timeline.

Uses clutter_actor_animate() as the basic approach,
but mentions ClutterState and ClutterAnimator as well.

14 years agodocs: Enabled animation section
Elliot Smith [Fri, 9 Jul 2010 10:27:57 +0000 (11:27 +0100)]
docs: Enabled animation section

14 years agoAdd the deprecated ref-counting for cogl_program
Neil Roberts [Fri, 9 Jul 2010 18:09:49 +0000 (19:09 +0100)]
Add the deprecated ref-counting for cogl_program

cogl_program has always had cogl_program_ref and cogl_program_unref
but this was missed from 89cb325fd4 so they got removed.

14 years agoDon't define public cogl_is_* functions for internal types
Neil Roberts [Fri, 9 Jul 2010 17:46:31 +0000 (18:46 +0100)]
Don't define public cogl_is_* functions for internal types

This adds a COGL_OBJECT_INTERNAL_DEFINE macro and friends that are the
same as COGL_OBJECT_DEFINE except that they prefix the cogl_is_*
function with an underscore so that it doesn't get exported in the
shared library.

14 years agoAdd cogl_vertex_buffer_is_indices to the public headers
Neil Roberts [Fri, 9 Jul 2010 17:24:28 +0000 (18:24 +0100)]
Add cogl_vertex_buffer_is_indices to the public headers

This function has always been defined in the shared library but it was
missed from the public headers.

14 years agocogl: Don't define the deprecated ref/unref accessors for new types
Neil Roberts [Fri, 9 Jul 2010 16:59:16 +0000 (17:59 +0100)]
cogl: Don't define the deprecated ref/unref accessors for new types

Previously COGL_OBJECT_DEFINE would always define deprecated
cogl_$type_{ref,unref} functions even if the type is new or if the
type is entirely internal. An application would still find it
difficult to use these because they wouldn't be in the headers, but it
still looks bad that they are exported from the shared library. This
patch changes it so that the deprecated ref counting functions are
defined using a separate macro and only the types that have these
functions in the headers call this macro.

14 years agotext: Layouts for single-line-mode entries are boundless
Emmanuele Bassi [Fri, 9 Jul 2010 17:37:34 +0000 (18:37 +0100)]
text: Layouts for single-line-mode entries are boundless

A PangoLayout for an editable, single-line text entry is by definition
without a given width, since the actor will be clipped when being drawn.

14 years agomaterial: use common node type for materials and layers
Robert Bragg [Thu, 8 Jul 2010 10:49:31 +0000 (11:49 +0100)]
material: use common node type for materials and layers

Since 365605cf42, materials and layers are represented in a tree
structure that allows traversing up through parents and iterating down
through children.  This re-works the related typedefs and reparenting
code so that they can be shared.

14 years agocogl-texture-pixmap-x11: This API is new in 1.4, not 1.2
Damien Lespiau [Fri, 9 Jul 2010 16:55:31 +0000 (17:55 +0100)]
cogl-texture-pixmap-x11: This API is new in 1.4, not 1.2

CoglTexturePixmapX11 has been introduced in the 1.3 development cycle. A
Stability: Unstable tag was missing too, so add it.

14 years agocogl: Add Stability tag to new experimental API
Damien Lespiau [Fri, 9 Jul 2010 14:59:14 +0000 (15:59 +0100)]
cogl: Add Stability tag to new experimental API

Functions guarded with COGL_ENABLE_EXPERIMENTAL API should be also maked
as being Unstable with the Stability gtk-doc tag.

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

14 years agoscript: Let ClutterActor parse behaviours
Emmanuele Bassi [Fri, 9 Jul 2010 13:59:32 +0000 (14:59 +0100)]
script: Let ClutterActor parse behaviours

Up until now, the "behaviours" member of an actor definition was parsed
by the ClutterScript parser itself - even though it's not strictly
necessary.

In an effort to minimize the ad hoc code in the Script parser, we should
let ClutterActor handle all the special cases that involve
actor-specific members.

14 years agoAdd new tests to the ignore files
Emmanuele Bassi [Fri, 9 Jul 2010 10:40:00 +0000 (11:40 +0100)]
Add new tests to the ignore files

14 years agoUse GL_MAX_TEXTURE_SIZE on GLES when checking supported tex size
Neil Roberts [Thu, 8 Jul 2010 17:37:01 +0000 (18:37 +0100)]
Use GL_MAX_TEXTURE_SIZE on GLES when checking supported tex size

Under big GL, _cogl_texture_driver_size_supported uses the proxy
texture to check whether the given texture size is supported. Proxy
textures aren't available under GLES so previously this would just
return TRUE to assume all texture sizes are supported. This patch
makes it use glGetIntegerv with GL_MAX_TEXTURE_SIZE to give a second
best guess.

This fixes the sliced texture backend so that it will use slices when
the texture is too big.

14 years agoFix cogl_texture_get_data when an intermediate buffer is used
Neil Roberts [Thu, 8 Jul 2010 17:33:45 +0000 (18:33 +0100)]
Fix cogl_texture_get_data when an intermediate buffer is used

When an intermediate buffer is used for downloading texture data it
was using the wrong byte length for a row so the copy back to the
user's buffer would fail.

14 years agoUse GL_NEAREST filter in the draw-and-read get_data texture fallback
Neil Roberts [Thu, 8 Jul 2010 17:31:29 +0000 (18:31 +0100)]
Use GL_NEAREST filter in the draw-and-read get_data texture fallback

The fallback for when glGetTexImage is not available renders the
texture to the framebuffer to read the data using glReadPixels. This
patch just sets the COGL_MATERIAL_FILTER_NEAREST filter mode on the
material before rendering to avoid linear filtering which would alter
the texture data.

14 years agoUse cogl_read_pixels in the cogl texture draw-and-read fallback
Neil Roberts [Thu, 8 Jul 2010 17:29:12 +0000 (18:29 +0100)]
Use cogl_read_pixels in the cogl texture draw-and-read fallback

The fallback for when glGetTexImage is not available draws parts of
the texture to the framebuffer and uses glReadPixels to extract the
data. However it was using cogl_rectangle to draw and then immediately
using raw glReadPixels to fetch the data. This won't cause a journal
flush so the rectangle won't necessarily have hit the framebuffer
yet. Instead it now uses cogl_read_pixels which does flush the
journal.

14 years agocogl-material: Fix some problems with flushing texture overrides
Neil Roberts [Thu, 8 Jul 2010 17:28:11 +0000 (18:28 +0100)]
cogl-material: Fix some problems with flushing texture overrides

There were a few problems flushing texture overrides so that sliced
textures would not work:

* In _cogl_material_set_layer_texture it ignored the 'overriden'
  parameter and always set texture_overridden to FALSE.

* cogl_texture_get_gl_texture wasn't being called correctly in
  override_layer_texture_cb. It returns a gboolean to indicate the
  error status but this boolean was being assigned to gl_target.

* _cogl_material_layer_texture_equal did not take into account the
  override.

* _cogl_material_layer_get_texture_info did not return the overridden
  texture so it would always use the first texture slice.

14 years agocogl-texture: Share the common code in the set_region virtual
Neil Roberts [Thu, 8 Jul 2010 14:15:22 +0000 (15:15 +0100)]
cogl-texture: Share the common code in the set_region virtual

There was a lot of common code that was copied to all of the backends
to convert the data to a suitable format and wrap it into a CoglBitmap
so that it can be passed to _cogl_texture_driver_upload_subregion_to_gl.
This patch moves the common code to cogl-texture.c so that the virtual
just takes a CoglBitmap that is already in the right format.

14 years agoAdd a conformance test for cogl_texture_{get_data,set_region}
Neil Roberts [Thu, 8 Jul 2010 13:25:23 +0000 (14:25 +0100)]
Add a conformance test for cogl_texture_{get_data,set_region}

This verifies that calling cogl_texture_get_data returns the same data
uploaded to the texture. The bottom quarter of the texture is replaced
using cogl_texture_set_region. It tries creating the texture with
different sizes and flags in the hope that it will hit different
texture backends.

14 years agocogl-texture: Share the common code in the get_data virtual
Neil Roberts [Thu, 8 Jul 2010 12:54:37 +0000 (13:54 +0100)]
cogl-texture: Share the common code in the get_data virtual

Previously cogl_texture_get_data would pretty much directly pass on to
the get_data texture virtual function. This ended up with a lot of
common code that was copied to all of the backends. For example, the
method is expected to return the required data size if the data
pointer is NULL and to calculate its own rowstride if the rowstride is
0. Also it needs to convert the downloaded data if GL can't support
that format directly.

This patch moves the common code to cogl-texture.c so the virtual is
always called with a format that can be downloaded directly by GL and
with a valid rowstride. If the download fails then the virtual can
return FALSE in which case cogl-texture will use the draw and read
fallback.

14 years agotests: don't delay/skip frames due to glReadPixel concerns
Robert Bragg [Thu, 8 Jul 2010 18:20:33 +0000 (19:20 +0100)]
tests: don't delay/skip frames due to glReadPixel concerns

This greatly speeds up running all the conformance tests by no longer
delaying many of the tests for a number of dummy frames to be painted.

We used to skip frames because we thought there was a problem with the
driver's glReadPixels implementation. Although we have seen driver
issues at times the real reason the delay was needed was because
resizing the stage usually happens asynchronously (because a non
synchronous X request is used by clutter_stage_set_size()). We now force
all X requests to be synchronized for the conformance tests so this is
no longer a problem and we can avoid these hacks.

14 years agocogl-vertex-buffer: Default to GL_CLAMP_TO_EDGE for point sprites
Neil Roberts [Wed, 7 Apr 2010 10:06:20 +0000 (11:06 +0100)]
cogl-vertex-buffer: Default to GL_CLAMP_TO_EDGE for point sprites

For point sprites you are usually drawing the whole texture so you
most often want GL_CLAMP_TO_EDGE. This patch removes the override for
COGL_MATERIAL_WRAP_MODE_AUTOMATIC when point sprites are enabled for a
layer so that it will clamp to edge.

14 years agoAdd an interactive test for cogl point sprites
Neil Roberts [Mon, 22 Mar 2010 13:48:27 +0000 (13:48 +0000)]
Add an interactive test for cogl point sprites

The test draws some fireworks with trailing sparks that fade out.

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

14 years agocogl-material: Add support for point sprites
Neil Roberts [Mon, 22 Mar 2010 13:33:55 +0000 (13:33 +0000)]
cogl-material: Add support for point sprites

This adds a new API call to enable point sprite coordinate generation
for a material layer:

void
cogl_material_set_layer_point_sprite_coords_enabled (CoglHandle material,
                                                     int layer_index,
                                                     gboolean enable);

There is also a corresponding get function.

Enabling point sprite coords simply sets the GL_COORD_REPLACE of the
GL_POINT_SPRITE glTexEnv when flusing the material. There is no
separate application control for glEnable(GL_POINT_SPRITE). Instead it
is left permanently enabled under the assumption that it has no affect
unless GL_COORD_REPLACE is enabled for a texture unit.

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

14 years agocogl-material: Add a property for setting the point size
Neil Roberts [Mon, 22 Mar 2010 09:32:17 +0000 (09:32 +0000)]
cogl-material: Add a property for setting the point size

This adds cogl_material_{get,set}_point_size. If the point size is not
1.0f then glPointSize will be called when the material is flushed.

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

14 years agotests/accessibility: Fix the soname for libclutter
Neil Roberts [Thu, 8 Jul 2010 14:28:37 +0000 (15:28 +0100)]
tests/accessibility: Fix the soname for libclutter

The required .so file was named using @CLUTTER_WINSYS@ but since
bf9d5f394997 the .so should be named with @CLUTTER_SONAME_INFIX@. This
was breaking the build on eglx.

14 years agomaterial: support dumping layer state graph to dot file
Robert Bragg [Wed, 7 Jul 2010 19:43:54 +0000 (20:43 +0100)]
material: support dumping layer state graph to dot file

Recently I added a _cogl_debug_dump_materials_dot_file function for
debugging the sparse material state. This extends the state dumped to
include the graph of layer state also.

14 years agomaterial: set ->layer_index on new layers for unit0
Robert Bragg [Wed, 7 Jul 2010 18:23:57 +0000 (19:23 +0100)]
material: set ->layer_index on new layers for unit0

We were mistakenly only initializing layer->layer_index for new layers
associated with texture units > 0. This had gone unnoticed because
normally layers associated with texture unit0 have a layer index of 0
too. Mutter was hitting this issue because it was initializing layer 1
before layer 0 for one of its materials so layer 1 was temporarily
associated with texture unit 0.

14 years agostate: add clutter_state_set_state and clutter_state_warp_to_state
Øyvind Kolås [Wed, 7 Jul 2010 17:14:43 +0000 (18:14 +0100)]
state: add clutter_state_set_state and clutter_state_warp_to_state

Replaced clutter_state_change with a boolean argument for animating the
transition or not with two separate argument-less methods.

14 years agobuild: Distcheck fixes after the Cally merge
Emmanuele Bassi [Wed, 7 Jul 2010 15:30:31 +0000 (16:30 +0100)]
build: Distcheck fixes after the Cally merge

14 years agoMerge branch 'cally-merge'
Emmanuele Bassi [Wed, 7 Jul 2010 15:06:30 +0000 (16:06 +0100)]
Merge branch 'cally-merge'

* cally-merge:
  cally: Add introspection generation
  cally: Improving cally doc
  cally: Cleaning CallyText
  cally: Refactoring "window:create" and "window:destroy" emission code
  cally: Use proper backend information on CallyActor
  cally: Check HAVE_CONFIG_H on cally-util.c
  docs: Fix Cally documentation
  cally: Clean up the headers
  Add binaries of the Cally examples to the ignore file
  docs: Add Cally API reference
  Avoid to load cally module on a11y examples
  Add accessibility tests
  Initialize accessibility support on clutter_init
  Rename some methods and includes to avoid -Wshadow warnings
  Cally initialization code
  Add Cally

14 years agotest-timeline: instantiate a stage so the master clock runs
Robert Bragg [Wed, 7 Jul 2010 14:58:02 +0000 (15:58 +0100)]
test-timeline: instantiate a stage so the master clock runs

This makes test-timeline get the default stage so there is at least one
stage instantiated. Without any stages the master clock will never run
which was causing this test to fail.

14 years agocally: Add introspection generation
Emmanuele Bassi [Wed, 7 Jul 2010 14:57:43 +0000 (15:57 +0100)]
cally: Add introspection generation

Toolkits and applications not written in C might still need access to
the Cally API to write accessibility extensions based on it for their
own native elements.

14 years agoRestore the report on the conformance test suite
Emmanuele Bassi [Wed, 7 Jul 2010 13:50:24 +0000 (14:50 +0100)]
Restore the report on the conformance test suite

The report generation was broken by the split of the various test units;
also, we were using GTest in a way that's not really sanctioned by
upstream.

This commit tries to re-use the targets from GLib's Makefile rules while
compensating for our own set up.

14 years agox11: Clean up NET_WM_STATE modifiers
Emmanuele Bassi [Wed, 7 Jul 2010 13:49:28 +0000 (14:49 +0100)]
x11: Clean up NET_WM_STATE modifiers

Use a separate function to avoid code duplication.

14 years agox11: Do not swallow XSettings events
Emmanuele Bassi [Tue, 6 Jul 2010 16:13:55 +0000 (17:13 +0100)]
x11: Do not swallow XSettings events

We might want pieces higher in the stack (like Mx) to handle XSettings
events as well, and swallowing them by removing them from the events
queue would make it impossible.

14 years agocally: Improving cally doc
Alejandro Piñeiro [Tue, 6 Jul 2010 14:51:24 +0000 (16:51 +0200)]
cally: Improving cally doc

  * Add documentation for all undocumented symbols
  * Add an overview section