import { View, Property } from '@nativescript/core';
import { CanvasRenderingContext } from '../common';
export interface ICanvasBase {
    on(eventName: 'ready', callback: (data: any) => void, thisArg?: any): void;
}
interface EventOptions {
    bubbles?: boolean;
    cancelable?: boolean;
    composed?: boolean;
}
export declare class DOMRectReadOnly {
    readonly bottom: number;
    readonly height: number;
    readonly left: number;
    readonly right: number;
    readonly top: number;
    readonly width: number;
    readonly x: number;
    readonly y: number;
    constructor(x: number, y: number, width: number, height: number, top?: number, right?: number, bottom?: number, left?: number);
}
export declare class DOMRect extends DOMRectReadOnly {
    constructor(x: number, y: number, width: number, height: number, top?: number, right?: number, bottom?: number, left?: number);
}
export declare class Event {
    readonly type: string;
    readonly bubbles: boolean;
    readonly cancelable: boolean;
    readonly composed: boolean;
    readonly timeStamp: number;
    constructor(type: string, options: EventOptions);
    preventDefault(): void;
    stopPropagation(): void;
}
interface UIEventOptions extends EventOptions {
    detail?: number;
    view?: any;
    sourceCapabilities?: any;
}
export declare class UIEvent extends Event {
    readonly detail: number;
    readonly view: any;
    readonly sourceCapabilities?: any;
    constructor(type: 'load' | 'unload' | 'abort' | 'error' | 'select', options?: UIEventOptions);
}
interface MouseEventOptions extends UIEventOptions {
    screenX?: number;
    screenY?: number;
    clientX?: number;
    clientY?: number;
    ctrlKey?: boolean;
    shiftKey?: boolean;
    altKey?: boolean;
    metaKey?: boolean;
    button?: number;
    buttons?: number;
    relatedTarget?: any;
    region?: any;
    movementX?: number;
    movementY?: number;
    pageX?: number;
    pageY?: number;
}
export declare class MouseEvent extends UIEvent {
    readonly screenX: number;
    readonly screenY: number;
    readonly clientX: number;
    readonly clientY: number;
    readonly ctrlKey: boolean;
    readonly shiftKey: boolean;
    readonly altKey: boolean;
    readonly metaKey: boolean;
    readonly button: number;
    readonly buttons: number;
    readonly relatedTarget: any;
    readonly region: any;
    readonly movementX: number;
    readonly movementY: number;
    readonly pageX: number;
    readonly pageY: number;
    constructor(type: 'dblclick' | 'mousedown' | 'mouseenter' | 'mouseleave' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseup', options?: MouseEventOptions);
}
interface PointerEventOptions extends MouseEventOptions {
    pointerId?: number;
    width?: number;
    height?: number;
    pressure?: number;
    tangentialPressure?: number;
    pointerType?: 'mouse' | 'touch' | 'pen';
    tiltX?: number;
    tiltY?: number;
    twist?: number;
    isPrimary?: boolean;
}
export declare class PointerEvent extends MouseEvent {
    readonly type: string;
    readonly pointerType: string;
    readonly pointerId: number;
    readonly width: number;
    readonly height: number;
    readonly pressure: number;
    readonly tangentialPressure: number;
    readonly tiltX?: number;
    readonly tiltY?: number;
    readonly twist?: number;
    readonly isPrimary?: boolean;
    constructor(type: 'pointerover' | 'pointerenter' | 'pointerdown' | 'pointermove' | 'pointerrawupdate' | 'pointerup' | 'pointercancel' | 'pointerout' | 'pointerleave' | 'gotpointercapture' | 'lostpointercapture', options?: PointerEventOptions);
    preventDefault(): void;
    stopPropagation(): void;
}
interface TouchOptions {
    identifier: number;
    target: any;
    clientX?: number;
    clientY?: number;
    screenX?: number;
    screenY?: number;
    pageX?: number;
    pageY?: number;
    radiusX?: number;
    radiusY?: number;
    rotationAngle?: number;
    force?: number;
}
export declare class Touch {
    readonly identifier: number;
    readonly target: any;
    readonly clientX: number;
    readonly clientY: number;
    readonly screenX: number;
    readonly screenY: number;
    readonly pageX: number;
    readonly pageY: number;
    readonly radiusX: number;
    readonly radiusY: number;
    readonly rotationAngle: number;
    readonly force: number;
    constructor(options: TouchOptions);
    preventDefault(): void;
    stopPropagation(): void;
}
export declare class TouchList extends Array {
    static fromList(list: Touch[]): TouchList;
    static empty(): TouchList;
    item(index: number): Touch;
    get length(): number;
}
interface TouchEventOptions extends UIEventOptions {
    touches?: TouchList;
    targetTouches?: TouchList;
    changedTouches?: Touch[];
    ctrlKey?: boolean;
    shiftKey?: boolean;
    altKey?: boolean;
    metaKey?: boolean;
}
export declare class TouchEvent extends UIEvent {
    readonly touches: TouchList;
    readonly targetTouches: TouchList;
    readonly changedTouches: Touch[];
    readonly ctrlKey: boolean;
    readonly shiftKey: boolean;
    readonly altKey: boolean;
    readonly metaKey: boolean;
    constructor(type: 'touchstart' | 'touchend' | 'touchmove' | 'touchcancel', options?: TouchEventOptions);
    preventDefault(): void;
    stopPropagation(): void;
}
interface WheelEventOptions extends UIEventOptions {
    deltaX?: number;
    deltaY?: number;
    deltaZ?: number;
    deltaMode?: number;
}
export declare class WheelEvent extends UIEvent {
    readonly deltaX?: number;
    readonly deltaY?: number;
    readonly deltaZ?: number;
    readonly deltaMode?: number;
    constructor(type: 'wheel', options?: WheelEventOptions);
}
export declare const ignoreTouchEventsProperty: Property<CanvasBase, boolean>;
export declare const doc: {
    defaultView: {
        getComputedStyle: () => any;
    };
};
export declare abstract class CanvasBase extends View implements ICanvasBase {
    static readyEvent: string;
    ignoreTouchEvents: boolean;
    _isCustom: boolean;
    _classList: Set<any>;
    _pointerMoveCallbacks: any[];
    _pointerUpCallbacks: any[];
    _pointerOutCallbacks: any[];
    _pointerLeaveCallbacks: any[];
    _pointerDownCallbacks: any[];
    _pointerCancelCallbacks: any[];
    _mouseMoveCallbacks: any[];
    _mouseUpCallbacks: any[];
    _mouseDownCallbacks: any[];
    _mouseCancelCallbacks: any[];
    _mouseWheelCallbacks: any[];
    _touchStartCallbacks: ((arg0: TouchEvent) => void)[];
    _touchEndCallbacks: ((arg0: TouchEvent) => void)[];
    _touchMoveCallbacks: ((arg0: TouchEvent) => void)[];
    _touchCancelCallbacks: ((arg0: TouchEvent) => void)[];
    _touches: Touch[];
    _touchesById: Touch[];
    _lastPointerEventById: {
        pointerId: number;
        x: number;
        y: number;
    }[];
    protected constructor();
    get ownerDocument(): {
        defaultView: {
            getComputedStyle: () => any;
        };
    } | Document;
    emit(): void;
    dispatchEvent(event: any): boolean;
    addEventListener(arg: string, callback: any, thisArg?: any): void;
    removeEventListener(arg: string, callback: any, thisArg?: any): void;
    private _moveCallback;
    private _upCallback;
    private _downCallback;
    private _cancelCallback;
    private _pinchCallback;
    _handleEvents(event: any): void;
    get classList(): Set<any>;
    _readyEvent(): void;
    getAttribute(attrib: any): any;
    setAttribute(attrib: any): void;
    abstract getContext(type: string, contextAttributes?: any): CanvasRenderingContext | null;
    abstract getBoundingClientRect(): {
        x: number;
        y: number;
        width: number;
        height: number;
        top: number;
        right: number;
        bottom: number;
        left: number;
    };
    setPointerCapture(id: any): void;
    releasePointerCapture(id: any): void;
}
export {};
