cocos2d/cocos2d-iphone — pull request #262 by pierredavidbelanger (2012-11-06 03:47:47+00:00)
Title: Add support for handling OSX gesture event

A little addition to be able to use OSX gesture.

It will compile and run on OSX 10.5.2 and later.

At runtime It should not create any problem with installation that do not supports gesture since the `NSResponder`'s gesture selectors will simply not be called.

In this commit:

- `CCGLView` delegates gesture events to `CCEventDispatcher`
- new `CCGestureEventDelegate` protocol to support: beginGesture, magnify, smartMagnify, rotate, swipe and endGesture, it supports swallowing event too
- add/remove/removeAllGestureDelegate selectors in `CCEventDispatcher` with priority
- gestureEnabled and gesturePriority properties in `CCLayer`
- edited `TouchTest` of the EventsTest target to demonstrate gestures usage

I tried to respect the cocos2d naming convention, but let me know if your are not ok with the way I named the new public protocol and selectors, I will refactor to suit your taste.