1
0
Fork 0
Commit graph

1136 commits

Author SHA1 Message Date
Emmanuele Bassi
0bf5008159 interactive/snap-constaint: Modernize code 2012-04-12 17:08:33 +01:00
Emmanuele Bassi
612b714149 interactive/stage-sizing: Clean up 2012-04-10 12:12:28 +01:00
Emmanuele Bassi
656c641d31 interactive/bin-layout: Call save/restore easing state
Don't do unprotected calls to set_easing_mode() and
set_easing_duration().
2012-03-29 15:12:09 +01:00
Emmanuele Bassi
499534f3ac actor: Make :content-gravity animatable
Let's start making some non-trivial property animatable, like the
content gravity.
2012-03-29 15:11:52 +01:00
Emmanuele Bassi
39ddf9c542 interactive/animation: Use implicit animations instead of animate()
Also, nest animations.
2012-03-28 13:01:17 +01:00
Emmanuele Bassi
2355b57aab interactive/transitions: Jump to middle-click coordinates
Middle click will update an existing transition while in flight, and
skip it.
2012-03-28 12:46:30 +01:00
Emmanuele Bassi
0f7dab15d8 interactive/transitions: Add missing easing state save/restore
The test hasn't been updated after commit 229241b8, and was trying to
change the easing state without creating one.
2012-03-28 11:49:53 +01:00
Neil Roberts
c9a81f035e Don't use any GL types or defines in Clutter
Some of the Clutter code was using GL types for the primitive types
such as GLint and GLubyte and then passing these to Cogl. This doesn't
make much sense because the Cogl functions directly take native C
types. This patch just replaces them with either a native C type or a
glib type.

Some of the cogl conformance tests are trying to directly call GL for
example to test creating a foreign texture. These tests have been
changed to manually define the GL enum values instead of relying on a
GL header to define them.

This is necessary because Cogl may soon stop including a GL header
from its public headers.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 17:24:42 +00:00
Emmanuele Bassi
40365a1f18 interactive/scrolling: Use the implicit animation API 2012-03-21 13:36:44 +00:00
Emmanuele Bassi
6a502f7104 conform: Set harsher environment for running tests
Set the MALLOC_CHECK_ and MALLOC_PERTURB_ environment variables to catch
allocation issues.
2012-03-20 16:19:23 +00:00
Emmanuele Bassi
767b14fb2d conform/anchors: Fix a dubious test
Changing the scale gravity should not affect the scale factors as well;
it was just a side-effect of the wrong implementation of the setter.
2012-03-19 14:47:55 +00:00
Emmanuele Bassi
de32ba1ddf interactive/image-box: Clarify the label contents 2012-03-16 15:05:42 +00:00
Emmanuele Bassi
ae554a5061 Rename 'bilinear' scaling filter to 'trilinear'
Yes, it's not really the proper GL name for a linear-on-every-axis of a
texture plus linear-between-mipmap-levels minification filter, but it
has three redeeming qualities as a name:

  - LINEAR_MIPMAP_LINEAR sucks, as it introduces GL concepts like
    mipmaps in the API naming, while we're trying to avoid that;
  - people using GL already know what 'trilinear' means in this context
    without going all Khronos on their asses;
  - we're using 2D textures anyway, so 'linear on two axes and linear
    between mipmap levels' can be effectively approximated to
    'trilinear'.

I mean, if even the OpenGL official wiki says:

  Unfortunately, what most people think of as "trilinear" is not linear
  filtering of a 3D texture, but what in OpenGL terms is GL_LINEAR mag
  filter and GL_LINEAR_MIPMAP_LINEAR in the min filter in a 2D texture.
  That is, it is bilinear filtering of each appropriate mipmap level,
  and doing a third linear filter between the adjacent mipmap levels.
  Hence the term "trilinear".
                -- http://www.opengl.org/wiki/Texture

then the horse has already been flogged to death, and I don't intend to
be accused of necrophilia and sadism by flogging it some more.

Prior art: every single GL tutorial in the history of ever;
CoreAnimation's scaling filter enumerations.

If people want to start using 1D or 3D textures they they are probably
going to be using Cogl API directly, and that has the GL naming scheme
for minification and magnification filters anyway.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
90784a025a interactive/image-box: Remove unneeded stuff 2012-03-16 12:33:39 +00:00
Emmanuele Bassi
10e2f551f5 actor: Unconditionally emit ::paint
It's a bit late in the game for changing the emission of the paint
signal with actors that use paint nodes - mostly because we have both
implicit paint nodes (background color, content) and explicit paint
nodes (the paint_node virtual).

When we branch for 1.12 we can revert this change.
2012-03-16 12:33:39 +00:00
Emmanuele Bassi
9845ce9d89 actor: Fix RESIZE_ASPECT mode for the content box 2012-03-16 12:33:38 +00:00
Emmanuele Bassi
1b4bfb04e5 interactive/image-box: Add a pure Image test, suitable for docs 2012-03-16 12:33:38 +00:00
Emmanuele Bassi
6c181b96e9 interactive/image: Test ClutterImage
Load up the image content using a GdkPixbuf; this means that the test is
not compiled when --disable-gdk-pixbuf is passed.
2012-03-16 12:33:38 +00:00
Emmanuele Bassi
23fad8589c interactive/canvas: Set the scaling filters 2012-03-16 12:33:38 +00:00
Emmanuele Bassi
0eeb61f3a8 canvas: Add canvas size to the ::draw signal
Instead of requiring a call to clutter_content_get_preferred_size(), we
can simply pass the canvas size to the Canvas::draw signal.
2012-03-16 12:33:37 +00:00
Emmanuele Bassi
07bb35bbe3 Add ClutterCanvas, a drawing content 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
74765404dd conform: Skip actor-offscreen-redirect
Until we figure out a way to make it succeed even without the paint
signal emission.
2012-03-16 12:33:37 +00:00
Emmanuele Bassi
485b720a54 conform/text-cache: Use the stage paint signal
The stage's paint signal is guaranteed to be emitted; ClutterText's
paint signal is not.
2012-03-16 12:33:37 +00:00
Emmanuele Bassi
ff7eb6c0a9 interactive/content: Define the size of the text geometry
So that Clutter can decide whether or not to clip the text properly.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
be4746b15f Add ClutterContent
ClutterContent is an interface for creating delegate objects that handle
what an actor is going to paint.

Since they are a newly added type, they only hook into the new PaintNode
based API.

The position and size of the content is controlled in part by the
content's own preferred size, and by the ClutterContentGravity
enumeration.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
fa9be0ba73 interactive/texture-async: Use implicit animations 2012-03-15 17:42:42 +00:00
Emmanuele Bassi
303ebaea88 interactive/bin-layout: Use implicit animations 2012-03-15 17:01:13 +00:00
Emmanuele Bassi
389ee45747 interactive/actor: Do not use clutter_actor_animate()
Use implicit animations instead.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
cb8dea0379 interactive/transitions: An easing demo without animate()
Use the newly added implicit animations support in ClutterActor.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
de90be9586 build: Remove maintainer flags from test build
Part of the test infrastructure relies on relaxed build conditions, so
there's no point to enforce the anal retentive maintainer flags.
2012-03-07 12:36:43 +00:00
Emmanuele Bassi
4db4471528 interactive/text-field: Use :background-color
Instead of a custom paint signal handler.
2012-03-06 15:10:04 +00:00
Emmanuele Bassi
7646404196 script: Support translatable strings for properties
ClutterScript should be able to automatically call gettext() and friends
on strings loaded from a UI definition, prior to passing the string to
the object it is constructing.

The basic implementation is trivial:

  - set a translation domain on the ClutterScript instance
  - mark the translatable strings inside the JSON data, like:

      "property" : {
        "translatable" : true,
        "string" : "a translatable string"
      }

The hard part is now getting the tools we use to extract the
translatable strings to understand the JSON format we use inside
ClutterScript.
2012-03-06 14:23:33 +00:00
Neil Roberts
762e0de2c6 tests: Remove test-cogl-pixel-buffer
This has been converted to a Cogl-based test in the cogl source tree
so there is no need to maintain it here anymore.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 19:45:10 +00:00
Emmanuele Bassi
7d64693de2 conformance/invariants: Test that visibility is not recursive
The show and hide methods should not recurse; that is the job of
show_all and hide_all, which are deprecated.
2012-03-05 17:45:23 +00:00
Emmanuele Bassi
add274c447 conform/actor-invariants: Add tests for show-on-set-parent
The show-on-set-parent flag is mental, but it needs to be tested better
than just checking for it always been set to TRUE.
2012-03-05 17:27:37 +00:00
Neil Roberts
b0fc4c1dff Remove test-wayland-surface
In a separate branch, this test has become quite complicated and
involves multiple files and its own configure options. Instead of
cluttering up the clutter source tree it has now been moved to its own
repo at:

 http://github.com/clutter-project/test-wayland-surface

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:50 +00:00
Emmanuele Bassi
3f5d63b522 interactive/actor: Add margin usage example 2012-02-29 15:20:58 +00:00
Emmanuele Bassi
a22d7ac1b5 interactive: Remove test-shader
ClutterShader is deprecated, and we already have various tests for the
shader API, both for Cogl and for ClutterShaderEffect.
2012-02-29 09:27:01 +00:00
Emmanuele Bassi
f292550d06 interactive: Remove test-fullscreen
The stage state test also has a fullscreen option, and it's a better
test all around.
2012-02-29 09:25:51 +00:00
Emmanuele Bassi
caf759f72f interactive: Remove test-actor-clone
Another clone of the venerable test-actors - but test-actor already uses
ClutterClone, so there's really little point in it.
2012-02-29 09:24:34 +00:00
Emmanuele Bassi
bd2f5d0e38 interactive: Remove test-behave
ClutterBehaviour and friends are deprecated, there's no point in having
an interactive test, and it may be misleading.
2012-02-29 09:23:40 +00:00
Emmanuele Bassi
4e6ff76a77 conformance: Clean up
Remove the last inconsistent bits.
2012-02-27 13:08:31 +00:00
Emmanuele Bassi
60e2f8ed5b conformance: Rename the source files
It's the conformance test suite: there's no need to namespace the files,
just like there's no need to namespace the units.

This commit does not change the Cogl tests: they will be moved to Cogl
over time, and it's easier to do if we leave them as they are.
2012-02-27 13:02:01 +00:00
Emmanuele Bassi
d16f2ac3b5 conform: Clean up test names
Drop the 'test-' prefix: it's the conformance test suite, we know it's
full of tests.
2012-02-27 12:54:23 +00:00
Robert Bragg
a8e631543e Reduce our internal dependence on the Cogl 1.x api
Since Cogl has started restricting what cogl 1.x api is exposed when
COGL_ENABLE_EXPERIMENTAL_2_0_API is defined and since we build all
Clutter internals with COGL_ENABLE_EXPERIMENTAL_2_0_API defined this
patch makes a first pass at reducing our internal use of the Cogl 1.x
api.

The most notable api that's no longer exposed to us internally is
the cogl_material_ api so this switches all Clutter internals to use the
cogl_pipeline_ api instead. This patch also makes quite a bit of
progress removing internal uses of CoglHandle although there is still
more to go.
2012-02-21 17:46:11 +00:00
Robert Bragg
eff95eba4a Pass context to cogl_texture_pixmap_x11_new() api
The experimental cogl_texture_pixmap_x11_new() api was recently changed
to take an explicit context argument and return a GError on failures.
This updates Clutter's use of the api accordingly.
2012-02-21 17:46:11 +00:00
Emmanuele Bassi
f97ffe544f interactive/layout: Update to modern API
No need to override Container. Actually, no need to use the Container
API at all. This also removes a bunch of leaks.
2012-02-15 17:03:03 +00:00
Emmanuele Bassi
c62b69bb14 conform/invariants: Clean up
Use modern API, and add a minimal check that hiding an actor will cause
it to unmap.
2012-02-15 13:45:08 +00:00
Emmanuele Bassi
553f446315 interactive/actor: Add more animations
Rotation along the Y axis and depth change.
2012-02-14 16:50:52 +00:00
Emmanuele Bassi
c44ffb02f5 interactive/actor: Use a BoxLayout
As it was intended.
2012-02-14 16:01:21 +00:00
Neil Roberts
0f04a1cd11 tests: Remove conformance tests that have been ported to Cogl
A lot of the conformance tests that were just testing Cogl
functionality have been ported to be standalone Cogl tests in the Cogl
source tree. This patch removes those from Clutter so we don't have to
maintain them in two places.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Emmanuele Bassi
83119966a4 interactive/depth: Drop deprecated API 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
5b17b4e41b interactive/*: Update the API usage
Drop some deprecated methods.
2012-02-13 17:30:22 +00:00
Emmanuele Bassi
8ba0351c7a conform/actor: Add unit for the Container signals
ClutterActor should be emitting signals defined on the ClutterContainer
interface, as well as ensuring that manipulating the scene graph is
still possible from within them.

The new unit checks that we're emitting signals, by implementing
something similar to the Bin class available in toolkits like gtk, st,
and mx — i.e. a container that can only hold one child at any given
point.
2012-02-09 16:48:08 +00:00
Robert Bragg
bace07c0a0 Updates use of Cogl in line with api changes
Some of Cogl's experimental apis have changed so that the buffer apis
now need to be passed a context argument and some drawing apis have been
replaced with cogl_framebuffer_ drawing apis that take explicit
framebuffer and pipeline arguments.

These changes were made as part of Cogl moving towards a more stateless
api that doesn't rely on a global context.

This patch updates Clutter to work with the latest Cogl api and bumps
the required Cogl version to 1.9.5.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-02-09 16:34:25 +00:00
Emmanuele Bassi
0c715d0026 conform/actor-graph: Add more cases
The actor-insert unit is not exercising the whole API and its allowed
arguments; this let sneak in the buglet found in bug 669730.
2012-02-09 14:22:31 +00:00
Emmanuele Bassi
1d55af9dfa interactive/text-field: Modernize 2012-02-07 11:30:43 +00:00
Emmanuele Bassi
ad62075378 interactive/actor: Show event and animation API 2012-02-02 14:07:38 +00:00
Emmanuele Bassi
58ffcfb10e actor: Add ClutterActorIter
Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
9d355f12c6 conform: Avoid a deadlock
Something is causing a deadlock when using clutter_threads_* API inside
the offscreen redirect conformance test. The conformance tests are
pretty insane anyway, so for the time being, let's put g_timeout_add()
back in while we figure out the issue.
2012-01-27 11:42:33 +00:00
Emmanuele Bassi
ccc70a911d tests: Update to use the symbolic button names
https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:47:25 +00:00
Emmanuele Bassi
9206bd7627 tests/*: Use symbolic constants for sources and events
And make sure to use clutter_threads_add_* instead of the bare
g_*_add().
2012-01-25 23:20:25 +00:00
Emmanuele Bassi
f5de10c05f interactive/actors: Update the venerable test-actors 2012-01-23 20:54:06 +00:00
Emmanuele Bassi
7dd06de6d5 interactive: Drop more deprecated classes 2012-01-17 16:54:30 +00:00
Emmanuele Bassi
8f1575b970 interactive: Use ClutterActor instead of deprecated classes 2012-01-17 16:21:55 +00:00
Emmanuele Bassi
8492b17ae2 conform/actor-size: Do not use Rectangle
Use ClutterActor directly, instead.
2012-01-17 16:21:55 +00:00
Emmanuele Bassi
40b023a33e interactive/text: Remove spurious g_object_unref() 2012-01-17 14:29:44 +00:00
Stef Walter
c073764369 text: Implement ClutterTextBuffer
* Abstracts the buffer for text in ClutterText
 * Allows implementation of undo/redo.
 * Allows use of non-pageable memory for text
   in the case of sensitive passwords.
 * Implement a test with two ClutterText using the same
   buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=652653
2012-01-17 14:29:44 +00:00
Emmanuele Bassi
9a66392d49 actor: Add new methods for changing the paint sequence
ClutterActor provides four methods for changing the paint sequence order
of its children:

  raise_top()
  raise()
  lower()
  lower_bottom()

The first and last one being just wrappers around raise() and lower(),
respectively. These methods have various issues: they omit the parent,
preferring to retrieve it from the actor passed as the first argument;
this does not match the new style of API introduced to operate on the
list of children of an actor.

Additionally, the raise() and lower() methods of ClutterActor call into
the Container interface, and are not really aptly named (raise() in
particular collides with the completely unrelated 'raise' keyword in
Python, and usually needs to be wrapped in order to be used at all).

Furthermore, we need public methods that Container can call from its
default implementation, as well as methods to port current Container
implementations.

Finally, since we have insert_child_at_index(), we should also have an
equivalent set_child_at_index() as well.
2012-01-16 23:37:13 +00:00
Emmanuele Bassi
b42f17b2dc tests/interactive: Add a simple test for Actor
It's meant to be xincluded in the API reference.
2012-01-16 23:37:12 +00:00
Emmanuele Bassi
f61916fc5e actor: Add remove_all_children()
A simple method for removing all children of an actor in one fell swoop.
2012-01-16 23:37:11 +00:00
Emmanuele Bassi
4f470b9231 actor: Provide a proper implementation of replace_child()
The correct sequence of actions should be remove(old) → insert(new), not
insert(new) → remove(old). We can implement a simple delegate insertion
functions to insert the new child between the previous and next siblings
of the old child.

While we're at it, let's also add a unit test for replace_child().
2012-01-16 23:37:11 +00:00
Emmanuele Bassi
f2015baeb7 conform/actor-graph: Add lower/raise units
Check that the lower_bottom(), lower(), raise(), and raise_top()
methods work as intended.
2012-01-16 23:37:10 +00:00
Emmanuele Bassi
419a6a38f2 conform: Add a suite for the Actor scene graph API
Verify that insertion and removal maintain a stable graph, with pointers
to the various children. This should help out tracking regressions in
the scene graph API.
2012-01-16 23:37:10 +00:00
Emmanuele Bassi
7fd35edd3f actor: Make Actor instantiatable
ClutterActor now has all the API and capabilities for being a concrete
class:

  - layout management, through delegation
  - container implementation and API
  - background color

This means that a simple scene can be built straight out of actors
without using subclasses except for the Stage.

This is the first step towards the deprecation of most of the Actor
subclasses provided by Clutter.
2012-01-16 23:35:16 +00:00
Emmanuele Bassi
7195d0fccf flow-layout: Fix minimum size request
The minimum preferred size of a Flow layout manager is the size of a
column or a row, as the whole point of the layout policy enforced by
the Flow layout manager is to reflow when needed.
2012-01-16 23:35:16 +00:00
Emmanuele Bassi
24a451b388 conform/layout: Remove last Container.add_actor() usage
Use clutter_actor_add_child(), now that Stage falls back to the default
implementation of Container provided by the Actor class.
2012-01-16 23:35:15 +00:00
Emmanuele Bassi
ef3dc2d1ba actor: Make Actor.add_child and Container.add_actor idempotent
And make sure that overriding Container and calling
clutter_actor_add_child() will result in the same sequence of operations
as the current set_parent()+queue_relayout()+signal_emit pattern.

Existing containers can continue using:

        clutter_actor_set_parent (child, CLUTTER_ACTOR (container));
        clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
        g_signal_emit_by_name (container, "actor-added", child);

and newly written containers overriding Container.add() can simply call:

        clutter_actor_add_child (CLUTTER_ACTOR (container), child);

instead.
2012-01-16 23:35:15 +00:00
Emmanuele Bassi
8c2118542c conform: Begin a test suite for layout options
A simple sampling check to validate that we're painting the right thing
at the right place.
2012-01-16 23:35:14 +00:00
Emmanuele Bassi
20b9ec8c6b build: Disable deprecation warnings in tests/accessibility
Like we do in the other tests/ sections.
2011-12-09 16:23:44 +00:00
Emmanuele Bassi
9e3a8a678e build: Disable deprecation warnings in tests/micro-bench 2011-12-09 16:23:35 +00:00
Emmanuele Bassi
bedf1664a7 build: Disable deprecation warnings in tests/performance 2011-12-09 16:23:20 +00:00
Robert Bragg
e5bde0b074 tests: Adds a simple wayland compositor example
This adds an extremely minimal wayland compositor to tests/interactive
to test the ClutterWaylandSurface actor. Currently this minimal
compositor doesn't support any input, it simply paints client surfaces
fixed at the top-left of the stage.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Chun-wei Fan
075ab0cbe6 conform/Makefile.am: Update Win32 test .bat name
Rename to test-conformance-clutter.bat to make the file name clearer to
users
2011-12-07 18:14:17 +08:00
Emmanuele Bassi
3f4bd0d9d4 conform: Add markers parsing to the timeline unit
We should check that the newly added custom parser for timeline
markers is working as intended.
2011-11-27 12:19:40 +00:00
Emmanuele Bassi
a13b095dc2 build: Fix distcheck 2011-11-22 13:53:08 +00:00
Emmanuele Bassi
a24ff882b6 conform: Bail out GLSL-based tests
If we don't have GLSL support on the platform.
2011-11-22 01:01:37 +00:00
Emmanuele Bassi
ecdb12ecc3 conform/cogl-pixel-buffer: Remove unused variable 2011-11-18 17:23:56 +00:00
Rico Tzschichholz
225820c4b4 Fix 'make dist' 2011-11-18 18:08:01 +01:00
Rico Tzschichholz
516b5de756 tests: Remove some trailing spaces 2011-11-18 17:38:45 +01:00
Emmanuele Bassi
73e7404652 build: Clean up the VS build rules
Some minor cleanups of the Visual Studio rules in the interactive and
conformance test suites.
2011-11-18 15:12:45 +00:00
Rico Tzschichholz
b62216955f build: Make sure test-unit-names.h is generated 2011-11-18 13:39:06 +01:00
Chun-wei Fan
a69c4fdc59 Merge branch 'master' into msvc-support-master 2011-11-17 22:17:01 +08:00
Emmanuele Bassi
ef02de19e8 interactive: Remove test-model
The model API is already tested in the conformance test suite.
2011-11-16 15:05:18 +00:00
Emmanuele Bassi
15000307fd interactive: Remove test-unproject
The coordinate transformation code is exercised throughout the
conformance and interactive tests, so there's no need to have a specific
interactive test that doesn't do anything more complicated than calling
clutter_actor_transform_stage_point().
2011-11-16 13:59:11 +00:00
Chun-wei Fan
2a54db4557 test-picking.c: Use G_PI rather than M_PI
M_PI is not universally available...
2011-11-15 16:29:35 +08:00
Chun-wei Fan
2a86ecc4b9 Update interactive/conformance .bat names
Add a -clutter suffix to avoid confustion with others, such as COGL.
2011-11-15 16:19:06 +08:00
Chun-wei Fan
96d4e527ea Merge branch 'master' into msvc-support-master 2011-11-14 22:57:50 +08:00
Chun-wei Fan
1b7249a247 Merge branch 'master' into msvc-support-master 2011-11-14 11:40:49 +08:00
Emmanuele Bassi
5903fcc36d performance/*: Do not use clutter_stage_get_default() 2011-11-10 15:37:51 +00:00
Emmanuele Bassi
7c180a0742 interactive/*: Do not use clutter_stage_get_default() 2011-11-10 15:37:50 +00:00
Emmanuele Bassi
6ed879b84c Merge with a11y 2011-11-10 15:37:50 +00:00
Emmanuele Bassi
93eb0bfe32 micro-bench/*: Do not use clutter_stage_get_default() 2011-11-10 15:37:50 +00:00
Emmanuele Bassi
a5522b707e accessibility/*: Do not use clutter_stage_get_default() 2011-11-10 15:37:50 +00:00
Emmanuele Bassi
deba576dd1 conform/*: Do not use clutter_stage_get_default()
Use the correct stage creation/destruction API.
2011-11-10 15:37:50 +00:00
Emmanuele Bassi
e374c2bd89 conform/color: Check invalid strings
We need to make sure to fail consistently for invalid strings.
2011-11-10 14:15:32 +00:00
Emmanuele Bassi
889a1f44f4 conform/color: Test hsla() format 2011-11-10 12:57:34 +00:00
Chun-wei Fan
63dbcc245c Merge branch 'master' into msvc-support-master 2011-11-09 00:30:32 +08:00
Emmanuele Bassi
101f39ea92 Replace usage of [sg]et_geometry()
The set_geometry() and get_geometry() methods are going to be
deprecated.
2011-11-08 14:46:16 +00:00
Chun-wei Fan
bb9e452a36 Merge branch 'master' into msvc-support-master 2011-11-07 11:42:16 +08:00
Emmanuele Bassi
53513f8586 tests: Remove #undef CLUTTER_DISABLE_DEPRECATED
We need to test deprecated API as well, and we don't use a guard any
more in the build.
2011-11-03 15:35:03 +00:00
Emmanuele Bassi
c4e6f74f29 interactive/pixmap: Make sure to work only on the X11 backend
Even if the test has been successfully compiled against the X11 backend,
we need to ensure that it is actually running against it, otherwise bad
things will happen.
2011-11-03 13:45:21 +00:00
Emmanuele Bassi
3b38cee66b interactive/devices: Build unconditionally
The test-devices interactive test does not rely on the X11 API being
present any more, after the introduction of the device manager API.
2011-11-03 13:45:21 +00:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Giovanni Campagna
610a9c17ba Add a new GDK backend
This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:42:13 +00:00
Chun-wei Fan
fedca055e9 Revert "Revert "Deprecate clutter_threads_init()""
This reverts commit 5419c11c99.

This is another part to attempt to investigate on error 0xC0000264
on Windows
2011-10-21 17:44:27 +08:00
Chun-wei Fan
098a83af9e test-[interactive/conformance].bat: Update .exe name 2011-10-20 17:26:55 +08:00
Chun-wei Fan
a36ab5787b Rename conform/interactive tests VS projects
Add a -clutter suffix for their project names to avoid clashes with the
COGL test executables
2011-10-20 16:35:38 +08:00
Chun-wei Fan
d6af2e54c8 Merge branch 'master' into msvc-support-master 2011-10-20 15:41:46 +08:00
Chun-wei Fan
5419c11c99 Revert "Deprecate clutter_threads_init()"
This reverts commit 7e3a75c66b.

Conflicts:

	clutter/clutter-main.c
	clutter/clutter-main.h
2011-10-20 15:17:25 +08:00
Neil Roberts
b240b95a97 tests: Use the portable cogl wrappers for GLSL builtins
Instead of directly using the GLSL names for the builtins in the
shaders for test-shader and test-pick, this makes it use the Cogl
wrapper names instead. That way it will be portable to GLES2 as well.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-10-19 13:50:48 +01:00
Chun-wei Fan
b1780711f7 Merge branch 'master' into msvc-support-master 2011-10-17 15:52:57 +08:00
Emmanuele Bassi
f75dfcfd8b interactive: Use the newly added CLUTTER_ALIGN_BOTH value
We center a lot of stuff using ClutterAlignConstraints.
2011-10-15 18:36:27 +01:00
Emmanuele Bassi
96cb1d7128 Disable deprecation warnings for the test suite
We test deprecated functionality as well as current one, so we need to
enable all symbols and disable the deprecation warnings.
2011-10-13 17:50:25 +01:00
Emmanuele Bassi
c58baf42ca interactive/threads: Clean up
Add some comments explaining why we use idle handlers to update the UI,
and update to the newest API in GLib master.
2011-10-13 10:38:36 +01:00
Emmanuele Bassi
9901a06a1f tests: Fix some compiler warnings 2011-10-12 09:57:53 +01:00
Emmanuele Bassi
9e61cfcf38 tests: Disable deprecation warnings 2011-10-12 09:57:33 +01:00
Chun-wei Fan
bd991e625b Merge branch 'master' into msvc-support-master 2011-10-12 14:37:19 +08:00
Emmanuele Bassi
29a16980fe interactive/threads: Use G_PRIVATE_INIT
Though strictly not necessary, we should be using the proper init macro
for GPrivate.
2011-10-12 00:22:04 +01:00
Emmanuele Bassi
57f54173ec interactive/threads: Fix up after deprecations
The GThread API has undergone a massive restructuring, and the fallout
is still being processed.
2011-10-11 17:52:17 +01:00
Chun-wei Fan
1cf7128540 Merge branch 'master' into msvc-support-master 2011-10-11 17:19:45 +08:00
Emmanuele Bassi
33846dcf4d Deprecate clutter_redraw()
It's just a badly named proxy to clutter_stage_ensure_redraw().
2011-10-10 15:48:43 +01:00
Emmanuele Bassi
7e3a75c66b Deprecate clutter_threads_init()
GLib deprecated g_thread_init(), and threading support is initialized
by GObject, so Clutter already runs with threading support enabled. We
can drop the clutter_threads_init() call requirement, and initialize the
Big Clutter Lock™ on clutter_init(). This reduces the things that have
to be done when dealing with threads with Clutter, and the things that
can possibly go wrong.
2011-10-07 15:57:32 +01:00
Emmanuele Bassi
3690ddc4a0 Drop g_thread_init()
It's not necessary any more, and it has been deprecated.
2011-10-07 15:10:37 +01:00
Chun-wei Fan
a9771b596f Update Visual C++ support
-tests/interactive/Makefile.am, build/win32/Makefile.am: copy the
 generated test-unit-names.h to build/win32 so that it can be
 distributed in "make dist" (maybe we could dist the generated header
 in tests/interactive directly?)
-Update test-interactive Visual C++ projects to include build/win32 in
 the list of folders to look for headers
2011-10-06 13:00:26 +08:00
Chun-wei Fan
b55656b698 Merge branch 'master' into msvc-support-master 2011-10-06 12:04:30 +08:00
Neil Roberts
3372a0233e Add a conformance test for ClutterShaderEffect
This adds a simple conformance test which sets up a few shader effects
using both the old style with clutter_shader_effect_set_source and the
new style by overriding get_static_shader_source. The effects are then
verified to confirm that they drew the right pixel colour.

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

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-09-30 11:51:38 +01:00
Emmanuele Bassi
e058cd4c5f Pass the remaining args to the executed interactive unit
We only support running one interactive test at a time; everything after
the unit name is to be considered an argument to the actual unit.
2011-09-29 14:01:03 +01:00
Chun-wei Fan
f0dfd8ab07 Merge branch 'master' into msvc-support-master
Conflicts:
	tests/interactive/Makefile.am
2011-09-29 16:33:02 +08:00
Emmanuele Bassi
ac8e174eca tests/interactive: Add some descriptions 2011-09-28 15:18:21 +01:00
Emmanuele Bassi
5fc953cb5e test-textures -> test-texture-slicing
The unit is supposed to be testing the slicing support in CoglTexture.
2011-09-28 15:18:21 +01:00
Emmanuele Bassi
d640c56cef test-interactive: Allow querying the interactive test for a description
It would be nice if the interactive tests had a way to be queried for a
description, instead of "Just Knowing" what they are meant to be doing.
2011-09-28 15:18:21 +01:00
Emmanuele Bassi
4ebdeede9f test-texture-async: Clean up the test code
Force threading on, and stop using the default stage and behaviours:
let's try to use modern API.
2011-09-28 13:52:53 +01:00
Chun-wei Fan
65e498e3f9 Conform-tests: Remove C99ism 2011-09-16 17:34:29 +08:00
Chun-wei Fan
9f12ec534e msvc-support: Recover wrecked branch
Recover the branch! :|
2011-09-16 17:25:47 +08:00
Emmanuele Bassi
0bd1e47b22 text: Make :use-markup set idempotent
Setting :use-markup and :text is currently not idempotent, and it
depends on the ordering, e.g.:

  g_object_set (actor, "use-markup", TRUE, "text", value, NULL);

does not yield the same results as:

  g_object_set (actor, "text", value, "use-markup", TRUE, NULL);

This is particularly jarring when using ClutterText from ClutterScript,
but in general GObject properties should not rely on the order when used
from g_object_set().

The fix is to store the contents of the ClutterText as a separate string
from the displayed text, and use the contents, instead of the displayed
text, when toggling the :use-markup property.

Let's also add a unit test for good measure, to try and catch
regressions.

https://bugzilla.gnome.org/show_bug.cgi?id=651940
2011-09-07 13:00:35 +01:00
Emmanuele Bassi
967bd3ac58 docs: Update test-easing and xinclude it into ClutterAnimation
The easing test is a nice example of what ClutterAnimation and
clutter_actor_animate() can do. The "tween ball to the pointer
event coordinates" is a bit of a staple in animation libraries
and their documentation.
2011-09-05 17:22:15 +01:00
Emmanuele Bassi
bce27e45b0 test-constraints: Clean up the example
Add some comments to detail what are we doing and why.
2011-09-02 15:39:56 +01:00
Emmanuele Bassi
2fdf73f64a tests: Go back to the hover state on button-release
If we get a button release, going back to the hover state is the most
logical choice.
2011-08-31 12:25:01 +01:00
Robert Bragg
0aacbd47b7 actor: make offscreen_redirect prop take flags + default off
Because we have had several reports about significant performance
regressions since we enabled offscreen redirection by default for
handling correct opacity we are now turning this feature off by default.

We feel that clutter should prioritize performance over correctness in
this case. Correct opacity is still possible if required but the
overhead of the numerous offscreen allocations as well as the cost of
many render target switches per-frame seems too high relative the
improvement in quality for many cases.

On reviewing the offscreen_redirect property so we have a way to
disable redirection by default we realized that it makes more sense for
it to take a set of flags instead of an enum so we can potentially
extend the number of things that might result in offscreen redirection.

We removed the ability to say REDIRECT_ALWAYS_FOR_OPACITY, since it
seems that implies you don't trust the implementation of an actor's
has_overlaps() vfunc which doesn't seem right.

The default value if actor::redirect_offscreen is now 0 which
effectively means don't ever redirect the actor offscreen.
2011-08-30 16:20:16 +01:00