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
-
dispatchEvents
property -
– 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
-
– removeAllMouseDelegates
Removes 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
-
– removeAllKeyboardDelegates
Removes 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
-
– removeAllTouchDelegates
Removes 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
-
– removeAllGestureDelegates
Removes 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)priority
Discussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.h
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.
- (void)addKeyboardDelegate:(id<CCKeyboardEventDelegate>)delegate priority:(NSInteger)priority
Discussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.h
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.
- (void)addMouseDelegate:(id<CCMouseEventDelegate>)delegate priority:(NSInteger)priority
Discussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.h
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.
- (void)addTouchDelegate:(id<CCTouchEventDelegate>)delegate priority:(NSInteger)priority
Discussion
IMPORTANT: The delegate will be retained.
Declared In
CCEventDispatcher.h
removeAllGestureDelegates
Removes all gesture delegates, releasing all the delegates
- (void)removeAllGestureDelegates
Declared In
CCEventDispatcher.h
removeAllKeyboardDelegates
Removes all mouse delegates, releasing all the delegates
- (void)removeAllKeyboardDelegates
Declared In
CCEventDispatcher.h
removeAllMouseDelegates
Removes all mouse delegates, releasing all the delegates
- (void)removeAllMouseDelegates
Declared In
CCEventDispatcher.h
removeAllTouchDelegates
Removes all touch delegates, releasing all the delegates
- (void)removeAllTouchDelegates
Declared In
CCEventDispatcher.h
removeGestureDelegate:
Removes a gesture delegate
- (void)removeGestureDelegate:(id)delegate
Declared In
CCEventDispatcher.h
removeKeyboardDelegate:
removes a mouse delegate
- (void)removeKeyboardDelegate:(id)delegate
Declared In
CCEventDispatcher.h