import type Application from "../application/application.ts";
import type { Vector2d } from "../math/vector2d.ts";
import Pointer from "./pointer.ts";
/**
* reference to the active application instance
* @ignore
*/
export declare let _app: Application;
/**
* the default target element for pointer events (usually the canvas element in which the game is rendered)
*/
export declare let pointerEventTarget: EventTarget | null;
/**
* Pointer information (current position and size)
*/
export declare const pointer: Pointer;
/**
* indicates if the pointer is currently locked
*/
export declare let locked: boolean;
/**
* time interval for event throttling in milliseconds
* default value : "1000/me.timer.maxfps" ms
* set to 0 ms to disable the feature
*/
export declare let throttlingInterval: number | undefined;
/**
* return true if there are pending pointer events in the queue
* @returns true if there are pending events
*/
export declare function hasActiveEvents(): boolean;
/**
* return true if there are register pointer events
* @see {@link registerPointerEvent}
* @returns true if there are pending events
*/
export declare function hasRegisteredEvents(): boolean;
/**
* Translate the specified x and y values from the global (absolute)
* coordinate to local (viewport) relative coordinate.
* @param x - the global x coordinate to be translated.
* @param y - the global y coordinate to be translated.
* @param v - an optional vector object where to set the translated coordinates
* @returns A vector object with the corresponding translated coordinates
* @example
* onMouseEvent : function (pointer) {
* // convert the given into local (viewport) relative coordinates
* let pos = me.input.globalToLocal(pointer.clientX, pointer.clientY);
* // do something with pos !
* };
*/
export declare function globalToLocal(x: number, y: number, v?: Vector2d): Vector2d;
/**
* enable/disable all gestures on the given element.
* by default melonJS will disable browser handling of all panning and zooming gestures.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action}
* @param element - the HTML element to configure
* @param value - the touch-action CSS value
*/
export declare function setTouchAction(element: HTMLCanvasElement, value?: string): void;
/**
* Associate a pointer event to a keycode
* Left button -- 0
* Middle button -- 1
* Right button -- 2
* @param args - button and/or keyCode
* @example
* // enable the keyboard
* me.input.bindKey(me.input.KEY.X, "shoot");
* // map the left button click on the X key (default if the button is not specified)
* me.input.bindPointer(me.input.KEY.X);
* // map the right button click on the X key
* me.input.bindPointer(me.input.pointer.RIGHT, me.input.KEY.X);
*/
export declare function bindPointer(...args: number[]): void;
/**
* unbind the defined keycode
* @param button - (accordingly to W3C values : 0,1,2 for left, middle and right buttons)
* @example
* me.input.unbindPointer(me.input.pointer.LEFT);
*/
export declare function unbindPointer(button?: number): void;
/**
* allows registration of event listeners on the object target.
* melonJS will pass a me.Pointer object to the defined callback.
* @see Pointer
* @see {@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events | W3C Pointer Event list}
* @param eventType - The event type for which the object is registering
* melonJS currently supports:
*
"pointermove""pointerdown""pointerup""pointerenter""pointerover""pointerleave""pointercancel""wheel"