1 | import { App } from '../components/app/app';
|
2 |
|
3 | export declare const GESTURE_GO_BACK_SWIPE = "goback-swipe";
|
4 |
|
5 | export declare const GESTURE_MENU_SWIPE = "menu-swipe";
|
6 |
|
7 | export declare const GESTURE_ITEM_SWIPE = "item-swipe";
|
8 |
|
9 | export declare const GESTURE_REFRESHER = "refresher";
|
10 |
|
11 | export declare const GESTURE_TOGGLE = "toggle";
|
12 |
|
13 | export declare const GESTURE_PRIORITY_SLIDING_ITEM = -10;
|
14 |
|
15 | export declare const GESTURE_PRIORITY_REFRESHER = 0;
|
16 |
|
17 | export declare const GESTURE_PRIORITY_MENU_SWIPE = 10;
|
18 |
|
19 | export declare const GESTURE_PRIORITY_GO_BACK_SWIPE = 20;
|
20 |
|
21 | export declare const GESTURE_PRIORITY_TOGGLE = 30;
|
22 |
|
23 |
|
24 |
|
25 | export interface GestureOptions {
|
26 | name: string;
|
27 | disableScroll?: boolean;
|
28 | priority?: number;
|
29 | }
|
30 |
|
31 |
|
32 |
|
33 | export interface BlockerOptions {
|
34 | disableScroll?: boolean;
|
35 | disable?: string[];
|
36 | }
|
37 |
|
38 |
|
39 |
|
40 | export declare const BLOCK_ALL: BlockerOptions;
|
41 |
|
42 |
|
43 |
|
44 | export 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 | */
|
70 | export 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 | */
|
86 | export 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 | }
|