Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2010-01-11 14:14:36 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2010-01-11 14:14:36 +0300
commit4a011a99cb9f45e0d76b134d72c2c2ab150ba006 (patch)
tree6141ccea3ff99236c32e31f479ef5ba36835a629 /intern/ghost/GHOST_Types.h
parentebb9286fd65d3cb1aae001080dbdb7102e7b49bf (diff)
Multitouch trackpad 2 fingers gestures implementation
- 2 fingers scroll (MOUSEPAN / GHOST_kTrackpadEventScroll event) pans/scrolls the view - 2 fingers pinch (MOUSEZOOM / GHOST_kTrackpadEventMagnify event) zooms the view And in 3D view: - alt + 2 fingers scroll rotates the view - 2 fingers rotation (MOUSEROTATE / GHOST_kTrackpadEventRotate) orbits the view. The implementation uses a new GHOST event type: GHOST_kEventTrackpad, that is then dispatched as Blender MOUSEPAN, MOUSEZOOM or MOUSEROTATE events. This is currently fully implemented for OSX (GHOST Cocoa fires the new events), with auto-detection of the source peripheral, so that a regular mouse still sends MOUSEWHEEL events.
Diffstat (limited to 'intern/ghost/GHOST_Types.h')
-rw-r--r--intern/ghost/GHOST_Types.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 5c888e218d8..e26013c1ecd 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -151,6 +151,7 @@ typedef enum {
GHOST_kEventButtonDown, /// Mouse button event
GHOST_kEventButtonUp, /// Mouse button event
GHOST_kEventWheel, /// Mouse wheel event
+ GHOST_kEventTrackpad, /// Trackpad event
GHOST_kEventNDOFMotion, /// N degree of freedom device motion event
GHOST_kEventNDOFButton, /// N degree of freedom device button event
@@ -373,6 +374,28 @@ typedef struct {
GHOST_TInt32 z;
} GHOST_TEventWheelData;
+typedef enum {
+ GHOST_kTrackpadEventUnknown =0,
+ GHOST_kTrackpadEventScroll,
+ GHOST_kTrackpadEventRotate,
+ GHOST_kTrackpadEventSwipe, /* Reserved, not used for now */
+ GHOST_kTrackpadEventMagnify
+} GHOST_TTrackpadEventSubTypes;
+
+
+typedef struct {
+ /** The event subtype */
+ GHOST_TTrackpadEventSubTypes subtype;
+ /** The x-location of the trackpad event */
+ GHOST_TInt32 x;
+ /** The y-location of the trackpad event */
+ GHOST_TInt32 y;
+ /** The x-delta or value of the trackpad event */
+ GHOST_TInt32 deltaX;
+ /** The y-delta (currently only for scroll subtype) of the trackpad event */
+ GHOST_TInt32 deltaY;
+} GHOST_TEventTrackpadData;
+
typedef enum {
GHOST_kDragnDropTypeUnknown =0,