Commit Graph

472 Commits

Author SHA1 Message Date
Emmanuele Bassi
c9028cee48 Move scroll actor test to the examples
Nothing specific to test, and the code is idiomatic enough to be used as
an example.
2012-05-17 10:57:15 +01:00
Emmanuele Bassi
5ad1ec7cca Put bind-constraint back into the interactive tests
The bind-constraint.c example still uses clutter_actor_animate(), and
it'd require some serious reworking to move it to
ClutterPropertyTransition or to implicit animations.
2012-05-08 16:15:33 +01:00
Emmanuele Bassi
c6b226e6c7 Move the easing modes test into the examples
It's a pretty simple, self-contained example of how to use different
easing modes, as well as the implicit animations API.
2012-05-02 18:37:36 +01:00
Emmanuele Bassi
3fab1e4026 interactive/transitions: Modernize
Drop deprecated API.
2012-05-02 12:45:45 +01:00
Emmanuele Bassi
ad27141556 interactive/binding-pool: Modernize
Drop deprecated API.
2012-05-02 12:45:18 +01:00
Emmanuele Bassi
46409b4043 Move FlowLayout test into examples
There's nothing really test-worthy in the ClutterFlowLayout interactive
test; it can be lifted pretty much as is, and placed into the examples.
2012-05-02 12:14:45 +01:00
Emmanuele Bassi
b8f6ed184d interactive/flow-layout: Modernize code
Drop deprecated API usage.
2012-05-02 12:03:14 +01:00
Emmanuele Bassi
07c95ebf0c Move examples from tests/interactive to a new top-level
The example code that is meant to be XIncluded into the API reference
should not be part of the interactive test suite: it's code that it is
meant to be used as a reference implementation - whereas the interactive
test suite should be allowed to be lean and test behaviour even in nasty
ways. In short: the test suite should not be the place where we show off
idiomatic code for educational purposes.
2012-05-01 19:00:35 +01:00
Emmanuele Bassi
999bbe20a5 Add ClutterScrollActor
ClutterScrollActor is an actor that allows showing a portion of its
contents.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
4d34a2229d interactive/table-layout: Enable animations 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
807d77c0f3 box-layout: Add the :orientation property
And deprecate the :vertical property.

An enumeration is clearer, and we can use it elsewhere in the API.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
4067dcdfe1 interactive/bin-layout: Improve the example code
Use modern API; clean up the code, and document it so that it's possible
to XInclude it into the API reference.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
217c4e7ba0 actor: Remove automatic transition init from add_transition()
Adding an explicit transition overrides any consideration of the easing
state of an actor.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
c500fc1844 Add ClutterTransitionGroup
The TransitionGroup class is a logical container for running multiple
transitions.

TransitionGroup is not a Score: it is a Transition that advances each
Transition it contains using the delta between frames, and ensures that
all transitions are in a consistent state; these transitions are not
advanced by the master clock.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
270894342e Add ClutterKeyframeTransition
A simple transition class that interpolates a property between key
frames.
2012-04-27 12:30:48 +01:00
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
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
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
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
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
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
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