@girs/garcon-1.0 4.18.2-4.0.0-beta.21 → 4.18.2-4.0.0-beta.24

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/garcon-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Garcon-1.0, generated from library version 4.18.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
8
+ GJS TypeScript type definitions for Garcon-1.0, generated from library version 4.18.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.24.
9
9
 
10
10
 
11
11
  ## Install
package/garcon-1.0.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
8
  */
9
9
 
10
+ import '@girs/gjs';
11
+
10
12
  // Module dependencies
11
13
  import type Libxfce4util from '@girs/libxfce4util-1.0';
12
14
  import type Gio from '@girs/gio-2.0';
@@ -165,14 +167,12 @@ export namespace Garcon {
165
167
  */
166
168
  function set_environment_xdg(fallback_env: string): void;
167
169
  namespace Menu {
168
- // Signal callback interfaces
169
-
170
- interface DirectoryChanged {
171
- (object: MenuDirectory, p0: MenuDirectory): void;
172
- }
173
-
174
- interface ReloadRequired {
175
- (): void;
170
+ // Signal signatures
171
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
172
+ 'directory-changed': (arg0: MenuDirectory, arg1: MenuDirectory) => void;
173
+ 'reload-required': () => void;
174
+ 'notify::directory': (pspec: GObject.ParamSpec) => void;
175
+ 'notify::file': (pspec: GObject.ParamSpec) => void;
176
176
  }
177
177
 
178
178
  // Constructor properties interface
@@ -198,6 +198,15 @@ export namespace Garcon {
198
198
  */
199
199
  get file(): Gio.File;
200
200
 
201
+ /**
202
+ * Compile-time signal type information.
203
+ *
204
+ * This instance property is generated only for TypeScript type checking.
205
+ * It is not defined at runtime and should not be accessed in JS code.
206
+ * @internal
207
+ */
208
+ $signals: Menu.SignalSignatures;
209
+
201
210
  // Constructors
202
211
 
203
212
  constructor(properties?: Partial<Menu.ConstructorProps>, ...args: any[]);
@@ -212,21 +221,21 @@ export namespace Garcon {
212
221
 
213
222
  // Signals
214
223
 
215
- connect(id: string, callback: (...args: any[]) => any): number;
216
- connect_after(id: string, callback: (...args: any[]) => any): number;
217
- emit(id: string, ...args: any[]): void;
218
- connect(
219
- signal: 'directory-changed',
220
- callback: (_source: this, object: MenuDirectory, p0: MenuDirectory) => void,
224
+ connect<K extends keyof Menu.SignalSignatures>(
225
+ signal: K,
226
+ callback: GObject.SignalCallback<this, Menu.SignalSignatures[K]>,
221
227
  ): number;
222
- connect_after(
223
- signal: 'directory-changed',
224
- callback: (_source: this, object: MenuDirectory, p0: MenuDirectory) => void,
228
+ connect(signal: string, callback: (...args: any[]) => any): number;
229
+ connect_after<K extends keyof Menu.SignalSignatures>(
230
+ signal: K,
231
+ callback: GObject.SignalCallback<this, Menu.SignalSignatures[K]>,
225
232
  ): number;
226
- emit(signal: 'directory-changed', object: MenuDirectory, p0: MenuDirectory): void;
227
- connect(signal: 'reload-required', callback: (_source: this) => void): number;
228
- connect_after(signal: 'reload-required', callback: (_source: this) => void): number;
229
- emit(signal: 'reload-required'): void;
233
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
234
+ emit<K extends keyof Menu.SignalSignatures>(
235
+ signal: K,
236
+ ...args: GObject.GjsParameters<Menu.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
237
+ ): void;
238
+ emit(signal: string, ...args: any[]): void;
230
239
 
231
240
  // Methods
232
241
 
@@ -443,7 +452,21 @@ export namespace Garcon {
443
452
  * @returns the data if found, or %NULL if no such data exists.
444
453
  */
445
454
  get_data(key: string): any | null;
446
- get_property(property_name: string): any;
455
+ /**
456
+ * Gets a property of an object.
457
+ *
458
+ * The value can be:
459
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
460
+ * - a GObject.Value initialized with the expected type of the property
461
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
462
+ *
463
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
464
+ *
465
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
466
+ * @param property_name The name of the property to get
467
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
468
+ */
469
+ get_property(property_name: string, value: GObject.Value | any): any;
447
470
  /**
448
471
  * This function gets back user data pointers stored via
449
472
  * g_object_set_qdata().
@@ -571,7 +594,12 @@ export namespace Garcon {
571
594
  * @param data data to associate with that key
572
595
  */
573
596
  set_data(key: string, data?: any | null): void;
574
- set_property(property_name: string, value: any): void;
597
+ /**
598
+ * Sets a property on an object.
599
+ * @param property_name The name of the property to set
600
+ * @param value The value to set the property to
601
+ */
602
+ set_property(property_name: string, value: GObject.Value | any): void;
575
603
  /**
576
604
  * Remove a specified datum from the object's data associations,
577
605
  * without invoking the association's destroy handler.
@@ -721,14 +749,43 @@ export namespace Garcon {
721
749
  * @param pspec
722
750
  */
723
751
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
752
+ /**
753
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
754
+ * @param id Handler ID of the handler to be disconnected
755
+ */
724
756
  disconnect(id: number): void;
757
+ /**
758
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
759
+ * @param properties Object containing the properties to set
760
+ */
725
761
  set(properties: { [key: string]: any }): void;
726
- block_signal_handler(id: number): any;
727
- unblock_signal_handler(id: number): any;
728
- stop_emission_by_name(detailedName: string): any;
762
+ /**
763
+ * Blocks a handler of an instance so it will not be called during any signal emissions
764
+ * @param id Handler ID of the handler to be blocked
765
+ */
766
+ block_signal_handler(id: number): void;
767
+ /**
768
+ * Unblocks a handler so it will be called again during any signal emissions
769
+ * @param id Handler ID of the handler to be unblocked
770
+ */
771
+ unblock_signal_handler(id: number): void;
772
+ /**
773
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
774
+ * @param detailedName Name of the signal to stop emission of
775
+ */
776
+ stop_emission_by_name(detailedName: string): void;
729
777
  }
730
778
 
731
779
  namespace MenuDirectory {
780
+ // Signal signatures
781
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
782
+ 'notify::comment': (pspec: GObject.ParamSpec) => void;
783
+ 'notify::file': (pspec: GObject.ParamSpec) => void;
784
+ 'notify::icon-name': (pspec: GObject.ParamSpec) => void;
785
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
786
+ 'notify::no-display': (pspec: GObject.ParamSpec) => void;
787
+ }
788
+
732
789
  // Constructor properties interface
733
790
 
734
791
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -779,6 +836,15 @@ export namespace Garcon {
779
836
  get noDisplay(): boolean;
780
837
  set noDisplay(val: boolean);
781
838
 
839
+ /**
840
+ * Compile-time signal type information.
841
+ *
842
+ * This instance property is generated only for TypeScript type checking.
843
+ * It is not defined at runtime and should not be accessed in JS code.
844
+ * @internal
845
+ */
846
+ $signals: MenuDirectory.SignalSignatures;
847
+
782
848
  // Constructors
783
849
 
784
850
  constructor(properties?: Partial<MenuDirectory.ConstructorProps>, ...args: any[]);
@@ -787,6 +853,24 @@ export namespace Garcon {
787
853
 
788
854
  static ['new'](file: Gio.File): MenuDirectory;
789
855
 
856
+ // Signals
857
+
858
+ connect<K extends keyof MenuDirectory.SignalSignatures>(
859
+ signal: K,
860
+ callback: GObject.SignalCallback<this, MenuDirectory.SignalSignatures[K]>,
861
+ ): number;
862
+ connect(signal: string, callback: (...args: any[]) => any): number;
863
+ connect_after<K extends keyof MenuDirectory.SignalSignatures>(
864
+ signal: K,
865
+ callback: GObject.SignalCallback<this, MenuDirectory.SignalSignatures[K]>,
866
+ ): number;
867
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
868
+ emit<K extends keyof MenuDirectory.SignalSignatures>(
869
+ signal: K,
870
+ ...args: GObject.GjsParameters<MenuDirectory.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
871
+ ): void;
872
+ emit(signal: string, ...args: any[]): void;
873
+
790
874
  // Methods
791
875
 
792
876
  /**
@@ -866,10 +950,23 @@ export namespace Garcon {
866
950
  }
867
951
 
868
952
  namespace MenuItem {
869
- // Signal callback interfaces
870
-
871
- interface Changed {
872
- (): void;
953
+ // Signal signatures
954
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
955
+ changed: () => void;
956
+ 'notify::command': (pspec: GObject.ParamSpec) => void;
957
+ 'notify::comment': (pspec: GObject.ParamSpec) => void;
958
+ 'notify::desktop-id': (pspec: GObject.ParamSpec) => void;
959
+ 'notify::file': (pspec: GObject.ParamSpec) => void;
960
+ 'notify::generic-name': (pspec: GObject.ParamSpec) => void;
961
+ 'notify::hidden': (pspec: GObject.ParamSpec) => void;
962
+ 'notify::icon-name': (pspec: GObject.ParamSpec) => void;
963
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
964
+ 'notify::no-display': (pspec: GObject.ParamSpec) => void;
965
+ 'notify::path': (pspec: GObject.ParamSpec) => void;
966
+ 'notify::prefers-non-default-gpu': (pspec: GObject.ParamSpec) => void;
967
+ 'notify::requires-terminal': (pspec: GObject.ParamSpec) => void;
968
+ 'notify::supports-startup-notification': (pspec: GObject.ParamSpec) => void;
969
+ 'notify::try-exec': (pspec: GObject.ParamSpec) => void;
873
970
  }
874
971
 
875
972
  // Constructor properties interface
@@ -1022,6 +1119,15 @@ export namespace Garcon {
1022
1119
  get tryExec(): string;
1023
1120
  set tryExec(val: string);
1024
1121
 
1122
+ /**
1123
+ * Compile-time signal type information.
1124
+ *
1125
+ * This instance property is generated only for TypeScript type checking.
1126
+ * It is not defined at runtime and should not be accessed in JS code.
1127
+ * @internal
1128
+ */
1129
+ $signals: MenuItem.SignalSignatures;
1130
+
1025
1131
  // Constructors
1026
1132
 
1027
1133
  constructor(properties?: Partial<MenuItem.ConstructorProps>, ...args: any[]);
@@ -1036,12 +1142,21 @@ export namespace Garcon {
1036
1142
 
1037
1143
  // Signals
1038
1144
 
1039
- connect(id: string, callback: (...args: any[]) => any): number;
1040
- connect_after(id: string, callback: (...args: any[]) => any): number;
1041
- emit(id: string, ...args: any[]): void;
1042
- connect(signal: 'changed', callback: (_source: this) => void): number;
1043
- connect_after(signal: 'changed', callback: (_source: this) => void): number;
1044
- emit(signal: 'changed'): void;
1145
+ connect<K extends keyof MenuItem.SignalSignatures>(
1146
+ signal: K,
1147
+ callback: GObject.SignalCallback<this, MenuItem.SignalSignatures[K]>,
1148
+ ): number;
1149
+ connect(signal: string, callback: (...args: any[]) => any): number;
1150
+ connect_after<K extends keyof MenuItem.SignalSignatures>(
1151
+ signal: K,
1152
+ callback: GObject.SignalCallback<this, MenuItem.SignalSignatures[K]>,
1153
+ ): number;
1154
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1155
+ emit<K extends keyof MenuItem.SignalSignatures>(
1156
+ signal: K,
1157
+ ...args: GObject.GjsParameters<MenuItem.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1158
+ ): void;
1159
+ emit(signal: string, ...args: any[]): void;
1045
1160
 
1046
1161
  // Virtual methods
1047
1162
 
@@ -1232,7 +1347,21 @@ export namespace Garcon {
1232
1347
  * @returns the data if found, or %NULL if no such data exists.
1233
1348
  */
1234
1349
  get_data(key: string): any | null;
1235
- get_property(property_name: string): any;
1350
+ /**
1351
+ * Gets a property of an object.
1352
+ *
1353
+ * The value can be:
1354
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
1355
+ * - a GObject.Value initialized with the expected type of the property
1356
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
1357
+ *
1358
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
1359
+ *
1360
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
1361
+ * @param property_name The name of the property to get
1362
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
1363
+ */
1364
+ get_property(property_name: string, value: GObject.Value | any): any;
1236
1365
  /**
1237
1366
  * This function gets back user data pointers stored via
1238
1367
  * g_object_set_qdata().
@@ -1350,7 +1479,12 @@ export namespace Garcon {
1350
1479
  * @param data data to associate with that key
1351
1480
  */
1352
1481
  set_data(key: string, data?: any | null): void;
1353
- set_property(property_name: string, value: any): void;
1482
+ /**
1483
+ * Sets a property on an object.
1484
+ * @param property_name The name of the property to set
1485
+ * @param value The value to set the property to
1486
+ */
1487
+ set_property(property_name: string, value: GObject.Value | any): void;
1354
1488
  /**
1355
1489
  * Remove a specified datum from the object's data associations,
1356
1490
  * without invoking the association's destroy handler.
@@ -1490,14 +1624,41 @@ export namespace Garcon {
1490
1624
  * @param pspec
1491
1625
  */
1492
1626
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1627
+ /**
1628
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
1629
+ * @param id Handler ID of the handler to be disconnected
1630
+ */
1493
1631
  disconnect(id: number): void;
1632
+ /**
1633
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
1634
+ * @param properties Object containing the properties to set
1635
+ */
1494
1636
  set(properties: { [key: string]: any }): void;
1495
- block_signal_handler(id: number): any;
1496
- unblock_signal_handler(id: number): any;
1497
- stop_emission_by_name(detailedName: string): any;
1637
+ /**
1638
+ * Blocks a handler of an instance so it will not be called during any signal emissions
1639
+ * @param id Handler ID of the handler to be blocked
1640
+ */
1641
+ block_signal_handler(id: number): void;
1642
+ /**
1643
+ * Unblocks a handler so it will be called again during any signal emissions
1644
+ * @param id Handler ID of the handler to be unblocked
1645
+ */
1646
+ unblock_signal_handler(id: number): void;
1647
+ /**
1648
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
1649
+ * @param detailedName Name of the signal to stop emission of
1650
+ */
1651
+ stop_emission_by_name(detailedName: string): void;
1498
1652
  }
1499
1653
 
1500
1654
  namespace MenuItemAction {
1655
+ // Signal signatures
1656
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1657
+ 'notify::command': (pspec: GObject.ParamSpec) => void;
1658
+ 'notify::icon-name': (pspec: GObject.ParamSpec) => void;
1659
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
1660
+ }
1661
+
1501
1662
  // Constructor properties interface
1502
1663
 
1503
1664
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -1534,6 +1695,15 @@ export namespace Garcon {
1534
1695
  get name(): string;
1535
1696
  set name(val: string);
1536
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: MenuItemAction.SignalSignatures;
1706
+
1537
1707
  // Constructors
1538
1708
 
1539
1709
  constructor(properties?: Partial<MenuItemAction.ConstructorProps>, ...args: any[]);
@@ -1542,6 +1712,24 @@ export namespace Garcon {
1542
1712
 
1543
1713
  static ['new'](): MenuItemAction;
1544
1714
 
1715
+ // Signals
1716
+
1717
+ connect<K extends keyof MenuItemAction.SignalSignatures>(
1718
+ signal: K,
1719
+ callback: GObject.SignalCallback<this, MenuItemAction.SignalSignatures[K]>,
1720
+ ): number;
1721
+ connect(signal: string, callback: (...args: any[]) => any): number;
1722
+ connect_after<K extends keyof MenuItemAction.SignalSignatures>(
1723
+ signal: K,
1724
+ callback: GObject.SignalCallback<this, MenuItemAction.SignalSignatures[K]>,
1725
+ ): number;
1726
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1727
+ emit<K extends keyof MenuItemAction.SignalSignatures>(
1728
+ signal: K,
1729
+ ...args: GObject.GjsParameters<MenuItemAction.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1730
+ ): void;
1731
+ emit(signal: string, ...args: any[]): void;
1732
+
1545
1733
  // Virtual methods
1546
1734
 
1547
1735
  vfunc_changed(): void;
@@ -1561,6 +1749,9 @@ export namespace Garcon {
1561
1749
  }
1562
1750
 
1563
1751
  namespace MenuItemCache {
1752
+ // Signal signatures
1753
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1754
+
1564
1755
  // Constructor properties interface
1565
1756
 
1566
1757
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
@@ -1569,6 +1760,15 @@ export namespace Garcon {
1569
1760
  class MenuItemCache extends GObject.Object {
1570
1761
  static $gtype: GObject.GType<MenuItemCache>;
1571
1762
 
1763
+ /**
1764
+ * Compile-time signal type information.
1765
+ *
1766
+ * This instance property is generated only for TypeScript type checking.
1767
+ * It is not defined at runtime and should not be accessed in JS code.
1768
+ * @internal
1769
+ */
1770
+ $signals: MenuItemCache.SignalSignatures;
1771
+
1572
1772
  // Constructors
1573
1773
 
1574
1774
  constructor(properties?: Partial<MenuItemCache.ConstructorProps>, ...args: any[]);
@@ -1577,6 +1777,24 @@ export namespace Garcon {
1577
1777
 
1578
1778
  static get_default(): MenuItemCache;
1579
1779
 
1780
+ // Signals
1781
+
1782
+ connect<K extends keyof MenuItemCache.SignalSignatures>(
1783
+ signal: K,
1784
+ callback: GObject.SignalCallback<this, MenuItemCache.SignalSignatures[K]>,
1785
+ ): number;
1786
+ connect(signal: string, callback: (...args: any[]) => any): number;
1787
+ connect_after<K extends keyof MenuItemCache.SignalSignatures>(
1788
+ signal: K,
1789
+ callback: GObject.SignalCallback<this, MenuItemCache.SignalSignatures[K]>,
1790
+ ): number;
1791
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1792
+ emit<K extends keyof MenuItemCache.SignalSignatures>(
1793
+ signal: K,
1794
+ ...args: GObject.GjsParameters<MenuItemCache.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1795
+ ): void;
1796
+ emit(signal: string, ...args: any[]): void;
1797
+
1580
1798
  // Methods
1581
1799
 
1582
1800
  foreach(func: GLib.HFunc): void;
@@ -1586,6 +1804,9 @@ export namespace Garcon {
1586
1804
  }
1587
1805
 
1588
1806
  namespace MenuItemPool {
1807
+ // Signal signatures
1808
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1809
+
1589
1810
  // Constructor properties interface
1590
1811
 
1591
1812
  interface ConstructorProps extends GObject.Object.ConstructorProps {}
@@ -1594,6 +1815,15 @@ export namespace Garcon {
1594
1815
  class MenuItemPool extends GObject.Object {
1595
1816
  static $gtype: GObject.GType<MenuItemPool>;
1596
1817
 
1818
+ /**
1819
+ * Compile-time signal type information.
1820
+ *
1821
+ * This instance property is generated only for TypeScript type checking.
1822
+ * It is not defined at runtime and should not be accessed in JS code.
1823
+ * @internal
1824
+ */
1825
+ $signals: MenuItemPool.SignalSignatures;
1826
+
1597
1827
  // Constructors
1598
1828
 
1599
1829
  constructor(properties?: Partial<MenuItemPool.ConstructorProps>, ...args: any[]);
@@ -1602,6 +1832,24 @@ export namespace Garcon {
1602
1832
 
1603
1833
  static ['new'](): MenuItemPool;
1604
1834
 
1835
+ // Signals
1836
+
1837
+ connect<K extends keyof MenuItemPool.SignalSignatures>(
1838
+ signal: K,
1839
+ callback: GObject.SignalCallback<this, MenuItemPool.SignalSignatures[K]>,
1840
+ ): number;
1841
+ connect(signal: string, callback: (...args: any[]) => any): number;
1842
+ connect_after<K extends keyof MenuItemPool.SignalSignatures>(
1843
+ signal: K,
1844
+ callback: GObject.SignalCallback<this, MenuItemPool.SignalSignatures[K]>,
1845
+ ): number;
1846
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1847
+ emit<K extends keyof MenuItemPool.SignalSignatures>(
1848
+ signal: K,
1849
+ ...args: GObject.GjsParameters<MenuItemPool.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1850
+ ): void;
1851
+ emit(signal: string, ...args: any[]): void;
1852
+
1605
1853
  // Methods
1606
1854
 
1607
1855
  apply_exclude_rule(node: GLib.Node): void;
@@ -1614,6 +1862,11 @@ export namespace Garcon {
1614
1862
  }
1615
1863
 
1616
1864
  namespace MenuMerger {
1865
+ // Signal signatures
1866
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1867
+ 'notify::tree-provider': (pspec: GObject.ParamSpec) => void;
1868
+ }
1869
+
1617
1870
  // Constructor properties interface
1618
1871
 
1619
1872
  interface ConstructorProps extends GObject.Object.ConstructorProps, MenuTreeProvider.ConstructorProps {
@@ -1630,6 +1883,15 @@ export namespace Garcon {
1630
1883
  get tree_provider(): MenuTreeProvider;
1631
1884
  get treeProvider(): MenuTreeProvider;
1632
1885
 
1886
+ /**
1887
+ * Compile-time signal type information.
1888
+ *
1889
+ * This instance property is generated only for TypeScript type checking.
1890
+ * It is not defined at runtime and should not be accessed in JS code.
1891
+ * @internal
1892
+ */
1893
+ $signals: MenuMerger.SignalSignatures;
1894
+
1633
1895
  // Constructors
1634
1896
 
1635
1897
  constructor(properties?: Partial<MenuMerger.ConstructorProps>, ...args: any[]);
@@ -1638,6 +1900,24 @@ export namespace Garcon {
1638
1900
 
1639
1901
  static ['new'](provider: MenuTreeProvider): MenuMerger;
1640
1902
 
1903
+ // Signals
1904
+
1905
+ connect<K extends keyof MenuMerger.SignalSignatures>(
1906
+ signal: K,
1907
+ callback: GObject.SignalCallback<this, MenuMerger.SignalSignatures[K]>,
1908
+ ): number;
1909
+ connect(signal: string, callback: (...args: any[]) => any): number;
1910
+ connect_after<K extends keyof MenuMerger.SignalSignatures>(
1911
+ signal: K,
1912
+ callback: GObject.SignalCallback<this, MenuMerger.SignalSignatures[K]>,
1913
+ ): number;
1914
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1915
+ emit<K extends keyof MenuMerger.SignalSignatures>(
1916
+ signal: K,
1917
+ ...args: GObject.GjsParameters<MenuMerger.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1918
+ ): void;
1919
+ emit(signal: string, ...args: any[]): void;
1920
+
1641
1921
  // Methods
1642
1922
 
1643
1923
  run(merge_files: string[], merge_dirs: string[], cancellable?: Gio.Cancellable | null): boolean;
@@ -1762,7 +2042,21 @@ export namespace Garcon {
1762
2042
  * @returns the data if found, or %NULL if no such data exists.
1763
2043
  */
1764
2044
  get_data(key: string): any | null;
1765
- get_property(property_name: string): any;
2045
+ /**
2046
+ * Gets a property of an object.
2047
+ *
2048
+ * The value can be:
2049
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
2050
+ * - a GObject.Value initialized with the expected type of the property
2051
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
2052
+ *
2053
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
2054
+ *
2055
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
2056
+ * @param property_name The name of the property to get
2057
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
2058
+ */
2059
+ get_property(property_name: string, value: GObject.Value | any): any;
1766
2060
  /**
1767
2061
  * This function gets back user data pointers stored via
1768
2062
  * g_object_set_qdata().
@@ -1890,7 +2184,12 @@ export namespace Garcon {
1890
2184
  * @param data data to associate with that key
1891
2185
  */
1892
2186
  set_data(key: string, data?: any | null): void;
1893
- set_property(property_name: string, value: any): void;
2187
+ /**
2188
+ * Sets a property on an object.
2189
+ * @param property_name The name of the property to set
2190
+ * @param value The value to set the property to
2191
+ */
2192
+ set_property(property_name: string, value: GObject.Value | any): void;
1894
2193
  /**
1895
2194
  * Remove a specified datum from the object's data associations,
1896
2195
  * without invoking the association's destroy handler.
@@ -2040,14 +2339,39 @@ export namespace Garcon {
2040
2339
  * @param pspec
2041
2340
  */
2042
2341
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2342
+ /**
2343
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
2344
+ * @param id Handler ID of the handler to be disconnected
2345
+ */
2043
2346
  disconnect(id: number): void;
2347
+ /**
2348
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
2349
+ * @param properties Object containing the properties to set
2350
+ */
2044
2351
  set(properties: { [key: string]: any }): void;
2045
- block_signal_handler(id: number): any;
2046
- unblock_signal_handler(id: number): any;
2047
- stop_emission_by_name(detailedName: string): any;
2352
+ /**
2353
+ * Blocks a handler of an instance so it will not be called during any signal emissions
2354
+ * @param id Handler ID of the handler to be blocked
2355
+ */
2356
+ block_signal_handler(id: number): void;
2357
+ /**
2358
+ * Unblocks a handler so it will be called again during any signal emissions
2359
+ * @param id Handler ID of the handler to be unblocked
2360
+ */
2361
+ unblock_signal_handler(id: number): void;
2362
+ /**
2363
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
2364
+ * @param detailedName Name of the signal to stop emission of
2365
+ */
2366
+ stop_emission_by_name(detailedName: string): void;
2048
2367
  }
2049
2368
 
2050
2369
  namespace MenuNode {
2370
+ // Signal signatures
2371
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2372
+ 'notify::node-type': (pspec: GObject.ParamSpec) => void;
2373
+ }
2374
+
2051
2375
  // Constructor properties interface
2052
2376
 
2053
2377
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -2066,6 +2390,15 @@ export namespace Garcon {
2066
2390
  get nodeType(): MenuNodeType;
2067
2391
  set nodeType(val: MenuNodeType);
2068
2392
 
2393
+ /**
2394
+ * Compile-time signal type information.
2395
+ *
2396
+ * This instance property is generated only for TypeScript type checking.
2397
+ * It is not defined at runtime and should not be accessed in JS code.
2398
+ * @internal
2399
+ */
2400
+ $signals: MenuNode.SignalSignatures;
2401
+
2069
2402
  // Constructors
2070
2403
 
2071
2404
  constructor(properties?: Partial<MenuNode.ConstructorProps>, ...args: any[]);
@@ -2074,6 +2407,24 @@ export namespace Garcon {
2074
2407
 
2075
2408
  static ['new'](node_type: MenuNodeType): MenuNode;
2076
2409
 
2410
+ // Signals
2411
+
2412
+ connect<K extends keyof MenuNode.SignalSignatures>(
2413
+ signal: K,
2414
+ callback: GObject.SignalCallback<this, MenuNode.SignalSignatures[K]>,
2415
+ ): number;
2416
+ connect(signal: string, callback: (...args: any[]) => any): number;
2417
+ connect_after<K extends keyof MenuNode.SignalSignatures>(
2418
+ signal: K,
2419
+ callback: GObject.SignalCallback<this, MenuNode.SignalSignatures[K]>,
2420
+ ): number;
2421
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2422
+ emit<K extends keyof MenuNode.SignalSignatures>(
2423
+ signal: K,
2424
+ ...args: GObject.GjsParameters<MenuNode.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2425
+ ): void;
2426
+ emit(signal: string, ...args: any[]): void;
2427
+
2077
2428
  // Static methods
2078
2429
 
2079
2430
  static tree_compare(tree: GLib.Node, other_tree: GLib.Node): number;
@@ -2105,6 +2456,11 @@ export namespace Garcon {
2105
2456
  }
2106
2457
 
2107
2458
  namespace MenuParser {
2459
+ // Signal signatures
2460
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2461
+ 'notify::file': (pspec: GObject.ParamSpec) => void;
2462
+ }
2463
+
2108
2464
  // Constructor properties interface
2109
2465
 
2110
2466
  interface ConstructorProps extends GObject.Object.ConstructorProps, MenuTreeProvider.ConstructorProps {
@@ -2119,6 +2475,15 @@ export namespace Garcon {
2119
2475
 
2120
2476
  get file(): Gio.File;
2121
2477
 
2478
+ /**
2479
+ * Compile-time signal type information.
2480
+ *
2481
+ * This instance property is generated only for TypeScript type checking.
2482
+ * It is not defined at runtime and should not be accessed in JS code.
2483
+ * @internal
2484
+ */
2485
+ $signals: MenuParser.SignalSignatures;
2486
+
2122
2487
  // Constructors
2123
2488
 
2124
2489
  constructor(properties?: Partial<MenuParser.ConstructorProps>, ...args: any[]);
@@ -2127,6 +2492,24 @@ export namespace Garcon {
2127
2492
 
2128
2493
  static ['new'](file: Gio.File): MenuParser;
2129
2494
 
2495
+ // Signals
2496
+
2497
+ connect<K extends keyof MenuParser.SignalSignatures>(
2498
+ signal: K,
2499
+ callback: GObject.SignalCallback<this, MenuParser.SignalSignatures[K]>,
2500
+ ): number;
2501
+ connect(signal: string, callback: (...args: any[]) => any): number;
2502
+ connect_after<K extends keyof MenuParser.SignalSignatures>(
2503
+ signal: K,
2504
+ callback: GObject.SignalCallback<this, MenuParser.SignalSignatures[K]>,
2505
+ ): number;
2506
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2507
+ emit<K extends keyof MenuParser.SignalSignatures>(
2508
+ signal: K,
2509
+ ...args: GObject.GjsParameters<MenuParser.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2510
+ ): void;
2511
+ emit(signal: string, ...args: any[]): void;
2512
+
2130
2513
  // Methods
2131
2514
 
2132
2515
  run(cancellable?: Gio.Cancellable | null): boolean;
@@ -2251,7 +2634,21 @@ export namespace Garcon {
2251
2634
  * @returns the data if found, or %NULL if no such data exists.
2252
2635
  */
2253
2636
  get_data(key: string): any | null;
2254
- get_property(property_name: string): any;
2637
+ /**
2638
+ * Gets a property of an object.
2639
+ *
2640
+ * The value can be:
2641
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
2642
+ * - a GObject.Value initialized with the expected type of the property
2643
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
2644
+ *
2645
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
2646
+ *
2647
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
2648
+ * @param property_name The name of the property to get
2649
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
2650
+ */
2651
+ get_property(property_name: string, value: GObject.Value | any): any;
2255
2652
  /**
2256
2653
  * This function gets back user data pointers stored via
2257
2654
  * g_object_set_qdata().
@@ -2379,7 +2776,12 @@ export namespace Garcon {
2379
2776
  * @param data data to associate with that key
2380
2777
  */
2381
2778
  set_data(key: string, data?: any | null): void;
2382
- set_property(property_name: string, value: any): void;
2779
+ /**
2780
+ * Sets a property on an object.
2781
+ * @param property_name The name of the property to set
2782
+ * @param value The value to set the property to
2783
+ */
2784
+ set_property(property_name: string, value: GObject.Value | any): void;
2383
2785
  /**
2384
2786
  * Remove a specified datum from the object's data associations,
2385
2787
  * without invoking the association's destroy handler.
@@ -2529,14 +2931,37 @@ export namespace Garcon {
2529
2931
  * @param pspec
2530
2932
  */
2531
2933
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2934
+ /**
2935
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
2936
+ * @param id Handler ID of the handler to be disconnected
2937
+ */
2532
2938
  disconnect(id: number): void;
2939
+ /**
2940
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
2941
+ * @param properties Object containing the properties to set
2942
+ */
2533
2943
  set(properties: { [key: string]: any }): void;
2534
- block_signal_handler(id: number): any;
2535
- unblock_signal_handler(id: number): any;
2536
- stop_emission_by_name(detailedName: string): any;
2944
+ /**
2945
+ * Blocks a handler of an instance so it will not be called during any signal emissions
2946
+ * @param id Handler ID of the handler to be blocked
2947
+ */
2948
+ block_signal_handler(id: number): void;
2949
+ /**
2950
+ * Unblocks a handler so it will be called again during any signal emissions
2951
+ * @param id Handler ID of the handler to be unblocked
2952
+ */
2953
+ unblock_signal_handler(id: number): void;
2954
+ /**
2955
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
2956
+ * @param detailedName Name of the signal to stop emission of
2957
+ */
2958
+ stop_emission_by_name(detailedName: string): void;
2537
2959
  }
2538
2960
 
2539
2961
  namespace MenuSeparator {
2962
+ // Signal signatures
2963
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
2964
+
2540
2965
  // Constructor properties interface
2541
2966
 
2542
2967
  interface ConstructorProps extends GObject.Object.ConstructorProps, MenuElement.ConstructorProps {}
@@ -2545,6 +2970,15 @@ export namespace Garcon {
2545
2970
  class MenuSeparator extends GObject.Object implements MenuElement {
2546
2971
  static $gtype: GObject.GType<MenuSeparator>;
2547
2972
 
2973
+ /**
2974
+ * Compile-time signal type information.
2975
+ *
2976
+ * This instance property is generated only for TypeScript type checking.
2977
+ * It is not defined at runtime and should not be accessed in JS code.
2978
+ * @internal
2979
+ */
2980
+ $signals: MenuSeparator.SignalSignatures;
2981
+
2548
2982
  // Constructors
2549
2983
 
2550
2984
  constructor(properties?: Partial<MenuSeparator.ConstructorProps>, ...args: any[]);
@@ -2553,6 +2987,24 @@ export namespace Garcon {
2553
2987
 
2554
2988
  static get_default(): MenuSeparator;
2555
2989
 
2990
+ // Signals
2991
+
2992
+ connect<K extends keyof MenuSeparator.SignalSignatures>(
2993
+ signal: K,
2994
+ callback: GObject.SignalCallback<this, MenuSeparator.SignalSignatures[K]>,
2995
+ ): number;
2996
+ connect(signal: string, callback: (...args: any[]) => any): number;
2997
+ connect_after<K extends keyof MenuSeparator.SignalSignatures>(
2998
+ signal: K,
2999
+ callback: GObject.SignalCallback<this, MenuSeparator.SignalSignatures[K]>,
3000
+ ): number;
3001
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
3002
+ emit<K extends keyof MenuSeparator.SignalSignatures>(
3003
+ signal: K,
3004
+ ...args: GObject.GjsParameters<MenuSeparator.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
3005
+ ): void;
3006
+ emit(signal: string, ...args: any[]): void;
3007
+
2556
3008
  // Inherited methods
2557
3009
  equal(b: MenuElement): boolean;
2558
3010
  get_comment(): string;
@@ -2685,7 +3137,21 @@ export namespace Garcon {
2685
3137
  * @returns the data if found, or %NULL if no such data exists.
2686
3138
  */
2687
3139
  get_data(key: string): any | null;
2688
- get_property(property_name: string): any;
3140
+ /**
3141
+ * Gets a property of an object.
3142
+ *
3143
+ * The value can be:
3144
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
3145
+ * - a GObject.Value initialized with the expected type of the property
3146
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
3147
+ *
3148
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
3149
+ *
3150
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
3151
+ * @param property_name The name of the property to get
3152
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
3153
+ */
3154
+ get_property(property_name: string, value: GObject.Value | any): any;
2689
3155
  /**
2690
3156
  * This function gets back user data pointers stored via
2691
3157
  * g_object_set_qdata().
@@ -2813,7 +3279,12 @@ export namespace Garcon {
2813
3279
  * @param data data to associate with that key
2814
3280
  */
2815
3281
  set_data(key: string, data?: any | null): void;
2816
- set_property(property_name: string, value: any): void;
3282
+ /**
3283
+ * Sets a property on an object.
3284
+ * @param property_name The name of the property to set
3285
+ * @param value The value to set the property to
3286
+ */
3287
+ set_property(property_name: string, value: GObject.Value | any): void;
2817
3288
  /**
2818
3289
  * Remove a specified datum from the object's data associations,
2819
3290
  * without invoking the association's destroy handler.
@@ -2963,11 +3434,31 @@ export namespace Garcon {
2963
3434
  * @param pspec
2964
3435
  */
2965
3436
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
3437
+ /**
3438
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
3439
+ * @param id Handler ID of the handler to be disconnected
3440
+ */
2966
3441
  disconnect(id: number): void;
3442
+ /**
3443
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
3444
+ * @param properties Object containing the properties to set
3445
+ */
2967
3446
  set(properties: { [key: string]: any }): void;
2968
- block_signal_handler(id: number): any;
2969
- unblock_signal_handler(id: number): any;
2970
- stop_emission_by_name(detailedName: string): any;
3447
+ /**
3448
+ * Blocks a handler of an instance so it will not be called during any signal emissions
3449
+ * @param id Handler ID of the handler to be blocked
3450
+ */
3451
+ block_signal_handler(id: number): void;
3452
+ /**
3453
+ * Unblocks a handler so it will be called again during any signal emissions
3454
+ * @param id Handler ID of the handler to be unblocked
3455
+ */
3456
+ unblock_signal_handler(id: number): void;
3457
+ /**
3458
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
3459
+ * @param detailedName Name of the signal to stop emission of
3460
+ */
3461
+ stop_emission_by_name(detailedName: string): void;
2971
3462
  }
2972
3463
 
2973
3464
  type MenuClass = typeof Menu;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/garcon-1.0",
3
- "version": "4.18.2-4.0.0-beta.21",
3
+ "version": "4.18.2-4.0.0-beta.24",
4
4
  "description": "GJS TypeScript type definitions for Garcon-1.0, generated from library version 4.18.2",
5
5
  "type": "module",
6
6
  "module": "garcon-1.0.js",
@@ -31,12 +31,12 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gio-2.0": "^2.83.3-4.0.0-beta.21",
35
- "@girs/gjs": "^4.0.0-beta.21",
36
- "@girs/glib-2.0": "^2.83.3-4.0.0-beta.21",
37
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.21",
38
- "@girs/gobject-2.0": "^2.83.3-4.0.0-beta.21",
39
- "@girs/libxfce4util-1.0": "^1.0.0-4.0.0-beta.21"
34
+ "@girs/gio-2.0": "^2.84.2-4.0.0-beta.24",
35
+ "@girs/gjs": "^4.0.0-beta.24",
36
+ "@girs/glib-2.0": "^2.84.2-4.0.0-beta.24",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.24",
38
+ "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24",
39
+ "@girs/libxfce4util-1.0": "^1.0.0-4.0.0-beta.24"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "*"