-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.d.ts
70 lines (68 loc) · 2.39 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
70
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export declare class Image {
readonly width: number
readonly height: number
cropSync(x: number, y: number, width: number, height: number): Image
crop(x: number, y: number, width: number, height: number): Promise<Image>
toPngSync(copyOutputData?: boolean | undefined | null): Buffer
toPng(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toJpegSync(copyOutputData?: boolean | undefined | null): Buffer
toJpeg(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toBmpSync(copyOutputData?: boolean | undefined | null): Buffer
toBmp(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toRawSync(copyOutputData?: boolean | undefined | null): Buffer
toRaw(copyOutputData?: boolean | undefined | null): Promise<Buffer>
}
export declare class Monitor {
/** Unique identifier associated with the screen. */
readonly id: number
/** Unique identifier associated with the screen. */
readonly name: string
/** The screen x coordinate. */
readonly x: number
/** The screen y coordinate. */
readonly y: number
/** The screen pixel width. */
readonly width: number
/** The screen pixel height. */
readonly height: number
/** Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. */
readonly rotation: number
/** Output device's pixel scale factor. */
readonly scaleFactor: number
/** The screen refresh rate. */
readonly frequency: number
/** Whether the screen is the main screen */
readonly isPrimary: boolean
static all(): Array<Monitor>
static fromPoint(x: number, y: number): Monitor | null
captureImageSync(): Image
captureImage(): Promise<Image>
}
export declare class Window {
/** The window id */
readonly id: number
/** The window app name */
readonly appName: string
/** The window title */
readonly title: string
/** The window current monitor */
readonly currentMonitor: Monitor
/** The window x coordinate. */
readonly x: number
/** The window x coordinate. */
readonly y: number
/** The window pixel width. */
readonly width: number
/** The window pixel height. */
readonly height: number
/** The window is minimized. */
readonly isMinimized: boolean
/** The window is maximized. */
readonly isMaximized: boolean
static all(): Array<Window>
captureImageSync(): Image
captureImage(): Promise<Image>
}