package openfl.events {
	
	
	import openfl.display.InteractiveObject;
	
	
	/**
	 * @externs
	 * A MouseEvent object is dispatched into the event flow whenever mouse events
	 * occur. A mouse event is usually generated by a user input device, such as a
	 * mouse or a trackball, that uses a pointer.
	 *
	 * When nested nodes are involved, mouse events target the deepest possible
	 * nested node that is visible in the display list. This node is called the
	 * _target node_. To have a target node's ancestor receive notification
	 * of a mouse event, use `EventDispatcher.addEventListener()` on
	 * the ancestor node with the `type` parameter set to the specific
	 * mouse event you want to detect.
	 * 
	 */
	public class MouseEvent extends Event {
		
		
		/**
		 * Defines the value of the `type` property of a
		 * `click` event object.
		 *
		 * This event has the following properties:
		 */
		public static const CLICK:String = "click";
		
		// #if flash
		// @:noCompletion @:dox(hide) @:require(flash11_2) public static var CONTEXT_MENU:String;
		// #end
		
		/**
		 * Defines the value of the `type` property of a
		 * `doubleClick` event object. The `doubleClickEnabled`
		 * property must be `true` for an object to generate the
		 * `doubleClick` event.
		 *
		 * This event has the following properties:
		 */
		public static const DOUBLE_CLICK:String = "doubleClick";
		
		/**
		 * Defines the value of the `type` property of a
		 * `middleClick` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MIDDLE_CLICK:String = "middleClick";
		
		/**
		 * Defines the value of the `type` property of a
		 * `middleMouseDown` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MIDDLE_MOUSE_DOWN:String = "middleMouseDown";
		
		/**
		 * Defines the value of the `type` property of a
		 * `middleMouseUp` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MIDDLE_MOUSE_UP:String = "middleMouseUp";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseDown` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_DOWN:String = "mouseDown";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseMove` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_MOVE:String = "mouseMove";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseOut` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_OUT:String = "mouseOut";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseOver` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_OVER:String = "mouseOver";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseUp` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_UP:String = "mouseUp";
		
		/**
		 * Defines the value of the `type` property of a
		 * `mouseWheel` event object.
		 *
		 * This event has the following properties:
		 */
		public static const MOUSE_WHEEL:String = "mouseWheel";
		
		/**
		 * Defines the value of the `type` property of a
		 * `releaseOutside` event object.
		 *
		 * This event has the following properties:
		 */
		public static const RELEASE_OUTSIDE:String = "releaseOutside";
		
		/**
		 * Defines the value of the `type` property of a
		 * `rightClick` event object.
		 *
		 * This event has the following properties:
		 */
		public static const RIGHT_CLICK:String = "rightClick";
		
		/**
		 * Defines the value of the `type` property of a
		 * `rightMouseDown` event object.
		 *
		 * This event has the following properties:
		 */
		public static const RIGHT_MOUSE_DOWN:String = "rightMouseDown";
		
		/**
		 * Defines the value of the `type` property of a
		 * `rightMouseUp` event object.
		 *
		 * This event has the following properties:
		 */
		public static const RIGHT_MOUSE_UP:String = "rightMouseUp";
		
		/**
		 * Defines the value of the `type` property of a
		 * `rollOut` event object.
		 *
		 * This event has the following properties:
		 */
		public static const ROLL_OUT:String = "rollOut";
		
		/**
		 * Defines the value of the `type` property of a
		 * `rollOver` event object.
		 *
		 * This event has the following properties:
		 */
		public static const ROLL_OVER:String = "rollOver";
		
		/**
		 * Indicates whether the Alt key is active(`true`) or inactive
		 * (`false`). Supported for Windows only. On other operating
		 * systems, this property is always set to `false`.
		 */
		public var altKey:Boolean;
		
		/**
		 * Indicates whether the primary mouse button is pressed(`true`)
		 * or not(`false`).
		 */
		public var buttonDown:Boolean;
		
		public var clickCount:int;
		
		public var commandKey:Boolean;
		
		/**
		 * On Windows or Linux, indicates whether the Ctrl key is active
		 * (`true`) or inactive(`false`). On Macintosh,
		 * indicates whether either the Control key or the Command key is activated.
		 */
		public var ctrlKey:Boolean;
		
		/**
		 * Indicates how many lines should be scrolled for each unit the user rotates
		 * the mouse wheel. A positive delta value indicates an upward scroll; a
		 * negative value indicates a downward scroll. Typical values are 1 to 3, but
		 * faster rotation may produce larger values. This setting depends on the
		 * device and operating system and is usually configurable by the user. This
		 * property applies only to the `MouseEvent.mouseWheel` event.
		 */
		public var delta:int;
		
		public var isRelatedObjectInaccessible:Boolean;
		
		/**
		 * The horizontal coordinate at which the event occurred relative to the
		 * containing sprite.
		 */
		public var localX:Number;
		
		/**
		 * The vertical coordinate at which the event occurred relative to the
		 * containing sprite.
		 */
		public var localY:Number;
		
		// #if flash
		// @:noCompletion @:dox(hide) @:require(flash11_2) public var movementX:Number;
		// #end
		
		// #if flash
		// @:noCompletion @:dox(hide) @:require(flash11_2) public var movementY:Number;
		// #end
		
		/**
		 * A reference to a display list object that is related to the event. For
		 * example, when a `mouseOut` event occurs,
		 * `relatedObject` represents the display list object to which the
		 * pointing device now points. This property applies to the
		 * `mouseOut`, `mouseOver`, `rollOut`, and
		 * `rollOver` events.
		 *
		 * The value of this property can be `null` in two
		 * circumstances: if there no related object, or there is a related object,
		 * but it is in a security sandbox to which you don't have access. Use the
		 * `isRelatedObjectInaccessible()` property to determine which of
		 * these reasons applies.
		 */
		public var relatedObject:InteractiveObject;
		
		/**
		 * Indicates whether the Shift key is active(`true`) or inactive
		 * (`false`).
		 */
		public var shiftKey:Boolean;
		
		/**
		 * The horizontal coordinate at which the event occurred in global Stage
		 * coordinates. This property is calculated when the `localX`
		 * property is set.
		 */
		public var stageX:Number;
		
		/**
		 * The vertical coordinate at which the event occurred in global Stage
		 * coordinates. This property is calculated when the `localY`
		 * property is set.
		 */
		public var stageY:Number;
		
		
		/**
		 * Creates an Event object that contains information about mouse events.
		 * Event objects are passed as parameters to event listeners.
		 * 
		 * @param type          The type of the event. Possible values are:
		 *                      `MouseEvent.CLICK`,
		 *                      `MouseEvent.DOUBLE_CLICK`,
		 *                      `MouseEvent.MOUSE_DOWN`,
		 *                      `MouseEvent.MOUSE_MOVE`,
		 *                      `MouseEvent.MOUSE_OUT`,
		 *                      `MouseEvent.MOUSE_OVER`,
		 *                      `MouseEvent.MOUSE_UP`,
		 *                      `MouseEvent.MIDDLE_CLICK`,
		 *                      `MouseEvent.MIDDLE_MOUSE_DOWN`,
		 *                      `MouseEvent.MIDDLE_MOUSE_UP`,
		 *                      `MouseEvent.RIGHT_CLICK`,
		 *                      `MouseEvent.RIGHT_MOUSE_DOWN`,
		 *                      `MouseEvent.RIGHT_MOUSE_UP`,
		 *                      `MouseEvent.MOUSE_WHEEL`,
		 *                      `MouseEvent.ROLL_OUT`, and
		 *                      `MouseEvent.ROLL_OVER`.
		 * @param bubbles       Determines whether the Event object participates in
		 *                      the bubbling phase of the event flow.
		 * @param cancelable    Determines whether the Event object can be canceled.
		 * @param localX        The horizontal coordinate at which the event occurred
		 *                      relative to the containing sprite.
		 * @param localY        The vertical coordinate at which the event occurred
		 *                      relative to the containing sprite.
		 * @param relatedObject The complementary InteractiveObject instance that is
		 *                      affected by the event. For example, when a
		 *                      `mouseOut` event occurs,
		 *                      `relatedObject` represents the display
		 *                      list object to which the pointing device now points.
		 * @param ctrlKey       On Windows or Linux, indicates whether the Ctrl key
		 *                      is activated. On Mac, indicates whether either the
		 *                      Ctrl key or the Command key is activated.
		 * @param altKey        Indicates whether the Alt key is activated(Windows
		 *                      or Linux only).
		 * @param shiftKey      Indicates whether the Shift key is activated.
		 * @param buttonDown    Indicates whether the primary mouse button is
		 *                      pressed.
		 * @param delta         Indicates how many lines should be scrolled for each
		 *                      unit the user rotates the mouse wheel. A positive
		 *                      delta value indicates an upward scroll; a negative
		 *                      value indicates a downward scroll. Typical values are
		 *                      1 to 3, but faster rotation may produce larger
		 *                      values. This parameter is used only for the
		 *                      `MouseEvent.mouseWheel` event.
		 */
		public function MouseEvent (type:String, bubbles:Boolean = true, cancelable:Boolean = false, localX:Number = 0, localY:Number = 0, relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, buttonDown:Boolean = false, delta:int = 0, commandKey:Boolean = false, clickCount:int = 0) { super (type); }
		
		
		/**
		 * Instructs Flash Player or Adobe AIR to render after processing of this
		 * event completes, if the display list has been modified.
		 * 
		 */
		public function updateAfterEvent ():void {}
		
		
	}
	
	
}