CCEventDispatcher Class Reference
| Inherits from | NSObject |
| Conforms to | CCEventDelegate |
| Declared in | CCEventDispatcher.h |
Overview
CCEventDispatcher
This is object is responsible for dispatching the events:
- Mouse events
- Keyboard events
- Touch events
Only available on Mac
Tasks
Other Methods
-
dispatchEventsproperty -
– addMouseDelegate:priority:Adds a mouse delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
-
– removeMouseDelegate:removes a mouse delegate
-
– removeAllMouseDelegatesRemoves all mouse delegates, releasing all the delegates
-
– addKeyboardDelegate:priority:Adds a Keyboard delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
-
– removeKeyboardDelegate:removes a mouse delegate
-
– removeAllKeyboardDelegatesRemoves all mouse delegates, releasing all the delegates
-
– addTouchDelegate:priority:Adds a Touch delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
-
– removeTouchDelegate:Removes a touch delegate
-
– removeAllTouchDelegatesRemoves all touch delegates, releasing all the delegates
-
– addGestureDelegate:priority:Adds a gesture delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
-
– removeGestureDelegate:Removes a gesture delegate
-
– removeAllGestureDelegatesRemoves all gesture delegates, releasing all the delegates
-
– dispatchEvent:
Deprecated Methods
Instance Methods
addGestureDelegate:priority:
Adds a gesture delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
- (void)addGestureDelegate:(id<CCGestureEventDelegate>)delegate priority:(NSInteger)priorityDiscussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.haddKeyboardDelegate:priority:
Adds a Keyboard delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
- (void)addKeyboardDelegate:(id<CCKeyboardEventDelegate>)delegate priority:(NSInteger)priorityDiscussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.haddMouseDelegate:priority:
Adds a mouse delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
- (void)addMouseDelegate:(id<CCMouseEventDelegate>)delegate priority:(NSInteger)priorityDiscussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.haddTouchDelegate:priority:
Adds a Touch delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.
- (void)addTouchDelegate:(id<CCTouchEventDelegate>)delegate priority:(NSInteger)priorityDiscussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.hremoveAllGestureDelegates
Removes all gesture delegates, releasing all the delegates
- (void)removeAllGestureDelegatesDeclared In
CCEventDispatcher.hremoveAllKeyboardDelegates
Removes all mouse delegates, releasing all the delegates
- (void)removeAllKeyboardDelegatesDeclared In
CCEventDispatcher.hremoveAllMouseDelegates
Removes all mouse delegates, releasing all the delegates
- (void)removeAllMouseDelegatesDeclared In
CCEventDispatcher.hremoveAllTouchDelegates
Removes all touch delegates, releasing all the delegates
- (void)removeAllTouchDelegatesDeclared In
CCEventDispatcher.hremoveGestureDelegate:
Removes a gesture delegate
- (void)removeGestureDelegate:(id)delegateDeclared In
CCEventDispatcher.hremoveKeyboardDelegate:
removes a mouse delegate
- (void)removeKeyboardDelegate:(id)delegateDeclared In
CCEventDispatcher.h