import Window from "./Window"; declare namespace openfl.display { /** * The Application class is a Lime Application instance that uses * OpenFL Window by default when a new window is created. * */ export class Application { constructor(); /** * The device's orientation. * */ get deviceOrientation(): number; /** * Meta-data values for the application, such as a version or a package name * */ meta: any; /** * A list of currently attached Module instances * */ modules: Array; /** * Update events are dispatched each frame (usually just before rendering) * */ onUpdate: any; /** * Dispatched when a new window has been created by this application * */ onCreateWindow: any; /** * Dispatched when the orientation of the display has changed. * */ onDisplayOrientationChange: any; /** * Dispatched when the orientation of the device has changed. Typically, * the display and device orientation values are the same. However, if the * display orientation is locked to portrait or landscape, the display and * device orientations may be different. * */ onDeviceOrientationChange: any; /** * The Preloader for the current Application * */ get preloader(): any; /** * The Window associated with this Application, or the first Window * if there are multiple Windows active * */ get window(): any; /** * A list of active Window instances associated with this Application * */ get windows(): Array; /** * Adds a new module to the Application * @param module A module to add * */ addModule(module: any): void; /** * Called when a gamepad axis move event is fired * @param gamepad The current gamepad * @param axis The axis that was moved * @param value The axis value (between 0 and 1) * */ onGamepadAxisMove(gamepad: any, axis: number, value: number): void; /** * Called when a gamepad button down event is fired * @param gamepad The current gamepad * @param button The button that was pressed * */ onGamepadButtonDown(gamepad: any, button: number): void; /** * Called when a gamepad button up event is fired * @param gamepad The current gamepad * @param button The button that was released * */ onGamepadButtonUp(gamepad: any, button: number): void; /** * Called when a gamepad is connected * @param gamepad The gamepad that was connected * */ onGamepadConnect(gamepad: any): void; /** * Called when a gamepad is disconnected * @param gamepad The gamepad that was disconnected * */ onGamepadDisconnect(gamepad: any): void; /** * Called when a joystick axis move event is fired * @param joystick The current joystick * @param axis The axis that was moved * @param value The axis value (between 0 and 1) * */ onJoystickAxisMove(joystick: any, axis: number, value: number): void; /** * Called when a joystick button down event is fired * @param joystick The current joystick * @param button The button that was pressed * */ onJoystickButtonDown(joystick: any, button: number): void; /** * Called when a joystick button up event is fired * @param joystick The current joystick * @param button The button that was released * */ onJoystickButtonUp(joystick: any, button: number): void; /** * Called when a joystick is connected * @param joystick The joystick that was connected * */ onJoystickConnect(joystick: any): void; /** * Called when a joystick is disconnected * @param joystick The joystick that was disconnected * */ onJoystickDisconnect(joystick: any): void; /** * Called when a joystick hat move event is fired * @param joystick The current joystick * @param hat The hat that was moved * @param position The current hat position * */ onJoystickHatMove(joystick: any, hat: number, position: number): void; /** * Called when a key down event is fired on the primary window * @param keyCode The code of the key that was pressed * @param modifier The modifier of the key that was pressed * */ onKeyDown(keyCode: number, modifier: number): void; /** * Called when a key up event is fired on the primary window * @param keyCode The code of the key that was released * @param modifier The modifier of the key that was released * */ onKeyUp(keyCode: number, modifier: number): void; /** * Called when the module is exiting * */ onModuleExit(code: number): void; /** * Called when a mouse down event is fired on the primary window * @param x The current x coordinate of the mouse * @param y The current y coordinate of the mouse * @param button The ID of the mouse button that was pressed * */ onMouseDown(x: number, y: number, button: number): void; /** * Called when a mouse move event is fired on the primary window * @param x The current x coordinate of the mouse * @param y The current y coordinate of the mouse * */ onMouseMove(x: number, y: number): void; /** * Called when a mouse move relative event is fired on the primary window * @param x The x movement of the mouse * @param y The y movement of the mouse * */ onMouseMoveRelative(x: number, y: number): void; /** * Called when a mouse up event is fired on the primary window * @param x The current x coordinate of the mouse * @param y The current y coordinate of the mouse * @param button The ID of the button that was released * */ onMouseUp(x: number, y: number, button: number): void; /** * Called when a mouse wheel event is fired on the primary window * @param deltaX The amount of horizontal scrolling (if applicable) * @param deltaY The amount of vertical scrolling (if applicable) * @param deltaMode The units of measurement used * */ onMouseWheel(deltaX: number, deltaY: number, deltaMode: any): void; /** * Called when a preload complete event is fired * */ onPreloadComplete(): void; /** * Called when a preload progress event is fired * @param loaded The number of items that are loaded * @param total The total number of items will be loaded * */ onPreloadProgress(loaded: number, total: number): void; /** * Called when a render context is lost on the primary window * */ onRenderContextLost(): void; /** * Called when a render context is restored on the primary window * @param context The render context relevant to the event * */ onRenderContextRestored(context: any): void; /** * Called when a text edit event is fired on the primary window * @param text The current replacement text * @param start The starting index for the edit * @param length The length of the edit * */ onTextEdit(text: string, start: number, length: number): void; /** * Called when a text input event is fired on the primary window * @param text The current input text * */ onTextInput(text: string): void; /** * Called when a touch cancel event is fired * @param touch The current touch object * */ onTouchCancel(touch: any): void; /** * Called when a touch end event is fired * @param touch The current touch object * */ onTouchEnd(touch: any): void; /** * Called when a touch move event is fired * @param touch The current touch object * */ onTouchMove(touch: any): void; /** * Called when a touch start event is fired * @param touch The current touch object * */ onTouchStart(touch: any): void; /** * Called when a window activate event is fired on the primary window * */ onWindowActivate(): void; /** * Called when a window close event is fired on the primary window * */ onWindowClose(): void; /** * Called when the primary window is created * */ onWindowCreate(): void; /** * Called when a window deactivate event is fired on the primary window * */ onWindowDeactivate(): void; /** * Called when a window drop file event is fired on the primary window * */ onWindowDropFile(file: string): void; /** * Called when a window enter event is fired on the primary window * */ onWindowEnter(): void; /** * Called when a window expose event is fired on the primary window * */ onWindowExpose(): void; /** * Called when a window focus in event is fired on the primary window * */ onWindowFocusIn(): void; /** * Called when a window focus out event is fired on the primary window * */ onWindowFocusOut(): void; /** * Called when the primary window enters fullscreen * */ onWindowFullscreen(): void; /** * Called when a window leave event is fired on the primary window * */ onWindowLeave(): void; /** * Called when a window move event is fired on the primary window * @param x The x position of the window in desktop coordinates * @param y The y position of the window in desktop coordinates * */ onWindowMove(x: number, y: number): void; /** * Called when the primary window is minimized * */ onWindowMinimize(): void; /** * Called when a window resize event is fired on the primary window * @param width The width of the window * @param height The height of the window * */ onWindowResize(width: number, height: number): void; /** * Called when the primary window is restored from being minimized or fullscreen * */ onWindowRestore(): void; /** * Removes a module from the Application * @param module A module to remove * */ removeModule(module: any): void; /** * Called when a render event is fired on the primary window * @param context The render context ready to be rendered * */ render(context: any): void; /** * Called when an update event is fired on the primary window * @param deltaTime The amount of time in milliseconds that has elapsed since the last update * */ update(deltaTime: number): void; /** * Exit events are dispatched when the application is exiting * */ onExit: any; createWindow(attributes: any): Window; } } export default openfl.display.Application;