@nativescript-community/gesturehandler
Version:
Declarative API exposing platform native touch and gesture system to NativeScript.
30 lines (29 loc) • 1.06 kB
TypeScript
import { View } from '@nativescript/core';
import { GestureEventData, GestureTypes } from '@nativescript/core/ui/gestures';
export declare function observe(target: View, type: GestureTypes, callback: (args: GestureEventData) => void, context?: any): GesturesObserver;
export declare class GesturesObserver {
private _callback;
private _target;
private _context;
type: GestureTypes;
private nObserver?;
get callback(): (args: GestureEventData) => void;
get target(): View & {
_gestureHandlers?: any;
};
get context(): any;
constructor(target: View, callback: (args: GestureEventData) => void, context: any);
disconnect(): void;
private _notifyTouch;
private gestureHandler;
private _eventData;
private _onTargetLoaded;
private _onTargetUnloaded;
observe(type: GestureTypes): void;
private _detach;
private emitEvent;
private onGestureStateChange;
private onGestureTouchChange;
private _attach;
androidOnTouchEvent(motionEvent: android.view.MotionEvent): void;
}