Commit Graph

5572 Commits

Author SHA1 Message Date
Emmanuele Bassi
2bec43c3c2 actor: Round the adjusted allocation origin correctly
We use floorf() for the allocation origin, and ceilf() for the
allocation size. Swapping the two introduces rounding errors if
the original allocation is not clamped to the nearest pixel.
2012-07-12 22:32:02 +01:00
Emmanuele Bassi
8b03ac6bae Documentation fixes 2012-07-11 15:27:56 +01:00
Emmanuele Bassi
0afc137918 Revert "layout-manager: Add a new animation API"
This reverts commit 7f6b17bc50.

ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
1806a2140b Revert "table-layout: Use the ClutterLayoutManager animation API"
This reverts commit 793bde9143.

ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
2fef1a174e grid-layout: Remove layout animations
ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
5a1c16de62 Revert "flow-layout: Implement layout animations"
This reverts commit 320fb156b4.

ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
b4994f9e76 Revert "box-layout: Use the ClutterLayoutManager animation API"
This reverts commit 58a1854b57.

ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
d381ab1207 Revert "bin-layout: Implement layout animations"
This reverts commit 03ec016faa.

ClutterLayoutManager implementations should just defer the easing state
set up to the child, and not try to impose a global one.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
b985c4035e Deprecate ClutterTexture's API
ClutterTexture is full of side effects that have been picked up over the
years; they make improving ClutterTexture harder than necessary, as well
as making subclassing impossible without introducing weird behaviours in
the child classes as well.

Since Clutter 1.10 we have the ClutterImage content type, which is
side-effects free, given that it just paints texture data using the
state of the actor.

Sadly, we still have subclasses of ClutterTexture, both deprecated and
not, so we cannot deprecate ClutterTexture right out; the type and
structures will still be available, like we do for ClutterGroup, but the
whole API should be moved to the deprecated section, waiting for the
time in which we can get rid of it all.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
42ca7bf1f4 Use Vertex zero init macro 2012-07-11 13:22:21 +01:00
Emmanuele Bassi
a101600c7d types: Add CLUTTER_VERTEX_INIT_ZERO
Similar to the macros for ClutterPoint, ClutterSize, and ClutterRect.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
9b52f9b3f5 actor: Add scaling factor in the Z axis
Having a scaling factor on the Z axis helps with projects that use fully
3D elements, like Mash.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
6feee080b3 actor: Clean up the order of transformations
https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
1796b37948 actor: Deprecate anchor-point
The pivot point and the translation transformation replace it
completely.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
8cea162d3c actor: Add translation transformation
We need an alternative to the translation performed by the anchor point,
one that possibly applies to all three axes and is relative to the
pivot-point.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
0ba078a146 Add notes on the properties to remove
Lest we forget during the 1.99 cycle.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
6e85feecf8 actor: Add :pivot-point-z
For some transformations we need to be able to set the Z component of
the pivot point.

Unlike :pivot-point, the Z coordinate is not normalized because actors
are 2D surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
005584a1ee actor: Deprecate scale center and gravity accessors
The ClutterActor:pivot-point supercedes the scale center and gravity
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
32b78a41f1 actor: Deprecate rotation center properties
The pivot point supercedes the per-axis center of rotation, including
the one based on the gravity enumeration.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:20 +01:00
Emmanuele Bassi
a758cf6d3d actor: Add accessors for rotation angles
Given that the rotation transformations are now affected by the pivot
point, the Actor class should provide an accessors pair only for the
angle of rotation on a given axis.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
1fd0f4b9a5 actor: Add pivot point
The pivot point is a point in normalized coordinates space around which
all transformations revolve.

It supercedes the anchor point and the per-transformation center points
as well as the gravity settings, and tries to sort out the mess that
is the modelview matrix set up in ClutterActor.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
b20e9b78e5 actor: Add :z-position and deprecate :depth
The ClutterActor:depth property has always been a bit of a misnomer:
actors are 2D flat surfaces, so they cannot have "depth"; the property
defines the position on the Z axis.

Another side effect of the :depth property is that it decides the
default paint and allocation order on insertion, and that setting it
will call the ClutterContainer.sort_depth_order() method. This has
proven to be a fairly bad design decision that we strung along from the
0.x days, as it gives a false impression of being able to change the
paint and allocation order simply by changing the position on the Z
axis — something that, in reality, requires depth testing to be enabled
during the paint sequence of an actor's parent.

For 2.0 we need a clean break from the side effects, and a better
defined interface.

ClutterActor:z-position is essentially what ClutterActor:depth is, but
doesn't call into ClutterContainer, and has a more apt name.

https://bugzilla.gnome.org/show_bug.cgi?id=679465
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
9b7287e897 actor: Move event chain emission into ClutterActor
By moving the function that builds the event emission chain we can avoid
a bunch of checks and function calls.
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
67cbb56ab8 actor: Constify event argument in clutter_actor_event()
The Clutter.Actor.event() method is a signal emitter; it does not modify
the event passed to it.
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
d685e8a95a text: Add :cursor-position and deprecate :position
The :position property on ClutterText clashes with the same property on
ClutterActor; it's also badly named, given that it represents the
cursor's position inside the text; finally, it does not match its
accessors, violating the API style conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=679457
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
721caece5d drag-action: Add ::drag-progress signal
Overriding the default behaviour of ClutterDragAction::drag-motion is
currently a pain; you either need to subclass the ClutterDragAction and
override the class closure for the signal, or you need to connect to the
signal and call g_signal_stop_emission_by_name() - neither option being
particularly nice or clean. The established pattern for these cases
would be to have a boolean return value on the ::drag-motion signal, but
we cannot do that without breaking ABI.

To solve the issue in a backward compatible way, we should introduce a
new signal, ::drag-progress, with a boolean return value. If the signal
emission chain returns TRUE, the ::drag-motion signal will be emitted,
and the default behaviour will be honoured; if the signal emission chain
returns FALSE, instead, the ::drag-motion signal will not be emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=679451
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
0e4c6d0a87 Deprecate clutter_threads_enter()/leave()
Acquiring the Clutter lock to mark critical sections is not portable,
and not recommended to implement threaded applications with Clutter.

The recommended pattern is to use worker threads, and schedule UI
updates inside idle or timeout handlers within the main loop. We should
enforce this pattern by deprecating the threads_enter()/leave()
functions. For compatibility concerns, we need internal API to acquire
the main lock during frame processing dispatch.

https://bugzilla.gnome.org/show_bug.cgi?id=679450
2012-07-11 13:22:19 +01:00
Emmanuele Bassi
0ba2d1df93 constraints: Clamp updated allocation to the nearest pixel
Use Clutter.ActorBox.clamp_to_pixel() to do it properly.
2012-06-27 21:28:01 +01:00
Emmanuele Bassi
1da42dd8a0 actor: Add ActorIter.is_valid()
It can be useful to check whether a ClutterActorIter is currently valid,
i.e. if the iterator has been initialized *and* if the actor to which it
refers to hasn't been updated.

We can also use the is_valid() method in the conformance test suite to
check that initialization has been successful, and that changing the
children list through the ClutterActorIter API leaves the iterator in a
valid state.
2012-06-27 21:28:01 +01:00
Alejandro Piñeiro
a8c829019f a11y: remove implementation for [add/remove]_global_event_listener
Since release 2.5.3, ATK provides an implementation for those
methods, so toolkits doesn't need to implement them.
2012-06-27 14:40:56 +02:00
Emmanuele Bassi
b6d5595470 docs: Add missing annotation for ClutterActorClass.touch_event 2012-06-25 23:47:12 +01:00
Emmanuele Bassi
ececa27ad0 docs: Fix XInclude path of the BindConstraint example 2012-06-25 23:44:11 +01:00
Jasper St. Pierre
6c4abde369 stage: Make sure to free any pending queued redraws if we have any
This fixes a memory leak when someone creates a stage and then immediately
destroys it.
2012-06-24 13:31:31 -04:00
Emmanuele Bassi
ab88511133 stage: Remove an extra reference count
The dispose sequence will keep the object alive, and we need to release
the last reference held by the StageManager before releasing control to
GObject.
2012-06-24 18:02:45 +01:00
Emmanuele Bassi
550168eee3 Clean up deprecated header inclusion
The build should not add deprecated/ into the default INCLUDE paths, so
that deprecated headers are clearly separated; this will make it easier
to get rid of them when we branch out for 2.0.
2012-06-23 08:23:11 +01:00
Emmanuele Bassi
8fe8b9c89e Move PathNode definitions into clutter-types.h
Near ClutterKnot, so that we can easily remove both when we branch off
for 2.0.
2012-06-23 08:23:11 +01:00
Lionel Landwerlin
49dd99f9c1 text: add touch events support
https://bugzilla.gnome.org/show_bug.cgi?id=678278
2012-06-22 21:53:07 +01:00
Lionel Landwerlin
927624d92c input-device: add APIs to grab sequences of touch events
https://bugzilla.gnome.org/show_bug.cgi?id=678279
2012-06-22 21:48:58 +01:00
Lionel Landwerlin
132e4b98d1 drag/drop actions: add touch event support
https://bugzilla.gnome.org/show_bug.cgi?id=678049
2012-06-22 21:40:08 +01:00
Lionel Landwerlin
1af7de8ac8 actor: add touch event vfuncs
https://bugzilla.gnome.org/show_bug.cgi?id=678047
2012-06-22 21:40:03 +01:00
Alejandro Piñeiro
dd7c1ed64a a11y: implementation for atk_text_get_text_[before/at/after]_offset
Copy and paste of the implementation done at Gtk+ based on pango. This
should be moved to a common library, like the old GailTextUtil. Ideally
on pango itself.

https://bugzilla.gnome.org/show_bug.cgi?id=677221
2012-06-22 18:06:06 +02:00
Bastian Winkler
d2fff6e3c3 actor: Make margin properties animatable
Enable implicit animations for :margin-(top|right|bottom|left)
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=678264
2012-06-22 08:52:00 +02:00
Matthias Clasen
e3ca87784e XI2: Avoid a crash in event translation
It is possible that we get a DeviceChanged event for a device
that is not in the hash table yet. E.g. I've seen this when
using xrandr to change screen resolution. Prevent a crash in
this case.

https://bugzilla.gnome.org/review?bug=678439
2012-06-20 07:22:12 -04:00
Andy Wingo
d571719a3d cairo: Always update texture after ClutterCairoTexture::draw
* clutter/clutter-cairo-texture.c (clutter_cairo_texture_emit_draw):
  Always update the Cogl texture after emitting ::draw, since we control
  the dynamic extent in which drawing should happen on the cairo_t.

  Fixes #677966.
2012-06-20 11:45:21 +02:00
Emmanuele Bassi
286e7e28e8 Remove duplicate typedefs
Redefining typedefs is allowed by C11 and by a GCC extension, but Clang
doesn't really like it.
2012-06-20 09:13:11 +01:00
Emmanuele Bassi
c4acae7752 build: Remove gcov from the build
We want to switch to lcov, so let's start with a clean slate.
2012-06-19 14:55:10 +01:00
Emmanuele Bassi
7b07d4a7c5 transition: Check if we're setting the same interval
If we do, then don't bother.
2012-06-18 23:00:08 +01:00
Emmanuele Bassi
b658023324 property-transition: Lazily convert the interpolated value
If the Interval used has a different type than the property we are
animating through a PropertyTransition then we should transform the
interpolated value before applying it, to avoid warnings down the
line.
2012-06-18 22:21:14 +01:00
Emmanuele Bassi
bebe90e565 interval: Do not leak the result GValue
The compute() method will cache the result, to avoid multiple
allocations and copies; this means, though, that we need to unset the
GValue when destroying the Interval.
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
cfc4e86b31 interval: Compute progress for signed char
Not just for unsigned ones, though both are pretty pointless.
2012-06-18 18:04:54 +01:00