@girs/gmenu-3.0 3.0.0-3.0.0-beta.12
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 +31 -0
- package/gmenu-3.0.cjs +9 -0
- package/gmenu-3.0.d.cts +352 -0
- package/gmenu-3.0.d.ts +357 -0
- package/gmenu-3.0.js +8 -0
- package/package.json +54 -0
- package/tsconfig.doc.json +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
# GMenu-3.0
|
|
3
|
+
|
|
4
|
+
GJS TypeScript type definitions for GMenu-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
To use this type definitions, install them with NPM like this:
|
|
9
|
+
```bash
|
|
10
|
+
npm install @girs/gmenu-3.0
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
You can import this package into your project like this:
|
|
16
|
+
```ts
|
|
17
|
+
import GMenu from '@girs/gmenu-3.0';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or if you prefer CommonJS, you can also use this:
|
|
21
|
+
```ts
|
|
22
|
+
const GMenu = require('@girs/gmenu-3.0');
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import GMenu from 'gi://GMenu?version=3.0';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
|
package/gmenu-3.0.cjs
ADDED
package/gmenu-3.0.d.cts
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* GMenu-3.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type Gio from '@girs/gio-2.0';
|
|
13
|
+
import type GObject from '@girs/gobject-2.0';
|
|
14
|
+
import type GLib from '@girs/glib-2.0';
|
|
15
|
+
|
|
16
|
+
export enum TreeItemType {
|
|
17
|
+
INVALID,
|
|
18
|
+
DIRECTORY,
|
|
19
|
+
ENTRY,
|
|
20
|
+
SEPARATOR,
|
|
21
|
+
HEADER,
|
|
22
|
+
ALIAS,
|
|
23
|
+
}
|
|
24
|
+
export enum TreeFlags {
|
|
25
|
+
NONE,
|
|
26
|
+
INCLUDE_EXCLUDED,
|
|
27
|
+
SHOW_EMPTY,
|
|
28
|
+
INCLUDE_NODISPLAY,
|
|
29
|
+
SHOW_ALL_SEPARATORS,
|
|
30
|
+
SORT_DISPLAY_NAME,
|
|
31
|
+
INCLUDE_UNALLOCATED,
|
|
32
|
+
}
|
|
33
|
+
export module Tree {
|
|
34
|
+
|
|
35
|
+
// Signal callback interfaces
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Signal callback interface for `changed`
|
|
39
|
+
*/
|
|
40
|
+
export interface ChangedSignalCallback {
|
|
41
|
+
($obj: Tree): void
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
// Constructor properties interface
|
|
46
|
+
|
|
47
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
48
|
+
|
|
49
|
+
// Own constructor properties of GMenu-3.0.GMenu.Tree
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Flags controlling the content of the menu.
|
|
53
|
+
*/
|
|
54
|
+
flags?: TreeFlags | null
|
|
55
|
+
/**
|
|
56
|
+
* The name of the menu file; must be a basename or a relative path. The file
|
|
57
|
+
* will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu
|
|
58
|
+
* specification.
|
|
59
|
+
*/
|
|
60
|
+
menu_basename?: string | null
|
|
61
|
+
/**
|
|
62
|
+
* The full path of the menu file. If set, GMenuTree:menu-basename will get
|
|
63
|
+
* ignored.
|
|
64
|
+
*/
|
|
65
|
+
menu_path?: string | null
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface Tree {
|
|
71
|
+
|
|
72
|
+
// Own properties of GMenu-3.0.GMenu.Tree
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Flags controlling the content of the menu.
|
|
76
|
+
*/
|
|
77
|
+
readonly flags: TreeFlags
|
|
78
|
+
/**
|
|
79
|
+
* The name of the menu file; must be a basename or a relative path. The file
|
|
80
|
+
* will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu
|
|
81
|
+
* specification.
|
|
82
|
+
*/
|
|
83
|
+
readonly menu_basename: string | null
|
|
84
|
+
/**
|
|
85
|
+
* The full path of the menu file. If set, GMenuTree:menu-basename will get
|
|
86
|
+
* ignored.
|
|
87
|
+
*/
|
|
88
|
+
readonly menu_path: string | null
|
|
89
|
+
|
|
90
|
+
// Owm methods of GMenu-3.0.GMenu.Tree
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* This function is only available if the tree has been loaded via
|
|
94
|
+
* gmenu_tree_load_sync() or a variant thereof.
|
|
95
|
+
* @returns The absolute and canonicalized path to the loaded menu file
|
|
96
|
+
*/
|
|
97
|
+
get_canonical_menu_path(): string | null
|
|
98
|
+
get_directory_from_path(path: string | null): TreeDirectory
|
|
99
|
+
/**
|
|
100
|
+
* Look up the entry corresponding to the given "desktop file id".
|
|
101
|
+
* @param id a desktop file ID
|
|
102
|
+
* @returns A newly referenced #GMenuTreeEntry, or %NULL if none
|
|
103
|
+
*/
|
|
104
|
+
get_entry_by_id(id: string | null): TreeEntry
|
|
105
|
+
/**
|
|
106
|
+
* Get the root directory; you must have loaded the tree first (at
|
|
107
|
+
* least once) via gmenu_tree_load_sync() or a variant thereof.
|
|
108
|
+
* @returns Root of the tree
|
|
109
|
+
*/
|
|
110
|
+
get_root_directory(): TreeDirectory
|
|
111
|
+
/**
|
|
112
|
+
* Synchronously load the menu contents. This function
|
|
113
|
+
* performs a significant amount of blocking I/O if the
|
|
114
|
+
* tree has not been loaded yet.
|
|
115
|
+
* @returns %TRUE on success, %FALSE on error
|
|
116
|
+
*/
|
|
117
|
+
load_sync(): boolean
|
|
118
|
+
|
|
119
|
+
// Own signals of GMenu-3.0.GMenu.Tree
|
|
120
|
+
|
|
121
|
+
connect(sigName: "changed", callback: Tree.ChangedSignalCallback): number
|
|
122
|
+
connect_after(sigName: "changed", callback: Tree.ChangedSignalCallback): number
|
|
123
|
+
emit(sigName: "changed", ...args: any[]): void
|
|
124
|
+
|
|
125
|
+
// Class property signals of GMenu-3.0.GMenu.Tree
|
|
126
|
+
|
|
127
|
+
connect(sigName: "notify::flags", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
128
|
+
connect_after(sigName: "notify::flags", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
129
|
+
emit(sigName: "notify::flags", ...args: any[]): void
|
|
130
|
+
connect(sigName: "notify::menu-basename", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
131
|
+
connect_after(sigName: "notify::menu-basename", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
132
|
+
emit(sigName: "notify::menu-basename", ...args: any[]): void
|
|
133
|
+
connect(sigName: "notify::menu-path", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
134
|
+
connect_after(sigName: "notify::menu-path", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
135
|
+
emit(sigName: "notify::menu-path", ...args: any[]): void
|
|
136
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
137
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
138
|
+
emit(sigName: string, ...args: any[]): void
|
|
139
|
+
disconnect(id: number): void
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export class Tree extends GObject.Object {
|
|
143
|
+
|
|
144
|
+
// Own properties of GMenu-3.0.GMenu.Tree
|
|
145
|
+
|
|
146
|
+
static name: string
|
|
147
|
+
static $gtype: GObject.GType<Tree>
|
|
148
|
+
|
|
149
|
+
// Constructors of GMenu-3.0.GMenu.Tree
|
|
150
|
+
|
|
151
|
+
constructor(config?: Tree.ConstructorProperties)
|
|
152
|
+
constructor(menu_basename: string | null, flags: TreeFlags)
|
|
153
|
+
static new(menu_basename: string | null, flags: TreeFlags): Tree
|
|
154
|
+
static new_for_path(menu_path: string | null, flags: TreeFlags): Tree
|
|
155
|
+
_init(config?: Tree.ConstructorProperties): void
|
|
156
|
+
static item_ref(item: any | null): any | null
|
|
157
|
+
static item_unref(item: any | null): void
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface TreeAlias {
|
|
161
|
+
|
|
162
|
+
// Owm methods of GMenu-3.0.GMenu.TreeAlias
|
|
163
|
+
|
|
164
|
+
get_aliased_directory(): TreeDirectory
|
|
165
|
+
get_aliased_entry(): TreeEntry
|
|
166
|
+
get_aliased_item_type(): TreeItemType
|
|
167
|
+
get_directory(): TreeDirectory
|
|
168
|
+
get_parent(): TreeDirectory
|
|
169
|
+
/**
|
|
170
|
+
* Grab the tree associated with a #GMenuTreeAlias.
|
|
171
|
+
* @returns The #GMenuTree
|
|
172
|
+
*/
|
|
173
|
+
get_tree(): Tree
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export class TreeAlias {
|
|
177
|
+
|
|
178
|
+
// Own properties of GMenu-3.0.GMenu.TreeAlias
|
|
179
|
+
|
|
180
|
+
static name: string
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface TreeClass {
|
|
184
|
+
|
|
185
|
+
// Own fields of GMenu-3.0.GMenu.TreeClass
|
|
186
|
+
|
|
187
|
+
parent_class: GObject.ObjectClass
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export abstract class TreeClass {
|
|
191
|
+
|
|
192
|
+
// Own properties of GMenu-3.0.GMenu.TreeClass
|
|
193
|
+
|
|
194
|
+
static name: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface TreeDirectory {
|
|
198
|
+
|
|
199
|
+
// Owm methods of GMenu-3.0.GMenu.TreeDirectory
|
|
200
|
+
|
|
201
|
+
get_comment(): string | null
|
|
202
|
+
get_desktop_file_path(): string | null
|
|
203
|
+
get_generic_name(): string | null
|
|
204
|
+
/**
|
|
205
|
+
* Gets the icon for the directory.
|
|
206
|
+
* @returns The #GIcon for this directory
|
|
207
|
+
*/
|
|
208
|
+
get_icon(): Gio.Icon
|
|
209
|
+
get_is_nodisplay(): boolean
|
|
210
|
+
get_menu_id(): string | null
|
|
211
|
+
get_name(): string | null
|
|
212
|
+
get_parent(): TreeDirectory
|
|
213
|
+
/**
|
|
214
|
+
* Grab the tree associated with a #GMenuTreeItem.
|
|
215
|
+
* @returns The #GMenuTree
|
|
216
|
+
*/
|
|
217
|
+
get_tree(): Tree
|
|
218
|
+
iter(): TreeIter
|
|
219
|
+
make_path(entry: TreeEntry): string | null
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export class TreeDirectory {
|
|
223
|
+
|
|
224
|
+
// Own properties of GMenu-3.0.GMenu.TreeDirectory
|
|
225
|
+
|
|
226
|
+
static name: string
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface TreeEntry {
|
|
230
|
+
|
|
231
|
+
// Owm methods of GMenu-3.0.GMenu.TreeEntry
|
|
232
|
+
|
|
233
|
+
get_app_info(): Gio.DesktopAppInfo
|
|
234
|
+
get_desktop_file_id(): string | null
|
|
235
|
+
get_desktop_file_path(): string | null
|
|
236
|
+
get_is_excluded(): boolean
|
|
237
|
+
get_is_nodisplay_recurse(): boolean
|
|
238
|
+
get_is_unallocated(): boolean
|
|
239
|
+
get_parent(): TreeDirectory
|
|
240
|
+
/**
|
|
241
|
+
* Grab the tree associated with a #GMenuTreeEntry.
|
|
242
|
+
* @returns The #GMenuTree
|
|
243
|
+
*/
|
|
244
|
+
get_tree(): Tree
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export class TreeEntry {
|
|
248
|
+
|
|
249
|
+
// Own properties of GMenu-3.0.GMenu.TreeEntry
|
|
250
|
+
|
|
251
|
+
static name: string
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface TreeHeader {
|
|
255
|
+
|
|
256
|
+
// Owm methods of GMenu-3.0.GMenu.TreeHeader
|
|
257
|
+
|
|
258
|
+
get_directory(): TreeDirectory
|
|
259
|
+
get_parent(): TreeDirectory
|
|
260
|
+
/**
|
|
261
|
+
* Grab the tree associated with a #GMenuTreeHeader.
|
|
262
|
+
* @returns The #GMenuTree
|
|
263
|
+
*/
|
|
264
|
+
get_tree(): Tree
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export class TreeHeader {
|
|
268
|
+
|
|
269
|
+
// Own properties of GMenu-3.0.GMenu.TreeHeader
|
|
270
|
+
|
|
271
|
+
static name: string
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface TreeIter {
|
|
275
|
+
|
|
276
|
+
// Owm methods of GMenu-3.0.GMenu.TreeIter
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
280
|
+
* returned GMENU_TREE_ITEM_ALIAS.
|
|
281
|
+
* @returns An alias
|
|
282
|
+
*/
|
|
283
|
+
get_alias(): TreeAlias
|
|
284
|
+
/**
|
|
285
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
286
|
+
* returned GMENU_TREE_ITEM_DIRECTORY.
|
|
287
|
+
* @returns A directory
|
|
288
|
+
*/
|
|
289
|
+
get_directory(): TreeDirectory
|
|
290
|
+
/**
|
|
291
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
292
|
+
* returned GMENU_TREE_ITEM_ENTRY.
|
|
293
|
+
* @returns An entry
|
|
294
|
+
*/
|
|
295
|
+
get_entry(): TreeEntry
|
|
296
|
+
/**
|
|
297
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
298
|
+
* returned GMENU_TREE_ITEM_HEADER.
|
|
299
|
+
* @returns A header
|
|
300
|
+
*/
|
|
301
|
+
get_header(): TreeHeader
|
|
302
|
+
/**
|
|
303
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
304
|
+
* returned #GMENU_TREE_ITEM_SEPARATOR.
|
|
305
|
+
* @returns A separator
|
|
306
|
+
*/
|
|
307
|
+
get_separator(): TreeSeparator
|
|
308
|
+
/**
|
|
309
|
+
* Change the iterator to the next item, and return its type. If
|
|
310
|
+
* there are no more items, %GMENU_TREE_ITEM_INVALID is returned.
|
|
311
|
+
* @returns The type of the next item that can be retrived from the iterator
|
|
312
|
+
*/
|
|
313
|
+
next(): TreeItemType
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export class TreeIter {
|
|
317
|
+
|
|
318
|
+
// Own properties of GMenu-3.0.GMenu.TreeIter
|
|
319
|
+
|
|
320
|
+
static name: string
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface TreeSeparator {
|
|
324
|
+
|
|
325
|
+
// Owm methods of GMenu-3.0.GMenu.TreeSeparator
|
|
326
|
+
|
|
327
|
+
get_parent(): TreeDirectory
|
|
328
|
+
/**
|
|
329
|
+
* Grab the tree associated with a #GMenuTreeSeparator.
|
|
330
|
+
* @returns The #GMenuTree
|
|
331
|
+
*/
|
|
332
|
+
get_tree(): Tree
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export class TreeSeparator {
|
|
336
|
+
|
|
337
|
+
// Own properties of GMenu-3.0.GMenu.TreeSeparator
|
|
338
|
+
|
|
339
|
+
static name: string
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Name of the imported GIR library
|
|
344
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
345
|
+
*/
|
|
346
|
+
export const __name__: string
|
|
347
|
+
/**
|
|
348
|
+
* Version of the imported GIR library
|
|
349
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
350
|
+
*/
|
|
351
|
+
export const __version__: string
|
|
352
|
+
// END
|
package/gmenu-3.0.d.ts
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* GMenu-3.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type Gio from '@girs/gio-2.0';
|
|
13
|
+
import type GObject from '@girs/gobject-2.0';
|
|
14
|
+
import type GLib from '@girs/glib-2.0';
|
|
15
|
+
|
|
16
|
+
export namespace GMenu {
|
|
17
|
+
|
|
18
|
+
enum TreeItemType {
|
|
19
|
+
INVALID,
|
|
20
|
+
DIRECTORY,
|
|
21
|
+
ENTRY,
|
|
22
|
+
SEPARATOR,
|
|
23
|
+
HEADER,
|
|
24
|
+
ALIAS,
|
|
25
|
+
}
|
|
26
|
+
enum TreeFlags {
|
|
27
|
+
NONE,
|
|
28
|
+
INCLUDE_EXCLUDED,
|
|
29
|
+
SHOW_EMPTY,
|
|
30
|
+
INCLUDE_NODISPLAY,
|
|
31
|
+
SHOW_ALL_SEPARATORS,
|
|
32
|
+
SORT_DISPLAY_NAME,
|
|
33
|
+
INCLUDE_UNALLOCATED,
|
|
34
|
+
}
|
|
35
|
+
module Tree {
|
|
36
|
+
|
|
37
|
+
// Signal callback interfaces
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Signal callback interface for `changed`
|
|
41
|
+
*/
|
|
42
|
+
interface ChangedSignalCallback {
|
|
43
|
+
($obj: Tree): void
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// Constructor properties interface
|
|
48
|
+
|
|
49
|
+
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
50
|
+
|
|
51
|
+
// Own constructor properties of GMenu-3.0.GMenu.Tree
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Flags controlling the content of the menu.
|
|
55
|
+
*/
|
|
56
|
+
flags?: TreeFlags | null
|
|
57
|
+
/**
|
|
58
|
+
* The name of the menu file; must be a basename or a relative path. The file
|
|
59
|
+
* will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu
|
|
60
|
+
* specification.
|
|
61
|
+
*/
|
|
62
|
+
menu_basename?: string | null
|
|
63
|
+
/**
|
|
64
|
+
* The full path of the menu file. If set, GMenuTree:menu-basename will get
|
|
65
|
+
* ignored.
|
|
66
|
+
*/
|
|
67
|
+
menu_path?: string | null
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface Tree {
|
|
73
|
+
|
|
74
|
+
// Own properties of GMenu-3.0.GMenu.Tree
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Flags controlling the content of the menu.
|
|
78
|
+
*/
|
|
79
|
+
readonly flags: TreeFlags
|
|
80
|
+
/**
|
|
81
|
+
* The name of the menu file; must be a basename or a relative path. The file
|
|
82
|
+
* will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu
|
|
83
|
+
* specification.
|
|
84
|
+
*/
|
|
85
|
+
readonly menu_basename: string | null
|
|
86
|
+
/**
|
|
87
|
+
* The full path of the menu file. If set, GMenuTree:menu-basename will get
|
|
88
|
+
* ignored.
|
|
89
|
+
*/
|
|
90
|
+
readonly menu_path: string | null
|
|
91
|
+
|
|
92
|
+
// Owm methods of GMenu-3.0.GMenu.Tree
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* This function is only available if the tree has been loaded via
|
|
96
|
+
* gmenu_tree_load_sync() or a variant thereof.
|
|
97
|
+
* @returns The absolute and canonicalized path to the loaded menu file
|
|
98
|
+
*/
|
|
99
|
+
get_canonical_menu_path(): string | null
|
|
100
|
+
get_directory_from_path(path: string | null): TreeDirectory
|
|
101
|
+
/**
|
|
102
|
+
* Look up the entry corresponding to the given "desktop file id".
|
|
103
|
+
* @param id a desktop file ID
|
|
104
|
+
* @returns A newly referenced #GMenuTreeEntry, or %NULL if none
|
|
105
|
+
*/
|
|
106
|
+
get_entry_by_id(id: string | null): TreeEntry
|
|
107
|
+
/**
|
|
108
|
+
* Get the root directory; you must have loaded the tree first (at
|
|
109
|
+
* least once) via gmenu_tree_load_sync() or a variant thereof.
|
|
110
|
+
* @returns Root of the tree
|
|
111
|
+
*/
|
|
112
|
+
get_root_directory(): TreeDirectory
|
|
113
|
+
/**
|
|
114
|
+
* Synchronously load the menu contents. This function
|
|
115
|
+
* performs a significant amount of blocking I/O if the
|
|
116
|
+
* tree has not been loaded yet.
|
|
117
|
+
* @returns %TRUE on success, %FALSE on error
|
|
118
|
+
*/
|
|
119
|
+
load_sync(): boolean
|
|
120
|
+
|
|
121
|
+
// Own signals of GMenu-3.0.GMenu.Tree
|
|
122
|
+
|
|
123
|
+
connect(sigName: "changed", callback: Tree.ChangedSignalCallback): number
|
|
124
|
+
connect_after(sigName: "changed", callback: Tree.ChangedSignalCallback): number
|
|
125
|
+
emit(sigName: "changed", ...args: any[]): void
|
|
126
|
+
|
|
127
|
+
// Class property signals of GMenu-3.0.GMenu.Tree
|
|
128
|
+
|
|
129
|
+
connect(sigName: "notify::flags", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
130
|
+
connect_after(sigName: "notify::flags", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
131
|
+
emit(sigName: "notify::flags", ...args: any[]): void
|
|
132
|
+
connect(sigName: "notify::menu-basename", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
133
|
+
connect_after(sigName: "notify::menu-basename", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
134
|
+
emit(sigName: "notify::menu-basename", ...args: any[]): void
|
|
135
|
+
connect(sigName: "notify::menu-path", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
136
|
+
connect_after(sigName: "notify::menu-path", callback: (($obj: Tree, pspec: GObject.ParamSpec) => void)): number
|
|
137
|
+
emit(sigName: "notify::menu-path", ...args: any[]): void
|
|
138
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
139
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
140
|
+
emit(sigName: string, ...args: any[]): void
|
|
141
|
+
disconnect(id: number): void
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
class Tree extends GObject.Object {
|
|
145
|
+
|
|
146
|
+
// Own properties of GMenu-3.0.GMenu.Tree
|
|
147
|
+
|
|
148
|
+
static name: string
|
|
149
|
+
static $gtype: GObject.GType<Tree>
|
|
150
|
+
|
|
151
|
+
// Constructors of GMenu-3.0.GMenu.Tree
|
|
152
|
+
|
|
153
|
+
constructor(config?: Tree.ConstructorProperties)
|
|
154
|
+
constructor(menu_basename: string | null, flags: TreeFlags)
|
|
155
|
+
static new(menu_basename: string | null, flags: TreeFlags): Tree
|
|
156
|
+
static new_for_path(menu_path: string | null, flags: TreeFlags): Tree
|
|
157
|
+
_init(config?: Tree.ConstructorProperties): void
|
|
158
|
+
static item_ref(item: any | null): any | null
|
|
159
|
+
static item_unref(item: any | null): void
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface TreeAlias {
|
|
163
|
+
|
|
164
|
+
// Owm methods of GMenu-3.0.GMenu.TreeAlias
|
|
165
|
+
|
|
166
|
+
get_aliased_directory(): TreeDirectory
|
|
167
|
+
get_aliased_entry(): TreeEntry
|
|
168
|
+
get_aliased_item_type(): TreeItemType
|
|
169
|
+
get_directory(): TreeDirectory
|
|
170
|
+
get_parent(): TreeDirectory
|
|
171
|
+
/**
|
|
172
|
+
* Grab the tree associated with a #GMenuTreeAlias.
|
|
173
|
+
* @returns The #GMenuTree
|
|
174
|
+
*/
|
|
175
|
+
get_tree(): Tree
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
class TreeAlias {
|
|
179
|
+
|
|
180
|
+
// Own properties of GMenu-3.0.GMenu.TreeAlias
|
|
181
|
+
|
|
182
|
+
static name: string
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface TreeClass {
|
|
186
|
+
|
|
187
|
+
// Own fields of GMenu-3.0.GMenu.TreeClass
|
|
188
|
+
|
|
189
|
+
parent_class: GObject.ObjectClass
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
abstract class TreeClass {
|
|
193
|
+
|
|
194
|
+
// Own properties of GMenu-3.0.GMenu.TreeClass
|
|
195
|
+
|
|
196
|
+
static name: string
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface TreeDirectory {
|
|
200
|
+
|
|
201
|
+
// Owm methods of GMenu-3.0.GMenu.TreeDirectory
|
|
202
|
+
|
|
203
|
+
get_comment(): string | null
|
|
204
|
+
get_desktop_file_path(): string | null
|
|
205
|
+
get_generic_name(): string | null
|
|
206
|
+
/**
|
|
207
|
+
* Gets the icon for the directory.
|
|
208
|
+
* @returns The #GIcon for this directory
|
|
209
|
+
*/
|
|
210
|
+
get_icon(): Gio.Icon
|
|
211
|
+
get_is_nodisplay(): boolean
|
|
212
|
+
get_menu_id(): string | null
|
|
213
|
+
get_name(): string | null
|
|
214
|
+
get_parent(): TreeDirectory
|
|
215
|
+
/**
|
|
216
|
+
* Grab the tree associated with a #GMenuTreeItem.
|
|
217
|
+
* @returns The #GMenuTree
|
|
218
|
+
*/
|
|
219
|
+
get_tree(): Tree
|
|
220
|
+
iter(): TreeIter
|
|
221
|
+
make_path(entry: TreeEntry): string | null
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
class TreeDirectory {
|
|
225
|
+
|
|
226
|
+
// Own properties of GMenu-3.0.GMenu.TreeDirectory
|
|
227
|
+
|
|
228
|
+
static name: string
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface TreeEntry {
|
|
232
|
+
|
|
233
|
+
// Owm methods of GMenu-3.0.GMenu.TreeEntry
|
|
234
|
+
|
|
235
|
+
get_app_info(): Gio.DesktopAppInfo
|
|
236
|
+
get_desktop_file_id(): string | null
|
|
237
|
+
get_desktop_file_path(): string | null
|
|
238
|
+
get_is_excluded(): boolean
|
|
239
|
+
get_is_nodisplay_recurse(): boolean
|
|
240
|
+
get_is_unallocated(): boolean
|
|
241
|
+
get_parent(): TreeDirectory
|
|
242
|
+
/**
|
|
243
|
+
* Grab the tree associated with a #GMenuTreeEntry.
|
|
244
|
+
* @returns The #GMenuTree
|
|
245
|
+
*/
|
|
246
|
+
get_tree(): Tree
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
class TreeEntry {
|
|
250
|
+
|
|
251
|
+
// Own properties of GMenu-3.0.GMenu.TreeEntry
|
|
252
|
+
|
|
253
|
+
static name: string
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
interface TreeHeader {
|
|
257
|
+
|
|
258
|
+
// Owm methods of GMenu-3.0.GMenu.TreeHeader
|
|
259
|
+
|
|
260
|
+
get_directory(): TreeDirectory
|
|
261
|
+
get_parent(): TreeDirectory
|
|
262
|
+
/**
|
|
263
|
+
* Grab the tree associated with a #GMenuTreeHeader.
|
|
264
|
+
* @returns The #GMenuTree
|
|
265
|
+
*/
|
|
266
|
+
get_tree(): Tree
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
class TreeHeader {
|
|
270
|
+
|
|
271
|
+
// Own properties of GMenu-3.0.GMenu.TreeHeader
|
|
272
|
+
|
|
273
|
+
static name: string
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
interface TreeIter {
|
|
277
|
+
|
|
278
|
+
// Owm methods of GMenu-3.0.GMenu.TreeIter
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
282
|
+
* returned GMENU_TREE_ITEM_ALIAS.
|
|
283
|
+
* @returns An alias
|
|
284
|
+
*/
|
|
285
|
+
get_alias(): TreeAlias
|
|
286
|
+
/**
|
|
287
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
288
|
+
* returned GMENU_TREE_ITEM_DIRECTORY.
|
|
289
|
+
* @returns A directory
|
|
290
|
+
*/
|
|
291
|
+
get_directory(): TreeDirectory
|
|
292
|
+
/**
|
|
293
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
294
|
+
* returned GMENU_TREE_ITEM_ENTRY.
|
|
295
|
+
* @returns An entry
|
|
296
|
+
*/
|
|
297
|
+
get_entry(): TreeEntry
|
|
298
|
+
/**
|
|
299
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
300
|
+
* returned GMENU_TREE_ITEM_HEADER.
|
|
301
|
+
* @returns A header
|
|
302
|
+
*/
|
|
303
|
+
get_header(): TreeHeader
|
|
304
|
+
/**
|
|
305
|
+
* This method may only be called if gmenu_tree_iter_next()
|
|
306
|
+
* returned #GMENU_TREE_ITEM_SEPARATOR.
|
|
307
|
+
* @returns A separator
|
|
308
|
+
*/
|
|
309
|
+
get_separator(): TreeSeparator
|
|
310
|
+
/**
|
|
311
|
+
* Change the iterator to the next item, and return its type. If
|
|
312
|
+
* there are no more items, %GMENU_TREE_ITEM_INVALID is returned.
|
|
313
|
+
* @returns The type of the next item that can be retrived from the iterator
|
|
314
|
+
*/
|
|
315
|
+
next(): TreeItemType
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
class TreeIter {
|
|
319
|
+
|
|
320
|
+
// Own properties of GMenu-3.0.GMenu.TreeIter
|
|
321
|
+
|
|
322
|
+
static name: string
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
interface TreeSeparator {
|
|
326
|
+
|
|
327
|
+
// Owm methods of GMenu-3.0.GMenu.TreeSeparator
|
|
328
|
+
|
|
329
|
+
get_parent(): TreeDirectory
|
|
330
|
+
/**
|
|
331
|
+
* Grab the tree associated with a #GMenuTreeSeparator.
|
|
332
|
+
* @returns The #GMenuTree
|
|
333
|
+
*/
|
|
334
|
+
get_tree(): Tree
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
class TreeSeparator {
|
|
338
|
+
|
|
339
|
+
// Own properties of GMenu-3.0.GMenu.TreeSeparator
|
|
340
|
+
|
|
341
|
+
static name: string
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Name of the imported GIR library
|
|
346
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
347
|
+
*/
|
|
348
|
+
const __name__: string
|
|
349
|
+
/**
|
|
350
|
+
* Version of the imported GIR library
|
|
351
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
352
|
+
*/
|
|
353
|
+
const __version__: string
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export default GMenu;
|
|
357
|
+
// END
|
package/gmenu-3.0.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/gmenu-3.0",
|
|
3
|
+
"version": "3.0.0-3.0.0-beta.12",
|
|
4
|
+
"description": "GJS TypeScript type definitions for GMenu-3.0, generated from library version 3.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "gmenu-3.0.js",
|
|
7
|
+
"main": "gmenu-3.0.js",
|
|
8
|
+
"typedoc": {
|
|
9
|
+
"entryPoint": "./gmenu-3.0.d.ts",
|
|
10
|
+
"readmeFile": "./README.md",
|
|
11
|
+
"displayName": "GMenu-3.0",
|
|
12
|
+
"tsconfig": "./tsconfig.doc.json"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./gmenu-3.0.d.ts",
|
|
18
|
+
"default": "./gmenu-3.0.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"types": "./gmenu-3.0.d.cts",
|
|
22
|
+
"default": "./gmenu-3.0.cjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "yarn test:esm && yarn test:cjs",
|
|
28
|
+
"test:esm": "tsc --noEmit gmenu-3.0.d.ts",
|
|
29
|
+
"test:cjs": "tsc --noEmit gmenu-3.0.d.cts"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@girs/gio-2.0": "^2.75.1-3.0.0-beta.12",
|
|
33
|
+
"@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
|
|
34
|
+
"@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"typescript": "^*"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"Gir",
|
|
41
|
+
"TypeScript",
|
|
42
|
+
"GMenu-3.0"
|
|
43
|
+
],
|
|
44
|
+
"author": "ts-for-gir",
|
|
45
|
+
"license": "Apache-2.0",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/gjsify/ts-for-gir#readme"
|
|
54
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// General settings for code interpretation
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"experimentalDecorators": true,
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"noEmitOnError": false,
|
|
10
|
+
"baseUrl": "./",
|
|
11
|
+
"rootDir": ".",
|
|
12
|
+
// General settings for code generation
|
|
13
|
+
"removeComments": false,
|
|
14
|
+
"inlineSourceMap": false,
|
|
15
|
+
"inlineSources": false,
|
|
16
|
+
"newLine": "LF"
|
|
17
|
+
},
|
|
18
|
+
"include": ["./gmenu-3.0.d.ts"]
|
|
19
|
+
}
|