@girs/bamf-3 4.3.0 → 4.5.0
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 +36 -41
- package/bamf-3.d.ts +108 -40
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for Bamf-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/bamf-3
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/bamf-3` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/bamf-3/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/bamf-3/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/bamf-3/bamf-3` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import Bamf from '@girs/bamf-3';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/bamf-3'
|
|
46
|
+
import '@girs/bamf-3';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/bamf-3"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/bamf-3"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import Bamf from 'gi://Bamf?version=3';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/bamf-3` or `@girs/bamf-3/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/bamf-3/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/bamf-3'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/bamf-3"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/bamf-3/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const Bamf = imports.gi.Bamf;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/bamf-3.d.ts
CHANGED
|
@@ -25,14 +25,14 @@ export namespace Bamf {
|
|
|
25
25
|
* @gir-type Enum
|
|
26
26
|
*/
|
|
27
27
|
enum ClickBehavior {
|
|
28
|
-
NONE,
|
|
29
|
-
OPEN,
|
|
30
|
-
FOCUS,
|
|
31
|
-
FOCUS_ALL,
|
|
32
|
-
MINIMIZE,
|
|
33
|
-
RESTORE,
|
|
34
|
-
RESTORE_ALL,
|
|
35
|
-
PICKER,
|
|
28
|
+
NONE = 0,
|
|
29
|
+
OPEN = 1,
|
|
30
|
+
FOCUS = 2,
|
|
31
|
+
FOCUS_ALL = 3,
|
|
32
|
+
MINIMIZE = 4,
|
|
33
|
+
RESTORE = 5,
|
|
34
|
+
RESTORE_ALL = 6,
|
|
35
|
+
PICKER = 7,
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
@@ -40,10 +40,10 @@ export namespace Bamf {
|
|
|
40
40
|
* @gir-type Enum
|
|
41
41
|
*/
|
|
42
42
|
enum WindowMaximizationType {
|
|
43
|
-
FLOATING,
|
|
44
|
-
HORIZONTAL_MAXIMIZED,
|
|
45
|
-
VERTICAL_MAXIMIZED,
|
|
46
|
-
MAXIMIZED,
|
|
43
|
+
FLOATING = 0,
|
|
44
|
+
HORIZONTAL_MAXIMIZED = 1,
|
|
45
|
+
VERTICAL_MAXIMIZED = 2,
|
|
46
|
+
MAXIMIZED = 3,
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
|
|
@@ -51,58 +51,121 @@ export namespace Bamf {
|
|
|
51
51
|
* @gir-type Enum
|
|
52
52
|
*/
|
|
53
53
|
enum WindowType {
|
|
54
|
-
NORMAL,
|
|
55
|
-
DESKTOP,
|
|
56
|
-
DOCK,
|
|
57
|
-
DIALOG,
|
|
58
|
-
TOOLBAR,
|
|
59
|
-
MENU,
|
|
60
|
-
UTILITY,
|
|
61
|
-
SPLASHSCREEN,
|
|
62
|
-
UNKNOWN,
|
|
54
|
+
NORMAL = 0,
|
|
55
|
+
DESKTOP = 1,
|
|
56
|
+
DOCK = 2,
|
|
57
|
+
DIALOG = 3,
|
|
58
|
+
TOOLBAR = 4,
|
|
59
|
+
MENU = 5,
|
|
60
|
+
UTILITY = 6,
|
|
61
|
+
SPLASHSCREEN = 7,
|
|
62
|
+
UNKNOWN = 8,
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @default desktop-file-updated
|
|
68
|
+
*/
|
|
66
69
|
const APPLICATION_SIGNAL_DESKTOP_FILE_UPDATED: string;
|
|
67
70
|
|
|
71
|
+
/**
|
|
72
|
+
* @default window-added
|
|
73
|
+
*/
|
|
68
74
|
const APPLICATION_SIGNAL_WINDOW_ADDED: string;
|
|
69
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @default window-removed
|
|
78
|
+
*/
|
|
70
79
|
const APPLICATION_SIGNAL_WINDOW_REMOVED: string;
|
|
71
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @default active-application-changed
|
|
83
|
+
*/
|
|
72
84
|
const MATCHER_SIGNAL_ACTIVE_APPLICATION_CHANGED: string;
|
|
73
85
|
|
|
86
|
+
/**
|
|
87
|
+
* @default active-window-changed
|
|
88
|
+
*/
|
|
74
89
|
const MATCHER_SIGNAL_ACTIVE_WINDOW_CHANGED: string;
|
|
75
90
|
|
|
91
|
+
/**
|
|
92
|
+
* @default stacking-order-changed
|
|
93
|
+
*/
|
|
76
94
|
const MATCHER_SIGNAL_STACKING_ORDER_CHANGED: string;
|
|
77
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @default view-closed
|
|
98
|
+
*/
|
|
78
99
|
const MATCHER_SIGNAL_VIEW_CLOSED: string;
|
|
79
100
|
|
|
101
|
+
/**
|
|
102
|
+
* @default view-opened
|
|
103
|
+
*/
|
|
80
104
|
const MATCHER_SIGNAL_VIEW_OPENED: string;
|
|
81
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @default active-changed
|
|
108
|
+
*/
|
|
82
109
|
const VIEW_SIGNAL_ACTIVE_CHANGED: string;
|
|
83
110
|
|
|
111
|
+
/**
|
|
112
|
+
* @default child-added
|
|
113
|
+
*/
|
|
84
114
|
const VIEW_SIGNAL_CHILD_ADDED: string;
|
|
85
115
|
|
|
116
|
+
/**
|
|
117
|
+
* @default child-moved
|
|
118
|
+
*/
|
|
86
119
|
const VIEW_SIGNAL_CHILD_MOVED: string;
|
|
87
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @default child-removed
|
|
123
|
+
*/
|
|
88
124
|
const VIEW_SIGNAL_CHILD_REMOVED: string;
|
|
89
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @default closed
|
|
128
|
+
*/
|
|
90
129
|
const VIEW_SIGNAL_CLOSED: string;
|
|
91
130
|
|
|
131
|
+
/**
|
|
132
|
+
* @default icon-changed
|
|
133
|
+
*/
|
|
92
134
|
const VIEW_SIGNAL_ICON_CHANGED: string;
|
|
93
135
|
|
|
136
|
+
/**
|
|
137
|
+
* @default name-changed
|
|
138
|
+
*/
|
|
94
139
|
const VIEW_SIGNAL_NAME_CHANGED: string;
|
|
95
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @default running-changed
|
|
143
|
+
*/
|
|
96
144
|
const VIEW_SIGNAL_RUNNING_CHANGED: string;
|
|
97
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @default starting-changed
|
|
148
|
+
*/
|
|
98
149
|
const VIEW_SIGNAL_STARTING_CHANGED: string;
|
|
99
150
|
|
|
151
|
+
/**
|
|
152
|
+
* @default urgent-changed
|
|
153
|
+
*/
|
|
100
154
|
const VIEW_SIGNAL_URGENT_CHANGED: string;
|
|
101
155
|
|
|
156
|
+
/**
|
|
157
|
+
* @default user-visible-changed
|
|
158
|
+
*/
|
|
102
159
|
const VIEW_SIGNAL_USER_VISIBLE_CHANGED: string;
|
|
103
160
|
|
|
161
|
+
/**
|
|
162
|
+
* @default maximized-changed
|
|
163
|
+
*/
|
|
104
164
|
const WINDOW_SIGNAL_MAXIMIZED_CHANGED: string;
|
|
105
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @default monitor-changed
|
|
168
|
+
*/
|
|
106
169
|
const WINDOW_SIGNAL_MONITOR_CHANGED: string;
|
|
107
170
|
|
|
108
171
|
/**
|
|
@@ -118,15 +181,15 @@ export namespace Bamf {
|
|
|
118
181
|
/**
|
|
119
182
|
* @signal
|
|
120
183
|
*/
|
|
121
|
-
"desktop-file-updated": (
|
|
184
|
+
"desktop-file-updated": (object: string) => void;
|
|
122
185
|
/**
|
|
123
186
|
* @signal
|
|
124
187
|
*/
|
|
125
|
-
"window-added": (
|
|
188
|
+
"window-added": (object: Window) => void;
|
|
126
189
|
/**
|
|
127
190
|
* @signal
|
|
128
191
|
*/
|
|
129
|
-
"window-removed": (
|
|
192
|
+
"window-removed": (object: Window) => void;
|
|
130
193
|
"notify::active": (pspec: GObject.ParamSpec) => void;
|
|
131
194
|
"notify::path": (pspec: GObject.ParamSpec) => void;
|
|
132
195
|
"notify::running": (pspec: GObject.ParamSpec) => void;
|
|
@@ -176,6 +239,7 @@ export namespace Bamf {
|
|
|
176
239
|
/**
|
|
177
240
|
* Used to fetch the bus name and the object path of the remote application menu.
|
|
178
241
|
* @returns `true` if found, `false` otherwise.
|
|
242
|
+
* @deprecated since 0.5.0
|
|
179
243
|
*/
|
|
180
244
|
get_application_menu(): [boolean, string, string];
|
|
181
245
|
|
|
@@ -208,6 +272,7 @@ export namespace Bamf {
|
|
|
208
272
|
* Used to fetch the application contains a Window with given `xid`.
|
|
209
273
|
* @param xid an X11 Window ID
|
|
210
274
|
* @returns a {@link Bamf.Window} for the passed `xid` or `null` if not found.
|
|
275
|
+
* @since 0.5.2
|
|
211
276
|
*/
|
|
212
277
|
get_window_for_xid(xid: number): Window;
|
|
213
278
|
|
|
@@ -299,11 +364,11 @@ export namespace Bamf {
|
|
|
299
364
|
/**
|
|
300
365
|
* @signal
|
|
301
366
|
*/
|
|
302
|
-
"active-application-changed": (
|
|
367
|
+
"active-application-changed": (object: Application, p0: Application) => void;
|
|
303
368
|
/**
|
|
304
369
|
* @signal
|
|
305
370
|
*/
|
|
306
|
-
"active-window-changed": (
|
|
371
|
+
"active-window-changed": (object: Window, p0: Window) => void;
|
|
307
372
|
/**
|
|
308
373
|
* @signal
|
|
309
374
|
*/
|
|
@@ -311,11 +376,11 @@ export namespace Bamf {
|
|
|
311
376
|
/**
|
|
312
377
|
* @signal
|
|
313
378
|
*/
|
|
314
|
-
"view-closed": (
|
|
379
|
+
"view-closed": (object: View) => void;
|
|
315
380
|
/**
|
|
316
381
|
* @signal
|
|
317
382
|
*/
|
|
318
|
-
"view-opened": (
|
|
383
|
+
"view-opened": (object: View) => void;
|
|
319
384
|
}
|
|
320
385
|
|
|
321
386
|
// Constructor properties interface
|
|
@@ -624,22 +689,22 @@ export namespace Bamf {
|
|
|
624
689
|
* @signal
|
|
625
690
|
* @run-first
|
|
626
691
|
*/
|
|
627
|
-
"active-changed": (
|
|
692
|
+
"active-changed": (object: boolean) => void;
|
|
628
693
|
/**
|
|
629
694
|
* @signal
|
|
630
695
|
* @run-first
|
|
631
696
|
*/
|
|
632
|
-
"child-added": (
|
|
697
|
+
"child-added": (object: View) => void;
|
|
633
698
|
/**
|
|
634
699
|
* @signal
|
|
635
700
|
* @run-first
|
|
636
701
|
*/
|
|
637
|
-
"child-moved": (
|
|
702
|
+
"child-moved": (object: View) => void;
|
|
638
703
|
/**
|
|
639
704
|
* @signal
|
|
640
705
|
* @run-first
|
|
641
706
|
*/
|
|
642
|
-
"child-removed": (
|
|
707
|
+
"child-removed": (object: View) => void;
|
|
643
708
|
/**
|
|
644
709
|
* @signal
|
|
645
710
|
* @run-last
|
|
@@ -648,31 +713,31 @@ export namespace Bamf {
|
|
|
648
713
|
/**
|
|
649
714
|
* @signal
|
|
650
715
|
*/
|
|
651
|
-
"icon-changed": (
|
|
716
|
+
"icon-changed": (object: string) => void;
|
|
652
717
|
/**
|
|
653
718
|
* @signal
|
|
654
719
|
*/
|
|
655
|
-
"name-changed": (
|
|
720
|
+
"name-changed": (object: string, p0: string) => void;
|
|
656
721
|
/**
|
|
657
722
|
* @signal
|
|
658
723
|
* @run-first
|
|
659
724
|
*/
|
|
660
|
-
"running-changed": (
|
|
725
|
+
"running-changed": (object: boolean) => void;
|
|
661
726
|
/**
|
|
662
727
|
* @signal
|
|
663
728
|
* @run-first
|
|
664
729
|
*/
|
|
665
|
-
"starting-changed": (
|
|
730
|
+
"starting-changed": (object: boolean) => void;
|
|
666
731
|
/**
|
|
667
732
|
* @signal
|
|
668
733
|
* @run-first
|
|
669
734
|
*/
|
|
670
|
-
"urgent-changed": (
|
|
735
|
+
"urgent-changed": (object: boolean) => void;
|
|
671
736
|
/**
|
|
672
737
|
* @signal
|
|
673
738
|
* @run-first
|
|
674
739
|
*/
|
|
675
|
-
"user-visible-changed": (
|
|
740
|
+
"user-visible-changed": (object: boolean) => void;
|
|
676
741
|
"notify::active": (pspec: GObject.ParamSpec) => void;
|
|
677
742
|
"notify::path": (pspec: GObject.ParamSpec) => void;
|
|
678
743
|
"notify::running": (pspec: GObject.ParamSpec) => void;
|
|
@@ -853,6 +918,7 @@ export namespace Bamf {
|
|
|
853
918
|
vfunc_is_urgent(): boolean;
|
|
854
919
|
|
|
855
920
|
/**
|
|
921
|
+
* @since 0.4.0
|
|
856
922
|
* @virtual
|
|
857
923
|
*/
|
|
858
924
|
vfunc_is_user_visible(): boolean;
|
|
@@ -967,6 +1033,7 @@ export namespace Bamf {
|
|
|
967
1033
|
|
|
968
1034
|
/**
|
|
969
1035
|
* @returns a boolean useful for determining if a particular view is "user visible". User visible is a concept relating to whether or not a window should be shown in a launcher tasklist.
|
|
1036
|
+
* @since 0.4.0
|
|
970
1037
|
*/
|
|
971
1038
|
is_user_visible(): boolean;
|
|
972
1039
|
|
|
@@ -974,6 +1041,7 @@ export namespace Bamf {
|
|
|
974
1041
|
* Note: Makes sever dbus calls the first time this is called on a view.
|
|
975
1042
|
* Dbus messaging is reduced afterwards.
|
|
976
1043
|
* @returns Returns a list of {@link Bamf.View} which is owned by the {@link Bamf.View} and should not freed or modified after usage.
|
|
1044
|
+
* @since 0.5.2
|
|
977
1045
|
*/
|
|
978
1046
|
peek_children(): View[];
|
|
979
1047
|
|
|
@@ -991,12 +1059,12 @@ export namespace Bamf {
|
|
|
991
1059
|
* @signal
|
|
992
1060
|
* @run-first
|
|
993
1061
|
*/
|
|
994
|
-
"maximized-changed": (
|
|
1062
|
+
"maximized-changed": (object: number, p0: number) => void;
|
|
995
1063
|
/**
|
|
996
1064
|
* @signal
|
|
997
1065
|
* @run-first
|
|
998
1066
|
*/
|
|
999
|
-
"monitor-changed": (
|
|
1067
|
+
"monitor-changed": (object: number, p0: number) => void;
|
|
1000
1068
|
"notify::active": (pspec: GObject.ParamSpec) => void;
|
|
1001
1069
|
"notify::path": (pspec: GObject.ParamSpec) => void;
|
|
1002
1070
|
"notify::running": (pspec: GObject.ParamSpec) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/bamf-3",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Bamf-3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "bamf-3.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/gobject-2.0": "^4.
|
|
36
|
-
"@girs/glib-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.5.0",
|
|
35
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
36
|
+
"@girs/glib-2.0": "^4.5.0" },
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "*"
|
|
39
39
|
},
|