Commit Graph

1063 Commits

Author SHA1 Message Date
Emmanuele Bassi
7af55d23e4 Deprecate ClutterTableLayout
The table layout manager has various issues:

  • no support for RTL flipping
  • most of the layout API is legacy, and has been replaced by the
    alignment and expansion flags on ClutterActor
  • the animation API is legacy, and has been replaced by the
    implicitly animatable allocation
  • the spanning cells handling is a bit awkward, as is its API

On top of that, we imported the grid layout management policy from GTK+
into ClutterGridLayout, which provides all the required features in a
more well-designed API.

Instead of wasting time and resources updating TableLayout, we should
deprecate it and point developers of the GridLayout.
2013-11-19 00:31:53 +00:00
Neil Roberts
70292672c4 Add API to install an event filter
This adds clutter_event_add/remove_filter which adds a callback
function which will receive all Clutter events just before the event
signal is emitted for them. The event filter will be invoked
regardless of any grabs or captures. This will be used by Mutter which
wants to access the events at a lower level then the event bubbling
mechanism. It needs to see all mouse motion events even if there is a
grab in place.

https://bugzilla.gnome.org/show_bug.cgi?id=707560
2013-11-14 14:32:17 -05:00
Emmanuele Bassi
0f217f0722 Documentation fixes 2013-09-19 22:58:43 +01:00
Emmanuele Bassi
a3b093d9c8 cookbook/examples: Disable Cogl deprecation warnings
We'll have to port the cookbook to a decent version of Clutter and Cogl
anyway.
2013-08-19 23:31:54 +01:00
Emmanuele Bassi
0d7bbc747f docs: Fix gtk-doc warnings 2013-08-19 23:30:09 +01:00
Chris Cummins
b6d2232150 wayland: Add foreign surface support to stage
This adds support for optionally a providing a foreign Wayland surface
to a ClutterStage before it is first show. Setting a foreign surface
prevents Cogl from allocating a surface and shell surface for the stage
automatically.

v2: add CLUTTER_AVAILABLE_IN_1_16 annotation and API reference docs
    (review from Emmanuele Bassi)
v3: set a boolean to indicate that this stage is using a foreign surface
(Rob Bradford)

https://bugzilla.gnome.org/show_bug.cgi?id=699578
2013-07-23 18:24:00 +01:00
Rob Bradford
a5e44d3934 wayland: Add API for disabling the event dispatching
This allows the integration of Clutter with another library, like GTK+,
that is dispatching the events itself. This is implemented by calling
into the cogl_wayland_renderer_set_event_dispatch_enabled() and since
that function must be called on the newly created renderer the newly
added clutter_wayland_disable_event_retrieval must be called before
clutter_init()

https://bugzilla.gnome.org/show_bug.cgi?id=704279
2013-07-23 18:23:40 +01:00
Emmanuele Bassi
7fe7d56ae9 docs: Add missing symbols 2013-07-10 11:54:24 +01:00
Rob Bradford
8df5aba361 wayland: add support for connecting to a foreign display
This allows the reuse of the display connection and hence objects with
existing code that is using Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=703566
2013-07-09 12:35:29 +01:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Chris Cummins
8a6aae14c8 docs: Add clutter-wayland section to reference docs
Gives this stray section a home in the reference documentation.
2013-05-14 12:42:08 +01:00
Bastian Winkler
cd9ba0ad8d flow-layout: Add :snap-to-grid property
Add a :snap-to-grid property to FlowLayout to prevent the layout from
assigning it's children a position based on the size of the largest
child.

https://bugzilla.gnome.org/show_bug.cgi?id=648873
2013-05-11 10:54:38 -04:00
Emmanuele Bassi
59bd044859 docs: Add missing symbol to the list 2013-03-13 15:46:16 -03:00
Emmanuele Bassi
c538a65a9f docs: Add 1.14 symbols index
Forgot to add it after the version bump.
2013-03-07 15:06:49 +00:00
Emmanuele Bassi
65d6c8c32e build: Dist the cookbook
So that we can publish it starting from the tarballs.
2013-03-05 00:22:21 +00:00
Emmanuele Bassi
37e3ef2303 offscreen-effect: Add a method to get the target area
The target size is not always enough, there are cases where the offset
used to paint the target must also be available for developers
implementing an OffscreenEffect.

The get_target_rect() method returns the rectangle used to paint the
target, with the offsets in the ClutterRect:origin and the texture size
in the ClutterRect:size fields, respectively.

The get_target_size() method should be deprecated, given that its
replacement is generally more useful.

https://bugzilla.gnome.org/show_bug.cgi?id=670004
2013-03-04 12:24:23 +00:00
Emmanuele Bassi
65a024af92 timeline: Add progress-based marker API
Being able to set a marker at a normalized point on a timeline, instead
of using a specific time, is a nice fit with the current Timeline class
API.

https://bugzilla.gnome.org/show_bug.cgi?id=694319
2013-02-20 23:06:28 +00:00
Emmanuele Bassi
c000fb7b83 build: Fix distcheck in the cookbook
Someday, somebody will have to explain to me how not touching
anything for a whole release cycle ends up breaking the build.

Adding the top_srcdir/doc/cookbook path to the includes fixes the
distcheck.
2012-12-18 01:40:39 +00:00
Jasper St. Pierre
75b521de6e pan-action: Add a simple convenience function to retrieve delta/coords
This is a simple helper designed to ease the implementation of alternate
implementations of the "pan" signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=689061
2012-11-30 17:19:14 -05:00
Emanuele Aina
879b133062 docs: Add missing symbols to the sections file 2012-11-29 10:20:10 +01:00
Emanuele Aina
5413b0ed62 docs: Ignore GestureAction private header on docs generation 2012-11-29 10:20:10 +01:00
Emanuele Aina
ccdbd36234 gesture-action: Add clutter_gesture_action_get_last_event()
Export the last event received for each touch point in its entirety,
instead of duplicating ClutterEvent accessors one at a time.

examples/pan-action.c has been updated to show the type of the event
that's causing the panning.

https://bugzilla.gnome.org/show_bug.cgi?id=685737
2012-10-19 14:13:17 +02:00
Emanuele Aina
61f2d751d0 tap-action: Add TapAction, to handle mouse/touch tapping
TapAction is a GestureAction-subclass that handles clicks and
tap gestures. It is meant to provide a replacement for ClickAction
using GestureAction:

• it handles events trasparently without capturing them, so that it
  can coexists with other GestureActions;

• the ::tap signal is not emitted if the drag threshold is exceeded;

• building upon GestureAction the amount of code is greatly reduced.

TapAction provides:

• tap signal, notifying users when a tap has been performed.

The image-content example program has been updated replacing its
ClickAction usage with TapAction.

https://bugzilla.gnome.org/show_bug.cgi?id=683948
2012-10-19 13:41:31 +02:00
Emmanuele Bassi
950e60f824 x11: Add EventSequence → touch detail accessor
The ClutterEventSequence structure is a fully opaque type; on X11, it is
just an unsigned integer that gets converted into a pointer, but in the
future it may become a fully fledged data structure.

Obviously, we cannot tell people to just dereference the pointer into an
integer in order to use it, and still retain the ability to change the
type; for this reason, we need a proper accessor function to convert the
EventSequence into a touch detail, to be used with the XInput API.
2012-09-05 09:43:47 +01:00
Emmanuele Bassi
6096b41d7c docs: Update with missing symbols 2012-09-03 22:21:44 +01:00
Emanuele Aina
9ca06d2895 pan-action: add PanAction, to handle panning in scrollable actors
PanAction is a GestureAction-subclass that implements the panning
concept for scrollable actors, with the ability to emit interpolated
signals to emulate the kinetic inertia of the panning. PanAction provides:

• pan signal, notifying users of the panning gesture status;

• pan-stopped signal, emitted at the end of the interpolated phase
  of the panning gesture, if enabled;

• pan-axis property, to allow constraining the dragging to a specific
  axis;

• interpolated property, to enable or disable the inertial behaviour;

• deceleration property, to customize the rate at which the momentum
  of the panning will be slowed down;

• acceleration-factor property, applied to the inertial momentum when
  starting the interpolated sequence.

An interactive test is also provided.

https://bugzilla.gnome.org/show_bug.cgi?id=681648
2012-08-28 10:11:16 -03:00
Emanuele Aina
436ebb2716 gesture-action: add _get_motion_delta()/_get_velocity()
Add some accessors to simplify common tasks for GestureAction users:

• clutter_gesture_action_get_motion_delta() to get the delta
  on the X and Y axis in stage coordinates since the last motion
  event, and the scalar distance travelled;

• clutter_gesture_action_get_velocity() to get an estimate of the
  speed of the last motion event along the X and Y axis and as a
  scalar value in pixels per millisecond.

https://bugzilla.gnome.org/show_bug.cgi?id=681648
2012-08-28 09:57:33 -03:00
Emanuele Aina
7b6ce3fd88 Add missing types to the reference manual list
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2012-08-27 14:52:45 +01:00
Emanuele Aina
f4bd9a6a3b Fix cookbook examples compilation
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2012-08-27 14:52:45 +01:00
Emmanuele Bassi
6716cd10e3 docs: Add ZoomAction symbols to the sections file 2012-08-20 19:41:21 +01:00
Emmanuele Bassi
449dca8034 docs: Add ZoomAction to the API reference 2012-08-20 18:29:31 +01:00
Emmanuele Bassi
044c04ea8b docs: Add ClutterAnimation migration docs 2012-08-20 14:28:17 +01:00
Emmanuele Bassi
f996c6e061 docs: Add missing symbols to the sections file 2012-08-19 17:57:32 +01:00
Giovanni Campagna
f99d48a0c6 ClutterDragAction: allow constraining the movement of the dragged actor
Allow setting a ClutterRect on the drag action and force the
dragged actor's position to be always within that rectangle (relative
to the actor's parent).

https://bugzilla.gnome.org/show_bug.cgi?id=681168
2012-08-16 18:21:07 +02:00
Emmanuele Bassi
d8fddbf780 build: Include top builddir for cookbook examples 2012-08-07 09:45:58 +01:00
Emmanuele Bassi
5461483df6 Documentation build fixes 2012-08-07 09:39:04 +01:00
Emmanuele Bassi
9faed5eba4 docs: Add missing section for ClutterRotateAction 2012-07-18 17:15:13 -04:00
Lionel Landwerlin
9e02ef459e input-device: add enter/leave events generation for touch events
This patch brings 'enter-event' and 'leave-event' generation for touch
based devices. This leads to adding a new API to retrieve coordinates
of a touch point.

https://bugzilla.gnome.org/show_bug.cgi?id=679797
2012-07-17 21:49:26 +01:00
Lionel Landwerlin
e2264c0484 Add rotate action
Allow rotation of an actor using 2 points (touch or pointers) events.

Also refactor the accumulators from various actions.

https://bugzilla.gnome.org/show_bug.cgi?id=678587
2012-07-17 16:52:41 +01:00
Lionel Landwerlin
5200390037 gesture-action: add multiple point support and touch events support
https://bugzilla.gnome.org/show_bug.cgi?id=678586
2012-07-17 01:27:38 +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
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
Emmanuele Bassi
847f9aef43 docs: Add missing clutter_interval_is_valid symbol 2012-06-10 23:33:00 +01:00
Emmanuele Bassi
17539bca95 base-types: Add zero point and rect
A constant ClutterPoint for (0, 0) and a constant degenerate ClutterRect
can be useful as guards for pointers, freeing the NULL value to mean
"unset".
2012-06-10 17:54:22 +01:00
Emmanuele Bassi
4c1bf6162a docs: Remove the old animation tutorial
The animation tutorial was written in the Good Ol' 0.x days, and has
barely been updated during the 1.x cycle; it only referenced low level
or deprecated API, and the ClutterActor class description has a whole
section on how to animate actors using both the implicit and the
explicit animation API.
2012-06-10 17:54:21 +01:00
Emmanuele Bassi
e7aa21203c actor: Add content-repeat
ClutterContent implementations may allow repeating their contents when
painting; we should provide the repeat policy on the actor, like we do
for scaling filters and content gravity.
2012-06-08 14:33:00 +01:00
Bastian Winkler
1eb869ec8f Add ClutterGridLayout
ClutterGridLayout is port of GtkGrid to a Clutter layout manager. All
the logic is taken from gtkgrid.c, so all the credits should go to
Matthias Clasen for writing this nice piece of code.

ClutterGridLayout supports adding children with it's own methods
GridLayout.attach() and GridLayout.attach_next_to() as well as
Actor.add_child() and friends. The latter adds children in a similar
fashion to ClutterBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=677372
2012-06-05 12:28:25 +02:00
Bastian Winkler
dbf45c680f doc: Add ClutterLayoutManagerPrivate to doc sections
https://bugzilla.gnome.org/show_bug.cgi?id=677384
2012-06-04 15:21:28 +02:00
Emmanuele Bassi
65c8b11604 image: Add a data setter using GBytes
The plain C bytes array, while convenient from a C perspective, is not
well handled by language bindings: the length of the array is not
specified, and it's only just implied by the image data size, rowstride,
and pixel format.

GBytes is a read-only bytes buffer that has an implicit length; we can
use it as the storage medium so that language bindings can actually
function correctly.
2012-06-04 10:34:22 +01:00