@gjsify/gtk-quartz-native 0.0.0-stage → 0.64.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/package.json +61 -5
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @gjsify/gtk-quartz-native
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Makes a Dock click on a windowless macOS app activate the `GApplication`.
|
|
4
|
+
|
|
5
|
+
Decision and measurements: [ADR 0140](../../../docs/adr/0140-a-dock-click-reopens-the-application-on-macos.md).
|
|
6
|
+
|
|
7
|
+
GTK 4.24.1's `GtkApplicationQuartzDelegate` does not implement
|
|
8
|
+
`applicationShouldHandleReopen:hasVisibleWindows:`, so the click is dropped. This package adds the
|
|
9
|
+
method through the Objective-C runtime (`class_addMethod`). It fails, and so does nothing, once the
|
|
10
|
+
loaded GTK has the method: the bridge retires itself.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import GjsifyQuartz from 'gi://GjsifyQuartz?version=1.0';
|
|
14
|
+
GjsifyQuartz.install_reopen_handler(); // true if this call installed it
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`@gjsify/adwaita-app` calls it for you on darwin. The library links neither GTK nor GLib; the
|
|
18
|
+
class is looked up by name at run time. No JavaScript; the prebuilt library and typelib arrive via
|
|
19
|
+
the per-target `optionalDependencies`.
|
|
20
|
+
|
|
21
|
+
## Tests
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
gjsify run test:meson # darwin only; needs host gtk4, glib, gjs
|
|
25
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@gjsify/gtk-quartz-native",
|
|
3
|
+
"version": "0.64.30",
|
|
4
|
+
"description": "Adds the missing Dock-click reopen handler to GTK's macOS application delegate, so a click on a windowless app's Dock icon activates the GApplication (ADR 0140). Contains no JavaScript; the prebuilt library and typelib arrive through per-target optionalDependencies.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [],
|
|
7
|
+
"gjsify": {
|
|
8
|
+
"platforms": [
|
|
9
|
+
"darwin-x64",
|
|
10
|
+
"darwin-arm64"
|
|
11
|
+
],
|
|
12
|
+
"runtimes": {
|
|
13
|
+
"gjs": "polyfill",
|
|
14
|
+
"node": "none",
|
|
15
|
+
"browser": "none",
|
|
16
|
+
"nativescript": "none"
|
|
17
|
+
},
|
|
18
|
+
"os": {
|
|
19
|
+
"linux": "none",
|
|
20
|
+
"darwin": "supported",
|
|
21
|
+
"win32": "none"
|
|
22
|
+
},
|
|
23
|
+
"osNotes": {
|
|
24
|
+
"linux": "Patches GtkApplicationQuartzDelegate, a class of GTK's macOS backend; GTK on Linux has no such class and desktops activate a running application through D-Bus.",
|
|
25
|
+
"win32": "Patches GtkApplicationQuartzDelegate, a class of GTK's macOS backend; GTK on Windows has no such class."
|
|
26
|
+
},
|
|
27
|
+
"tier": 1
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"clear": "gjsify clear build _install",
|
|
31
|
+
"check": "echo 'no TypeScript in this package'",
|
|
32
|
+
"init:meson": "meson setup build .",
|
|
33
|
+
"init:meson:wipe": "gjsify run init:meson --wipe",
|
|
34
|
+
"build": "echo 'native only — see build:prebuilds'",
|
|
35
|
+
"build:meson": "gjsify run init:meson && meson compile -C build",
|
|
36
|
+
"build:prebuilds": "gjsify run build:meson && node ../../../scripts/stage-prebuild.mjs .",
|
|
37
|
+
"test": "echo 'darwin only — run test:meson'",
|
|
38
|
+
"test:meson": "gjsify run build:meson && meson test -C build --print-errorlogs"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"gjs",
|
|
42
|
+
"gtk",
|
|
43
|
+
"quartz",
|
|
44
|
+
"darwin",
|
|
45
|
+
"macos",
|
|
46
|
+
"dock"
|
|
47
|
+
],
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
52
|
+
"directory": "packages/framework/gtk-quartz-native"
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/framework/gtk-quartz-native#readme",
|
|
58
|
+
"optionalDependencies": {
|
|
59
|
+
"@gjsify/gtk-quartz-native-darwin-arm64": "0.64.30",
|
|
60
|
+
"@gjsify/gtk-quartz-native-darwin-x64": "0.64.30"
|
|
61
|
+
}
|
|
62
|
+
}
|