-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathjs-bindings.d.ts
More file actions
741 lines (686 loc) · 21.5 KB
/
Copy pathjs-bindings.d.ts
File metadata and controls
741 lines (686 loc) · 21.5 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
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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
/* auto-generated by NAPI-RS */
/* eslint-disable */
export declare class Application {
constructor(options?: ApplicationOptions | undefined | null);
onEvent(handler?: ((arg: ApplicationEvent) => void) | undefined | null): void;
bind(handler?: ((arg: ApplicationEvent) => void) | undefined | null): void;
isReady(): boolean;
exit(): void;
/** Creates a new WebContext with the given options. */
createWebContext(options?: WebContextOptions | undefined | null): JsWebContext;
createTrayIcon(options: TrayIconOptions): JsTrayIcon;
createBrowserWindow(options?: BrowserWindowOptions | undefined | null): BrowserWindow;
createChildBrowserWindow(options?: BrowserWindowOptions | undefined | null): BrowserWindow;
setMenu(menuOptions?: MenuOptions | undefined | null): void;
/**
* Pump the tao event loop once without blocking. Returns `true` while
* the app is alive, `false` when it should stop. Drive this from a JS
* `setInterval` via the `run()` wrapper in `index.js`.
*/
pumpEvents(): boolean;
/**
* Run Tao's native event loop continuously on the current thread.
*
* This blocks JavaScript until the application exits. Use `run()` when the
* Node.js event loop must remain available.
*/
runSync(): void;
/** Run the application event loop. */
run(options?: ApplicationRunOptions | undefined | null): void;
}
export declare class BrowserWindow {
_registerProtocol(name: string, handler: (arg: string) => void): void;
_completeProtocol(id: number, response: CustomProtocolResponse): void;
createWebview(options?: WebviewOptions | undefined | null, webContext?: JsWebContext | undefined | null): JsWebview;
_setPendingWebviewEventCallback(handler: (err: Error | null, arg: WebviewEventPayload) => any): void;
_setPendingWebviewNavigationHandler(handler: (arg: string) => boolean): void;
_clearPendingWebviewHandlers(): void;
get isChild(): boolean;
getNativeHandle(): bigint;
isFocused(): boolean;
isVisible(): boolean;
isDecorated(): boolean;
isClosable(): boolean;
isMaximizable(): boolean;
isMinimizable(): boolean;
isMaximized(): boolean;
isMinimized(): boolean;
isResizable(): boolean;
setTitle(title: string): void;
get title(): string;
setClosable(closable: boolean): void;
setMaximizable(maximizable: boolean): void;
setMinimizable(minimizable: boolean): void;
setResizable(resizable: boolean): void;
setSize(width: number, height: number, logical?: boolean | undefined | null): Dimensions | null;
setMinSize(width: number, height: number, logical?: boolean | undefined | null): void;
getInnerSize(logical?: boolean | undefined | null): Dimensions;
setMaxSize(width: number, height: number, logical?: boolean | undefined | null): void;
getOuterSize(logical?: boolean | undefined | null): Dimensions;
openFileDialog(options?: FileDialogOptions | undefined | null): Array<string>;
id(): number;
hasMenu(): boolean;
dispose(): void;
isDisposed(): boolean;
_onWindowEvent(handler?: ((arg: WindowEventPayload) => void) | undefined | null): void;
get theme(): Theme;
setTheme(theme: Theme): void;
setWindowIcon(
icon: Uint8Array | Array<number>,
width?: number | undefined | null,
height?: number | undefined | null,
): void;
removeWindowIcon(): void;
setEnable(enabled: boolean): void;
setTaskbarIcon(
icon: Uint8Array | Array<number>,
width?: number | undefined | null,
height?: number | undefined | null,
): void;
removeTaskbarIcon(): void;
setUndecoratedShadow(shadow: boolean): void;
getNativeHandleAnyThread(): bigint;
simpleFullscreen(): boolean;
setSimpleFullscreen(fullscreen: boolean): boolean;
hasShadow(): boolean;
setHasShadow(value: boolean): void;
setTabbingIdentifier(identifier: string): void;
tabbingIdentifier(): string;
isDocumentEdited(): boolean;
setDocumentEdited(edited: boolean): void;
getWaylandSurface(): bigint;
setIosScaleFactor(value: number): void;
setValidOrientations(value: IosValidOrientations): void;
setPrefersHomeIndicatorHidden(value: boolean): void;
setPreferredScreenEdgesDeferringSystemGestures(edges: number): void;
setPrefersStatusBarHidden(value: boolean): void;
androidContentRect(): AndroidContentRect;
androidConfig(): string;
setVisible(visible: boolean): void;
setProgressBar(state: JsProgressBar): void;
setMaximized(value: boolean): void;
setMinimized(value: boolean): void;
focus(): void;
getAvailableMonitors(): Array<Monitor>;
getCurrentMonitor(): Monitor | null;
getPrimaryMonitor(): Monitor | null;
getMonitorFromPoint(x: number, y: number): Monitor | null;
setContentProtection(enabled: boolean): void;
setAlwaysOnTop(enabled: boolean): void;
setAlwaysOnBottom(enabled: boolean): void;
setDecorations(enabled: boolean): void;
get fullscreen(): FullscreenType | null;
setFullscreen(fullscreenType?: FullscreenType | undefined | null): void;
close(): void;
hide(): void;
show(): void;
setPosition(x: number, y: number, logical?: boolean | undefined | null): void;
getPosition(logical?: boolean | undefined | null): Position;
center(): void;
get width(): number;
get height(): number;
get x(): number;
get y(): number;
scaleFactor(): number;
setCursor(cursor: CursorType): void;
setCursorVisible(visible: boolean): void;
setCursorPosition(x: number, y: number): void;
setIgnoreCursorEvents(ignore: boolean): void;
setSkipTaskbar(skip: boolean): void;
requestRedraw(): void;
}
export declare class NativeNotification {
constructor(options: NativeNotificationOptions, callback: (err: Error | null, arg: NotificationEventPayload) => any);
close(): void;
}
export type JsNotification = NativeNotification;
export declare class TrayIcon {
constructor();
get id(): string;
_onTrayEvent(handler?: ((arg: TrayEventPayload) => void) | undefined | null): void;
setIcon(
icon: Uint8Array | Array<number>,
width?: number | undefined | null,
height?: number | undefined | null,
): void;
removeIcon(): void;
setMenu(menu?: MenuOptions | undefined | null): void;
setTooltip(tooltip?: string | undefined | null): void;
setTitle(title?: string | undefined | null): void;
setVisible(visible: boolean): void;
setIconAsTemplate(value: boolean): void;
setShowMenuOnLeftClick(value: boolean): void;
setShowMenuOnRightClick(value: boolean): void;
showMenu(): void;
rect(): TrayRect | null;
dispose(): void;
isDisposed(): boolean;
}
export type JsTrayIcon = TrayIcon;
export declare class WebContext {
/** Not supported. Use `app.createWebContext(options)` instead. */
constructor();
/** A reference to the data directory the context was created with. */
get dataDirectory(): string | null;
/** Check if a custom protocol has been registered on this context. */
isCustomProtocolRegistered(scheme: string): boolean;
/**
* Set if this context allows automation.
* Note: this is currently only enforced on Linux, and has the stipulation that only 1 context allows automation at a time.
*/
setAllowsAutomation(flag: boolean): void;
dispose(): void;
isDisposed(): boolean;
}
export type JsWebContext = WebContext;
export declare class Webview {
constructor();
onIpcMessage(handler?: ((arg: IpcMessage) => void) | undefined | null): void;
dispose(): void;
isDisposed(): boolean;
/**
* Low-level method used by the JS `expose()` wrapper.
*
* Injects a page script that creates `window[name]` as an object with:
* - static values from `statics_json` (a JSON object string)
* - async function stubs for each name in `func_names`
*
* When the page calls one of the stubs the call is routed back here via
* the internal IPC channel and dispatched to `handler`. `handler` is
* responsible for calling `evaluateScript` to send the response.
*/
_exposeInternal(
name: string,
staticsJson: string,
funcNames: Array<string>,
handler: (arg: ExposeCallData) => void,
): void;
print(): void;
zoom(scaleFactor: number): void;
setWebviewVisibility(visible: boolean): void;
isDevtoolsOpen(): boolean;
openDevtools(): void;
closeDevtools(): void;
loadUrl(url: string): void;
loadHtml(html: string): void;
evaluateScript(js: string): void;
evaluateScriptWithCallback(js: string, callback: (err: Error | null, arg: string) => any): void;
reload(): void;
/** The URL the webview is currently showing. */
url(): string | null;
/** Webview width in logical pixels (same coordinate space as `set_bounds`). */
get width(): number | null;
/** Webview height in logical pixels (same coordinate space as `set_bounds`). */
get height(): number | null;
/** Webview x offset from the window's top-left corner, in logical pixels. */
get x(): number | null;
/** Webview y offset from the window's top-left corner, in logical pixels. */
get y(): number | null;
/** Load `url` with additional HTTP request headers. */
loadUrlWithHeaders(url: string, headers: Array<HeaderData>): void;
/**
* Return all cookies currently stored for `url`, or every cookie if `url`
* is `null` / `undefined`.
*/
getCookies(url?: string | undefined | null): Array<WebviewCookie>;
/** Store a cookie in the webview's session. */
setCookie(cookie: WebviewCookie): void;
/**
* Delete a cookie by name. `domain` and `path` narrow the match;
* omit them to delete across all domains/paths.
*/
deleteCookie(name: string, domain?: string | undefined | null, path?: string | undefined | null): void;
/** Erase all cookies, cache, local storage, and IndexedDB data. */
clearAllBrowsingData(): void;
/**
* Set the background colour shown before (or behind) page content.
* Values are 0-255.
*/
setBackgroundColor(r: number, g: number, b: number, a: number): void;
/**
* Return the webview's current bounds relative to the window, in logical
* pixels.
*/
getBounds(): WebviewBounds | null;
/** Reposition and resize the webview within its window. */
setBounds(bounds: WebviewBounds): void;
/** Give keyboard focus to the webview content area. */
focus(): void;
/** Return focus to the parent/host window. */
focusParent(): void;
}
export type JsWebview = Webview;
export interface AndroidContentRect {
left: number;
top: number;
right: number;
bottom: number;
}
export interface ApplicationEvent {
event: WebviewApplicationEvent;
customMenuEvent?: CustomMenuEvent;
}
export interface ApplicationOptions {
controlFlow?: ControlFlow;
waitTime?: number;
exitCode?: number;
}
export interface ApplicationRunOptions {
/** The interval in milliseconds to pump events. Defaults to 16 (60 FPS). */
interval?: number;
/** Whether to keep the event loop alive. Defaults to true. */
ref?: boolean;
}
/** Converting `{protocol}://localhost/abc` to `{http_or_https}://{protocol}.localhost/abc` */
export declare function applyUriWorkAround(uri: string, httpOrHttps: string, protocol: string): string;
export interface BrowserWindowOptions {
menu?: MenuOptions;
showMenu?: boolean;
resizable?: boolean;
title?: string;
logical?: boolean;
width?: number;
height?: number;
x?: number;
y?: number;
contentProtection?: boolean;
alwaysOnTop?: boolean;
alwaysOnBottom?: boolean;
visible?: boolean;
decorations?: boolean;
visibleOnAllWorkspaces?: boolean;
maximized?: boolean;
maximizable?: boolean;
minimizable?: boolean;
focused?: boolean;
transparent?: boolean;
fullscreen?: FullscreenType;
windowsOwnerWindow?: bigint;
windowsTaskbarIcon?: TrayIconImage;
windowsNoRedirectionBitmap?: boolean;
windowsDragAndDrop?: boolean;
windowsSkipTaskbar?: boolean;
windowsClassName?: string;
windowsUndecoratedShadow?: boolean;
macosMovableByWindowBackground?: boolean;
macosTitlebarTransparent?: boolean;
macosTitleHidden?: boolean;
macosTitlebarHidden?: boolean;
macosTitlebarButtonsHidden?: boolean;
macosFullsizeContentView?: boolean;
macosDisallowHidpi?: boolean;
macosHasShadow?: boolean;
macosTabbingIdentifier?: string;
iosScaleFactor?: number;
iosValidOrientations?: IosValidOrientations;
iosPrefersHomeIndicatorHidden?: boolean;
iosDeferredSystemGestureEdges?: number;
iosPrefersStatusBarHidden?: boolean;
}
/** Kept for backward compat; no longer used internally. */
export declare enum ControlFlow {
Poll = 0,
Wait = 1,
WaitUntil = 2,
Exit = 3,
ExitWithCode = 4,
}
/** Cursor shape passed to [`BrowserWindow::set_cursor`]. */
export declare enum CursorType {
Default = 0,
Crosshair = 1,
Hand = 2,
Arrow = 3,
Move = 4,
Text = 5,
Wait = 6,
Help = 7,
Progress = 8,
NotAllowed = 9,
ContextMenu = 10,
Cell = 11,
VerticalText = 12,
Alias = 13,
Copy = 14,
NoDrop = 15,
Grab = 16,
Grabbing = 17,
ZoomIn = 18,
ZoomOut = 19,
ResizeEast = 20,
ResizeNorth = 21,
ResizeNorthEast = 22,
ResizeNorthWest = 23,
ResizeSouth = 24,
ResizeSouthEast = 25,
ResizeSouthWest = 26,
ResizeWest = 27,
ResizeEastWest = 28,
ResizeNorthSouth = 29,
ResizeNorthEastSouthWest = 30,
ResizeNorthWestSouthEast = 31,
ResizeColumn = 32,
ResizeRow = 33,
AllScroll = 34,
}
export interface CustomMenuEvent {
id: string;
windowId: number;
}
/** Incoming request delivered to a custom-protocol handler. */
export interface CustomProtocolRequest {
url: string;
method: string;
headers: Array<HeaderData>;
body?: Buffer;
}
/** Response returned by a custom-protocol handler. */
export interface CustomProtocolResponse {
/** HTTP status code. Defaults to 200. */
statusCode?: number;
/** Extra response headers (e.g. `[{ key: "Cache-Control", value: "no-store" }]`). */
headers?: Array<HeaderData>;
/** Response body bytes. */
body: Buffer;
/** MIME type (e.g. `"text/html"`, `"application/javascript"`). */
mimeType?: string;
}
export interface Dimensions {
width: number;
height: number;
}
/** Data sent to the expose handler when the page calls a proxied function. */
export interface ExposeCallData {
ns: string;
method: string;
id: number;
argsJson: string;
}
export interface FileDialogOptions {
multiple?: boolean;
title?: string;
defaultPath?: string;
filters?: Array<FileFilter>;
}
export interface FileFilter {
name: string;
extensions: Array<string>;
}
export declare enum FullscreenType {
Exclusive = 0,
Borderless = 1,
}
export declare function getWebviewVersion(): string;
export interface HeaderData {
key: string;
value?: string;
}
export declare enum IosValidOrientations {
LandscapeAndPortrait = 0,
Landscape = 1,
Portrait = 2,
}
export interface IpcMessage {
body: Buffer;
method: string;
headers: Array<HeaderData>;
uri: string;
}
/** If the URI is a work around URI for this protocol which starts with `{http_or_https}://{protocol}.` */
export declare function isWorkAroundUri(uri: string, httpOrHttps: string, protocol: string): boolean;
export interface JsProgressBar {
state?: ProgressBarState;
progress?: number;
}
export interface MenuItemOptions {
id?: string;
label?: string;
enabled?: boolean;
accelerator?: string;
submenu?: MenuOptions;
role?: string;
}
export interface MenuOptions {
items: Array<MenuItemOptions>;
}
export interface Monitor {
name?: string;
scaleFactor: number;
size: Dimensions;
position: Position;
videoModes: Array<VideoMode>;
}
export interface NativeNotificationAction {
action: string;
title: string;
icon?: string;
}
export interface NativeNotificationOptions {
title: string;
body?: string;
icon?: string;
imagePath?: string;
imageData?: Buffer;
requireInteraction?: boolean;
persistent: boolean;
actions: Array<NativeNotificationAction>;
}
export interface NotificationEventPayload {
event: string;
action?: string;
error?: string;
}
/** Returns `{protocol}://` */
export declare function originalUriPrefix(protocol: string): string;
export interface Position {
x: number;
y: number;
}
export declare enum ProgressBarState {
None = 0,
Normal = 1,
Indeterminate = 2,
Paused = 3,
Error = 4,
}
/** Converting `{http_or_https}://{protocol}.localhost/abc` back to `{protocol}://localhost/abc` */
export declare function revertUriWorkAround(uri: string, httpOrHttps: string, protocol: string): string;
export declare enum Theme {
Light = 0,
Dark = 1,
System = 2,
}
export interface TrayEventPayload {
event: string;
id: string;
x: number;
y: number;
rect: TrayRect;
button?: string;
buttonState?: string;
}
export interface TrayIconImage {
data: Buffer;
width?: number;
height?: number;
}
export interface TrayIconOptions {
id?: string;
icon?: TrayIconImage;
tooltip?: string;
title?: string;
menu?: MenuOptions;
iconIsTemplate?: boolean;
menuOnLeftClick?: boolean;
menuOnRightClick?: boolean;
}
export interface TrayRect {
x: number;
y: number;
width: number;
height: number;
}
/** The current version of the `@webviewjs/webview` package */
export const VERSION: string;
export interface VideoMode {
size: Dimensions;
bitDepth: number;
refreshRate: number;
}
export interface WebContextOptions {
/**
* Whether the WebView window should have a custom user data path.
* This is useful in Windows when a bundled application can’t have the webview data inside Program Files.
*/
dataDirectory?: string;
/**
* Whether the WebView window should allow automation (e.g. for testing).
* Note: this is currently only enforced on Linux, and has the stipulation that only 1 context allows automation at a time.
*/
allowsAutomation?: boolean;
}
export declare enum WebviewApplicationEvent {
WindowCloseRequested = 0,
ApplicationCloseRequested = 1,
CustomMenuClick = 2,
Ready = 3,
}
export interface WebviewBounds {
x: number;
y: number;
width: number;
height: number;
}
export interface WebviewCookie {
name: string;
value: string;
domain?: string;
path?: string;
httpOnly?: boolean;
secure?: boolean;
/** `"strict"`, `"lax"`, or `"none"`. */
sameSite?: string;
}
/** Payload delivered to the webview event dispatch callback. */
export interface WebviewEventPayload {
event: WebviewEventType;
/** URL associated with the event (navigation, page load, download). */
url?: string;
/** Document title for `TitleChanged` events. */
title?: string;
/** Download success flag for `DownloadCompleted` events. */
success?: boolean;
}
/** Event types fired by a Webview and surfaced as EventEmitter events in JS. */
export declare enum WebviewEventType {
PageLoadStarted = 0,
PageLoadFinished = 1,
TitleChanged = 2,
DownloadStarted = 3,
DownloadCompleted = 4,
NavigationStarted = 5,
/**
* Fired when a page attempts to open a new browser window
* (`window.open`, `target="_blank"`, etc.).
*/
NewWindowRequested = 6,
}
export interface WebviewOptions {
url?: string;
html?: string;
width?: number;
height?: number;
x?: number;
y?: number;
enableDevtools?: boolean;
incognito?: boolean;
userAgent?: string;
child?: boolean;
preload?: string;
transparent?: boolean;
theme?: Theme;
hotkeysZoom?: boolean;
clipboard?: boolean;
autoplay?: boolean;
backForwardNavigationGestures?: boolean;
/** Custom name for the IPC global injected by wry (default: `"ipc"`). */
ipcName?: string;
/** Whether to automatically normalize URL passed to `loadUrl` or `loadUrlWithHeaders` on windows (default: true). */
autoNormalizeLoadUrl?: boolean;
/**
* Determines whether the custom protocols should use `https://<scheme>.path/to/page` instead of the default `http://<scheme>.path/to/page`.
* Using a http scheme will allow mixed content when trying to fetch http endpoints and is therefore less secure but will match the behavior
* of the `<scheme>://path/to/page` protocols used on macOS and Linux.
*/
useHttpsScheme?: boolean;
}
export declare enum WindowCommand {
Close = 0,
Show = 1,
Hide = 2,
}
export interface WindowEventPayload {
event: WindowEventType;
/** Physical x position (cursor or window). */
x?: number;
/** Physical y position (cursor or window). */
y?: number;
/** Physical width (resize event). */
width?: number;
/** Physical height (resize event). */
height?: number;
/** Mouse button index: 0=left, 1=middle, 2=right. */
button?: number;
/** Horizontal scroll delta (pixels). */
deltaX?: number;
/** Vertical scroll delta (pixels). */
deltaY?: number;
/** Logical key name (DOM KeyboardEvent.key, e.g. "a", "Enter", "ArrowLeft"). */
key?: string;
/** Physical key code (DOM KeyboardEvent.code, e.g. "KeyA", "ArrowLeft"). */
code?: string;
/** Modifier bitmask: 1=Shift, 2=Ctrl, 4=Alt, 8=Meta/Super/Command. */
modifiers?: number;
/** Whether this key event is a repeat from holding the key down. */
isRepeat?: boolean;
/** File paths for FileDrop / FileHover events. */
files?: Array<string>;
/** DPI scale factor for ScaleFactorChanged events. */
scaleFactor?: number;
/**
* Text for Ime events (preedit string or committed text);
* "light" or "dark" for ThemeChanged events.
*/
text?: string;
/** Touch point identifier (cast from u64) for Touch events. */
touchId?: number;
/**
* Phase string: "started"/"moved"/"ended"/"cancelled" for Touch;
* "enabled"/"preedit"/"commit"/"disabled" for Ime events.
*/
phase?: string;
}
export declare enum WindowEventType {
Moved = 0,
Resized = 1,
CloseRequested = 2,
Focused = 3,
Blurred = 4,
MouseEnter = 5,
MouseLeave = 6,
MouseMove = 7,
MouseDown = 8,
MouseUp = 9,
Scroll = 10,
KeyDown = 11,
KeyUp = 12,
FileDrop = 13,
FileHover = 14,
FileHoverCancelled = 15,
ScaleFactorChanged = 16,
ThemeChanged = 17,
Ime = 18,
Touch = 19,
}
/** Returns `{http_or_https}://{protocol}.` */
export declare function workAroundUriPrefix(httpOrHttps: string, protocol: string): string;