-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathindex.d.ts
More file actions
84 lines (82 loc) · 2.75 KB
/
Copy pathindex.d.ts
File metadata and controls
84 lines (82 loc) · 2.75 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* auto-generated by NAPI-RS */
/* eslint-disable */
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 {
/** List all monitors */
static all(): Array<Monitor>
/** Get the monitor by point */
static fromPoint(x: number, y: number): Monitor | null
/** Unique identifier associated with the screen. */
id(): number
/** Unique identifier associated with the screen. */
name(): string
/** The screen x coordinate. */
x(): number
/** The screen x coordinate. */
y(): number
/** The screen pixel width. */
width(): number
/** The screen pixel height. */
height(): number
/** Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. */
rotation(): number
/** Output device's pixel scale factor. */
scaleFactor(): number
/** The screen refresh rate. */
frequency(): number
/** Whether the screen is the main screen */
isPrimary(): boolean
/** Whether the screen is builtin */
isBuiltin(): boolean
/** Capture image of the monitor synchronously */
captureImageSync(): Image
/** Capture image of the monitor asynchronously */
captureImage(): Promise<Image>
}
export declare class Window {
/** List all windows, sorted by z coordinate. */
static all(): Array<Window>
/** The window id */
id(): number
/** The window process id */
pid(): number
/** The window app name */
appName(): string
/** The window title */
title(): string
/** The window current monitor */
currentMonitor(): Monitor
/** The window x coordinate. */
x(): number
/** The window y coordinate. */
y(): number
/** The window z coordinate. */
z(): number
/** The window pixel width. */
width(): number
/** The window pixel height. */
height(): number
/** The window is minimized. */
isMinimized(): boolean
/** The window is maximized. */
isMaximized(): boolean
/** The window is focused. */
isFocused(): boolean
/** capture the window image synchronously */
captureImageSync(): Image
/** capture the window image asynchronously */
captureImage(): Promise<Image>
}