import { Point } from "../geom/Point"; import { InteractiveObject } from "../display/InteractiveObject"; import { ASObject } from "../../avm2/nat/ASObject"; import { MouseCursorData } from "./MouseCursorData"; import { Stage } from '../display/Stage'; import { Sprite } from '../display/Sprite'; /** * Copyright 2014 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Dispatches AS3 mouse events. */ export declare class MouseEventDispatcher { stage: Stage; currentTarget: InteractiveObject; /** * Finds the interactive object on which the event is dispatched. */ private _findTarget; /** * Converts DOM mouse event data into AS3 mouse events. */ private _dispatchMouseEvent; /** * Handles the mouse event and returns the target on which the event was dispatched. */ handleMouseEvent(data: MouseEventAndPointData): InteractiveObject; } export declare const enum MouseButtonFlags { Left = 1, Middle = 2, Right = 4 } export interface MouseEventAndPointData { type: string; point: Point; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; buttons: MouseButtonFlags; } export declare class Mouse extends ASObject { static axClass: typeof Mouse; static classInitializer(): void; constructor(); static _cursor: string; static get supportsCursor(): boolean; static get cursor(): string; static set cursor(value: string); static get supportsNativeCursor(): boolean; static hide(): void; static show(): void; static registerCursor(name: string, cursor: MouseCursorData): void; static unregisterCursor(name: string): void; static _currentPosition: Point; /** * Remembers the current mouse position. */ static updateCurrentPosition(value: Point): void; static draggableObject: Sprite; }