@girs/garcon-1.0 4.0.4

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.
@@ -0,0 +1,2049 @@
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-gir
7
+ *
8
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
9
+ */
10
+
11
+ import '@girs/gjs';
12
+
13
+ // Module dependencies
14
+ import type Libxfce4util from '@girs/libxfce4util-1.0';
15
+ import type Gio from '@girs/gio-2.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type GModule from '@girs/gmodule-2.0';
19
+
20
+ export namespace Garcon {
21
+
22
+ /**
23
+ * Garcon-1.0
24
+ */
25
+
26
+
27
+ /**
28
+ * @gir-type Enum
29
+ */
30
+ enum MenuLayoutMergeType {
31
+ MENUS,
32
+ FILES,
33
+ ALL,
34
+ }
35
+
36
+
37
+ /**
38
+ * @gir-type Enum
39
+ */
40
+ enum MenuMergeFileType {
41
+ PATH,
42
+ PARENT,
43
+ }
44
+
45
+
46
+ /**
47
+ * @gir-type Enum
48
+ */
49
+ export namespace MenuNodeType {
50
+ export const $gtype: GObject.GType<MenuNodeType>;
51
+ }
52
+
53
+ /**
54
+ * @gir-type Enum
55
+ */
56
+ enum MenuNodeType {
57
+ INVALID,
58
+ MENU,
59
+ NAME,
60
+ DIRECTORY,
61
+ DIRECTORYDIR,
62
+ DEFAULTDIRECTORYDIRS,
63
+ APPDIR,
64
+ DEFAULTAPPDIRS,
65
+ ONLYUNALLOCATED,
66
+ NOTONLYUNALLOCATED,
67
+ DELETED,
68
+ NOTDELETED,
69
+ INCLUDE,
70
+ EXCLUDE,
71
+ ALL,
72
+ FILENAME,
73
+ CATEGORY,
74
+ OR,
75
+ AND,
76
+ NOT,
77
+ MOVE,
78
+ OLD,
79
+ NEW,
80
+ DEFAULTLAYOUT,
81
+ LAYOUT,
82
+ MENUNAME,
83
+ SEPARATOR,
84
+ MERGE,
85
+ MERGEFILE,
86
+ MERGEDIR,
87
+ MERGEDIRS,
88
+ }
89
+
90
+
91
+ /**
92
+ * Macro for garcon_set_environment or garcon_set_environment_xdg
93
+ * to set the Xfce Desktop Environment.
94
+ * @since 0.3.0
95
+ */
96
+ const ENVIRONMENT_XFCE: string;
97
+
98
+ /**
99
+ * The major version number of the garcon library.
100
+ * Like garcon_major_version, but from the headers used at
101
+ * application compile time, rather than from the library
102
+ * linked against at application run time.
103
+ */
104
+ const MAJOR_VERSION: number;
105
+
106
+ /**
107
+ * The micro version number of the garcon library.
108
+ * Like garcon_micro_version, but from the headers used at
109
+ * application compile time, rather than from the library
110
+ * linked against at application run time.
111
+ */
112
+ const MICRO_VERSION: number;
113
+
114
+ /**
115
+ * The minor version number of the garcon library.
116
+ * Like garcon_minor_version, but from the headers used at
117
+ * application compile time, rather than from the library
118
+ * linked against at application run time.
119
+ */
120
+ const MINOR_VERSION: number;
121
+
122
+ /**
123
+ * Checks that the <systemitem class="library">garcon</systemitem>
124
+ * library in use is compatible with the given version. Generally you
125
+ * would pass in the constants #GARCON_MAJOR_VERSION,
126
+ * #GARCON_MINOR_VERSION and #GARCON_MICRO_VERSION as the three
127
+ * arguments to this function; that produces a check that the library
128
+ * in use is compatible with the version of
129
+ * <systemitem class="library">garcon</systemitem> the application was
130
+ * compiled against.
131
+ *
132
+ * <example>
133
+ * <title>Checking the runtime version of the garcon library</title>
134
+ * <programlisting>
135
+ * const gchar *mismatch;
136
+ * mismatch = garcon_check_version (GARCON_VERSION_MAJOR,
137
+ * GARCON_VERSION_MINOR,
138
+ * GARCON_VERSION_MICRO);
139
+ * if (G_UNLIKELY (mismatch != NULL))
140
+ * g_error ("Version mismatch: %<!---->s", mismatch);
141
+ * </programlisting>
142
+ * </example>
143
+ * @param required_major the required major version.
144
+ * @param required_minor the required minor version.
145
+ * @param required_micro the required micro version.
146
+ * @returns `null` if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.
147
+ */
148
+ function check_version(required_major: number, required_minor: number, required_micro: number): string;
149
+
150
+ /**
151
+ * @param filename name of .desktop file
152
+ */
153
+ function config_build_paths(filename: string): string[];
154
+
155
+ /**
156
+ * Looks for the filename in the users' config directory and then
157
+ * the system config directories.
158
+ * @param filename relative filename of the config resource.
159
+ * @returns the absolute path to the first file in the search path, that matches `filename` or `null` if no such file or directory could be found.
160
+ */
161
+ function config_lookup(filename: string): string;
162
+
163
+ /**
164
+ * Get the environment set with `garcon_set_environment()`.
165
+ * @returns Name of the desktop environment (e.g. XFCE, KDE, GNOME) which is used or `null`.
166
+ */
167
+ function get_environment(): string;
168
+
169
+ /**
170
+ * @param closure
171
+ * @param return_value
172
+ * @param n_param_values
173
+ * @param param_values
174
+ * @param invocation_hint
175
+ * @param marshal_data
176
+ */
177
+ function marshal_VOID__OBJECT_OBJECT(closure: GObject.Closure, return_value: GObject.Value | any, n_param_values: number, param_values: GObject.Value | any, invocation_hint: null, marshal_data: null): void;
178
+
179
+ /**
180
+ * Sets (or unsets) the desktop environment for which menus will generated.
181
+ * Menus and menu items belonging to other desktop environments will be
182
+ * ignored. If set to `null`, all menu items are used.
183
+ * @param env Name of the desktop environment for which menus will be generated (e.g. XFCE, KDE, GNOME or `null`).
184
+ */
185
+ function set_environment(env: string): void;
186
+
187
+ /**
188
+ * Set the desktop environment to the envvar XDG_CURRENT_DESKTOP.
189
+ * If this variables is not set, it falls back to `default_env`.
190
+ *
191
+ * For `fallback_env` you can use for example #GARCON_ENVIRONMENT_XFCE.
192
+ * @param fallback_env fallback value
193
+ * @since 0.3.0
194
+ */
195
+ function set_environment_xdg(fallback_env: string): void;
196
+
197
+ namespace Menu {
198
+ // Signal signatures
199
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
200
+ /**
201
+ * @signal
202
+ * @run-last
203
+ */
204
+ "directory-changed": (arg0: MenuDirectory, arg1: MenuDirectory) => void;
205
+ /**
206
+ * @signal
207
+ * @run-last
208
+ */
209
+ "reload-required": () => void;
210
+ "notify::directory": (pspec: GObject.ParamSpec) => void;
211
+ "notify::file": (pspec: GObject.ParamSpec) => void;
212
+ }
213
+
214
+ // Constructor properties interface
215
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MenuElement.ConstructorProps {
216
+ directory: MenuDirectory | null;
217
+ file: Gio.File;
218
+ }
219
+ }
220
+
221
+ /**
222
+ * @gir-type Class
223
+ */
224
+ class Menu extends GObject.Object implements MenuElement {
225
+ static $gtype: GObject.GType<Menu>;
226
+
227
+ // Properties
228
+ /**
229
+ * The directory entry associated with this menu.
230
+ */
231
+ get directory(): MenuDirectory | null;
232
+ set directory(val: MenuDirectory | null);
233
+
234
+ /**
235
+ * The {@link Gio.File} from which the %GarconMenu was loaded.
236
+ * @construct-only
237
+ */
238
+ get file(): Gio.File;
239
+
240
+ /**
241
+ * Compile-time signal type information.
242
+ *
243
+ * This instance property is generated only for TypeScript type checking.
244
+ * It is not defined at runtime and should not be accessed in JS code.
245
+ * @internal
246
+ */
247
+ $signals: Menu.SignalSignatures;
248
+
249
+ // Constructors
250
+ constructor(properties?: Partial<Menu.ConstructorProps>, ...args: any[]);
251
+
252
+ _init(...args: any[]): void;
253
+
254
+ static ["new"](file: Gio.File): Menu;
255
+
256
+ static new_applications(): Menu;
257
+
258
+ static new_for_path(filename: string): Menu;
259
+
260
+ // Signals
261
+ /** @signal */
262
+ connect<K extends keyof Menu.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Menu.SignalSignatures[K]>): number;
263
+ connect(signal: string, callback: (...args: any[]) => any): number;
264
+
265
+ /** @signal */
266
+ connect_after<K extends keyof Menu.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Menu.SignalSignatures[K]>): number;
267
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
268
+
269
+ /** @signal */
270
+ emit<K extends keyof Menu.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Menu.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
271
+ emit(signal: string, ...args: any[]): void;
272
+
273
+ // Methods
274
+ /**
275
+ * Adds `submenu` as a sub menu to `menu`.
276
+ * @param submenu a {@link Garcon.Menu}
277
+ */
278
+ add_menu(submenu: Menu): void;
279
+
280
+ /**
281
+ * Returns the {@link Garcon.MenuDirectory} of `menu` or `null` if `menu` has
282
+ * no valid directory element.
283
+ *
284
+ * The menu directory may contain a lot of useful information about
285
+ * the menu like the display and icon name, desktop environments it
286
+ * should show up in etc.
287
+ * @returns a {@link Garcon.MenuDirectory}
288
+ */
289
+ get_directory(): MenuDirectory | null;
290
+
291
+ /**
292
+ * Get all the menu element in `menu`. This contains sub menus, menu items
293
+ * and separators.
294
+ *
295
+ * Returns a list of {@link Garcon.MenuItem} or `null`. Free the list with
296
+ * `g_list_free()`.
297
+ */
298
+ get_elements(): MenuItem[] | null;
299
+
300
+ /**
301
+ * Get the file for `menu`. It refers to the .menu file from which
302
+ * `menu` was or will be loaded.
303
+ *
304
+ * The returned object should be unreffed with `g_object_unref()`
305
+ * when no longer needed.
306
+ * @returns a {@link Gio.File}.
307
+ */
308
+ get_file(): Gio.File;
309
+
310
+ /**
311
+ * Get the item pool of the menu. This pool contains all items in this
312
+ * menu (for that of its submenus).
313
+ * @returns a {@link Garcon.MenuItemPool}.
314
+ */
315
+ get_item_pool(): MenuItemPool;
316
+
317
+ /**
318
+ * Returns all {@link Garcon.MenuItem} included in `menu`. The items are
319
+ * sorted by their display names in ascending order.
320
+ *
321
+ * The caller is responsible to free the returned list using
322
+ * `g_list_free()` when no longer needed.
323
+ * @returns list of {@link Garcon.MenuItem} included in `menu`.
324
+ */
325
+ get_items(): MenuItem[];
326
+
327
+ /**
328
+ * Looks in `menu` for a submenu with `name` as name.
329
+ * @param name a sub menu name
330
+ * @returns a {@link Garcon.Menu} or `null`.
331
+ */
332
+ get_menu_with_name(name: string): Menu | null;
333
+
334
+ /**
335
+ * Returns a sorted list of {@link Garcon.Menu} submenus of `menu`. The list
336
+ * should be freed with `g_list_free()`.
337
+ * @returns a sorted list of {@link Garcon.Menu}.
338
+ */
339
+ get_menus(): Menu[];
340
+
341
+ /**
342
+ * Returns the parent {@link Garcon.Menu} or `menu`.
343
+ * @returns a {@link Garcon.Menu} or `null` if `menu` is the root menu.
344
+ */
345
+ get_parent(): Menu | null;
346
+
347
+ /**
348
+ * This function loads the entire menu tree from the file referred to
349
+ * by `menu`. It resolves merges, moves and everything else defined
350
+ * in the menu specification. The resulting tree information is
351
+ * stored within `menu` and can be accessed using the public {@link Garcon.Menu}
352
+ * API afterwards.
353
+ *
354
+ * `cancellable` can be used to handle blocking I/O when reading data
355
+ * from files during the loading process.
356
+ *
357
+ * `error` should either be NULL or point to a {@link GLib.Error} return location
358
+ * where errors should be stored in.
359
+ * @param cancellable a {@link Gio.Cancellable}
360
+ * @returns `true` if the menu was loaded successfully or `false` if there was an error or the process was cancelled.
361
+ */
362
+ load(cancellable: Gio.Cancellable | null): boolean;
363
+
364
+ /**
365
+ * @param b
366
+ */
367
+ equal(b: MenuElement): boolean;
368
+
369
+ get_comment(): string;
370
+
371
+ get_icon_name(): string;
372
+
373
+ get_name(): string;
374
+
375
+ get_no_display(): boolean;
376
+
377
+ get_show_in_environment(): boolean;
378
+
379
+ get_visible(): boolean;
380
+
381
+ /**
382
+ * @param other
383
+ * @virtual
384
+ */
385
+ vfunc_equal(other: MenuElement): boolean;
386
+
387
+ /**
388
+ * @virtual
389
+ */
390
+ vfunc_get_comment(): string;
391
+
392
+ /**
393
+ * @virtual
394
+ */
395
+ vfunc_get_icon_name(): string;
396
+
397
+ /**
398
+ * @virtual
399
+ */
400
+ vfunc_get_name(): string;
401
+
402
+ /**
403
+ * @virtual
404
+ */
405
+ vfunc_get_no_display(): boolean;
406
+
407
+ /**
408
+ * @virtual
409
+ */
410
+ vfunc_get_show_in_environment(): boolean;
411
+
412
+ /**
413
+ * @virtual
414
+ */
415
+ vfunc_get_visible(): boolean;
416
+ }
417
+
418
+
419
+ namespace MenuDirectory {
420
+ // Signal signatures
421
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
422
+ "notify::comment": (pspec: GObject.ParamSpec) => void;
423
+ "notify::file": (pspec: GObject.ParamSpec) => void;
424
+ "notify::icon-name": (pspec: GObject.ParamSpec) => void;
425
+ "notify::name": (pspec: GObject.ParamSpec) => void;
426
+ "notify::no-display": (pspec: GObject.ParamSpec) => void;
427
+ }
428
+
429
+ // Constructor properties interface
430
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
431
+ comment: string;
432
+ file: Gio.File;
433
+ icon_name: string;
434
+ iconName: string;
435
+ name: string;
436
+ no_display: boolean;
437
+ noDisplay: boolean;
438
+ }
439
+ }
440
+
441
+ /**
442
+ * @gir-type Class
443
+ */
444
+ class MenuDirectory extends GObject.Object {
445
+ static $gtype: GObject.GType<MenuDirectory>;
446
+
447
+ // Properties
448
+ /**
449
+ * Directory description (comment).
450
+ * @default null
451
+ */
452
+ get comment(): string;
453
+ set comment(val: string);
454
+
455
+ /**
456
+ * @construct-only
457
+ */
458
+ get file(): Gio.File;
459
+
460
+ /**
461
+ * Icon associated with this directory.
462
+ * @default null
463
+ */
464
+ get icon_name(): string;
465
+ set icon_name(val: string);
466
+
467
+ /**
468
+ * Icon associated with this directory.
469
+ * @default null
470
+ */
471
+ get iconName(): string;
472
+ set iconName(val: string);
473
+
474
+ /**
475
+ * Name of the directory.
476
+ * @default null
477
+ */
478
+ get name(): string;
479
+ set name(val: string);
480
+
481
+ /**
482
+ * Whether this menu item is hidden in menus.
483
+ * @default false
484
+ */
485
+ get no_display(): boolean;
486
+ set no_display(val: boolean);
487
+
488
+ /**
489
+ * Whether this menu item is hidden in menus.
490
+ * @default false
491
+ */
492
+ get noDisplay(): boolean;
493
+ set noDisplay(val: boolean);
494
+
495
+ /**
496
+ * Compile-time signal type information.
497
+ *
498
+ * This instance property is generated only for TypeScript type checking.
499
+ * It is not defined at runtime and should not be accessed in JS code.
500
+ * @internal
501
+ */
502
+ $signals: MenuDirectory.SignalSignatures;
503
+
504
+ // Constructors
505
+ constructor(properties?: Partial<MenuDirectory.ConstructorProps>, ...args: any[]);
506
+
507
+ _init(...args: any[]): void;
508
+
509
+ static ["new"](file: Gio.File): MenuDirectory;
510
+
511
+ // Signals
512
+ /** @signal */
513
+ connect<K extends keyof MenuDirectory.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuDirectory.SignalSignatures[K]>): number;
514
+ connect(signal: string, callback: (...args: any[]) => any): number;
515
+
516
+ /** @signal */
517
+ connect_after<K extends keyof MenuDirectory.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuDirectory.SignalSignatures[K]>): number;
518
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
519
+
520
+ /** @signal */
521
+ emit<K extends keyof MenuDirectory.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuDirectory.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
522
+ emit(signal: string, ...args: any[]): void;
523
+
524
+ // Methods
525
+ /**
526
+ * Checks if both directories point to the same file.
527
+ * @param other a {@link Garcon.MenuDirectory}
528
+ * @returns if files are equal `true`, else `false`.
529
+ */
530
+ equal(other: MenuDirectory): boolean;
531
+
532
+ /**
533
+ * Get the comment of `directory`.
534
+ * @returns a the description for `directory`.
535
+ */
536
+ get_comment(): string;
537
+
538
+ /**
539
+ * Get the {@link Gio.File} for `directory`. The returned object should be
540
+ * unreffed with `g_object_unref()` when no longer needed.
541
+ * @returns a {@link Gio.File}
542
+ */
543
+ get_file(): Gio.File;
544
+
545
+ /**
546
+ * Whether `directory` should be hidden.
547
+ * For applications you want to call `garcon_menu_directory_get_visible()`.
548
+ * @returns a the hidden key for `directory`.
549
+ */
550
+ get_hidden(): boolean;
551
+
552
+ /**
553
+ * Get the icon name of `directory`.
554
+ * @returns a the icon-name key for `directory`.
555
+ */
556
+ get_icon_name(): string;
557
+
558
+ /**
559
+ * Get the name of `directory`.
560
+ * @returns a the name for `directory`.
561
+ */
562
+ get_name(): string;
563
+
564
+ /**
565
+ * Whether `directory` should be displayed.
566
+ * For applications you want to call `garcon_menu_directory_get_visible()`.
567
+ * @returns a the no-display key for `directory`.
568
+ */
569
+ get_no_display(): boolean;
570
+
571
+ /**
572
+ * Whether `directory` is visible in the current environment
573
+ * which has been set by `garcon_set_environment()`.
574
+ * For applications you want to call `garcon_menu_directory_get_visible()`.
575
+ * @returns `true` is visible in environment, else `false`.
576
+ */
577
+ get_show_in_environment(): boolean;
578
+
579
+ /**
580
+ * Check which runs the following checks:
581
+ * `garcon_menu_directory_get_show_in_environment()`,
582
+ * `garcon_menu_directory_get_hidden()` and
583
+ * `garcon_menu_directory_get_no_display()`.
584
+ * @returns if visible `true`, else `false`.
585
+ */
586
+ get_visible(): boolean;
587
+
588
+ /**
589
+ * Set the comment of `directory`.
590
+ * @param comment the new description for `directory`.
591
+ */
592
+ set_comment(comment: string): void;
593
+
594
+ /**
595
+ * Set the icon name of `directory`.
596
+ * @param icon_name the new icon name for `directory`.
597
+ */
598
+ set_icon_name(icon_name: string): void;
599
+
600
+ /**
601
+ * Set the name of `directory`.
602
+ * @param name the new name for `directory`.
603
+ */
604
+ set_name(name: string): void;
605
+
606
+ /**
607
+ * Set the NoDisplay key of `directory`.
608
+ * @param no_display whether `directory` should be displayed.
609
+ */
610
+ set_no_display(no_display: boolean): void;
611
+ }
612
+
613
+
614
+ namespace MenuItem {
615
+ // Signal signatures
616
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
617
+ /**
618
+ * Emitted when {@link Garcon.MenuItem} has been reloaded.
619
+ * @signal
620
+ * @run-first
621
+ */
622
+ changed: () => void;
623
+ "notify::command": (pspec: GObject.ParamSpec) => void;
624
+ "notify::comment": (pspec: GObject.ParamSpec) => void;
625
+ "notify::desktop-id": (pspec: GObject.ParamSpec) => void;
626
+ "notify::file": (pspec: GObject.ParamSpec) => void;
627
+ "notify::generic-name": (pspec: GObject.ParamSpec) => void;
628
+ "notify::hidden": (pspec: GObject.ParamSpec) => void;
629
+ "notify::icon-name": (pspec: GObject.ParamSpec) => void;
630
+ "notify::name": (pspec: GObject.ParamSpec) => void;
631
+ "notify::no-display": (pspec: GObject.ParamSpec) => void;
632
+ "notify::path": (pspec: GObject.ParamSpec) => void;
633
+ "notify::prefers-non-default-gpu": (pspec: GObject.ParamSpec) => void;
634
+ "notify::requires-terminal": (pspec: GObject.ParamSpec) => void;
635
+ "notify::supports-startup-notification": (pspec: GObject.ParamSpec) => void;
636
+ "notify::try-exec": (pspec: GObject.ParamSpec) => void;
637
+ }
638
+
639
+ // Constructor properties interface
640
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MenuElement.ConstructorProps {
641
+ command: string;
642
+ comment: string;
643
+ desktop_id: string;
644
+ desktopId: string;
645
+ file: Gio.File;
646
+ generic_name: string;
647
+ genericName: string;
648
+ hidden: boolean;
649
+ icon_name: string;
650
+ iconName: string;
651
+ name: string;
652
+ no_display: boolean;
653
+ noDisplay: boolean;
654
+ path: string;
655
+ prefers_non_default_gpu: boolean;
656
+ prefersNonDefaultGpu: boolean;
657
+ requires_terminal: boolean;
658
+ requiresTerminal: boolean;
659
+ supports_startup_notification: boolean;
660
+ supportsStartupNotification: boolean;
661
+ try_exec: string;
662
+ tryExec: string;
663
+ }
664
+ }
665
+
666
+ /**
667
+ * @gir-type Class
668
+ */
669
+ class MenuItem extends GObject.Object implements MenuElement {
670
+ static $gtype: GObject.GType<MenuItem>;
671
+
672
+ // Properties
673
+ /**
674
+ * Command to be executed when the menu item is clicked.
675
+ * @default null
676
+ */
677
+ get command(): string;
678
+ set command(val: string);
679
+
680
+ /**
681
+ * Comment/description for the application. To be displayed e.g. in tooltips of
682
+ * GtkMenuItems.
683
+ * @default null
684
+ */
685
+ get comment(): string;
686
+ set comment(val: string);
687
+
688
+ /**
689
+ * The desktop-file id of this application.
690
+ * @default null
691
+ */
692
+ get desktop_id(): string;
693
+ set desktop_id(val: string);
694
+
695
+ /**
696
+ * The desktop-file id of this application.
697
+ * @default null
698
+ */
699
+ get desktopId(): string;
700
+ set desktopId(val: string);
701
+
702
+ /**
703
+ * The {@link Gio.File} from which the %GarconMenuItem was loaded.
704
+ * @construct-only
705
+ */
706
+ get file(): Gio.File;
707
+
708
+ /**
709
+ * GenericName of the application (will be displayed in menus etc.).
710
+ * @default null
711
+ */
712
+ get generic_name(): string;
713
+ set generic_name(val: string);
714
+
715
+ /**
716
+ * GenericName of the application (will be displayed in menus etc.).
717
+ * @default null
718
+ */
719
+ get genericName(): string;
720
+ set genericName(val: string);
721
+
722
+ /**
723
+ * It means the user deleted (at his level) something that was present
724
+ * (at an upper level, e.g. in the system dirs). It's strictly equivalent
725
+ * to the .desktop file not existing at all, as far as that user is concerned.
726
+ * @default false
727
+ */
728
+ get hidden(): boolean;
729
+ set hidden(val: boolean);
730
+
731
+ /**
732
+ * Name of the icon to be displayed for this menu item.
733
+ * @default null
734
+ */
735
+ get icon_name(): string;
736
+ set icon_name(val: string);
737
+
738
+ /**
739
+ * Name of the icon to be displayed for this menu item.
740
+ * @default null
741
+ */
742
+ get iconName(): string;
743
+ set iconName(val: string);
744
+
745
+ /**
746
+ * Name of the application (will be displayed in menus etc.).
747
+ * @default null
748
+ */
749
+ get name(): string;
750
+ set name(val: string);
751
+
752
+ /**
753
+ * Whether this menu item is hidden in menus.
754
+ * @default false
755
+ */
756
+ get no_display(): boolean;
757
+ set no_display(val: boolean);
758
+
759
+ /**
760
+ * Whether this menu item is hidden in menus.
761
+ * @default false
762
+ */
763
+ get noDisplay(): boolean;
764
+ set noDisplay(val: boolean);
765
+
766
+ /**
767
+ * Working directory the application should be started in.
768
+ * @default null
769
+ */
770
+ get path(): string;
771
+ set path(val: string);
772
+
773
+ /**
774
+ * If true, the application prefers to be run on a more powerful discrete GPU
775
+ * if available.
776
+ * @default false
777
+ */
778
+ get prefers_non_default_gpu(): boolean;
779
+ set prefers_non_default_gpu(val: boolean);
780
+
781
+ /**
782
+ * If true, the application prefers to be run on a more powerful discrete GPU
783
+ * if available.
784
+ * @default false
785
+ */
786
+ get prefersNonDefaultGpu(): boolean;
787
+ set prefersNonDefaultGpu(val: boolean);
788
+
789
+ /**
790
+ * Whether this application requires a terinal to be started in.
791
+ * @default false
792
+ */
793
+ get requires_terminal(): boolean;
794
+ set requires_terminal(val: boolean);
795
+
796
+ /**
797
+ * Whether this application requires a terinal to be started in.
798
+ * @default false
799
+ */
800
+ get requiresTerminal(): boolean;
801
+ set requiresTerminal(val: boolean);
802
+
803
+ /**
804
+ * @default false
805
+ */
806
+ get supports_startup_notification(): boolean;
807
+ set supports_startup_notification(val: boolean);
808
+
809
+ /**
810
+ * @default false
811
+ */
812
+ get supportsStartupNotification(): boolean;
813
+ set supportsStartupNotification(val: boolean);
814
+
815
+ /**
816
+ * Path to an executable file on disk used to determine if the program
817
+ * is actually installed. If the path is not an absolute path, the file
818
+ * is looked up in the $PATH environment variable. If the file is not
819
+ * present or if it is not executable, the entry may be ignored (not be
820
+ * used in menus, for example).
821
+ * @default null
822
+ */
823
+ get try_exec(): string;
824
+ set try_exec(val: string);
825
+
826
+ /**
827
+ * Path to an executable file on disk used to determine if the program
828
+ * is actually installed. If the path is not an absolute path, the file
829
+ * is looked up in the $PATH environment variable. If the file is not
830
+ * present or if it is not executable, the entry may be ignored (not be
831
+ * used in menus, for example).
832
+ * @default null
833
+ */
834
+ get tryExec(): string;
835
+ set tryExec(val: string);
836
+
837
+ /**
838
+ * Compile-time signal type information.
839
+ *
840
+ * This instance property is generated only for TypeScript type checking.
841
+ * It is not defined at runtime and should not be accessed in JS code.
842
+ * @internal
843
+ */
844
+ $signals: MenuItem.SignalSignatures;
845
+
846
+ // Constructors
847
+ constructor(properties?: Partial<MenuItem.ConstructorProps>, ...args: any[]);
848
+
849
+ _init(...args: any[]): void;
850
+
851
+ static ["new"](file: Gio.File): MenuItem;
852
+
853
+ static new_for_path(filename: string): MenuItem;
854
+
855
+ static new_for_uri(uri: string): MenuItem;
856
+
857
+ // Signals
858
+ /** @signal */
859
+ connect<K extends keyof MenuItem.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItem.SignalSignatures[K]>): number;
860
+ connect(signal: string, callback: (...args: any[]) => any): number;
861
+
862
+ /** @signal */
863
+ connect_after<K extends keyof MenuItem.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItem.SignalSignatures[K]>): number;
864
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
865
+
866
+ /** @signal */
867
+ emit<K extends keyof MenuItem.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuItem.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
868
+ emit(signal: string, ...args: any[]): void;
869
+
870
+ // Virtual methods
871
+ /**
872
+ * @virtual
873
+ */
874
+ vfunc_changed(): void;
875
+
876
+ // Methods
877
+ decrement_allocated(): void;
878
+
879
+ /**
880
+ * @param action_name
881
+ * @returns a {@link Garcon.MenuItemAction}
882
+ */
883
+ get_action(action_name: string): MenuItemAction | null;
884
+
885
+ /**
886
+ * @returns list of action name
887
+ */
888
+ get_actions(): string[];
889
+
890
+ get_allocated(): number;
891
+
892
+ /**
893
+ * Returns list of categories
894
+ */
895
+ get_categories(): string[];
896
+
897
+ get_command(): string;
898
+
899
+ get_comment(): string;
900
+
901
+ get_desktop_id(): string;
902
+
903
+ /**
904
+ * Get the {@link Gio.File} for `item`. The returned object should be
905
+ * unreffed with `g_object_unref()` when no longer needed.
906
+ * @returns a {@link Gio.File}.
907
+ */
908
+ get_file(): Gio.File;
909
+
910
+ get_generic_name(): string;
911
+
912
+ get_hidden(): boolean;
913
+
914
+ get_icon_name(): string;
915
+
916
+ get_keywords(): string[];
917
+
918
+ get_name(): string;
919
+
920
+ get_no_display(): boolean;
921
+
922
+ get_path(): string;
923
+
924
+ get_prefers_non_default_gpu(): boolean;
925
+
926
+ get_show_in_environment(): boolean;
927
+
928
+ get_try_exec(): string;
929
+
930
+ get_uri(): string;
931
+
932
+ /**
933
+ * @param action_name
934
+ */
935
+ has_action(action_name: string): boolean;
936
+
937
+ /**
938
+ * @param category
939
+ */
940
+ has_category(category: string): boolean;
941
+
942
+ /**
943
+ * @param keyword
944
+ */
945
+ has_keyword(keyword: string): boolean;
946
+
947
+ increment_allocated(): void;
948
+
949
+ only_show_in_environment(): boolean;
950
+
951
+ ref(): void;
952
+
953
+ /**
954
+ * @param args
955
+ */
956
+ // Conflicted with GObject.Object.ref
957
+ ref(...args: never[]): any;
958
+
959
+ /**
960
+ * @param affects_the_outside
961
+ */
962
+ reload(affects_the_outside: boolean): boolean;
963
+
964
+ /**
965
+ * @param file
966
+ * @param affects_the_outside
967
+ */
968
+ reload_from_file(file: Gio.File, affects_the_outside: boolean): boolean;
969
+
970
+ /**
971
+ * @param action_name
972
+ * @param action
973
+ */
974
+ set_action(action_name: string, action: MenuItemAction): void;
975
+
976
+ /**
977
+ * @param categories list of categories
978
+ */
979
+ set_categories(categories: string[]): void;
980
+
981
+ /**
982
+ * @param command
983
+ */
984
+ set_command(command: string): void;
985
+
986
+ /**
987
+ * @param comment
988
+ */
989
+ set_comment(comment: string): void;
990
+
991
+ /**
992
+ * @param desktop_id
993
+ */
994
+ set_desktop_id(desktop_id: string): void;
995
+
996
+ /**
997
+ * @param generic_name
998
+ */
999
+ set_generic_name(generic_name: string): void;
1000
+
1001
+ /**
1002
+ * @param hidden
1003
+ */
1004
+ set_hidden(hidden: boolean): void;
1005
+
1006
+ /**
1007
+ * @param icon_name
1008
+ */
1009
+ set_icon_name(icon_name: string): void;
1010
+
1011
+ /**
1012
+ * @param keywords list of keywords
1013
+ */
1014
+ set_keywords(keywords: string[]): void;
1015
+
1016
+ /**
1017
+ * @param name
1018
+ */
1019
+ set_name(name: string): void;
1020
+
1021
+ /**
1022
+ * @param no_display
1023
+ */
1024
+ set_no_display(no_display: boolean): void;
1025
+
1026
+ /**
1027
+ * @param path
1028
+ */
1029
+ set_path(path: string): void;
1030
+
1031
+ /**
1032
+ * @param prefers_non_default_gpu
1033
+ */
1034
+ set_prefers_non_default_gpu(prefers_non_default_gpu: boolean): void;
1035
+
1036
+ /**
1037
+ * @param requires_terminal
1038
+ */
1039
+ set_requires_terminal(requires_terminal: boolean): void;
1040
+
1041
+ /**
1042
+ * @param supports_startup_notification
1043
+ */
1044
+ set_supports_startup_notification(supports_startup_notification: boolean): void;
1045
+
1046
+ /**
1047
+ * @param try_exec
1048
+ */
1049
+ set_try_exec(try_exec: string): void;
1050
+
1051
+ unref(): void;
1052
+
1053
+ /**
1054
+ * @param b
1055
+ */
1056
+ equal(b: MenuElement): boolean;
1057
+
1058
+ get_visible(): boolean;
1059
+
1060
+ /**
1061
+ * @param other
1062
+ * @virtual
1063
+ */
1064
+ vfunc_equal(other: MenuElement): boolean;
1065
+
1066
+ /**
1067
+ * @virtual
1068
+ */
1069
+ vfunc_get_comment(): string;
1070
+
1071
+ /**
1072
+ * @virtual
1073
+ */
1074
+ vfunc_get_icon_name(): string;
1075
+
1076
+ /**
1077
+ * @virtual
1078
+ */
1079
+ vfunc_get_name(): string;
1080
+
1081
+ /**
1082
+ * @virtual
1083
+ */
1084
+ vfunc_get_no_display(): boolean;
1085
+
1086
+ /**
1087
+ * @virtual
1088
+ */
1089
+ vfunc_get_show_in_environment(): boolean;
1090
+
1091
+ /**
1092
+ * @virtual
1093
+ */
1094
+ vfunc_get_visible(): boolean;
1095
+ }
1096
+
1097
+
1098
+ namespace MenuItemAction {
1099
+ // Signal signatures
1100
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1101
+ "notify::command": (pspec: GObject.ParamSpec) => void;
1102
+ "notify::icon-name": (pspec: GObject.ParamSpec) => void;
1103
+ "notify::name": (pspec: GObject.ParamSpec) => void;
1104
+ }
1105
+
1106
+ // Constructor properties interface
1107
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1108
+ command: string;
1109
+ icon_name: string;
1110
+ iconName: string;
1111
+ name: string;
1112
+ }
1113
+ }
1114
+
1115
+ /**
1116
+ * @gir-type Class
1117
+ */
1118
+ class MenuItemAction extends GObject.Object {
1119
+ static $gtype: GObject.GType<MenuItemAction>;
1120
+
1121
+ // Properties
1122
+ /**
1123
+ * Command to be executed when the application action is clicked.
1124
+ * @default null
1125
+ */
1126
+ get command(): string;
1127
+ set command(val: string);
1128
+
1129
+ /**
1130
+ * Name of the custom icon associated with this action.
1131
+ * @default null
1132
+ */
1133
+ get icon_name(): string;
1134
+ set icon_name(val: string);
1135
+
1136
+ /**
1137
+ * Name of the custom icon associated with this action.
1138
+ * @default null
1139
+ */
1140
+ get iconName(): string;
1141
+ set iconName(val: string);
1142
+
1143
+ /**
1144
+ * Name of the application action (will be displayed in menus etc.).
1145
+ * @default null
1146
+ */
1147
+ get name(): string;
1148
+ set name(val: string);
1149
+
1150
+ /**
1151
+ * Compile-time signal type information.
1152
+ *
1153
+ * This instance property is generated only for TypeScript type checking.
1154
+ * It is not defined at runtime and should not be accessed in JS code.
1155
+ * @internal
1156
+ */
1157
+ $signals: MenuItemAction.SignalSignatures;
1158
+
1159
+ // Constructors
1160
+ constructor(properties?: Partial<MenuItemAction.ConstructorProps>, ...args: any[]);
1161
+
1162
+ _init(...args: any[]): void;
1163
+
1164
+ static ["new"](): MenuItemAction;
1165
+
1166
+ // Signals
1167
+ /** @signal */
1168
+ connect<K extends keyof MenuItemAction.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemAction.SignalSignatures[K]>): number;
1169
+ connect(signal: string, callback: (...args: any[]) => any): number;
1170
+
1171
+ /** @signal */
1172
+ connect_after<K extends keyof MenuItemAction.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemAction.SignalSignatures[K]>): number;
1173
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1174
+
1175
+ /** @signal */
1176
+ emit<K extends keyof MenuItemAction.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuItemAction.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1177
+ emit(signal: string, ...args: any[]): void;
1178
+
1179
+ // Virtual methods
1180
+ /**
1181
+ * @virtual
1182
+ */
1183
+ vfunc_changed(): void;
1184
+
1185
+ // Methods
1186
+ get_command(): string;
1187
+
1188
+ get_icon_name(): string;
1189
+
1190
+ get_name(): string;
1191
+
1192
+ ref(): void;
1193
+
1194
+ /**
1195
+ * @param args
1196
+ */
1197
+ // Conflicted with GObject.Object.ref
1198
+ ref(...args: never[]): any;
1199
+
1200
+ /**
1201
+ * @param command
1202
+ */
1203
+ set_command(command: string): void;
1204
+
1205
+ /**
1206
+ * @param icon_name
1207
+ */
1208
+ set_icon_name(icon_name: string): void;
1209
+
1210
+ /**
1211
+ * @param name
1212
+ */
1213
+ set_name(name: string): void;
1214
+
1215
+ unref(): void;
1216
+ }
1217
+
1218
+
1219
+ namespace MenuItemCache {
1220
+ // Signal signatures
1221
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1222
+
1223
+ // Constructor properties interface
1224
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1225
+ }
1226
+
1227
+ /**
1228
+ * @gir-type Class
1229
+ */
1230
+ class MenuItemCache extends GObject.Object {
1231
+ static $gtype: GObject.GType<MenuItemCache>;
1232
+
1233
+ /**
1234
+ * Compile-time signal type information.
1235
+ *
1236
+ * This instance property is generated only for TypeScript type checking.
1237
+ * It is not defined at runtime and should not be accessed in JS code.
1238
+ * @internal
1239
+ */
1240
+ $signals: MenuItemCache.SignalSignatures;
1241
+
1242
+ // Constructors
1243
+ constructor(properties?: Partial<MenuItemCache.ConstructorProps>, ...args: any[]);
1244
+
1245
+ _init(...args: any[]): void;
1246
+
1247
+ static get_default(): MenuItemCache;
1248
+
1249
+ // Signals
1250
+ /** @signal */
1251
+ connect<K extends keyof MenuItemCache.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemCache.SignalSignatures[K]>): number;
1252
+ connect(signal: string, callback: (...args: any[]) => any): number;
1253
+
1254
+ /** @signal */
1255
+ connect_after<K extends keyof MenuItemCache.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemCache.SignalSignatures[K]>): number;
1256
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1257
+
1258
+ /** @signal */
1259
+ emit<K extends keyof MenuItemCache.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuItemCache.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1260
+ emit(signal: string, ...args: any[]): void;
1261
+
1262
+ // Methods
1263
+ /**
1264
+ * @param func
1265
+ */
1266
+ foreach(func: GLib.HFunc): void;
1267
+
1268
+ invalidate(): void;
1269
+
1270
+ /**
1271
+ * @param file
1272
+ */
1273
+ invalidate_file(file: Gio.File): void;
1274
+
1275
+ /**
1276
+ * @param uri URI to look for
1277
+ * @param desktop_id desktop id to update
1278
+ * @returns a {@link Garcon.MenuItem}
1279
+ */
1280
+ lookup(uri: string, desktop_id: string): MenuItem | null;
1281
+ }
1282
+
1283
+
1284
+ namespace MenuItemPool {
1285
+ // Signal signatures
1286
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1287
+
1288
+ // Constructor properties interface
1289
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1290
+ }
1291
+
1292
+ /**
1293
+ * @gir-type Class
1294
+ */
1295
+ class MenuItemPool extends GObject.Object {
1296
+ static $gtype: GObject.GType<MenuItemPool>;
1297
+
1298
+ /**
1299
+ * Compile-time signal type information.
1300
+ *
1301
+ * This instance property is generated only for TypeScript type checking.
1302
+ * It is not defined at runtime and should not be accessed in JS code.
1303
+ * @internal
1304
+ */
1305
+ $signals: MenuItemPool.SignalSignatures;
1306
+
1307
+ // Constructors
1308
+ constructor(properties?: Partial<MenuItemPool.ConstructorProps>, ...args: any[]);
1309
+
1310
+ _init(...args: any[]): void;
1311
+
1312
+ static ["new"](): MenuItemPool;
1313
+
1314
+ // Signals
1315
+ /** @signal */
1316
+ connect<K extends keyof MenuItemPool.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemPool.SignalSignatures[K]>): number;
1317
+ connect(signal: string, callback: (...args: any[]) => any): number;
1318
+
1319
+ /** @signal */
1320
+ connect_after<K extends keyof MenuItemPool.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuItemPool.SignalSignatures[K]>): number;
1321
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1322
+
1323
+ /** @signal */
1324
+ emit<K extends keyof MenuItemPool.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuItemPool.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1325
+ emit(signal: string, ...args: any[]): void;
1326
+
1327
+ // Methods
1328
+ /**
1329
+ * @param node
1330
+ */
1331
+ apply_exclude_rule(node: GLib.Node): void;
1332
+
1333
+ clear(): void;
1334
+
1335
+ /**
1336
+ * @param func
1337
+ */
1338
+ foreach(func: GLib.HFunc): void;
1339
+
1340
+ get_empty(): boolean;
1341
+
1342
+ /**
1343
+ * @param item a {@link Garcon.MenuItem}
1344
+ */
1345
+ insert(item: MenuItem): void;
1346
+
1347
+ /**
1348
+ * @param desktop_id .desktop file
1349
+ * @returns a {@link Garcon.MenuItem} object
1350
+ */
1351
+ lookup(desktop_id: string): MenuItem;
1352
+
1353
+ /**
1354
+ * @param file a GFile instance
1355
+ * @returns a {@link Garcon.MenuItem} object
1356
+ */
1357
+ lookup_file(file: Gio.File): MenuItem;
1358
+ }
1359
+
1360
+
1361
+ namespace MenuMerger {
1362
+ // Signal signatures
1363
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1364
+ "notify::tree-provider": (pspec: GObject.ParamSpec) => void;
1365
+ }
1366
+
1367
+ // Constructor properties interface
1368
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MenuTreeProvider.ConstructorProps {
1369
+ tree_provider: MenuTreeProvider;
1370
+ treeProvider: MenuTreeProvider;
1371
+ }
1372
+ }
1373
+
1374
+ /**
1375
+ * @gir-type Class
1376
+ */
1377
+ class MenuMerger extends GObject.Object implements MenuTreeProvider {
1378
+ static $gtype: GObject.GType<MenuMerger>;
1379
+
1380
+ // Properties
1381
+ /**
1382
+ * @construct-only
1383
+ */
1384
+ get tree_provider(): MenuTreeProvider;
1385
+
1386
+ /**
1387
+ * @construct-only
1388
+ */
1389
+ get treeProvider(): MenuTreeProvider;
1390
+
1391
+ /**
1392
+ * Compile-time signal type information.
1393
+ *
1394
+ * This instance property is generated only for TypeScript type checking.
1395
+ * It is not defined at runtime and should not be accessed in JS code.
1396
+ * @internal
1397
+ */
1398
+ $signals: MenuMerger.SignalSignatures;
1399
+
1400
+ // Constructors
1401
+ constructor(properties?: Partial<MenuMerger.ConstructorProps>, ...args: any[]);
1402
+
1403
+ _init(...args: any[]): void;
1404
+
1405
+ static ["new"](provider: MenuTreeProvider): MenuMerger;
1406
+
1407
+ // Signals
1408
+ /** @signal */
1409
+ connect<K extends keyof MenuMerger.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuMerger.SignalSignatures[K]>): number;
1410
+ connect(signal: string, callback: (...args: any[]) => any): number;
1411
+
1412
+ /** @signal */
1413
+ connect_after<K extends keyof MenuMerger.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuMerger.SignalSignatures[K]>): number;
1414
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1415
+
1416
+ /** @signal */
1417
+ emit<K extends keyof MenuMerger.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuMerger.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1418
+ emit(signal: string, ...args: any[]): void;
1419
+
1420
+ // Methods
1421
+ /**
1422
+ * @param merge_files list of files to merge
1423
+ * @param merge_dirs list of menu directories to merge
1424
+ * @param cancellable
1425
+ */
1426
+ run(merge_files: string[], merge_dirs: string[], cancellable: Gio.Cancellable | null): boolean;
1427
+
1428
+ get_file(): Gio.File;
1429
+
1430
+ /**
1431
+ * @virtual
1432
+ */
1433
+ vfunc_get_file(): Gio.File;
1434
+ }
1435
+
1436
+
1437
+ namespace MenuNode {
1438
+ // Signal signatures
1439
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1440
+ "notify::node-type": (pspec: GObject.ParamSpec) => void;
1441
+ }
1442
+
1443
+ // Constructor properties interface
1444
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1445
+ node_type: MenuNodeType;
1446
+ nodeType: MenuNodeType;
1447
+ }
1448
+ }
1449
+
1450
+ /**
1451
+ * @gir-type Class
1452
+ */
1453
+ class MenuNode extends GObject.Object {
1454
+ static $gtype: GObject.GType<MenuNode>;
1455
+
1456
+ // Properties
1457
+ /**
1458
+ * @default Garcon.MenuNodeType.MENU
1459
+ */
1460
+ get node_type(): MenuNodeType;
1461
+ set node_type(val: MenuNodeType);
1462
+
1463
+ /**
1464
+ * @default Garcon.MenuNodeType.MENU
1465
+ */
1466
+ get nodeType(): MenuNodeType;
1467
+ set nodeType(val: MenuNodeType);
1468
+
1469
+ /**
1470
+ * Compile-time signal type information.
1471
+ *
1472
+ * This instance property is generated only for TypeScript type checking.
1473
+ * It is not defined at runtime and should not be accessed in JS code.
1474
+ * @internal
1475
+ */
1476
+ $signals: MenuNode.SignalSignatures;
1477
+
1478
+ // Constructors
1479
+ constructor(properties?: Partial<MenuNode.ConstructorProps>, ...args: any[]);
1480
+
1481
+ _init(...args: any[]): void;
1482
+
1483
+ static ["new"](node_type: MenuNodeType): MenuNode;
1484
+
1485
+ // Signals
1486
+ /** @signal */
1487
+ connect<K extends keyof MenuNode.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuNode.SignalSignatures[K]>): number;
1488
+ connect(signal: string, callback: (...args: any[]) => any): number;
1489
+
1490
+ /** @signal */
1491
+ connect_after<K extends keyof MenuNode.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuNode.SignalSignatures[K]>): number;
1492
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1493
+
1494
+ /** @signal */
1495
+ emit<K extends keyof MenuNode.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuNode.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1496
+ emit(signal: string, ...args: any[]): void;
1497
+
1498
+ // Static methods
1499
+ /**
1500
+ * @param tree
1501
+ * @param other_tree
1502
+ */
1503
+ static tree_compare(tree: GLib.Node, other_tree: GLib.Node): number;
1504
+
1505
+ /**
1506
+ * @param tree
1507
+ */
1508
+ static tree_free(tree: GLib.Node): void;
1509
+
1510
+ /**
1511
+ * @param tree
1512
+ */
1513
+ static tree_free_data(tree: GLib.Node): void;
1514
+
1515
+ /**
1516
+ * @param tree
1517
+ * @param type
1518
+ */
1519
+ static tree_get_boolean_child(tree: GLib.Node, type: MenuNodeType): boolean;
1520
+
1521
+ /**
1522
+ * @param tree a GNode
1523
+ * @param type type for the menu nodes
1524
+ * @param reverse
1525
+ */
1526
+ static tree_get_child_nodes(tree: GLib.Node, type: MenuNodeType, reverse: boolean): GLib.Node[];
1527
+
1528
+ /**
1529
+ * @param tree
1530
+ */
1531
+ static tree_get_layout_merge_type(tree: GLib.Node): MenuLayoutMergeType;
1532
+
1533
+ /**
1534
+ * @param tree
1535
+ */
1536
+ static tree_get_merge_file_filename(tree: GLib.Node): string;
1537
+
1538
+ /**
1539
+ * @param tree
1540
+ */
1541
+ static tree_get_merge_file_type(tree: GLib.Node): MenuMergeFileType;
1542
+
1543
+ /**
1544
+ * @param tree
1545
+ */
1546
+ static tree_get_node_type(tree: GLib.Node): MenuNodeType;
1547
+
1548
+ /**
1549
+ * @param tree
1550
+ */
1551
+ static tree_get_string(tree: GLib.Node): string;
1552
+
1553
+ /**
1554
+ * @param tree
1555
+ * @param type
1556
+ */
1557
+ static tree_get_string_child(tree: GLib.Node, type: MenuNodeType): string;
1558
+
1559
+ /**
1560
+ * @param tree a {@link GLib.Node} instance
1561
+ * @param type type for the menu nodes
1562
+ * @param reverse
1563
+ */
1564
+ static tree_get_string_children(tree: GLib.Node, type: MenuNodeType, reverse: boolean): GLib.Node[];
1565
+
1566
+ /**
1567
+ * @param tree
1568
+ * @param item
1569
+ */
1570
+ static tree_rule_matches(tree: GLib.Node, item: MenuItem): boolean;
1571
+
1572
+ /**
1573
+ * @param tree
1574
+ * @param filename
1575
+ */
1576
+ static tree_set_merge_file_filename(tree: GLib.Node, filename: string): void;
1577
+
1578
+ /**
1579
+ * @param tree
1580
+ * @param value
1581
+ */
1582
+ static tree_set_string(tree: GLib.Node, value: string): void;
1583
+
1584
+ // Methods
1585
+ /**
1586
+ * @param data
1587
+ * @returns a {@link Garcon.MenuNode}
1588
+ */
1589
+ copy(data: null): MenuNode;
1590
+
1591
+ get_merge_file_filename(): string;
1592
+
1593
+ get_merge_file_type(): MenuMergeFileType;
1594
+
1595
+ get_node_type(): MenuNodeType;
1596
+
1597
+ get_string(): string;
1598
+
1599
+ /**
1600
+ * @param filename
1601
+ */
1602
+ set_merge_file_filename(filename: string): void;
1603
+
1604
+ /**
1605
+ * @param type
1606
+ */
1607
+ set_merge_file_type(type: MenuMergeFileType): void;
1608
+
1609
+ /**
1610
+ * @param value
1611
+ */
1612
+ set_string(value: string): void;
1613
+ }
1614
+
1615
+
1616
+ namespace MenuParser {
1617
+ // Signal signatures
1618
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1619
+ "notify::file": (pspec: GObject.ParamSpec) => void;
1620
+ }
1621
+
1622
+ // Constructor properties interface
1623
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MenuTreeProvider.ConstructorProps {
1624
+ file: Gio.File;
1625
+ }
1626
+ }
1627
+
1628
+ /**
1629
+ * @gir-type Class
1630
+ */
1631
+ class MenuParser extends GObject.Object implements MenuTreeProvider {
1632
+ static $gtype: GObject.GType<MenuParser>;
1633
+
1634
+ // Properties
1635
+ /**
1636
+ * @construct-only
1637
+ */
1638
+ get file(): Gio.File;
1639
+
1640
+ /**
1641
+ * Compile-time signal type information.
1642
+ *
1643
+ * This instance property is generated only for TypeScript type checking.
1644
+ * It is not defined at runtime and should not be accessed in JS code.
1645
+ * @internal
1646
+ */
1647
+ $signals: MenuParser.SignalSignatures;
1648
+
1649
+ // Constructors
1650
+ constructor(properties?: Partial<MenuParser.ConstructorProps>, ...args: any[]);
1651
+
1652
+ _init(...args: any[]): void;
1653
+
1654
+ static ["new"](file: Gio.File): MenuParser;
1655
+
1656
+ // Signals
1657
+ /** @signal */
1658
+ connect<K extends keyof MenuParser.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuParser.SignalSignatures[K]>): number;
1659
+ connect(signal: string, callback: (...args: any[]) => any): number;
1660
+
1661
+ /** @signal */
1662
+ connect_after<K extends keyof MenuParser.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuParser.SignalSignatures[K]>): number;
1663
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1664
+
1665
+ /** @signal */
1666
+ emit<K extends keyof MenuParser.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuParser.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1667
+ emit(signal: string, ...args: any[]): void;
1668
+
1669
+ // Methods
1670
+ /**
1671
+ * @param cancellable
1672
+ */
1673
+ run(cancellable: Gio.Cancellable | null): boolean;
1674
+
1675
+ get_file(): Gio.File;
1676
+
1677
+ /**
1678
+ * @virtual
1679
+ */
1680
+ vfunc_get_file(): Gio.File;
1681
+ }
1682
+
1683
+
1684
+ namespace MenuSeparator {
1685
+ // Signal signatures
1686
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1687
+
1688
+ // Constructor properties interface
1689
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MenuElement.ConstructorProps {}
1690
+ }
1691
+
1692
+ /**
1693
+ * @gir-type Class
1694
+ */
1695
+ class MenuSeparator extends GObject.Object implements MenuElement {
1696
+ static $gtype: GObject.GType<MenuSeparator>;
1697
+
1698
+ /**
1699
+ * Compile-time signal type information.
1700
+ *
1701
+ * This instance property is generated only for TypeScript type checking.
1702
+ * It is not defined at runtime and should not be accessed in JS code.
1703
+ * @internal
1704
+ */
1705
+ $signals: MenuSeparator.SignalSignatures;
1706
+
1707
+ // Constructors
1708
+ constructor(properties?: Partial<MenuSeparator.ConstructorProps>, ...args: any[]);
1709
+
1710
+ _init(...args: any[]): void;
1711
+
1712
+ static get_default(): MenuSeparator;
1713
+
1714
+ // Signals
1715
+ /** @signal */
1716
+ connect<K extends keyof MenuSeparator.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuSeparator.SignalSignatures[K]>): number;
1717
+ connect(signal: string, callback: (...args: any[]) => any): number;
1718
+
1719
+ /** @signal */
1720
+ connect_after<K extends keyof MenuSeparator.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, MenuSeparator.SignalSignatures[K]>): number;
1721
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1722
+
1723
+ /** @signal */
1724
+ emit<K extends keyof MenuSeparator.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<MenuSeparator.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1725
+ emit(signal: string, ...args: any[]): void;
1726
+
1727
+ /**
1728
+ * @param b
1729
+ */
1730
+ equal(b: MenuElement): boolean;
1731
+
1732
+ get_comment(): string;
1733
+
1734
+ get_icon_name(): string;
1735
+
1736
+ get_name(): string;
1737
+
1738
+ get_no_display(): boolean;
1739
+
1740
+ get_show_in_environment(): boolean;
1741
+
1742
+ get_visible(): boolean;
1743
+
1744
+ /**
1745
+ * @param other
1746
+ * @virtual
1747
+ */
1748
+ vfunc_equal(other: MenuElement): boolean;
1749
+
1750
+ /**
1751
+ * @virtual
1752
+ */
1753
+ vfunc_get_comment(): string;
1754
+
1755
+ /**
1756
+ * @virtual
1757
+ */
1758
+ vfunc_get_icon_name(): string;
1759
+
1760
+ /**
1761
+ * @virtual
1762
+ */
1763
+ vfunc_get_name(): string;
1764
+
1765
+ /**
1766
+ * @virtual
1767
+ */
1768
+ vfunc_get_no_display(): boolean;
1769
+
1770
+ /**
1771
+ * @virtual
1772
+ */
1773
+ vfunc_get_show_in_environment(): boolean;
1774
+
1775
+ /**
1776
+ * @virtual
1777
+ */
1778
+ vfunc_get_visible(): boolean;
1779
+ }
1780
+
1781
+
1782
+ /**
1783
+ * @gir-type Alias
1784
+ */
1785
+ type MenuClass = typeof Menu;
1786
+
1787
+ /**
1788
+ * @gir-type Alias
1789
+ */
1790
+ type MenuDirectoryClass = typeof MenuDirectory;
1791
+
1792
+ /**
1793
+ * @gir-type Struct
1794
+ */
1795
+ abstract class MenuDirectoryPrivate {
1796
+ static $gtype: GObject.GType<MenuDirectoryPrivate>;
1797
+ }
1798
+
1799
+
1800
+ /**
1801
+ * @gir-type Alias
1802
+ */
1803
+ type MenuElementIface = typeof MenuElement;
1804
+
1805
+ /**
1806
+ * @gir-type Alias
1807
+ */
1808
+ type MenuItemActionClass = typeof MenuItemAction;
1809
+
1810
+ /**
1811
+ * @gir-type Struct
1812
+ */
1813
+ abstract class MenuItemActionPrivate {
1814
+ static $gtype: GObject.GType<MenuItemActionPrivate>;
1815
+ }
1816
+
1817
+
1818
+ /**
1819
+ * @gir-type Alias
1820
+ */
1821
+ type MenuItemCacheClass = typeof MenuItemCache;
1822
+
1823
+ /**
1824
+ * @gir-type Struct
1825
+ */
1826
+ abstract class MenuItemCachePrivate {
1827
+ static $gtype: GObject.GType<MenuItemCachePrivate>;
1828
+ }
1829
+
1830
+
1831
+ /**
1832
+ * @gir-type Alias
1833
+ */
1834
+ type MenuItemClass = typeof MenuItem;
1835
+
1836
+ /**
1837
+ * @gir-type Alias
1838
+ */
1839
+ type MenuItemPoolClass = typeof MenuItemPool;
1840
+
1841
+ /**
1842
+ * @gir-type Struct
1843
+ */
1844
+ abstract class MenuItemPoolPrivate {
1845
+ static $gtype: GObject.GType<MenuItemPoolPrivate>;
1846
+ }
1847
+
1848
+
1849
+ /**
1850
+ * @gir-type Struct
1851
+ */
1852
+ abstract class MenuItemPrivate {
1853
+ static $gtype: GObject.GType<MenuItemPrivate>;
1854
+ }
1855
+
1856
+
1857
+ /**
1858
+ * @gir-type Alias
1859
+ */
1860
+ type MenuMergerClass = typeof MenuMerger;
1861
+
1862
+ /**
1863
+ * @gir-type Struct
1864
+ */
1865
+ abstract class MenuMergerPrivate {
1866
+ static $gtype: GObject.GType<MenuMergerPrivate>;
1867
+ }
1868
+
1869
+
1870
+ /**
1871
+ * @gir-type Alias
1872
+ */
1873
+ type MenuNodeClass = typeof MenuNode;
1874
+
1875
+ /**
1876
+ * @gir-type Alias
1877
+ */
1878
+ type MenuParserClass = typeof MenuParser;
1879
+
1880
+ /**
1881
+ * @gir-type Struct
1882
+ */
1883
+ abstract class MenuParserPrivate {
1884
+ static $gtype: GObject.GType<MenuParserPrivate>;
1885
+ }
1886
+
1887
+
1888
+ /**
1889
+ * @gir-type Struct
1890
+ */
1891
+ abstract class MenuPrivate {
1892
+ static $gtype: GObject.GType<MenuPrivate>;
1893
+ }
1894
+
1895
+
1896
+ /**
1897
+ * @gir-type Alias
1898
+ */
1899
+ type MenuSeparatorClass = typeof MenuSeparator;
1900
+
1901
+ /**
1902
+ * @gir-type Alias
1903
+ */
1904
+ type MenuTreeProviderIface = typeof MenuTreeProvider;
1905
+
1906
+ /**
1907
+ * @gir-type Struct
1908
+ */
1909
+ class MenuNodeData {
1910
+ static $gtype: GObject.GType<MenuNodeData>;
1911
+ }
1912
+
1913
+
1914
+ namespace MenuElement {
1915
+ /**
1916
+ * Interface for implementing MenuElement.
1917
+ * Contains only the virtual methods that need to be implemented.
1918
+ */
1919
+ interface Interface {
1920
+
1921
+ // Virtual methods
1922
+ /**
1923
+ * @param other
1924
+ * @virtual
1925
+ */
1926
+ vfunc_equal(other: MenuElement): boolean;
1927
+
1928
+ /**
1929
+ * @virtual
1930
+ */
1931
+ vfunc_get_comment(): string;
1932
+
1933
+ /**
1934
+ * @virtual
1935
+ */
1936
+ vfunc_get_icon_name(): string;
1937
+
1938
+ /**
1939
+ * @virtual
1940
+ */
1941
+ vfunc_get_name(): string;
1942
+
1943
+ /**
1944
+ * @virtual
1945
+ */
1946
+ vfunc_get_no_display(): boolean;
1947
+
1948
+ /**
1949
+ * @virtual
1950
+ */
1951
+ vfunc_get_show_in_environment(): boolean;
1952
+
1953
+ /**
1954
+ * @virtual
1955
+ */
1956
+ vfunc_get_visible(): boolean;
1957
+ }
1958
+
1959
+
1960
+ // Constructor properties interface
1961
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1962
+ }
1963
+
1964
+ export interface MenuElementNamespace {
1965
+ $gtype: GObject.GType<MenuElement>;
1966
+ prototype: MenuElement;
1967
+ }
1968
+ /**
1969
+ * @gir-type Interface
1970
+ */
1971
+ interface MenuElement extends GObject.Object, MenuElement.Interface {
1972
+
1973
+ // Methods
1974
+ /**
1975
+ * @param b
1976
+ */
1977
+ equal(b: MenuElement): boolean;
1978
+
1979
+ get_comment(): string;
1980
+
1981
+ get_icon_name(): string;
1982
+
1983
+ get_name(): string;
1984
+
1985
+ get_no_display(): boolean;
1986
+
1987
+ get_show_in_environment(): boolean;
1988
+
1989
+ get_visible(): boolean;
1990
+ }
1991
+
1992
+
1993
+ export const MenuElement: MenuElementNamespace & {
1994
+ new (): MenuElement; // This allows `obj instanceof MenuElement`
1995
+ };
1996
+
1997
+ namespace MenuTreeProvider {
1998
+ /**
1999
+ * Interface for implementing MenuTreeProvider.
2000
+ * Contains only the virtual methods that need to be implemented.
2001
+ */
2002
+ interface Interface {
2003
+
2004
+ // Virtual methods
2005
+ /**
2006
+ * @virtual
2007
+ */
2008
+ vfunc_get_file(): Gio.File;
2009
+ }
2010
+
2011
+
2012
+ // Constructor properties interface
2013
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2014
+ }
2015
+
2016
+ export interface MenuTreeProviderNamespace {
2017
+ $gtype: GObject.GType<MenuTreeProvider>;
2018
+ prototype: MenuTreeProvider;
2019
+ }
2020
+ /**
2021
+ * @gir-type Interface
2022
+ */
2023
+ interface MenuTreeProvider extends GObject.Object, MenuTreeProvider.Interface {
2024
+
2025
+ // Methods
2026
+ get_file(): Gio.File;
2027
+ }
2028
+
2029
+
2030
+ export const MenuTreeProvider: MenuTreeProviderNamespace & {
2031
+ new (): MenuTreeProvider; // This allows `obj instanceof MenuTreeProvider`
2032
+ };
2033
+
2034
+ /**
2035
+ * Name of the imported GIR library
2036
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2037
+ */
2038
+ const __name__: string;
2039
+
2040
+ /**
2041
+ * Version of the imported GIR library
2042
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2043
+ */
2044
+ const __version__: string;
2045
+ }
2046
+
2047
+ export default Garcon;
2048
+
2049
+ // END