Commit Graph

1027 Commits

Author SHA1 Message Date
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