cocos2d-mac  1.0.1
Improved Cocos2D API Reference (Mac OS X version) for Kobold2D developers
CCEventDispatcher Interface Reference

#include <CCEventDispatcher.h>

Inheritance diagram for CCEventDispatcher:
Collaboration diagram for CCEventDispatcher:

List of all members.

Public Member Functions

void addMouseDelegate:priority: (id< CCMouseEventDelegate > delegate,[priority] NSInteger priority)
void removeMouseDelegate: (id delegate)
void removeAllMouseDelegates ()
void addKeyboardDelegate:priority: (id< CCKeyboardEventDelegate > delegate,[priority] NSInteger priority)
void removeKeyboardDelegate: (id delegate)
void removeAllKeyboardDelegates ()
void addTouchDelegate:priority: (id< CCTouchEventDelegate > delegate,[priority] NSInteger priority)
void removeTouchDelegate: (id delegate)
void removeAllTouchDelegates ()

Static Public Member Functions

CCEventDispatchersharedDispatcher ()

Protected Attributes

BOOL dispatchEvents_
struct _listEntry * keyboardDelegates_
struct _listEntry * mouseDelegates_
struct _listEntry * touchDelegates_

Properties

BOOL dispatchEvents

Detailed Description

CCEventDispatcher

This is object is responsible for dispatching the events:

  • Mouse events
  • Keyboard events
  • Touch events

Only available on Mac


Member Function Documentation

void CCEventDispatcher::addKeyboardDelegate:priority: ( id< CCKeyboardEventDelegate delegate,
[priority] NSInteger  priority 
) [virtual]

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 propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

void CCEventDispatcher::addMouseDelegate:priority: ( id< CCMouseEventDelegate delegate,
[priority] NSInteger  priority 
) [virtual]

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 propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

void CCEventDispatcher::addTouchDelegate:priority: ( id< CCTouchEventDelegate delegate,
[priority] NSInteger  priority 
) [virtual]

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 propgated to all the delegates, unless the one delegate returns YES.

IMPORTANT: The delegate will be retained.

void CCEventDispatcher::removeAllKeyboardDelegates ( ) [virtual]

Removes all mouse delegates, releasing all the delegates

void CCEventDispatcher::removeAllMouseDelegates ( ) [virtual]

Removes all mouse delegates, releasing all the delegates

void CCEventDispatcher::removeAllTouchDelegates ( ) [virtual]

Removes all touch delegates, releasing all the delegates

void CCEventDispatcher::removeKeyboardDelegate: ( id  delegate) [virtual]

removes a mouse delegate

void CCEventDispatcher::removeMouseDelegate: ( id  delegate) [virtual]

removes a mouse delegate

void CCEventDispatcher::removeTouchDelegate: ( id  delegate) [virtual]

Removes a touch delegate

CCEventDispatcher* CCEventDispatcher::sharedDispatcher ( ) [static, virtual]

CCEventDispatcher singleton


The documentation for this interface was generated from the following file: