forked from nut-tree/nut.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreen.html
612 lines (612 loc) · 33.3 KB
/
screen.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Screen | @nut-tree/nut-js</title>
<meta name="description" content="Documentation for @nut-tree/nut-js">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@nut-tree/nut-js</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="screen.html">Screen</a>
</li>
</ul>
<h1>Class Screen</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html">Screen</a> class provides methods to access screen content of a systems main display</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Screen</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="screen.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#capture" class="tsd-kind-icon">capture</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#find" class="tsd-kind-icon">find</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#height" class="tsd-kind-icon">height</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#highlight" class="tsd-kind-icon">highlight</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#on" class="tsd-kind-icon">on</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#waitfor" class="tsd-kind-icon">wait<wbr>For</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#width" class="tsd-kind-icon">width</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="screen.html#cancelwaitfor" class="tsd-kind-icon">cancel<wbr>Wait<wbr>For</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Object literals</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-object-literal tsd-parent-kind-class"><a href="screen.html#config" class="tsd-kind-icon">config</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Screen<span class="tsd-signature-symbol">(</span>vision<span class="tsd-signature-symbol">: </span><a href="visionadapter.html" class="tsd-signature-type">VisionAdapter</a>, findHooks<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../globals.html#findhookcallback" class="tsd-signature-type">FindHookCallback</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="screen.html" class="tsd-signature-type">Screen</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L46">screen.class.ts:46</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html">Screen</a> class constructor</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>vision: <a href="visionadapter.html" class="tsd-signature-type">VisionAdapter</a></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="visionadapter.html">VisionAdapter</a> instance which bundles access to screen and / or computer vision related APIs</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> findHooks: <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../globals.html#findhookcallback" class="tsd-signature-type">FindHookCallback</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = new Map<string, FindHookCallback[]>()</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A {@link Map} of <a href="../globals.html#findhookcallback">FindHookCallback</a> methods assigned to a template image filename</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="screen.html" class="tsd-signature-type">Screen</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="capture" class="tsd-anchor"></a>
<h3>capture</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">capture<span class="tsd-signature-symbol">(</span>fileName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, fileFormat<span class="tsd-signature-symbol">?: </span><a href="../enums/filetype.html" class="tsd-signature-type">FileType</a>, filePath<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, fileNamePrefix<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, fileNamePostfix<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L170">screen.class.ts:170</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#capture">capture</a> captures a screenshot of a systems main display</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>fileName: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Basename for the generated screenshot</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> fileFormat: <a href="../enums/filetype.html" class="tsd-signature-type">FileType</a><span class="tsd-signature-symbol"> = FileType.PNG</span></h5>
<div class="tsd-comment tsd-typography">
<p>The <a href="../enums/filetype.html">FileType</a> for the generated screenshot</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> filePath: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = cwd()</span></h5>
<div class="tsd-comment tsd-typography">
<p>The output path for the generated screenshot (Default: {@link cwd})</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> fileNamePrefix: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></h5>
<div class="tsd-comment tsd-typography">
<p>Filename prefix for the generated screenshot (Default: empty)</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> fileNamePostfix: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></h5>
<div class="tsd-comment tsd-typography">
<p>Filename postfix for the generated screenshot (Default: empty)</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="find" class="tsd-anchor"></a>
<h3>find</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">find<span class="tsd-signature-symbol">(</span>templateImageFilename<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, params<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">LocationParameters</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L81">screen.class.ts:81</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#find">find</a> will search for a template image on a systems main screen</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>templateImageFilename: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Filename of the template image, relative to <a href="screen.html#config.resourcedirectory">Screen.config.resourceDirectory</a></p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> params: <span class="tsd-signature-type">LocationParameters</span></h5>
<div class="tsd-comment tsd-typography">
<p>{@link LocationParameters} which are used to fine tune search region and / or match confidence</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="height" class="tsd-anchor"></a>
<h3>height</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L72">screen.class.ts:72</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#height">height</a> returns the main screen height
This refers to the hardware resolution.
Screens with higher pixel density (e.g. retina displays in MacBooks) might have a higher height in in actual pixels</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="highlight" class="tsd-anchor"></a>
<h3>highlight</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">highlight<span class="tsd-signature-symbol">(</span>regionToHighlight<span class="tsd-signature-symbol">: </span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L132">screen.class.ts:132</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#highlight">highlight</a> highlights a screen <a href="region.html">Region</a> for a certain duration by overlaying it with an opaque highlight window</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>regionToHighlight: <a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></h5>
<div class="tsd-comment tsd-typography">
<p>The <a href="region.html">Region</a> to highlight</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="on" class="tsd-anchor"></a>
<h3>on</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>templateImageFilename<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, callback<span class="tsd-signature-symbol">: </span><a href="../globals.html#findhookcallback" class="tsd-signature-type">FindHookCallback</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L157">screen.class.ts:157</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#on">on</a> registeres a callback which is triggered once a certain template image is found</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>templateImageFilename: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Template image to trigger the callback on</p>
</div>
</li>
<li>
<h5>callback: <a href="../globals.html#findhookcallback" class="tsd-signature-type">FindHookCallback</a></h5>
<div class="tsd-comment tsd-typography">
<p>The <a href="../globals.html#findhookcallback">FindHookCallback</a> function to trigger</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="waitfor" class="tsd-anchor"></a>
<h3>wait<wbr>For</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">wait<wbr>For<span class="tsd-signature-symbol">(</span>templateImageFilename<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, timeoutMs<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, params<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">LocationParameters</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L144">screen.class.ts:144</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#waitfor">waitFor</a> searches for a template image for a specified duration</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>templateImageFilename: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Filename of the template image, relative to <a href="screen.html#config.resourcedirectory">Screen.config.resourceDirectory</a></p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> timeoutMs: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5000</span></h5>
<div class="tsd-comment tsd-typography">
<p>Timeout in milliseconds after which <a href="screen.html#waitfor">waitFor</a> fails</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> params: <span class="tsd-signature-type">LocationParameters</span></h5>
<div class="tsd-comment tsd-typography">
<p>{@link LocationParameters} which are used to fine tune search region and / or match confidence</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="region.html" class="tsd-signature-type">Region</a><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="width" class="tsd-anchor"></a>
<h3>width</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L63">screen.class.ts:63</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#width">width</a> returns the main screen width
This refers to the hardware resolution.
Screens with higher pixel density (e.g. retina displays in MacBooks) might have a higher width in in actual pixels</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="cancelwaitfor" class="tsd-anchor"></a>
<h3>cancel<wbr>Wait<wbr>For</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">cancel<wbr>Wait<wbr>For<span class="tsd-signature-symbol">(</span>templateImageFilename<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/90e5072/lib/screen.class.ts#L193">screen.class.ts:144</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p><a href="screen.html#cancelwaitfor">cancelWaitFor</a> cancels a waitFor for any given template image</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>templateImageFilename: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Filename of the template image to cancel waitFor of, relative to <a href="screen.html#config.resourcedirectory">Screen.config.resourceDirectory</a></p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Object literals</h2>
<section class="tsd-panel tsd-member tsd-kind-object-literal tsd-parent-kind-class">
<a name="config" class="tsd-anchor"></a>
<h3>config</h3>
<div class="tsd-signature tsd-kind-icon">config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L22">screen.class.ts:22</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Config object for <a href="screen.html">Screen</a> class</p>
</div>
</div>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
<a name="config.autohighlight" class="tsd-anchor"></a>
<h3>auto<wbr>Highlight</h3>
<div class="tsd-signature tsd-kind-icon">auto<wbr>Highlight<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L31">screen.class.ts:31</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Configure whether to auto highlight all search results or not</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
<a name="config.confidence" class="tsd-anchor"></a>
<h3>confidence</h3>
<div class="tsd-signature tsd-kind-icon">confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0.99</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L26">screen.class.ts:26</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Configures the required matching percentage for template images to be declared as a match</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
<a name="config.highlightdurationms" class="tsd-anchor"></a>
<h3>highlight<wbr>Duration<wbr>Ms</h3>
<div class="tsd-signature tsd-kind-icon">highlight<wbr>Duration<wbr>Ms<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 500</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L35">screen.class.ts:35</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Configure highlighting duration</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
<a name="config.highlightopacity" class="tsd-anchor"></a>
<h3>highlight<wbr>Opacity</h3>
<div class="tsd-signature tsd-kind-icon">highlight<wbr>Opacity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0.25</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L40">screen.class.ts:40</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Configure opacity of highlight window</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
<a name="config.resourcedirectory" class="tsd-anchor"></a>
<h3>resource<wbr>Directory</h3>
<div class="tsd-signature tsd-kind-icon">resource<wbr>Directory<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = cwd()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/nut-tree/nut.js/blob/e2352ac/lib/screen.class.ts#L45">screen.class.ts:45</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Configures the path from which template images are loaded from</p>
</div>
</div>
</section>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class">
<a href="screen.html" class="tsd-kind-icon">Screen</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="screen.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#capture" class="tsd-kind-icon">capture</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#find" class="tsd-kind-icon">find</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#height" class="tsd-kind-icon">height</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#highlight" class="tsd-kind-icon">highlight</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#on" class="tsd-kind-icon">on</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#waitfor" class="tsd-kind-icon">wait<wbr>For</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#width" class="tsd-kind-icon">width</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="screen.html#cancelwaitfor" class="tsd-kind-icon">cancel<wbr>Wait<wbr>For</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-class">
<a href="screen.html#config" class="tsd-kind-icon">config</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<footer>
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
</ul>
</div>
</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>