UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

37 lines (36 loc) 1.47 kB
import { GestureEventData } from '.'; import { View } from '../core/view'; import { GesturesObserverBase, GestureTypes } from './gestures-common'; export * from './gestures-common'; export declare function observe(target: View, type: GestureTypes, callback: (args: GestureEventData) => void, context?: any): GesturesObserver; export declare class GesturesObserver extends GesturesObserverBase { private readonly _recognizers; private _onTargetLoaded; private _onTargetUnloaded; androidOnTouchEvent(motionEvent: android.view.MotionEvent): void; /** * Observes a singular GestureTypes value (e.g. GestureTypes.tap). * * Does not support observing plural GestureTypes values, e.g. * GestureTypes.tap & GestureTypes.doubleTap. */ observe(type: GestureTypes): void; /** * Given a singular GestureTypes value (e.g. GestureTypes.tap), adds a * UIGestureRecognizer for it and populates a RecognizerCache entry in * this._recognizers. * * Does not support attaching plural GestureTypes values, e.g. * GestureTypes.tap & GestureTypes.doubleTap. */ private _attach; private _detach; disconnect(): void; _executeCallback(args: GestureEventData): void; /** * Creates a UIGestureRecognizer (and populates a RecognizerCache entry in * this._recognizers) corresponding to the singular GestureTypes value passed * in. */ private _createRecognizer; }