PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/osflash/signals/natives/INativeDispatcher.as

http://github.com/robertpenner/as3-signals
ActionScript | 40 lines | 14 code | 6 blank | 20 comment | 0 complexity | a680dfca1e29f67757928d04b0d54add MD5 | raw file
 1package org.osflash.signals.natives
 2{
 3	import org.osflash.signals.IPrioritySignal;
 4
 5	import flash.events.Event;
 6	import flash.events.IEventDispatcher;
 7
 8	/**
 9	 * Similar to IDispatcher but using strong types specific to Flash's native event system.
10	 */
11	public interface INativeDispatcher extends IPrioritySignal
12	{
13		/**
14		 * The type of event permitted to be dispatched. Corresponds to flash.events.Event.type.
15		 */
16		function get eventType():String;
17		
18		/**
19		 * The class of event permitted to be dispatched. Will be flash.events.Event or a subclass.
20		 */
21		function get eventClass():Class;
22		
23		/**
24		 * The object considered the source of the dispatched events.
25		 */
26		function get target():IEventDispatcher;
27
28		function set target(value:IEventDispatcher):void;
29
30		/**
31		 * Dispatches an event to listeners.
32		 * @param	event			An instance of a class that is or extends flash.events.Event.
33		 * @throws	ArgumentError	<code>ArgumentError</code>: Event object is <code>null</code>.
34		 * @throws	ArgumentError	<code>ArgumentError</code>:	Event object [event] is not an instance of [eventClass].
35		 * @throws	ArgumentError	<code>ArgumentError</code>:	Event object has incorrect type. Expected [eventType] but was [event.type].
36		 * @throws  ArgumentError   <code>ArgumentError</code>:  Target object cannot be <code>null</code>.
37		 */
38		function dispatchEvent(event:Event):Boolean;
39	}
40}