Commit Graph

390 Commits

Author SHA1 Message Date
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
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
9f12ec534e msvc-support: Recover wrecked branch
Recover the branch! :|
2011-09-16 17:25:47 +08: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
059d32b40d build: Add -lm to the tests linker flags
https://bugzilla.gnome.org/show_bug.cgi?id=657529
2011-08-28 00:03:28 +01:00
Emmanuele Bassi
df107fc5ba interactive/test-actors: Constraint the hands group
Use constraints to align and size the ClutterGroup containing the
spinning hands so that resizing the stage doesn't look like arse.
2011-08-15 15:53:58 +01:00
Emmanuele Bassi
f28c1d2d2a state: Use the Animatable interface
The Animatable interface allows object classes to provide and animate
properties outside of the usual GObject property introspection API.

This change allows ClutterState to defer to the animatable objects the
property introspection and animation, just like ClutterAnimation does.
2011-07-29 11:44:28 +01:00
Emmanuele Bassi
110dff5823 test/cairo-clock: Remove a double source color set
Do not call cairo_set_source_rgba() right after calling
clutter_cairo_set_source_color().
2011-07-27 11:48:07 +01:00
Emmanuele Bassi
7f8838d7cc cairo-texture: Add the :auto-resize property
Keeping the backing Cairo surface of a CairoTexture canvas in sync with
the actor's allocation is tedious and prone to mistakes. We can
definitely do better by simply exposing a property that does the surface
resize and invalidation automagically on ::allocate.
2011-07-26 14:55:19 +01:00
Emmanuele Bassi
278daca61c cairo-texture: Deprecate create()/create_region()
The recommended way of drawing on a ClutterCairoTexture is the ::draw
signal.
2011-07-26 12:53:22 +01:00
Emmanuele Bassi
2f445682b1 cairo-texture: Use signal-based drawing
The current "create context/draw/destroy context" pattern presents
various problems. The first issue is that it defers memory management to
the caller of the create() or create_region() methods, which makes
bookkeeping of the cairo_t* harder for language bindings and third party
libraries. The second issue is that, while it's easier for
draw-and-forget texturs, this API is needlessly complicated for contents
that have to change programmatically - and it introduces constraints
like calling the drawing code explicitly after a surface resize (e.g.
inside an allocate() implementation).

By using a signal-based approach we can make the CairoTexture actor
behave like other actors, and like other libraries using Cairo as their
2D drawing API.

The semantics of the newly-introduced ::draw signal are the same as the
one used by GTK+:

  - the signal is emitted on invalidation;
  - the cairo_t* context is owned by the actor;
  - it is safe to have multiple callbacks attached to the same
    signal, to allow composition;
  - the cairo_t* is already clipped to the invalidated area, so
    that Cairo can discard geometry immediately before we upload
    the texture data.

There are possible future improvements, like coalescing multiple
invalidations inside regions, and performing clipped draws during
the paint cycle; we could even perform clipped redraws if we know the
extent of the invalidated area.
2011-07-26 12:40:52 +01:00
Neil Roberts
cbe1e8321b tests: Dynamically resolve GL symbols
Some of the tests are making direct GL calls. Eventually we want
Clutter not to link directly against any GL library so that it can
leave Cogl to load it dynamically. As a step towards getting this to
work this patch changes the tests to resolve the symbols using
cogl_get_proc_address instead of linking directly.
2011-07-19 16:06:06 +01:00
Emmanuele Bassi
96440acffe texture: Deprecate the new_from_actor() function
Now that we have proper offscreen and shader handling using the
ClutterEffect API, we can finally deprecate this hard to bind, easy
to break function.
2011-07-08 12:08:19 +01:00
Emmanuele Bassi
1238e0ddf9 Add ClutterDropAction
ClutterDropAction is an Action sub-class that allows writing actors that
react to dragged actors being dropped on them.

https://bugzilla.gnome.org/show_bug.cgi?id=652842
2011-06-20 15:25:53 +01:00
Emmanuele Bassi
b6eb5728e1 stage: Make per-actor motion event delivery accessors public
Complete the quest of commit bc548dc862
by making the ClutterStage methods for controlling the per-actor motion
and crossing event delivery public, and deprecating the global ones.
2011-06-20 11:41:28 +01:00
Emmanuele Bassi
cb3999744f Remove usage of clutter_group_add()
The macro is there for mallum eyes only.
2011-06-16 17:07:32 +01:00
Emmanuele Bassi
cd2b36ed91 Merge branch 'swipe-action'
* swipe-action:
  test-swipe-action: Clean up the test code
  docs: Add the new actions to the API reference
  gesture-action: Remove the multi-device entry points
  swipe-action: Remove the required devices call
  swipe-action: Clean up
  gesture-action: Clean up
  Add ClutterSwipeAction and ClutterGestureAction
2011-06-13 14:39:03 +01:00
Emmanuele Bassi
e745ce52e7 test-interactive: Add signal-based state transitions
Use the newly added support for binding signal emissions to state
changes on a ClutterState.
2011-06-13 13:47:08 +01:00
Robert Bragg
7b4f7cd3e0 build: include <cairo.h> not <cairo/cairo.h>
cairo.h is intended to be included as <cairo.h> not <cairo/cairo.h> as
is the style for clutter.h. If you have installed cairo to a custom
prefix then using cairo/cairo.h can result in unintentional use of the
system cairo headers, or if they aren't installed then it will result in
a failure to find the header.
2011-06-10 17:57:18 +01:00
Emmanuele Bassi
80dd60ecbb test-swipe-action: Clean up the test code
Remove unused code, and be more strict at discarding swipes on
constrained actors.

Add a note on the behaviour of each rectangle/action pair.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2585
2011-06-10 15:15:15 +01:00
Tomeu Vizoso
ba72235b66 Add ClutterSwipeAction and ClutterGestureAction
To allow actors to handle gestures in a more organized way.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2585
2011-06-10 14:02:17 +01:00
Emmanuele Bassi
8b70260528 test-bin-layout: Use the long-press signal on ClickAction 2011-06-09 15:12:41 +01:00
Emmanuele Bassi
835fc2381c Deprecate ClutterShader
With the instantiatable ClutterShaderEffect, the only reason for
ClutterShader to exist is to make the ClutterActor::paint implementation
miserable.

Yes, ClutterShader doesn't use a FBO, so it's "more efficient" on
ClutterTextures. It's also generally wrong unless you know *exactly* how
the actor's pipeline is set up — something we cannot even guarantee
internally unless we start doing lame type checks.
2011-06-07 14:09:53 +01:00
Emmanuele Bassi
941d8d23fa test-constrains: Use a ShaderEffect
Demonstrate how to use a ShaderEffect instance.
2011-06-07 14:09:53 +01:00
Emmanuele Bassi
0b0d4e1239 test-binding-pool: Remove usage of deprecated get_gid()
Use the actor name instead of a random, internal numeric id.
2011-05-31 11:57:18 +01:00
Neil Roberts
7d233241f1 Fix include location for cogl-pango.h
In Cogl, cogl-pango.h has moved to <cogl-pango/cogl-pango.h>. When
using the experimental 2.0 API (which Clutter does) it is no longer
possible to include it under the old name of <cogl/cogl-pango.h> so we
need to update the include location.
2011-05-16 16:04:27 +01:00