UNPKG

2.65 kBTypeScriptView Raw
1import { App } from '../components/app/app';
2/** @hidden */
3export declare const GESTURE_GO_BACK_SWIPE = "goback-swipe";
4/** @hidden */
5export declare const GESTURE_MENU_SWIPE = "menu-swipe";
6/** @hidden */
7export declare const GESTURE_ITEM_SWIPE = "item-swipe";
8/** @hidden */
9export declare const GESTURE_REFRESHER = "refresher";
10/** @hidden */
11export declare const GESTURE_TOGGLE = "toggle";
12/** @hidden */
13export declare const GESTURE_PRIORITY_SLIDING_ITEM = -10;
14/** @hidden */
15export declare const GESTURE_PRIORITY_REFRESHER = 0;
16/** @hidden */
17export declare const GESTURE_PRIORITY_MENU_SWIPE = 10;
18/** @hidden */
19export declare const GESTURE_PRIORITY_GO_BACK_SWIPE = 20;
20/** @hidden */
21export declare const GESTURE_PRIORITY_TOGGLE = 30;
22/**
23* @hidden
24*/
25export interface GestureOptions {
26 name: string;
27 disableScroll?: boolean;
28 priority?: number;
29}
30/**
31* @hidden
32*/
33export interface BlockerOptions {
34 disableScroll?: boolean;
35 disable?: string[];
36}
37/**
38* @hidden
39*/
40export declare const BLOCK_ALL: BlockerOptions;
41/**
42* @hidden
43*/
44export declare class GestureController {
45 private _app;
46 private id;
47 private requestedStart;
48 private disabledGestures;
49 private disabledScroll;
50 private capturedID;
51 constructor(_app: App);
52 createGesture(opts: GestureOptions): GestureDelegate;
53 createBlocker(opts?: BlockerOptions): BlockerDelegate;
54 newID(): number;
55 start(gestureName: string, id: number, priority: number): boolean;
56 capture(gestureName: string, id: number, priority: number): boolean;
57 release(id: number): void;
58 disableGesture(gestureName: string, id: number): void;
59 enableGesture(gestureName: string, id: number): void;
60 disableScroll(id: number): void;
61 enableScroll(id: number): void;
62 canStart(gestureName: string): boolean;
63 isCaptured(): boolean;
64 isScrollDisabled(): boolean;
65 isDisabled(gestureName: string): boolean;
66}
67/**
68* @hidden
69*/
70export declare class GestureDelegate {
71 private name;
72 private id;
73 private controller;
74 private priority;
75 private disableScroll;
76 constructor(name: string, id: number, controller: GestureController, priority: number, disableScroll: boolean);
77 canStart(): boolean;
78 start(): boolean;
79 capture(): boolean;
80 release(): void;
81 destroy(): void;
82}
83/**
84* @hidden
85*/
86export declare class BlockerDelegate {
87 private id;
88 private controller;
89 private disable;
90 private disableScroll;
91 blocked: boolean;
92 constructor(id: number, controller: GestureController, disable: string[], disableScroll: boolean);
93 block(): void;
94 unblock(): void;
95 destroy(): void;
96}