diff options
author | 2022-08-21 00:33:01 +0200 | |
---|---|---|
committer | 2022-08-21 02:01:59 +0200 | |
commit | 8ebc24a5ba1c87cb5cb14fbaff3bee329e30fc15 (patch) | |
tree | 2ea323c637ef371d4bdfc9ccc69460147dd1597b /subprojects/frontend/types/windowControlsOverlay.d.ts | |
parent | feat(frontend): try to match OS theme (diff) | |
download | refinery-8ebc24a5ba1c87cb5cb14fbaff3bee329e30fc15.tar.gz refinery-8ebc24a5ba1c87cb5cb14fbaff3bee329e30fc15.tar.zst refinery-8ebc24a5ba1c87cb5cb14fbaff3bee329e30fc15.zip |
feat(frontend): overlay window controls
Might need manual intervention in browsers, e.g.
https://docs.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/window-controls-overlay#enable-the-window-controls-overlay-api-in-microsoft-edge
Diffstat (limited to 'subprojects/frontend/types/windowControlsOverlay.d.ts')
-rw-r--r-- | subprojects/frontend/types/windowControlsOverlay.d.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/subprojects/frontend/types/windowControlsOverlay.d.ts b/subprojects/frontend/types/windowControlsOverlay.d.ts new file mode 100644 index 00000000..d8f3182f --- /dev/null +++ b/subprojects/frontend/types/windowControlsOverlay.d.ts | |||
@@ -0,0 +1,32 @@ | |||
1 | interface WindowControlsOverlayGeometryChangeEvent extends Event { | ||
2 | titlebarAreaRect: DOMRect; | ||
3 | |||
4 | visible: boolean; | ||
5 | } | ||
6 | |||
7 | interface WindowControlsOverlay { | ||
8 | readonly visible: boolean; | ||
9 | |||
10 | getTitlebarAreaRect(): DOMRect; | ||
11 | |||
12 | addEventListener( | ||
13 | type: 'geometrychange', | ||
14 | listener: ( | ||
15 | this: WindowControlsOverlay, | ||
16 | event: WindowControlsOverlayGeometryChangeEvent, | ||
17 | ) => unknown, | ||
18 | options?: boolean | AddEventListenerOptions, | ||
19 | ); | ||
20 | |||
21 | removeEventListener( | ||
22 | type: 'geometrychange', | ||
23 | listener: ( | ||
24 | this: WindowControlsOverlay, | ||
25 | event: WindowControlsOverlayGeometryChangeEvent, | ||
26 | ) => unknown, | ||
27 | ); | ||
28 | } | ||
29 | |||
30 | interface Navigator { | ||
31 | windowControlsOverlay?: WindowControlsOverlay; | ||
32 | } | ||