-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.d.ts
69 lines (61 loc) · 2.47 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// +-+-+-+-+-+-+
// |y|o|o|n|i|t|
// +-+-+-+-+-+-+
//
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | Yoonit Camera Plugin for NativeScript applications |
// | Luigui Delyer, Haroldo Teruya, |
// | Victor Goulart & Márcio Bruffato @ Cyberlabs AI 2020 |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
import {
ContentView,
EventData
} from '@nativescript/core';
export interface FaceImageCreatedEventData extends EventData {
count: number;
total: number;
image: any;
}
export interface FrameImageCreatedEventData extends EventData {
count: number;
total: number;
image: any;
}
export interface FaceDetectedEventData extends EventData {
x: number;
y: number;
width: number;
height: number;
}
export interface BarcodeScannedEventData extends EventData {
content: string;
}
export interface StatusEventData extends EventData {
status: any;
}
export declare class Camera extends ContentView {
requestPermission(explanationText?: string): Promise<boolean>;
hasPermission(): boolean;
preview(): void;
startCapture(captureType: string): void;
stopCapture(): void;
toggleLens(): void;
getLens(): number;
setFaceNumberOfImages(faceNumberOfImages: number): void;
setFaceDetectionBox(faceDetectionBox: boolean): void;
setFaceTimeBetweenImages(faceTimeBetweenImages: number): void;
setFacePaddingPercent(facePaddingPercent: number): void;
setFaceImageSize(width: number, height: number): void;
setFaceCaptureMinSize(faceCaptureMinSize: number): void;
setFaceCaptureMaxSize(faceCaptureMaxSize: number): void;
setFrameNumberOfImages(frameNumberOfImages: number): void;
setFrameTimeBetweenImages(frameTimeBetweenImages: number): void;
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
on(event: faceImage, callback: (args: FaceImageCreatedEventData) => void, thisArg?: any);
on(event: frameImage, callback: (args: FrameImageCreatedEventData) => void, thisArg?: any);
on(event: faceDetected, callback: (args: FaceDetectedEventData) => void, thisArg?: any);
on(event: endCapture, callback: () => void, thisArg?: any);
on(event: qrCodeContent, callback: (args: BarCodeScannedEventData) => void, thisArg?: any);
on(event: status, callback: (args: MessageEventData) => void, thisArg?: any);
on(event: permissionDenied, callback: () => void, thisArg?: any);
}