~extremepopcorn/dhlib/dhlib_ep

« back to all changes in this revision

Viewing changes to lib/gamex/EventDispatcher.mhx

  • Committer: edA-qa mort-ora-y
  • Date: 2010-02-16 05:36:32 UTC
  • Revision ID: eda-qa@disemia.com-20100216053632-60lt7fndfi3fgblw
first

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package gamex;
 
2
 
 
3
/**
 
4
 * Defines an interface by which events can be dispatched. This can be used
 
5
 * instead of direct reference to BaseGameDriver objects as it reduces
 
6
 * coupling and eases class management.
 
7
 *
 
8
 * Refer to BaseGameDriver for the function documentation.
 
9
 */
 
10
interface EventDispatcher
 
11
{
 
12
        public function addEventListener( evt : String, listener : Dynamic -> Void, ?priority : Int, ?weak : Bool = true ) : Void;
 
13
        public function removeEventListener( evt : String, listener : Dynamic -> Void ) : Void;
 
14
        public function postEvent( evt : BaseEvent ) : Void;
 
15
        public function queueEvent( evt : BaseEvent ) : Void;
 
16
        public function dispatchEvent( evt : BaseEvent ) : Void;
 
17
}