Multitouch trackpad 2 fingers gestures implementation
authorDamien Plisson <damien.plisson@yahoo.fr>
Mon, 11 Jan 2010 11:14:36 +0000 (11:14 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Mon, 11 Jan 2010 11:14:36 +0000 (11:14 +0000)
commit4a011a99cb9f45e0d76b134d72c2c2ab150ba006
tree6141ccea3ff99236c32e31f479ef5ba36835a629
parentebb9286fd65d3cb1aae001080dbdb7102e7b49bf
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.
14 files changed:
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_EventTrackpad.h [new file with mode: 0644]
intern/ghost/intern/GHOST_SystemCocoa.mm
source/blender/editors/interface/view2d_ops.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/makesrna/intern/rna_wm.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/wm_event_types.h