import { GLsizei2 } from './tuples'; /** * Mixin that incorporates resize event handling. The mixin depends on the global window resize event and forwards any * resize event to every existing instance of this class (global tracking). */ export declare abstract class Resizable { /** * Event identifier for resize event (single point of definition). */ private static readonly EVENT_IDENTIFIER; /** * Array for referencing all instances of resizable. */ private static instances; /** * Resize event availability (cached value). */ private static eventSupported; private static readonly MUTATION_OBSERVER_CONFIG; /** * Mutation observer for listening on element style changes. */ private _mutationObserver; /** * This function is called when the window is resized (and the event listener was successfully registered). The * event is forwarded to each registered resizable object. */ protected static resize(): void; /** * Retrieves the native width and height of a given element in device pixel (size on screen in physical pixels). If * the element is not found, or either window or its device pixel ratio are not defined, a default vec2 is returned. * If the canvas size is not yet computed, i.e., not provided in px unit, undefined will be return. * @param element - DOM element to get the width and height in (native) pixel from. * @returns - Size of the element in native screen pixels. Undefined when size is not available in 'px'. */ static elementSize(element: HTMLElement): GLsizei2 | undefined; /** * Every instance of resizable is registered in the global list of resizable instances. The first instance, however, * triggers the registration of the global window resize event listener. */ constructor(); protected _resizeEventListener: () => void; protected _mutationEventListener: () => void; /** * Observe a certain element for style or class mutations. Any mutation invokes the resize event. * @param element - element that can be observed for style mutations (style mutation will trigger resize). */ protected observe(element: HTMLElement): void; /** * Unregister this instance from the global list of resizable instances. On destruction of the last instance, the * resize event handle is removed. Please note that destruction needs to be invoked explicitly. */ protected dispose(): void; /** * This function is invoked when a resize event happened. */ protected abstract onResize(): void; }