Commit Graph
20 Commits
Author SHA1 Message Date
Carlos Garnacho c635ee5dd7 Include SugarGestureGrabber in .gir generation
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-10-02 16:22:57 +02:00
Carlos Garnacho 470d14a749 swipe: enter into "recognized" state when there is a motion directionality
This allows for checking the controller state as events are fed into it
without connecting to begin/end signals

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-10-02 16:22:57 +02:00
Carlos Garnacho c5fe8a26f6 Add API to allow for tracking global gestures
The new API is added to SugarExt. Similar to the
KeyGrabber we listen on the root window for the
events. We then filter for gestures recognized by
an event controller.

You can add any event controller of the ones recently
added to the toolkit to be tracked and can pass a
specific area where the starting point of the gesture
should be, it's then allowed to go out of bounds as
it moves.

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-10-02 16:12:12 +02:00
Carlos Garnacho fe4667f0f5 event-controller: For the long-press notification animation check on the screen being actually composited
Fixes the notification being a black rectangle on screens with an alpha colormap,
but with no compositing manager.

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-18 16:48:35 +02:00
Carlos Garnacho 282ccc7734 event-controller: Rename gir to SugarGestures
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 495a9f43d1 event-controller: Document SugarTouchController
Also set up introspection annotations wherever it's needed

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 1a0ddf4d54 event-controller: Use "scale" to refer to the current value in the zoom-controller
This changed both the emitted signal and the getter

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho aa652b8754 event-controller: Implement zoom-controller on top of SugarTouchController
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 1fe3d4234d event-controller: Implement rotate-controller on top of SugarTouchController
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 1ba68fa120 event-controller: Add SugarTouchController
This is a base class for gesture recognizers using possibly more
than a single touch.

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 1ecc0f5e1d event-controller: Rename emitted progress signals
started/finished was renamed to began/ended, and "updated" signal
has been added too to complete the semantics

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 64a759e2dc event-controller: Improve rendering/themeability of the UI notification for the long-press controller
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho 73c0688689 event-controller: in the long-press controller rename "timeout" property to "trigger-delay"
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:23:15 +02:00
Carlos Garnacho ec42f63630 event-controller: rename notification signal "swipe" to "swipe-ended"
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:22:55 +02:00
Carlos Garnacho a2b77a2166 event-controler: Add UI feedback for long-press
style and colors of the progress feedback are subject to change

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:22:19 +02:00
Carlos Garnacho 63ff76b95f event-controller: Add widget property to SugarEventController
controllers were already intrinsically related to a widget, so
set a property so controllers have a back reference to the widget
they attach to

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:12:45 +02:00
Carlos Garnacho 7d0a6e25af event-controller: Add documentation/g-i annotations
This makes the .gir correct

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:12:29 +02:00
Carlos Garnacho 239ecdfbcd event-controller: Enable introspection
Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:12:09 +02:00
Carlos Garnacho ade02f958b event-controller: Add separate library for event controllers
SugarEventController is an abstract object that attaches to a widget
and interprets an arbitrary set of events. Implementations of that
object get to define the sequence of events that trigger these.

The basic touch gestures (long press, rotate, swipe, zoom) have
been implemented on top of that object.

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-09-16 12:10:30 +02:00
Carlos Garnacho f36fc4ae85 Tray: set a minimum size in the viewport so that it allows scrolling
The minimum height/width requested by the GtkViewport still tries to cater
for all contained children, which makes the [VH]Tray widgets to grow as
new items are added. Instead, request a minimum width/height of 0 to avoid
the Tray from growing, and having scrolling kick in instead.

Also, fixed what seemed to be a typo in do_get_preferred_height(), where
the viewport width was requested instead.

http://bugs.sugarlabs.org/ticket/3522

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
2012-05-04 16:26:48 +02:00