profile/ivi/clutter.git
14 years ago[cogl_polygon] Enable COGL_ENABLE_BLEND when use_color is set
Neil Roberts [Tue, 27 Oct 2009 13:18:51 +0000 (13:18 +0000)]
[cogl_polygon] Enable COGL_ENABLE_BLEND when use_color is set

Otherwise you can't use the alpha channel of the vertex colors unless
the material has a texture with alpha or the material's color has
alpha less than 255.

14 years agobuild: Add $(top_buiddir)/clutter/cogl to the include path in clutter/cogl/cogl
Neil Roberts [Tue, 27 Oct 2009 12:38:10 +0000 (12:38 +0000)]
build: Add $(top_buiddir)/clutter/cogl to the include path in clutter/cogl/cogl

Some files try to include "cogl/cogl-defines-gl.h" so
$(top_builddir)/clutter/cogl needs to be in the include path for out of
tree builds to work.

14 years agocolor: Fix HLS-to-RGB conversion
Emmanuele Bassi [Mon, 26 Oct 2009 16:29:31 +0000 (16:29 +0000)]
color: Fix HLS-to-RGB conversion

Apparently, on 64bit systems the floating point noise is enough
to screw up the float-to-int truncation.

The solution is to round up by 0.5 and then use floorf(). This
gives predictable and correct results on both 32bit and 64bit
systems.

14 years agolayout: Do not create a LayoutMeta on remove
Emmanuele Bassi [Mon, 26 Oct 2009 16:02:06 +0000 (16:02 +0000)]
layout: Do not create a LayoutMeta on remove

When calling remove_child_meta() we check if there is a LayoutMeta
already attached to the Actor, and if that LayoutMeta matches the
(manager, container, actor) tuple. If the LayoutMeta does not match,
though, we create a new LayoutMeta instance -- in order to remove it
right afterwards.

Instead of doing this, we can simply check for a matching LayoutMeta
and if present, remove it.

In case of an existing, non-matching LayoutMeta, we're left with a
dangling instance, but it does not matter: the removal happens in the
unparenting phase of a ClutterContainer, so either the Actor will be
destroyed and thus the LayoutMeta will be disposed along with it; or
it will be parented to another container, and thus the LayoutMeta
will be replaced.

14 years agotests: Use the right key symbol for adding children
Emmanuele Bassi [Mon, 26 Oct 2009 15:10:20 +0000 (15:10 +0000)]
tests: Use the right key symbol for adding children

The test-box-layout should be using CLUTTER_plus instead of a
literal '+'.

14 years agobox: Depth level changes should queue a relayout
Emmanuele Bassi [Mon, 26 Oct 2009 15:09:07 +0000 (15:09 +0000)]
box: Depth level changes should queue a relayout

ClutterBox is not ClutterGroup: a change in the level of an actor
through raise, lower or depth sorting must trigger a relayout.

14 years agobox: Check before using the LayoutManager instance
Emmanuele Bassi [Mon, 26 Oct 2009 15:08:03 +0000 (15:08 +0000)]
box: Check before using the LayoutManager instance

A ClutterBox might not have a ClutterLayoutManager instance
associated -- for instance, during destruction. We should check
for one before calling methods on it.

14 years agotexture: Error handling fix
Emmanuele Bassi [Mon, 26 Oct 2009 11:51:30 +0000 (11:51 +0000)]
texture: Error handling fix

When cogl_texture_new_from_data() fails in clutter_texture_set_from_data()
and no GError is provided, the clutter app will segfault when dereferencing
the GError ** and emitting LOAD_FINISHED signal.

Based on a patch by: Haakon Sporsheim <haakon.sporsheim@gmail.com>

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

14 years agotests: Print out the captured event type
Emmanuele Bassi [Mon, 26 Oct 2009 11:42:16 +0000 (11:42 +0000)]
tests: Print out the captured event type

The ::captured-event signal on the Stage is not printing out the
event type.

14 years agodocs: Add images for layout managers
Emmanuele Bassi [Fri, 23 Oct 2009 16:32:18 +0000 (17:32 +0100)]
docs: Add images for layout managers

It's easier to show the layout manager policy with a simple
screen shot coming from our interactive tests.

14 years agocogl: Avoid C99-isms
Emmanuele Bassi [Fri, 23 Oct 2009 15:44:28 +0000 (16:44 +0100)]
cogl: Avoid C99-isms

Do not declare variables after statements.

14 years agocogl: Remove cogl-current-matrix.c
Emmanuele Bassi [Fri, 23 Oct 2009 14:46:25 +0000 (15:46 +0100)]
cogl: Remove cogl-current-matrix.c

The cogl-current-matrix.c file is unused since commit
5e5d94dfbed18bf2b4c8c7a7ff9847952b2c4ae2 and it's not compiled
or distributed anymore.

14 years agoUpdate Git ignore rules
Emmanuele Bassi [Fri, 23 Oct 2009 13:30:15 +0000 (14:30 +0100)]
Update Git ignore rules

14 years agoPost-release bump to 1.1.3
Emmanuele Bassi [Fri, 23 Oct 2009 12:55:50 +0000 (13:55 +0100)]
Post-release bump to 1.1.3

14 years agoRelease 1.1.2 developers snapshot
Emmanuele Bassi [Fri, 23 Oct 2009 12:38:28 +0000 (13:38 +0100)]
Release 1.1.2 developers snapshot

14 years agobuild: Make COGL pass distcheck
Emmanuele Bassi [Fri, 23 Oct 2009 11:15:25 +0000 (12:15 +0100)]
build: Make COGL pass distcheck

Some changes to make COGL pass distcheck with Automake 1.11 and
anal-retentiveness turned up to 11.

The "major" change is the flattening of the winsys/ part of COGL,
which is built directly inside libclutter-cogl.la instead of an
intermediate libclutter-cogl-winsys.la object.

Ideally, the whole COGL should be flattened out using a
quasi-non-recursive Automake layout; unfortunately, the driver/
sub-section ships with identical targets and Automake cannot
distinguish GL and GLES objects.

14 years agoactor: Identify allocation cycles
Emmanuele Bassi [Fri, 23 Oct 2009 09:17:40 +0000 (10:17 +0100)]
actor: Identify allocation cycles

If an actor calls directly or indirectly clutter_actor_queue_relayout()
on itself from within the allocate() implementation it will cause a
relayout cycle. This is usually a condition that should be checked by
ClutterActor and we should emit a warning if it is verified.

14 years agoactor: Add checks for IN_DESTRUCTION flag
Emmanuele Bassi [Fri, 23 Oct 2009 09:08:02 +0000 (10:08 +0100)]
actor: Add checks for IN_DESTRUCTION flag

ClutterActor should check whether the current instance is being
destroyed and avoid performing operations like:

 • queueing redraws
 • queueing relayouts

It should also warn if the actor is being parented to an actor
currently being destroyed.

14 years agoactor: Show actor name or type in the state checks warnings
Emmanuele Bassi [Fri, 23 Oct 2009 08:48:35 +0000 (09:48 +0100)]
actor: Show actor name or type in the state checks warnings

When showing a warning in the state checks we perform to verify that
the invariants are maintained when showing, mapping and realizing, we
should also print out the name of the actor failing the checks. If the
actor has no name, the GType name should be used as a fallback.

14 years agoFix some compilation errors in cogl-gles2-wrapper.c
Neil Roberts [Thu, 22 Oct 2009 15:55:29 +0000 (16:55 +0100)]
Fix some compilation errors in cogl-gles2-wrapper.c

The changes in 74f2122b6 introduced some syntax errors which were
preventing the GLES2 backend from compiling.

14 years agoclone: Set :source as CONSTRUCT
Emmanuele Bassi [Thu, 22 Oct 2009 12:48:49 +0000 (13:48 +0100)]
clone: Set :source as CONSTRUCT

The :source property for ClutterClone is a constructor property, but
it most definitely is not a constructor-only one.

14 years agoRemove cogl/{gl,gles}/Makefile.am
Neil Roberts [Thu, 22 Oct 2009 14:39:30 +0000 (15:39 +0100)]
Remove cogl/{gl,gles}/Makefile.am

These are no longer used anywhere.

14 years agodocs: Close the right tag to avoid XML errors
Emmanuele Bassi [Wed, 21 Oct 2009 16:44:44 +0000 (17:44 +0100)]
docs: Close the right tag to avoid XML errors

14 years agodocs: Rename the Shader and StageManager sections
Emmanuele Bassi [Wed, 21 Oct 2009 16:43:34 +0000 (17:43 +0100)]
docs: Rename the Shader and StageManager sections

14 years agotests: Update test-script
Emmanuele Bassi [Wed, 21 Oct 2009 15:15:18 +0000 (16:15 +0100)]
tests: Update test-script

Use explicit alpha definition and custom alpha functions.

14 years agoalpha: Manually parse the :mode property in ClutterScript
Emmanuele Bassi [Wed, 21 Oct 2009 15:04:12 +0000 (16:04 +0100)]
alpha: Manually parse the :mode property in ClutterScript

The :mode property for a ClutterAlpha can either be an integer, for
an easing mode logical id, or a string for the easing mode "nickname".

14 years agoscript, docs: Update documentation for alphas
Emmanuele Bassi [Wed, 21 Oct 2009 14:43:01 +0000 (15:43 +0100)]
script, docs: Update documentation for alphas

It is now possible to have Alpha instances defined explicitly for
behaviours, so we need to fix the documentation.

14 years agoalpha: Allow setting the function in ClutterScript
Emmanuele Bassi [Wed, 21 Oct 2009 14:29:25 +0000 (15:29 +0100)]
alpha: Allow setting the function in ClutterScript

When defining an Alpha in ClutterScript we should allow setting
the alpha function by using a custom property. This makes it
possible to have both:

  {
    "id" : "behaviour-1",
    "type" : "ClutterBehaviourDepth",
    "alpha" : { "timeline" : "timeline-1", "function" : "alpha_func" },
    ...
  }

And:

  {
    "id" : "alpha-1",
    "type" : "ClutterAlpha",
    "timeline" : "timeline-1",
    "function" : "alpha_func"
  },
  {
    "id" : "behaviour-1",
    "type" : "ClutterBehaviourDepth",
    "alpha" : "alpha-1",
    ...
  }

The latter allows defining a single alpha function for multiple
behaviours.

14 years agoscript: Always allow setting object properties by id reference
Emmanuele Bassi [Wed, 21 Oct 2009 14:17:50 +0000 (15:17 +0100)]
script: Always allow setting object properties by id reference

The block that allows setting a GObject property holding an object
instance is conditionally depending on the USE_PIXBUF define. This
makes it impossible to reference an object inside ClutterScript on
platforms not using GdkPixbuf.

14 years agobehaviour: Notify changes of the :alpha property
Emmanuele Bassi [Wed, 21 Oct 2009 14:16:43 +0000 (15:16 +0100)]
behaviour: Notify changes of the :alpha property

The set_alpha() setter of ClutterBehaviour is not emitting notifications
for the alpha property.

14 years agoForce a relayout when showing an actor
Owen W. Taylor [Tue, 6 Oct 2009 03:20:07 +0000 (23:20 -0400)]
Force a relayout when showing an actor

When an actor is hidden, the parent actor is not required to
size request or allocate it. (ClutterGroup does, but, for example,
NbtkBoxLayout doesn't.) This means that the
needs_width_request/needs_height_request/needs_allocate can be
stale when we go to show it again - they are set for the actor
but not the parent. Explicitly setting them to FALSE avoids
clutter_actor_relayout() improperly short-circuiting.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agotext: Invalidate caches and sizes in set_text_internal()
Emmanuele Bassi [Tue, 20 Oct 2009 21:05:04 +0000 (22:05 +0100)]
text: Invalidate caches and sizes in set_text_internal()

The change in commit 3bbc96e17e5a03ba931c86a5cd2a0ecaa2a3b77b moved the
:text property setter to use set_text_internal(); this function does not
invalidate the Layout cache and does not queue a relayout, thus breaking
the behaviour of ClutterText when setting the contents of the actor using
the property.

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

14 years ago[group] Fix copy & paste error from 857b0239e (Use FixedLayout inside Group)
Robert Bragg [Tue, 20 Oct 2009 13:57:40 +0000 (14:57 +0100)]
[group] Fix copy & paste error from 857b0239e (Use FixedLayout inside Group)

clutter_group_get_preferred_height was calling
clutter_layout_manager_get_preferred_width which e.g.  broke
test-actor-clone.

14 years ago[gles2] remove lots of redundant matrix stack code
Robert Bragg [Tue, 29 Sep 2009 01:56:23 +0000 (02:56 +0100)]
[gles2] remove lots of redundant matrix stack code

Since we no longer depend on the GL matrix API in Cogl we can remove a lot
of wrapper code from the GLES 2 backend.  This is particularly nice given
that there was no code shared between the cogl-matrix-stack API and gles2
wrappers so we had a lot of duplicated logic.

14 years ago[cogl] Removes the cogl-current-matrix abstraction
Robert Bragg [Tue, 13 Oct 2009 22:09:42 +0000 (23:09 +0100)]
[cogl] Removes the cogl-current-matrix abstraction

The indirection through this API isn't necessary since we no longer
arbitrate between the OpenGL matrix API and Cogl's client side API.  Also it
doesn't help to maintain an OpenGL style matrix mode API for internal use
since it's awkward to keep restoring the MODELVIEW mode and easy enough to
directly work with the matrix stacks of interest.

This replaces use of the _cogl_current_matrix API with direct use of the
_cogl_matrix_stack API.  All the unused cogl_current_matrix API is removed
and the matrix utility code left in cogl-current-matrix.c was moved to
cogl.c.

14 years ago[matrix-stack] Adds ctx->flushed_matrix_mode to cache the gl matrix mode
Robert Bragg [Wed, 14 Oct 2009 09:53:48 +0000 (10:53 +0100)]
[matrix-stack] Adds ctx->flushed_matrix_mode to cache the gl matrix mode

This cache of the gl matrix mode lets us avoid repeat calls to glMatrixMode
in _cogl_matrix_stack_flush_to_gl when we have lots of sequential modelview
matrix modifications.

14 years agomatrix-stack: more optimization for load_identity case
Robert Bragg [Tue, 6 Oct 2009 11:36:32 +0000 (12:36 +0100)]
matrix-stack: more optimization for load_identity case

This goes a bit further than the previous patch, and as a special case
we now simply represent identity matrices using a boolean, and only
lazily initialize them when they need to be modified.

14 years ago[matrix-stack] avoid redundant clearing of matrix when using load_identity
Robert Bragg [Tue, 6 Oct 2009 09:52:07 +0000 (10:52 +0100)]
[matrix-stack] avoid redundant clearing of matrix when using load_identity

The journal always uses an identity matrix since it uses software
transformation.  Currently it manually uses glLoadMatrix since previous
experimentation showed that the cogl-matrix-stack gave bad performance, but
it would be nice to fix performance so we only have to care about one path
for loading matrices.

For the common case where we do:
cogl_matrix_stack_push()
cogl_matrix_stack_load_identity()
we were effectively initializing the matrix 3 times. Once due to use of
g_slice_new0, then we had a cogl_matrix_init_identity in
_cogl_matrix_state_new for good measure, and then finally in
cogl_matrix_stack_load_identity we did another cogl_matrix_init_identity.

We don't use g_slice_new0 anymore, _cogl_matrix_state_new is documented as
not initializing the matrix (instead _cogl_matrix_stack_top_mutable now
takes a boolean to choose if new stack entries should be initialised) and so
we now only initialize once in cogl_matrix_stack_load_identity.

14 years ago[current-matrix] Adds texture matrix stacks + removes GL matrix API usage
Robert Bragg [Tue, 29 Sep 2009 01:58:27 +0000 (02:58 +0100)]
[current-matrix] Adds texture matrix stacks + removes GL matrix API usage

This relates back to an earlier commitment to stop using the OpenGL matrix
API which is considered deprecated. (ref 54159f5a1d029db)

The new texture matrix stacks are hung from a list of (internal only)
CoglTextureUnit structures which the CoglMaterial code internally references
via _cogl_get_texure_unit ().

So we would be left with only the cogl-matrix-stack code being responsible
for glMatrixMode, glLoadMatrix and glLoadIdentity this commit updates the
journal code so it now uses the matrix-stack API instead of GL directly.

14 years agotext: Take pre-edit cursor position into account
Emmanuele Bassi [Mon, 19 Oct 2009 14:31:29 +0000 (15:31 +0100)]
text: Take pre-edit cursor position into account

When determining the cursor position we also need to take into account
the pre-edit cursor position as set by the set_preedit_string()
function.

14 years agodocs: Documentation fixes
Emmanuele Bassi [Mon, 19 Oct 2009 11:01:38 +0000 (12:01 +0100)]
docs: Documentation fixes

 • Fix list_stages() and peek_stages() documentation

 • Fix clutter_text_set_preedit_string() arguments in the header
   to match source and documentation

 • Add clutter_units_cm() to the private section for Units

 • Rename the LayoutManager section

 • Add FlowLayout:homogeneous accessors

14 years agoMerge branch 'layout-manager'
Emmanuele Bassi [Mon, 19 Oct 2009 10:45:15 +0000 (11:45 +0100)]
Merge branch 'layout-manager'

* layout-manager: (50 commits)
  docs: Reword a link
  layout, docs: Add more documentation to LayoutManager
  layout, docs: Fix description of Bin properties
  layout, bin: Use ceilf() instead of casting to int
  layout, docs: Add long description for FlowLayout
  layout, box: Clean up
  layout, box: Write long description for Box
  layout, docs: Remove unused functions
  layout: Document BoxLayout
  layout: Add BoxLayout, a single line layout manager
  layout: Report the correct size of FlowLayout
  layout: Resizing the stage resizes the FlowLayout box
  layout: Use the get_request_mode() getter in BinLayout
  layout: Change the request-mode along with the orientation
  actor: Add set_request_mode() method
  [layout] Remove FlowLayout:wrap
  [layout] Rename BinLayout and FlowLayout interactive tests
  [layout] Skip invisible children in FlowLayout
  [layout] Clean up and document FlowLayout
  [layout] Snap children of FlowLayout to column/row
  ...

14 years agodocs: Reword a link
Emmanuele Bassi [Mon, 19 Oct 2009 10:44:29 +0000 (11:44 +0100)]
docs: Reword a link

14 years agolayout, docs: Add more documentation to LayoutManager
Emmanuele Bassi [Mon, 19 Oct 2009 10:00:23 +0000 (11:00 +0100)]
layout, docs: Add more documentation to LayoutManager

The layout manager reference should have some documentation on how
to use a LayoutManager object inside a container and how to implement
a LayoutManager sub-class correctly.

14 years agobuild: Add back QUIET_GEN to the GIR generation
Emmanuele Bassi [Sun, 18 Oct 2009 16:49:00 +0000 (17:49 +0100)]
build: Add back QUIET_GEN to the GIR generation

14 years agoUpdate ignore file
Emmanuele Bassi [Sun, 18 Oct 2009 16:15:04 +0000 (17:15 +0100)]
Update ignore file

14 years agobuild: De-nest the JSON from the introspection rules
Emmanuele Bassi [Sun, 18 Oct 2009 16:12:12 +0000 (17:12 +0100)]
build: De-nest the JSON from the introspection rules

The JSON conditional rules can be moved outside the introspection
conditional ones to avoid a nested check, as all the JSON rules do
is setting up variables that may or may not be used.

14 years agobuild: Use QUIET_GEN when building ClutterJson GIR
Emmanuele Bassi [Sun, 18 Oct 2009 16:11:42 +0000 (17:11 +0100)]
build: Use QUIET_GEN when building ClutterJson GIR

14 years agobuild: Fix up the GIR generation rules
Emmanuele Bassi [Sun, 18 Oct 2009 16:00:24 +0000 (17:00 +0100)]
build: Fix up the GIR generation rules

The rules for generating Clutter's introspection data are
still referencing the old COGL layout.

14 years agobuild: Add CPPFLAGS for the g-ir-scanner command line
Emmanuele Bassi [Fri, 16 Oct 2009 23:30:37 +0000 (00:30 +0100)]
build: Add CPPFLAGS for the g-ir-scanner command line

When I moved all CPP flags to AM_CPPFLAGS from the INCLUDES directive
I forgot that g-ir-scanner needs those defines as well.

14 years ago[cogl-primitives] Split the journal out from cogl-primitives.c
Robert Bragg [Wed, 16 Sep 2009 13:01:57 +0000 (14:01 +0100)]
[cogl-primitives] Split the journal out from cogl-primitives.c

The Journal can be considered a standalone component, so even though
it's currently only used to log quads, it seems better to split it
out into its own file.

14 years ago[test-backface-culling] Check that inverted tex coords don't affect culling
Robert Bragg [Sun, 6 Sep 2009 20:47:46 +0000 (21:47 +0100)]
[test-backface-culling] Check that inverted tex coords don't affect culling

The additional check draws another front facing rectangle but this time with
the texture coords flipped on the x axis.  The code that handles sliced
textures in cogl-primitives.c makes some suspicious changes to the geometry
when the texture coords are inverted.

14 years ago[cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced
Robert Bragg [Wed, 23 Sep 2009 14:11:55 +0000 (15:11 +0100)]
[cogl-spans] split out cogl-spans code from cogl-texture-2d-sliced

When we implement atlas textures we will probably want to use the spans API
to handle texture repeating so it doesn't make sense to leave the code in
cogl-texture-2d-sliced.c.  Since it's a standalone set of data structures
and algorithms it also seems reasonable to split out from cogl-texture.

14 years ago[cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced
Vladimir Nadvornik [Sun, 30 Aug 2009 10:36:11 +0000 (12:36 +0200)]
[cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced

cogl-texture-2d-sliced provides an implementation of CoglTexture and this
seperation lays the foundation for potentially supporting atlas textures,
pixmap textures (as in GLX_EXT_texture_from_pixmap) and fast-path
GL_TEXTURE_{1D,2D,3D,RECTANGLE} textures in a maintainable fashion.

14 years ago[cogl-texture] Seal CoglTexture internals from cogl-primitives.c
Robert Bragg [Wed, 16 Sep 2009 10:56:17 +0000 (11:56 +0100)]
[cogl-texture] Seal CoglTexture internals from cogl-primitives.c

cogl-primitives.c was previously digging right into CoglTextures so it could
manually iterate the texture slices for texturing quads and polygons and
because we were missing some state getters we were lazily just poking into
the structures directly.

This adds some extra state getter functions, and adds a higher level
_cogl_texture_foreach_slice () API that hopefully simplifies the way in
which sliced textures may be used to render primitives.  This lets you
specify a rectangle in "virtual" texture coords and it will call a given
callback for each slice that intersects that rectangle giving the virtual
coords of the current slice and corresponding "real" texture coordinates for
the underlying gl texture.

At the same time a noteable bug in how we previously iterated sliced
textures was fixed, whereby we weren't correctly handling inverted texture
coordinates.  E.g.  with the previous code if you supplied texture coords of
tx1=100,ty1=0,tx2=0,ty2=100 (inverted along y axis) that would result in a
back-facing quad, which could be discarded if using back-face culling.

14 years ago[docs] switch gl_handle+gl_target docs for cogl_texture_new_from_foreign
Robert Bragg [Thu, 30 Jul 2009 11:06:02 +0000 (12:06 +0100)]
[docs] switch gl_handle+gl_target docs for cogl_texture_new_from_foreign

The descriptions for gl_handle and gl_target were inverted.

Thanks to Young-Ho Cha for spotting that.

Signed-off-by: Robert Bragg <robert@linux.intel.com>
14 years ago[cogl] move clutter/pango to clutter/cogl/pango
Robert Bragg [Wed, 29 Jul 2009 16:21:07 +0000 (17:21 +0100)]
[cogl] move clutter/pango to clutter/cogl/pango

As part of the re-organisation of Cogl; move clutter/pango to be part of the
cogl sub-project.

14 years agoIntial Re-layout of the Cogl source code and introduction of a Cogl Winsys
Robert Bragg [Tue, 28 Jul 2009 01:02:02 +0000 (02:02 +0100)]
Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys

As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.

Currently this is the structure I'm aiming for:
cogl/
    cogl/
<put common source here>
winsys/
   cogl-glx.c
   cogl-wgl.c
driver/
    gl/
    gles/
os/ ?
    utils/
cogl-fixed
cogl-matrix-stack?
        cogl-journal?
        cogl-primitives?
    pango/

The new winsys component is a starting point for migrating window system
code (i.e.  x11,glx,wgl,osx,egl etc) from Clutter to Cogl.

The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.

Overview of the planned structure:

* The winsys/ API is the API that binds OpenGL to a specific window system,
  be that X11 or win32 etc.  Example are glx, wgl and egl. Much of the logic
  under clutter/{glx,osx,win32 etc} should migrate here.

* Note there is also the idea of a winsys-base that may represent a window
  system for which there are multiple winsys APIs.  An example of this is
  x11, since glx and egl may both be used with x11.  (currently only Clutter
  has the idea of a winsys-base)

* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
  representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
  GLES 1.1 (fixed funciton) and 2.0 (fully shader based)

* Everything under cogl/ should fundamentally be supporting access to the
  GPU.  Essentially Cogl's most basic requirement is to provide a nice GPU
  Graphics API and drawing a line between this and the utility functionality
  we add to support Clutter should help keep this lean and maintainable.

* Code under utils/ as suggested builds on cogl/ adding more convenient
  APIs or mechanism to optimize special cases. Broadly speaking you can
  compare cogl/ to OpenGL and utils/ to GLU.

* clutter/pango will be moved to clutter/cogl/pango

How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"

Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps

As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.

14 years agoMake the CoglContext structure a bit more maintainable
Robert Bragg [Tue, 28 Jul 2009 00:34:33 +0000 (01:34 +0100)]
Make the CoglContext structure a bit more maintainable

This moves most of cogl-context.{c.h} to cogl/common with some driver
specific members now living in a CoglContextDriver struct.  Driver specific
context initialization and typedefs now live in
cogl/{gl,gles}/cogl-context-driver.{c,h}

Driver specific members can be found under ctx->drv.stuff

14 years agoImprove cogl-texture maintainability by moving 90% into cogl/common
Robert Bragg [Mon, 27 Jul 2009 23:37:11 +0000 (00:37 +0100)]
Improve cogl-texture maintainability by moving 90% into cogl/common

This splits the limited components that differed between
cogl/{gl,gles}/cogl-texture.c into new {gl,gles}/cogl-texture-driver.c files
and the rest that can now be shared into cogl/common/cogl-texture.c

14 years ago[stage-egl] support fallbacks in clutter_stage_egl_realize
Robert Bragg [Thu, 20 Aug 2009 10:54:41 +0000 (11:54 +0100)]
[stage-egl] support fallbacks in clutter_stage_egl_realize

Most of clutter_stage_egl_realize was renamed to
_clutter_stage_egl_try_realize which now takes a cookie indicating which
fallback number should tried next.  clutter_stage_egl_realize now keeps
trying to realize with successive fallback numbers until it succeeds or runs
out of fallbacks.

The only fallback supported for now is for hardware with no stencil buffer
support.

14 years ago[x11 backend] remove data duplicated between backends and stages
Robert Bragg [Mon, 3 Aug 2009 13:50:10 +0000 (14:50 +0100)]
[x11 backend] remove data duplicated between backends and stages

Make backends the canonical point of reference for the xdisplay, the xscreen
number, the x root window and the xvisinfo for creating foreign stages.

14 years ago[glx backend] white space fixes
Robert Bragg [Fri, 31 Jul 2009 19:39:28 +0000 (20:39 +0100)]
[glx backend] white space fixes

Simply removes lots of trailing white spaces

14 years ago[glx backend] use FBConfigs instead of Visuals for GL context creation
Robert Bragg [Fri, 31 Jul 2009 16:07:10 +0000 (17:07 +0100)]
[glx backend] use FBConfigs instead of Visuals for GL context creation

This replaces calls to the old (glx 1.2) functions glXChooseVisual,
glXCreateContext, glXMakeCurrent with the 1.3+ fbconfig varients
glXChooseFBConfig, glXCreateNewContext, glXMakeContextCurrent.

14 years ago[backends] Remove the idea of offscreen stages from all backends
Robert Bragg [Fri, 31 Jul 2009 17:34:51 +0000 (18:34 +0100)]
[backends] Remove the idea of offscreen stages from all backends

The only backend that tried to implement offscreen stages was the GLX backend
and even this has apparently be broken for some time without anyone noticing.

The property still remains and since the property already clearly states that
it may not work I don't expect anyone to notice.

This simplifies quite a bit of the GLX code which is very desireable from the
POV that we want to start migrating window system code down to Cogl and the
simpler the code is the more straight forward this work will be.

In the future when Cogl has a nicely designed API for framebuffer objects then
re-implementing offscreen stages cleanly for *all* backends should be quite
straightforward.

14 years ago[build] more Makefile.am.{enums,marshal} fixes for out of tree builds
Robert Bragg [Fri, 16 Oct 2009 16:15:47 +0000 (17:15 +0100)]
[build] more Makefile.am.{enums,marshal} fixes for out of tree builds

for the marshal files $(srcdir) was getting prefixed twice since my last
commit (2cc88f1140) since it was already being prefixed including
Makefile.am.  The problem with prefixing it in the includer file though is
that the Make variable substitutions like :.list=.h mean we end up
generating into the $(srcdir).  This removes the prefix added in
clutter/Makefile.am

We were also missing a $(srcdir) prefix when setting EXTRA_DIST

14 years agoSimple coding style fix for commit c5551184
Emmanuele Bassi [Fri, 16 Oct 2009 14:57:21 +0000 (15:57 +0100)]
Simple coding style fix for commit c5551184

14 years agoMerge branch 'bug-1846'
Emmanuele Bassi [Fri, 16 Oct 2009 14:55:05 +0000 (15:55 +0100)]
Merge branch 'bug-1846'

* bug-1846:
  Fix warning message in the ParamSpec validation

14 years agoMerge branch 'bug-1845'
Emmanuele Bassi [Fri, 16 Oct 2009 14:55:04 +0000 (15:55 +0100)]
Merge branch 'bug-1845'

* bug-1845:
  Add a warning when ClutterInterval can't compute progress

14 years agoFix warning message in the ParamSpec validation
Damien Lespiau [Mon, 12 Oct 2009 16:05:05 +0000 (17:05 +0100)]
Fix warning message in the ParamSpec validation

When validating a new GValue against the ClutterParamSpecUnits, we issue
a warning when the units do not match with both the new value and the
unit we expect to have. Unfortunately we were printing the unit of the
new value twice and not the unit of the ParamSpec.

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

14 years agoAdd a warning when ClutterInterval can't compute progress
Damien Lespiau [Mon, 12 Oct 2009 15:45:39 +0000 (16:45 +0100)]
Add a warning when ClutterInterval can't compute progress

This is really useful when trying to animate GTypes that haven't
registered any progress function. Instead of silently not working it
will warn the developer.

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

14 years agoAdd ClutterInterval integration
Damien Lespiau [Mon, 12 Oct 2009 15:28:10 +0000 (16:28 +0100)]
Add ClutterInterval integration

To be able to animate CLUTTER_TYPE_UNITS properties we need to register
the GType and its progress function against the ClutterInterval code.

The two ClutterUnits defining the interval can use different units, the
resulting unit will always be in pixels, so calculating a progress
between 10px and 4cm is valid.

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

14 years agounits: Cache the pixels value inside Units
Emmanuele Bassi [Fri, 16 Oct 2009 14:25:37 +0000 (15:25 +0100)]
units: Cache the pixels value inside Units

When computing the pixels value of a ClutterUnits value we should
be caching the value to avoid recomputing for every call of
clutter_units_to_pixels(). We already have a flag telling us to
return the cached value, but we miss the mechanism to evict the
cache whenever the Backend settings affecting the conversion, that
is default font and resolution, change.

In order to implement the eviction we can use a "serial"; the
Backend will have an internal serial field which we retrieve and
put inside the ClutterUnits structure (we split one of the two
64 bit padding fields into two 32 bit fields to maintain ABI); every
time we call clutter_units_to_pixels() we compare the units serial
with that of the Backend; if they match and pixels_set is set to
TRUE then we just return the stored pixels value. If the serials
do not match then we unset the pixels_set flag and recompute the
pixels value.

We can verify this by adding a simple test unit checking that
by changing the resolution of ClutterBackend we get different
pixel values for 1 em.

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

14 years agotext: Notify :position when it changes
Emmanuele Bassi [Fri, 16 Oct 2009 13:22:15 +0000 (14:22 +0100)]
text: Notify :position when it changes

The :position property is not notified when changed.

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

14 years ago[text] NULL-ify strings to avoid double-frees
Emmanuele Bassi [Sat, 19 Sep 2009 08:19:06 +0000 (09:19 +0100)]
[text] NULL-ify strings to avoid double-frees

14 years ago[text] Do not apply unset preedit attributes
Emmanuele Bassi [Sat, 19 Sep 2009 08:18:06 +0000 (09:18 +0100)]
[text] Do not apply unset preedit attributes

The pre-edit attributes are optional and thus should only be applied
if they have been set to avoid assertion failures.

14 years ago[text] Add pre-edit string to ClutterText
Emmanuele Bassi [Wed, 9 Sep 2009 11:15:23 +0000 (12:15 +0100)]
[text] Add pre-edit string to ClutterText

Input Methods require to be able to set a "pre-edit string", that is
a string that it's just displayed into the Text actor without being
committed to the actor's buffer. The string might require custom Pango
attributes, and an update of the cursor position.

14 years ago[build] fix Makefile.am.{enums,marshal} to support out of tree builds
Robert Bragg [Thu, 15 Oct 2009 18:12:34 +0000 (19:12 +0100)]
[build] fix Makefile.am.{enums,marshal} to support out of tree builds

Out of tree builds were broken in commit 46b736f42e1165 since we didn't
explicitly use $(srcdir) to find the input files for glib-mkenums and
glib-genmarshal.

14 years agolayout, docs: Fix description of Bin properties
Emmanuele Bassi [Thu, 15 Oct 2009 13:20:44 +0000 (14:20 +0100)]
layout, docs: Fix description of Bin properties

The BinLayer and BinLayout properties name and blurb for introspection
should be slightly more descriptive.

14 years agolayout, bin: Use ceilf() instead of casting to int
Emmanuele Bassi [Thu, 15 Oct 2009 13:12:37 +0000 (14:12 +0100)]
layout, bin: Use ceilf() instead of casting to int

Casting a float to int to truncate it before assigning the value
to a float again is wrong. We should use ceilf() instead which
does what we want to achieve (rounding up the size to avoid
sub-pixel positioning of children).

14 years agolayout, docs: Add long description for FlowLayout
Emmanuele Bassi [Thu, 15 Oct 2009 13:11:36 +0000 (14:11 +0100)]
layout, docs: Add long description for FlowLayout

Add the full description of the layout policy

14 years agolayout, box: Clean up
Emmanuele Bassi [Thu, 15 Oct 2009 11:15:49 +0000 (12:15 +0100)]
layout, box: Clean up

* Use g_list_foreach() instead of iterating over the list inside
  the destruction sequence, since we are causing the widgets to be
  implicitly removed from the list via the destroy() call.

* Use g_signal_connect_swapped() and spare us from a callback.

14 years agolayout, box: Write long description for Box
Emmanuele Bassi [Thu, 15 Oct 2009 11:04:50 +0000 (12:04 +0100)]
layout, box: Write long description for Box

Also have an example of how to create a Box with a layout manager
and how to use the pack() method.

14 years agolayout, docs: Remove unused functions
Emmanuele Bassi [Tue, 13 Oct 2009 15:52:57 +0000 (16:52 +0100)]
layout, docs: Remove unused functions

The :wrap property and its accessor functions were removed from
ClutterFlowLayout.

14 years agolayout: Document BoxLayout
Emmanuele Bassi [Tue, 13 Oct 2009 11:15:25 +0000 (12:15 +0100)]
layout: Document BoxLayout

Add BoxLayout to the API reference.

14 years agolayout: Add BoxLayout, a single line layout manager
Emmanuele Bassi [Tue, 13 Oct 2009 11:14:05 +0000 (12:14 +0100)]
layout: Add BoxLayout, a single line layout manager

The BoxLayout layout manager implements a layout policy for arranging
children on a single line, either alongside the X axis or alongside the
Y axis.

14 years agolayout: Report the correct size of FlowLayout
Emmanuele Bassi [Thu, 8 Oct 2009 14:45:29 +0000 (15:45 +0100)]
layout: Report the correct size of FlowLayout

FlowLayout should compute the correct height for the assigned width when
in horizontal flow, and the correct width for the assigned height when
in vertical flow. This means pre-computing the number of lines inside
the get_preferred_width() and get_preferred_height(). We can then cache
the computed column width and row height, cache them inside the layout
and then use them when allocating the children.

14 years agolayout: Resizing the stage resizes the FlowLayout box
Emmanuele Bassi [Wed, 7 Oct 2009 14:30:29 +0000 (15:30 +0100)]
layout: Resizing the stage resizes the FlowLayout box

Add some user interaction to verify the dynamic reflowing.

14 years agolayout: Use the get_request_mode() getter in BinLayout
Emmanuele Bassi [Wed, 7 Oct 2009 14:29:47 +0000 (15:29 +0100)]
layout: Use the get_request_mode() getter in BinLayout

Instead of using g_object_get(child, "request-mode", ...).

14 years agolayout: Change the request-mode along with the orientation
Emmanuele Bassi [Wed, 7 Oct 2009 14:28:01 +0000 (15:28 +0100)]
layout: Change the request-mode along with the orientation

When changing the orientation of a FlowLayout, the associated
container should also change its request mode. A horizontally
flowing layout has a height depending on the width, since it
will reflow vertically; similarly, a vertically reflowing layout
will have a width depending on the height.

14 years agoactor: Add set_request_mode() method
Emmanuele Bassi [Wed, 7 Oct 2009 14:15:02 +0000 (15:15 +0100)]
actor: Add set_request_mode() method

We should not require the use g_object_set()/_get() for accessing
the :request-mode property. A proper accessors pair should be
preferred.

14 years ago[layout] Remove FlowLayout:wrap
Emmanuele Bassi [Wed, 7 Oct 2009 11:35:39 +0000 (12:35 +0100)]
[layout] Remove FlowLayout:wrap

The :wrap property is not implemented, and mostly useless: the
FlowLayout is a reflowing grid. This means that if it receives
less than the preferred width or height in the flow direction
then it should always reflow.

14 years ago[layout] Rename BinLayout and FlowLayout interactive tests
Emmanuele Bassi [Wed, 7 Oct 2009 10:42:09 +0000 (11:42 +0100)]
[layout] Rename BinLayout and FlowLayout interactive tests

The BinLayout and FlowLayout interactive tests should be named more
explicitly.

14 years ago[layout] Skip invisible children in FlowLayout
Emmanuele Bassi [Wed, 7 Oct 2009 10:39:18 +0000 (11:39 +0100)]
[layout] Skip invisible children in FlowLayout

Skip hidden actors when computing the preferred size and when
allocating.

14 years ago[layout] Clean up and document FlowLayout
Emmanuele Bassi [Wed, 7 Oct 2009 10:08:51 +0000 (11:08 +0100)]
[layout] Clean up and document FlowLayout

14 years ago[layout] Snap children of FlowLayout to column/row
Emmanuele Bassi [Tue, 6 Oct 2009 16:30:49 +0000 (17:30 +0100)]
[layout] Snap children of FlowLayout to column/row

Use the column and row size to align each child; with :homogeneous
set to TRUE, or with children with the same size, the FlowLayout
will behave like a reflowing grid.

14 years ago[layout] Add :homogeneous to FlowLayout
Emmanuele Bassi [Tue, 6 Oct 2009 15:17:16 +0000 (16:17 +0100)]
[layout] Add :homogeneous to FlowLayout

14 years ago[layout] Initial implementation of FlowLayout
Emmanuele Bassi [Fri, 18 Sep 2009 16:28:02 +0000 (17:28 +0100)]
[layout] Initial implementation of FlowLayout

FlowLayout is a layout manager that arranges its children in a
reflowing line; the orientation controls the major axis for the
layout: horizontal, for reflow on the Y axis, and vertical, for
reflow on the X axis.

14 years ago[layout] Use FixedLayout inside Group
Emmanuele Bassi [Mon, 5 Oct 2009 16:21:41 +0000 (17:21 +0100)]
[layout] Use FixedLayout inside Group

The Group actor should use the FixedLayout layout manager object
to avoid duplicating code.

14 years ago[layout] Update FixedLayout
Emmanuele Bassi [Mon, 5 Oct 2009 16:09:04 +0000 (17:09 +0100)]
[layout] Update FixedLayout

The behaviour of ClutterGroup has been fixed with regards to the
preferred size request; the fixed layout manager should use the
same behaviour.