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

14 years agocally: Cleaning CallyText
Alejandro Piñeiro [Tue, 6 Jul 2010 11:28:38 +0000 (13:28 +0200)]
cally: Cleaning CallyText

  * Removing superfluous g_return_if_fail
  * Removing unused ClutterText::text-changed callback

14 years agocally: Refactoring "window:create" and "window:destroy" emission code
Alejandro Piñeiro [Tue, 6 Jul 2010 11:25:44 +0000 (13:25 +0200)]
cally: Refactoring "window:create" and "window:destroy" emission code

Previously "window:create" and "window:destroy" were emitted on
CallyUtil. Although it works, and CallyUtil already have callbacks to
stage_added/removed signals, I think that it is more tidy/clear to do
that on CallyRoot:

  * CallyRoot already has code to manage ClutterStage addition/removal

  * In fact, we can see CallyRoot as the object exposing the a11y
    information from ClutterStageManager, so it fits better here.

  * CallyUtil callbacks these signals are related to key event
    listeners (key snooper simulation). One of the main CallyUtil
    responsabilities is managing event (connecting, emitting), so I
    would prefer to not start to add/mix more functionalities here.

Ideally it would be better to emit all CallyStage methods from
CallyStage, but it is clear that "create" and "destroy" are more easy
to emit from a external object

14 years agocally: Use proper backend information on CallyActor
Alejandro Piñeiro [Tue, 6 Jul 2010 11:36:48 +0000 (13:36 +0200)]
cally: Use proper backend information on CallyActor

It uses HAVE_CLUTTER_GLX to check the current backend in use for
some accessibility related methods.

Fixes CB#2071

14 years agocally: Check HAVE_CONFIG_H on cally-util.c
Alejandro Piñeiro [Wed, 7 Jul 2010 12:05:27 +0000 (14:05 +0200)]
cally: Check HAVE_CONFIG_H on cally-util.c

14 years agoframebuffer: Replace CoglHandle with CoglFramebuffer *
Robert Bragg [Wed, 7 Jul 2010 13:41:54 +0000 (14:41 +0100)]
framebuffer: Replace CoglHandle with CoglFramebuffer *

One more object converted to stop using CoglHandle re:a8c8cbee513

14 years agomaterial: route fogging state through CoglMaterial
Robert Bragg [Tue, 6 Jul 2010 19:18:26 +0000 (20:18 +0100)]
material: route fogging state through CoglMaterial

Previously cogl_set_fog would cause a flush of the Cogl journal and
would directly bang the GL state machine to setup fogging. As part of
the ongoing effort to track most state in CoglMaterial to support
renderlists this now adds an indirection so that cogl_set_fog now just
updates ctx->legacy_fog_state. The fogging state then gets enabled as a
legacy override similar to how the old depth testing API is handled.

14 years agoosx: explicitly request depth and stencil buffer bits
Robert Bragg [Tue, 6 Jul 2010 15:47:09 +0000 (16:47 +0100)]
osx: explicitly request depth and stencil buffer bits

This is a blind patch because I don't know enough about the osx backend
and the osx backend probably doesn't even work these days anyway but
since people have filed bugs specifically on OSX that imply they don't
have a depth or stencil buffer this tries to fix that.

Maybe someone will eventually pick up the osx backend again and verify
if this helps.

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

14 years agocogl-buffer: Move malloc fallback logic into CoglBuffer
Robert Bragg [Tue, 6 Jul 2010 00:21:43 +0000 (01:21 +0100)]
cogl-buffer: Move malloc fallback logic into CoglBuffer

Since we'll want to share the fallback logic with CoglVertexArray this
moves the malloc based fallback (for when OpenGL doesn't support vertex
or pixel buffer objects) into cogl-buffer.c.

14 years agocogl-buffer: consider it an error to free a mapped buffer
Robert Bragg [Mon, 5 Jul 2010 22:32:55 +0000 (23:32 +0100)]
cogl-buffer: consider it an error to free a mapped buffer

Explicitly warn if we detect that a CoglBuffer is being freed while it
is still mapped. Previously we silently unmapped the buffer, but it's
not something we want to encourage.

14 years agocogl-buffer: Track the last used bind target in CoglBuffer
Robert Bragg [Mon, 5 Jul 2010 22:24:34 +0000 (23:24 +0100)]
cogl-buffer: Track the last used bind target in CoglBuffer

This makes CoglBuffer track the last used bind target as a private
property. This is later used when binding a buffer to map instead of
always using the PIXEL_UNPACK target.

This also adds some additional sanity checks that code doesn't try to
nest binds to the same target or bind a buffer to multiple targets at
the same time.

14 years agotests: Force X synchronization so the stage size is reliable
Robert Bragg [Wed, 7 Jul 2010 12:38:10 +0000 (13:38 +0100)]
tests: Force X synchronization so the stage size is reliable

Normally the asynchronous nature of X means that setting the clutter
stage size may really happen an indefinite amount of time later but
since the tests are so short lived and may only render a single frame
this is not an acceptable semantic.

This way we should be able to remove all the hacky sleeps and frame
count delays from our tests.

14 years agotests: no longer clean up state between tests
Robert Bragg [Wed, 7 Jul 2010 12:31:35 +0000 (13:31 +0100)]
tests: no longer clean up state between tests

Since we now run every test in a separate process there is no need to
try and avoid state leakage between tests. This removes the code to
cleanup all children of the stage and disconnect handlers from the
stage paint signal. We now explicitly print a warning if the users tries
to run multiple tests in one process.

14 years agocogl: expose the semantic differences of gl/gles2 npot textures
Robert Bragg [Tue, 6 Jul 2010 01:01:24 +0000 (02:01 +0100)]
cogl: expose the semantic differences of gl/gles2 npot textures

This adds three new feature flags COGL_FEATURE_TEXTURE_NPOT_BASIC,
COGL_FEATURE_TEXTURE_NPOT_MIPMAP and COGL_FEATURE_TEXTURE_NPOT_REPEAT
that can tell you if your hardware supports non power of two textures,
npot textures + mipmaps and npot textures + wrap modes other than
CLAMP_TO_EDGE.

The pre-existing COGL_FEATURE_TEXTURE_NPOT feature implies all of the
above.

By default GLES 2 core supports npot textures but mipmaps and repeat
modes can only be used with power of two textures. This patch also makes
GLES check for the GL_OES_texture_npot extension to determine if mipmaps
and repeating are supported with npot textures.

14 years agocookbook: Fixed typo
Elliot Smith [Tue, 6 Jul 2010 16:14:22 +0000 (17:14 +0100)]
cookbook: Fixed typo

Removed stray 'd' character.

14 years agocookbook: Fix build so CSS files get installed
Elliot Smith [Tue, 6 Jul 2010 15:22:47 +0000 (16:22 +0100)]
cookbook: Fix build so CSS files get installed

I had changed the build so CSS files get put into
the HTML build directory; but done it in such
a way that they were then being ignored during
install. Fixed this.

14 years agocookbook: Moved paragraph where it logically belongs
Elliot Smith [Tue, 6 Jul 2010 15:11:46 +0000 (16:11 +0100)]
cookbook: Moved paragraph where it logically belongs

There was a note about constants for keys and
where they are defined in Clutter header files; but
the sentence about where key modifiers are defined
was outside the note. Logically, they belong
together.

14 years agocookbook: Added some judicious note elements
Elliot Smith [Tue, 6 Jul 2010 15:09:58 +0000 (16:09 +0100)]
cookbook: Added some judicious note elements

In some cases, there were blocks of text which
were really asides/interrupts to the flow, but
which weren't explicitly marked as such. I fixed
them by turning them into <note> blocks.

14 years agocookbook: Added more information for contributors
Elliot Smith [Tue, 6 Jul 2010 15:08:43 +0000 (16:08 +0100)]
cookbook: Added more information for contributors

Suggested use of <note> element for adding detail
or asides which would otherwise interrupt the
flow of the recipe.

14 years agocookbook: Link out to docbook site
Elliot Smith [Tue, 6 Jul 2010 15:04:46 +0000 (16:04 +0100)]
cookbook: Link out to docbook site

Corrected the link on the word Docbook, as it
was an internal <link> rather than an external
<ulink>.

14 years agocookbook: Made docbook element usage consistent
Elliot Smith [Tue, 6 Jul 2010 15:00:33 +0000 (16:00 +0100)]
cookbook: Made docbook element usage consistent

Made usage of docbook elements consistent across
recipes; to ensure the conventions are kept by others,
added a section about how to write and style recipes.

14 years agocookbook: Additional selectors in CSS stylesheet
Elliot Smith [Tue, 6 Jul 2010 14:42:32 +0000 (15:42 +0100)]
cookbook: Additional selectors in CSS stylesheet

Added some selectors for docbook element types
[properties and types], so those elements can be used in recipes

14 years agocookbook: Copy the CSS file into the HTML build directory
Elliot Smith [Tue, 6 Jul 2010 14:34:19 +0000 (15:34 +0100)]
cookbook: Copy the CSS file into the HTML build directory

This makes local testing easier, as you can see what the
cookbook will look like when installed.

14 years agocogl-vertex-buffer: Fix the #define for glDisableVertexAttribArray
Neil Roberts [Tue, 6 Jul 2010 15:08:06 +0000 (16:08 +0100)]
cogl-vertex-buffer: Fix the #define for glDisableVertexAttribArray

glDisableVertexAttribArray was defined to glEnableVertexAttribArray so
it would probably cause crashes if it was ever used. Presumably
nothing is using these yet because the generic attributes are not yet
tied to shader attributes in a predictable way.

14 years agoconfigure: Improves GLES 1.x checks
Robert Bragg [Tue, 6 Jul 2010 13:23:40 +0000 (14:23 +0100)]
configure: Improves GLES 1.x checks

We now always aim to use pkg-config based configuration when possible,
but when not configure.ac now knows the difference between GLES_CM
libraries that contain EGL symbols (I.e. a separate EGL library doesn't
need to be found) and GLESv1_CM libraries that don't contain EGL
symbols.

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

14 years agotest-state: fix test for state count after state removal
Øyvind Kolås [Tue, 6 Jul 2010 13:26:07 +0000 (14:26 +0100)]
test-state: fix test for state count after state removal

In the .json file used for the test, there is no null -> "base"
transition defined only a "clicked" -> "base", when the "clicked" state
is removed the "base" state will also disappear.

14 years agoanimator: fix removal of multiple keys
Øyvind Kolås [Tue, 6 Jul 2010 12:38:16 +0000 (13:38 +0100)]
animator: fix removal of multiple keys

When removing keys, sometimes a couple of keys would be remaining.

14 years agostate: added clutter_state_key_get_property_type
Øyvind Kolås [Tue, 6 Jul 2010 12:47:49 +0000 (13:47 +0100)]
state: added clutter_state_key_get_property_type

A function to retrieve the type of the value stored in a key, the
equivalent already exists for ClutterAnimator.

14 years agostate: automatically remove unused states
Øyvind Kolås [Tue, 6 Jul 2010 12:34:22 +0000 (13:34 +0100)]
state: automatically remove unused states

When there is no further keys with a state as the target state, remove
the state (and all transitions that used this state as a target)

14 years agobuild: Exclude built sources from the dist
Alexandros Frantzis [Tue, 6 Jul 2010 12:24:00 +0000 (13:24 +0100)]
build: Exclude built sources from the dist

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agobuild: Allow to run the tests from any directory
Damien Lespiau [Sun, 6 Jun 2010 21:47:02 +0000 (22:47 +0100)]
build: Allow to run the tests from any directory

I was fed up to cd into the tests/conform or tests/interactive directories
to launch a specific test. Now, with the power the abs_ variants of
builddir and srcdir we can run specific test from any directory.

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

14 years agodebug: Adds a COGL_DEBUG=disable-pbos debug option
Robert Bragg [Tue, 6 Jul 2010 00:30:25 +0000 (01:30 +0100)]
debug: Adds a COGL_DEBUG=disable-pbos debug option

For testing purposes, either to identify bugs in Cogl or the driver or
simulate lack of PBO support COGL_DEBUG=disable-pbos can be used to
fallback to malloc instead.

14 years agopango-render: set CLAMP_TO_EDGE wrap mode on glyph_material
Robert Bragg [Sat, 3 Jul 2010 18:05:04 +0000 (19:05 +0100)]
pango-render: set CLAMP_TO_EDGE wrap mode on glyph_material

The pango renderer was causing lots of override materials to be allocated
because the vertex_buffer API converts AUTOMATIC mode into REPEAT for
backwards compatibility. By explicitly setting the wrap mode to
CLAMP_TO_EDGE when creating the glyph_material then the vertex_buffer
API will leave it untouched.

14 years agopixel-array: Allow passing of hints to cogl_buffer_map
Robert Bragg [Mon, 5 Jul 2010 15:14:00 +0000 (16:14 +0100)]
pixel-array: Allow passing of hints to cogl_buffer_map

This allows you to tell Cogl that you are planning to replace all the
buffer's data once it is mapped with cogl_buffer_map. This means if the
buffer is currently being accessed by the GPU then the driver doesn't
have to stall and wait for it to finish before it can access it from the
CPU and can instead potentially allocate a new buffer with undefined
data and map that.

14 years agotest-cogl-pixel-array: fix how data is initialized
Robert Bragg [Mon, 5 Jul 2010 18:49:35 +0000 (19:49 +0100)]
test-cogl-pixel-array: fix how data is initialized

There was a missing '* 4' and '* i' in the for() loops that initialized
the first test buffer, so it was containing uninitialized data causing
the test to fail.

14 years agomoduleset: Update cairo and pixman versions
Emmanuele Bassi [Tue, 6 Jul 2010 10:57:16 +0000 (11:57 +0100)]
moduleset: Update cairo and pixman versions

The gtk+ we use for clutter-gtk depends on a new version of Cairo.

14 years agomoduleset: Remove libXft
Emmanuele Bassi [Tue, 6 Jul 2010 10:42:08 +0000 (11:42 +0100)]
moduleset: Remove libXft

The system one should be enough.

14 years agodocs: Fix Cally documentation
Emmanuele Bassi [Mon, 5 Jul 2010 14:10:42 +0000 (15:10 +0100)]
docs: Fix Cally documentation

14 years agocally: Clean up the headers
Emmanuele Bassi [Mon, 5 Jul 2010 13:43:18 +0000 (14:43 +0100)]
cally: Clean up the headers

Make Cally follow the single-include header file policy of Clutter and
Cogl; this means making cally.h the single include header, and requires
a new cally-main.h file for the functions defined by cally.h.

Also:

  • clean up the licensing notice and remove the FSF address;

  • document the object structures (instance and class);

  • G_GNUC_CONST-ify the get_type() functions;

  • reduce the padding for CallyActor sub-classes;

  • reduce the amount of headers included.

14 years agoAdd binaries of the Cally examples to the ignore file
Emmanuele Bassi [Mon, 5 Jul 2010 13:00:29 +0000 (14:00 +0100)]
Add binaries of the Cally examples to the ignore file

14 years agodocs: Add Cally API reference
Emmanuele Bassi [Mon, 5 Jul 2010 12:59:36 +0000 (13:59 +0100)]
docs: Add Cally API reference

14 years agoAvoid to load cally module on a11y examples
Alejandro Piñeiro [Tue, 27 Apr 2010 10:08:42 +0000 (12:08 +0200)]
Avoid to load cally module on a11y examples

As cally is being integrated on clutter is not required to load
cally module anymore. Anyway, it is still required to load
the atk bridge by hand. The current way to load it could change
in the future, more information here:

https://bugzilla.gnome.org/show_bug.cgi?id=612599
https://bugzilla.gnome.org/show_bug.cgi?id=619946

Part [4/4] of CB#2099

14 years agoAdd accessibility tests
Alejandro Piñeiro [Mon, 26 Apr 2010 18:07:22 +0000 (20:07 +0200)]
Add accessibility tests

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoInitialize accessibility support on clutter_init
Alejandro Piñeiro [Mon, 26 Apr 2010 17:33:49 +0000 (19:33 +0200)]
Initialize accessibility support on clutter_init

Initialize the accessibility support calling cally_accessibility_init

Take into account that this is required to at least be sure that
CallyUtil class is available.

It also modifies cally_accessibility_module_init in order to return
if the initialization was fine (and the name, removing the module word).

It also removes the gnome accessibility hooks, as it is not anymore
module code.

Solves CB#2098

14 years agoRename some methods and includes to avoid -Wshadow warnings
Alejandro Piñeiro [Tue, 15 Jun 2010 11:45:19 +0000 (13:45 +0200)]
Rename some methods and includes to avoid -Wshadow warnings

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

14 years agoCally initialization code
Alejandro Piñeiro [Mon, 14 Jun 2010 16:05:57 +0000 (18:05 +0200)]
Cally initialization code

This commit includes a method to init the a11y support. Two main purposes:

 * Register the different Atk factories.
 * Ensure that there are a AtkUtil implementation class available.

Part of CB#2097

14 years agoAdd Cally
Alejandro Piñeiro [Mon, 14 Jun 2010 11:38:25 +0000 (13:38 +0200)]
Add Cally

The Clutter Accessibility Library is an implementation of the ATK,
the Accessibility Toolkit, which exposes Clutter actors to accessibility
tools. This allows not only writing accessible user interfaces, but also
allows testing and verification frameworks based on A11Y technologies to
inspect and test a Clutter scene graph.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoUpdate conformance Git ignore file
Emmanuele Bassi [Mon, 5 Jul 2010 15:45:19 +0000 (16:45 +0100)]
Update conformance Git ignore file

14 years agoconform: don't reference old test_cogl_pixel_buffer symbol
Robert Bragg [Mon, 5 Jul 2010 15:17:34 +0000 (16:17 +0100)]
conform: don't reference old test_cogl_pixel_buffer symbol

Since CoglPixelBuffer was renamed to CoglPixelArray the test entry point
was also renamed to test_cogl_pixel_array, but mistakenly the
corresponding test-conform-main.c change wasn't pushed at the same time.

14 years agocogl-object: cogl_is_XYZ prototype should take void *
Robert Bragg [Sat, 3 Jul 2010 20:11:33 +0000 (21:11 +0100)]
cogl-object: cogl_is_XYZ prototype should take void *

This changes the cogl_is_XYZ function prototypes generated when using
the COGL_OBJECT_DEFINE macro to take a void * argument instead of a
CoglHandle argument.