@girs/gobject-2.0 2.82.2-4.0.0-beta.19 → 2.83.3-4.0.0-beta.21
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 +1 -1
- package/gobject-2.0.d.ts +328 -143
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.
|
|
8
|
+
GJS TypeScript type definitions for GObject-2.0, generated from library version 2.83.3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/gobject-2.0.d.ts
CHANGED
|
@@ -856,10 +856,10 @@ export namespace GObject {
|
|
|
856
856
|
* generate a my_enum_get_type() function from a usual C enumeration
|
|
857
857
|
* definition than to write one yourself using g_enum_register_static().
|
|
858
858
|
* @param name A nul-terminated string used as the name of the new type.
|
|
859
|
-
* @param const_static_values An array of
|
|
859
|
+
* @param const_static_values An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
|
|
860
860
|
* @returns The new type identifier.
|
|
861
861
|
*/
|
|
862
|
-
function enum_register_static(name: string, const_static_values: EnumValue): GType;
|
|
862
|
+
function enum_register_static(name: string, const_static_values: EnumValue[]): GType;
|
|
863
863
|
/**
|
|
864
864
|
* Pretty-prints `value` in the form of the enum’s name.
|
|
865
865
|
*
|
|
@@ -906,10 +906,10 @@ export namespace GObject {
|
|
|
906
906
|
* generate a my_flags_get_type() function from a usual C enumeration
|
|
907
907
|
* definition than to write one yourself using g_flags_register_static().
|
|
908
908
|
* @param name A nul-terminated string used as the name of the new type.
|
|
909
|
-
* @param const_static_values An array of
|
|
909
|
+
* @param const_static_values An array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
|
|
910
910
|
* @returns The new type identifier.
|
|
911
911
|
*/
|
|
912
|
-
function flags_register_static(name: string, const_static_values: FlagsValue): GType;
|
|
912
|
+
function flags_register_static(name: string, const_static_values: FlagsValue[]): GType;
|
|
913
913
|
/**
|
|
914
914
|
* Pretty-prints `value` in the form of the flag names separated by ` | ` and
|
|
915
915
|
* sorted. Any extra bits will be shown at the end as a hexadecimal number.
|
|
@@ -1491,12 +1491,14 @@ export namespace GObject {
|
|
|
1491
1491
|
* for signals which don't have %G_SIGNAL_NO_HOOKS flag set.
|
|
1492
1492
|
* @param signal_id the signal identifier, as returned by g_signal_lookup().
|
|
1493
1493
|
* @param detail the detail on which to call the hook.
|
|
1494
|
+
* @param hook_func a #GSignalEmissionHook function.
|
|
1494
1495
|
* @param data_destroy a #GDestroyNotify for @hook_data.
|
|
1495
1496
|
* @returns the hook id, for later use with g_signal_remove_emission_hook().
|
|
1496
1497
|
*/
|
|
1497
1498
|
function signal_add_emission_hook(
|
|
1498
1499
|
signal_id: number,
|
|
1499
1500
|
detail: GLib.Quark,
|
|
1501
|
+
hook_func: SignalEmissionHook,
|
|
1500
1502
|
data_destroy?: GLib.DestroyNotify | null,
|
|
1501
1503
|
): number;
|
|
1502
1504
|
/**
|
|
@@ -1513,11 +1515,19 @@ export namespace GObject {
|
|
|
1513
1515
|
*
|
|
1514
1516
|
* If `closure` is a floating reference (see g_closure_sink()), this function
|
|
1515
1517
|
* takes ownership of `closure`.
|
|
1518
|
+
*
|
|
1519
|
+
* This function cannot fail. If the given signal name doesn’t exist,
|
|
1520
|
+
* a critical warning is emitted. No validation is performed on the
|
|
1521
|
+
* ‘detail’ string when specified in `detailed_signal,` other than a
|
|
1522
|
+
* non-empty check.
|
|
1523
|
+
*
|
|
1524
|
+
* Refer to the [signals documentation](signals.html) for more
|
|
1525
|
+
* details.
|
|
1516
1526
|
* @param instance the instance to connect to.
|
|
1517
1527
|
* @param detailed_signal a string of the form "signal-name::detail".
|
|
1518
1528
|
* @param closure the closure to connect.
|
|
1519
1529
|
* @param after whether the handler should be called before or after the default handler of the signal.
|
|
1520
|
-
* @returns the handler ID (always greater than 0
|
|
1530
|
+
* @returns the handler ID (always greater than 0)
|
|
1521
1531
|
*/
|
|
1522
1532
|
function signal_connect_closure(
|
|
1523
1533
|
instance: Object,
|
|
@@ -1530,12 +1540,20 @@ export namespace GObject {
|
|
|
1530
1540
|
*
|
|
1531
1541
|
* If `closure` is a floating reference (see g_closure_sink()), this function
|
|
1532
1542
|
* takes ownership of `closure`.
|
|
1543
|
+
*
|
|
1544
|
+
* This function cannot fail. If the given signal name doesn’t exist,
|
|
1545
|
+
* a critical warning is emitted. No validation is performed on the
|
|
1546
|
+
* ‘detail’ string when specified in `detailed_signal,` other than a
|
|
1547
|
+
* non-empty check.
|
|
1548
|
+
*
|
|
1549
|
+
* Refer to the [signals documentation](signals.html) for more
|
|
1550
|
+
* details.
|
|
1533
1551
|
* @param instance the instance to connect to.
|
|
1534
1552
|
* @param signal_id the id of the signal.
|
|
1535
1553
|
* @param detail the detail.
|
|
1536
1554
|
* @param closure the closure to connect.
|
|
1537
1555
|
* @param after whether the handler should be called before or after the default handler of the signal.
|
|
1538
|
-
* @returns the handler ID (always greater than 0
|
|
1556
|
+
* @returns the handler ID (always greater than 0)
|
|
1539
1557
|
*/
|
|
1540
1558
|
function signal_connect_closure_by_id(
|
|
1541
1559
|
instance: Object,
|
|
@@ -1634,6 +1652,7 @@ export namespace GObject {
|
|
|
1634
1652
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1635
1653
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1636
1654
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1655
|
+
* @param closure The closure the handlers will invoke.
|
|
1637
1656
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1638
1657
|
* @param data The closure data of the handlers' closures.
|
|
1639
1658
|
* @returns The number of handlers that matched.
|
|
@@ -1643,6 +1662,7 @@ export namespace GObject {
|
|
|
1643
1662
|
mask: SignalMatchType | null,
|
|
1644
1663
|
signal_id: number,
|
|
1645
1664
|
detail: GLib.Quark,
|
|
1665
|
+
closure?: Closure | null,
|
|
1646
1666
|
func?: any | null,
|
|
1647
1667
|
data?: any | null,
|
|
1648
1668
|
): number;
|
|
@@ -1672,6 +1692,7 @@ export namespace GObject {
|
|
|
1672
1692
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1673
1693
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1674
1694
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1695
|
+
* @param closure The closure the handlers will invoke.
|
|
1675
1696
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1676
1697
|
* @param data The closure data of the handlers' closures.
|
|
1677
1698
|
* @returns The number of handlers that matched.
|
|
@@ -1681,6 +1702,7 @@ export namespace GObject {
|
|
|
1681
1702
|
mask: SignalMatchType | null,
|
|
1682
1703
|
signal_id: number,
|
|
1683
1704
|
detail: GLib.Quark,
|
|
1705
|
+
closure?: Closure | null,
|
|
1684
1706
|
func?: any | null,
|
|
1685
1707
|
data?: any | null,
|
|
1686
1708
|
): number;
|
|
@@ -1704,6 +1726,7 @@ export namespace GObject {
|
|
|
1704
1726
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1705
1727
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1706
1728
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1729
|
+
* @param closure The closure the handlers will invoke.
|
|
1707
1730
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1708
1731
|
* @param data The closure data of the handlers' closures.
|
|
1709
1732
|
* @returns The number of handlers that matched.
|
|
@@ -1713,6 +1736,7 @@ export namespace GObject {
|
|
|
1713
1736
|
mask: SignalMatchType | null,
|
|
1714
1737
|
signal_id: number,
|
|
1715
1738
|
detail: GLib.Quark,
|
|
1739
|
+
closure?: Closure | null,
|
|
1716
1740
|
func?: any | null,
|
|
1717
1741
|
data?: any | null,
|
|
1718
1742
|
): number;
|
|
@@ -1749,9 +1773,8 @@ export namespace GObject {
|
|
|
1749
1773
|
* Validate a signal name. This can be useful for dynamically-generated signals
|
|
1750
1774
|
* which need to be validated at run-time before actually trying to create them.
|
|
1751
1775
|
*
|
|
1752
|
-
* See [
|
|
1753
|
-
*
|
|
1754
|
-
* for property names.
|
|
1776
|
+
* See [func`GObject`.signal_new] for details of the rules for valid names.
|
|
1777
|
+
* The rules for signal names are the same as those for property names.
|
|
1755
1778
|
* @param name the canonical name of the signal
|
|
1756
1779
|
* @returns %TRUE if @name is a valid signal name, %FALSE otherwise.
|
|
1757
1780
|
*/
|
|
@@ -1789,31 +1812,6 @@ export namespace GObject {
|
|
|
1789
1812
|
* @returns the signal name, or %NULL if the signal number was invalid.
|
|
1790
1813
|
*/
|
|
1791
1814
|
function signal_name(signal_id: number): string | null;
|
|
1792
|
-
/**
|
|
1793
|
-
* Creates a new signal. (This is usually done in the class initializer.)
|
|
1794
|
-
*
|
|
1795
|
-
* See g_signal_new() for details on allowed signal names.
|
|
1796
|
-
*
|
|
1797
|
-
* If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
|
|
1798
|
-
* the marshaller for this signal.
|
|
1799
|
-
* @param signal_name the name for the signal
|
|
1800
|
-
* @param itype the type this signal pertains to. It will also pertain to types which are derived from this type
|
|
1801
|
-
* @param signal_flags a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST
|
|
1802
|
-
* @param class_closure The closure to invoke on signal emission; may be %NULL
|
|
1803
|
-
* @param c_marshaller the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
|
|
1804
|
-
* @param return_type the type of return value, or %G_TYPE_NONE for a signal without a return value
|
|
1805
|
-
* @param param_types an array of types, one for each parameter (may be %NULL if @n_params is zero)
|
|
1806
|
-
* @returns the signal id
|
|
1807
|
-
*/
|
|
1808
|
-
function signal_newv(
|
|
1809
|
-
signal_name: string,
|
|
1810
|
-
itype: GType,
|
|
1811
|
-
signal_flags: SignalFlags | null,
|
|
1812
|
-
class_closure: Closure | null,
|
|
1813
|
-
c_marshaller: SignalCMarshaller | null,
|
|
1814
|
-
return_type: GType,
|
|
1815
|
-
param_types?: GType[] | null,
|
|
1816
|
-
): number;
|
|
1817
1815
|
/**
|
|
1818
1816
|
* Overrides the class closure (i.e. the default handler) for the given signal
|
|
1819
1817
|
* for emissions on instances of `instance_type`. `instance_type` must be derived
|
|
@@ -1870,20 +1868,6 @@ export namespace GObject {
|
|
|
1870
1868
|
* @param hook_id the id of the emission hook, as returned by g_signal_add_emission_hook()
|
|
1871
1869
|
*/
|
|
1872
1870
|
function signal_remove_emission_hook(signal_id: number, hook_id: number): void;
|
|
1873
|
-
/**
|
|
1874
|
-
* Change the #GSignalCVaMarshaller used for a given signal. This is a
|
|
1875
|
-
* specialised form of the marshaller that can often be used for the
|
|
1876
|
-
* common case of a single connected signal handler and avoids the
|
|
1877
|
-
* overhead of #GValue. Its use is optional.
|
|
1878
|
-
* @param signal_id the signal id
|
|
1879
|
-
* @param instance_type the instance type on which to set the marshaller.
|
|
1880
|
-
* @param va_marshaller the marshaller to set.
|
|
1881
|
-
*/
|
|
1882
|
-
function signal_set_va_marshaller(
|
|
1883
|
-
signal_id: number,
|
|
1884
|
-
instance_type: GType,
|
|
1885
|
-
va_marshaller: SignalCVaMarshaller,
|
|
1886
|
-
): void;
|
|
1887
1871
|
/**
|
|
1888
1872
|
* Stops a signal's current emission.
|
|
1889
1873
|
*
|
|
@@ -2004,35 +1988,68 @@ export namespace GObject {
|
|
|
2004
1988
|
function type_children(type: GType): GType[];
|
|
2005
1989
|
function type_class_adjust_private_offset(g_class: any | null, private_size_or_offset: number): void;
|
|
2006
1990
|
/**
|
|
2007
|
-
*
|
|
2008
|
-
*
|
|
1991
|
+
* Retrieves the type class of the given `type`.
|
|
1992
|
+
*
|
|
1993
|
+
* This function will create the class on demand if it does not exist
|
|
1994
|
+
* already.
|
|
1995
|
+
*
|
|
1996
|
+
* If you don't want to create the class, use g_type_class_peek() instead.
|
|
1997
|
+
* @param type type ID of a classed type
|
|
1998
|
+
* @returns the class structure for the type
|
|
1999
|
+
*/
|
|
2000
|
+
function type_class_get(type: GType): TypeClass;
|
|
2001
|
+
/**
|
|
2002
|
+
* Retrieves the class for a give type.
|
|
2003
|
+
*
|
|
2004
|
+
* This function is essentially the same as g_type_class_get(),
|
|
2005
|
+
* except that the class may have not been instantiated yet.
|
|
2006
|
+
*
|
|
2009
2007
|
* As a consequence, this function may return %NULL if the class
|
|
2010
2008
|
* of the type passed in does not currently exist (hasn't been
|
|
2011
2009
|
* referenced before).
|
|
2012
2010
|
* @param type type ID of a classed type
|
|
2013
|
-
* @returns the
|
|
2011
|
+
* @returns the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist
|
|
2014
2012
|
*/
|
|
2015
|
-
function type_class_peek(type: GType): TypeClass;
|
|
2013
|
+
function type_class_peek(type: GType): TypeClass | null;
|
|
2016
2014
|
/**
|
|
2017
2015
|
* A more efficient version of g_type_class_peek() which works only for
|
|
2018
2016
|
* static types.
|
|
2019
2017
|
* @param type type ID of a classed type
|
|
2020
|
-
* @returns the
|
|
2018
|
+
* @returns the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist or is dynamically loaded
|
|
2021
2019
|
*/
|
|
2022
|
-
function type_class_peek_static(type: GType): TypeClass;
|
|
2020
|
+
function type_class_peek_static(type: GType): TypeClass | null;
|
|
2023
2021
|
/**
|
|
2024
2022
|
* Increments the reference count of the class structure belonging to
|
|
2025
|
-
* `type`.
|
|
2026
|
-
*
|
|
2023
|
+
* `type`.
|
|
2024
|
+
*
|
|
2025
|
+
* This function will demand-create the class if it doesn't exist already.
|
|
2027
2026
|
* @param type type ID of a classed type
|
|
2028
|
-
* @returns the #GTypeClass
|
|
2027
|
+
* @returns the #GTypeClass structure for the given type ID
|
|
2029
2028
|
*/
|
|
2030
2029
|
function type_class_ref(type: GType): TypeClass;
|
|
2030
|
+
/**
|
|
2031
|
+
* Returns the default interface vtable for the given `g_type`.
|
|
2032
|
+
*
|
|
2033
|
+
* If the type is not currently in use, then the default vtable
|
|
2034
|
+
* for the type will be created and initialized by calling
|
|
2035
|
+
* the base interface init and default vtable init functions for
|
|
2036
|
+
* the type (the `base_init` and `class_init` members of #GTypeInfo).
|
|
2037
|
+
*
|
|
2038
|
+
* If you don't want to create the interface vtable, you should use
|
|
2039
|
+
* g_type_default_interface_peek() instead.
|
|
2040
|
+
*
|
|
2041
|
+
* Calling g_type_default_interface_get() is useful when you
|
|
2042
|
+
* want to make sure that signals and properties for an interface
|
|
2043
|
+
* have been installed.
|
|
2044
|
+
* @param g_type an interface type
|
|
2045
|
+
* @returns the default vtable for the interface.
|
|
2046
|
+
*/
|
|
2047
|
+
function type_default_interface_get(g_type: GType): TypeInterface;
|
|
2031
2048
|
/**
|
|
2032
2049
|
* If the interface type `g_type` is currently in use, returns its
|
|
2033
2050
|
* default interface vtable.
|
|
2034
2051
|
* @param g_type an interface type
|
|
2035
|
-
* @returns the default
|
|
2052
|
+
* @returns the default vtable for the interface, or %NULL if the type is not currently in use
|
|
2036
2053
|
*/
|
|
2037
2054
|
function type_default_interface_peek(g_type: GType): TypeInterface;
|
|
2038
2055
|
/**
|
|
@@ -2047,15 +2064,16 @@ export namespace GObject {
|
|
|
2047
2064
|
* want to make sure that signals and properties for an interface
|
|
2048
2065
|
* have been installed.
|
|
2049
2066
|
* @param g_type an interface type
|
|
2050
|
-
* @returns the default
|
|
2067
|
+
* @returns the default vtable for the interface; call g_type_default_interface_unref() when you are done using the interface.
|
|
2051
2068
|
*/
|
|
2052
2069
|
function type_default_interface_ref(g_type: GType): TypeInterface;
|
|
2053
2070
|
/**
|
|
2054
2071
|
* Decrements the reference count for the type corresponding to the
|
|
2055
|
-
* interface default vtable `g_iface`.
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
2058
|
-
*
|
|
2072
|
+
* interface default vtable `g_iface`.
|
|
2073
|
+
*
|
|
2074
|
+
* If the type is dynamic, then when no one is using the interface and all
|
|
2075
|
+
* references have been released, the finalize function for the interface's
|
|
2076
|
+
* default vtable (the `class_finalize` member of #GTypeInfo) will be called.
|
|
2059
2077
|
* @param g_iface the default vtable structure for an interface, as returned by g_type_default_interface_ref()
|
|
2060
2078
|
*/
|
|
2061
2079
|
function type_default_interface_unref(g_iface: TypeInterface): void;
|
|
@@ -2203,9 +2221,9 @@ export namespace GObject {
|
|
|
2203
2221
|
* passed in class conforms.
|
|
2204
2222
|
* @param instance_class a #GTypeClass structure
|
|
2205
2223
|
* @param iface_type an interface ID which this class conforms to
|
|
2206
|
-
* @returns the #GTypeInterface
|
|
2224
|
+
* @returns the #GTypeInterface structure of @iface_type if implemented by @instance_class, %NULL otherwise
|
|
2207
2225
|
*/
|
|
2208
|
-
function type_interface_peek(instance_class: TypeClass, iface_type: GType): TypeInterface;
|
|
2226
|
+
function type_interface_peek(instance_class: TypeClass, iface_type: GType): TypeInterface | null;
|
|
2209
2227
|
/**
|
|
2210
2228
|
* Returns the prerequisites of an interfaces type.
|
|
2211
2229
|
* @param interface_type an interface type
|
|
@@ -2229,11 +2247,12 @@ export namespace GObject {
|
|
|
2229
2247
|
*/
|
|
2230
2248
|
function type_is_a(type: GType, is_a_type: GType): boolean;
|
|
2231
2249
|
/**
|
|
2232
|
-
* Get the unique name that is assigned to a type ID.
|
|
2233
|
-
*
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2236
|
-
*
|
|
2250
|
+
* Get the unique name that is assigned to a type ID.
|
|
2251
|
+
*
|
|
2252
|
+
* Note that this function (like all other GType API) cannot cope with
|
|
2253
|
+
* invalid type IDs. %G_TYPE_INVALID may be passed to this function, as
|
|
2254
|
+
* may be any other validly registered type ID, but randomized type IDs
|
|
2255
|
+
* should not be passed in and will most likely lead to a crash.
|
|
2237
2256
|
* @param type type to return name for
|
|
2238
2257
|
* @returns static type name or %NULL
|
|
2239
2258
|
*/
|
|
@@ -2628,11 +2647,13 @@ export namespace GObject {
|
|
|
2628
2647
|
*/
|
|
2629
2648
|
READWRITE,
|
|
2630
2649
|
/**
|
|
2631
|
-
* the parameter will be set upon object construction
|
|
2650
|
+
* the parameter will be set upon object construction.
|
|
2651
|
+
* See [vfunc`Object`.constructed] for more details
|
|
2632
2652
|
*/
|
|
2633
2653
|
CONSTRUCT,
|
|
2634
2654
|
/**
|
|
2635
|
-
* the parameter can only be set upon object construction
|
|
2655
|
+
* the parameter can only be set upon object construction.
|
|
2656
|
+
* See [vfunc`Object`.constructed] for more details
|
|
2636
2657
|
*/
|
|
2637
2658
|
CONSTRUCT_ONLY,
|
|
2638
2659
|
/**
|
|
@@ -2898,7 +2919,7 @@ export namespace GObject {
|
|
|
2898
2919
|
*/
|
|
2899
2920
|
DEEP_DERIVABLE,
|
|
2900
2921
|
}
|
|
2901
|
-
|
|
2922
|
+
namespace Binding {
|
|
2902
2923
|
// Constructor properties interface
|
|
2903
2924
|
|
|
2904
2925
|
interface ConstructorProps extends Object.ConstructorProps {
|
|
@@ -3124,7 +3145,7 @@ export namespace GObject {
|
|
|
3124
3145
|
unbind(): void;
|
|
3125
3146
|
}
|
|
3126
3147
|
|
|
3127
|
-
|
|
3148
|
+
namespace BindingGroup {
|
|
3128
3149
|
// Constructor properties interface
|
|
3129
3150
|
|
|
3130
3151
|
interface ConstructorProps extends Object.ConstructorProps {
|
|
@@ -3239,7 +3260,7 @@ export namespace GObject {
|
|
|
3239
3260
|
set_source(source?: Object | null): void;
|
|
3240
3261
|
}
|
|
3241
3262
|
|
|
3242
|
-
|
|
3263
|
+
namespace InitiallyUnowned {
|
|
3243
3264
|
// Constructor properties interface
|
|
3244
3265
|
|
|
3245
3266
|
interface ConstructorProps extends Object.ConstructorProps {}
|
|
@@ -3261,7 +3282,7 @@ export namespace GObject {
|
|
|
3261
3282
|
_init(...args: any[]): void;
|
|
3262
3283
|
}
|
|
3263
3284
|
|
|
3264
|
-
|
|
3285
|
+
namespace Object {
|
|
3265
3286
|
// Signal callback interfaces
|
|
3266
3287
|
|
|
3267
3288
|
interface Notify {
|
|
@@ -3794,18 +3815,8 @@ export namespace GObject {
|
|
|
3794
3815
|
}
|
|
3795
3816
|
|
|
3796
3817
|
/**
|
|
3797
|
-
*
|
|
3798
|
-
*
|
|
3799
|
-
* ## Parameter names
|
|
3800
|
-
*
|
|
3801
|
-
* A property name consists of one or more segments consisting of ASCII letters
|
|
3802
|
-
* and digits, separated by either the `-` or `_` character. The first
|
|
3803
|
-
* character of a property name must be a letter. These are the same rules as
|
|
3804
|
-
* for signal naming (see [func`GObject`.signal_new]).
|
|
3805
|
-
*
|
|
3806
|
-
* When creating and looking up a `GParamSpec`, either separator can be
|
|
3807
|
-
* used, but they cannot be mixed. Using `-` is considerably more
|
|
3808
|
-
* efficient, and is the ‘canonical form’. Using `_` is discouraged.
|
|
3818
|
+
* A GObject parameter specification that defines property characteristics.
|
|
3819
|
+
* See https://gjs.guide/guides/gobject/basics.html#properties for more details.
|
|
3809
3820
|
*/
|
|
3810
3821
|
abstract class ParamSpec<A = unknown> {
|
|
3811
3822
|
static $gtype: GType<ParamSpec>;
|
|
@@ -3828,139 +3839,286 @@ export namespace GObject {
|
|
|
3828
3839
|
* dynamically-generated properties which need to be validated at run-time
|
|
3829
3840
|
* before actually trying to create them.
|
|
3830
3841
|
*
|
|
3831
|
-
* See [canonical parameter names][
|
|
3832
|
-
* the rules for valid names.
|
|
3842
|
+
* See [canonical parameter names][class`GObject`.ParamSpec#parameter-names]
|
|
3843
|
+
* for details of the rules for valid names.
|
|
3833
3844
|
* @param name the canonical name of the property
|
|
3834
3845
|
*/
|
|
3835
3846
|
static is_valid_name(name: string): boolean;
|
|
3847
|
+
/**
|
|
3848
|
+
* Creates a new GParamSpecChar instance specifying a G_TYPE_CHAR property.
|
|
3849
|
+
* @param name The name of the property
|
|
3850
|
+
* @param nick A human readable name for the property
|
|
3851
|
+
* @param blurb A longer description of the property
|
|
3852
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3853
|
+
* @param minimum The minimum value for this property
|
|
3854
|
+
* @param maximum The maximum value for this property
|
|
3855
|
+
* @param defaultValue The default value for this property
|
|
3856
|
+
*/
|
|
3836
3857
|
static ['char'](
|
|
3837
3858
|
name: string,
|
|
3838
|
-
nick: string,
|
|
3839
|
-
blurb: string,
|
|
3859
|
+
nick: string | null,
|
|
3860
|
+
blurb: string | null,
|
|
3840
3861
|
flags: ParamFlags | number,
|
|
3841
3862
|
minimum: number,
|
|
3842
3863
|
maximum: number,
|
|
3843
3864
|
defaultValue: number,
|
|
3844
3865
|
): ParamSpec<number>;
|
|
3866
|
+
/**
|
|
3867
|
+
* Creates a new GParamSpecUChar instance specifying a G_TYPE_UCHAR property.
|
|
3868
|
+
* @param name The name of the property
|
|
3869
|
+
* @param nick A human readable name for the property
|
|
3870
|
+
* @param blurb A longer description of the property
|
|
3871
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3872
|
+
* @param minimum The minimum value for this property
|
|
3873
|
+
* @param maximum The maximum value for this property
|
|
3874
|
+
* @param defaultValue The default value for this property
|
|
3875
|
+
*/
|
|
3845
3876
|
static uchar(
|
|
3846
3877
|
name: string,
|
|
3847
|
-
nick: string,
|
|
3848
|
-
blurb: string,
|
|
3878
|
+
nick: string | null,
|
|
3879
|
+
blurb: string | null,
|
|
3849
3880
|
flags: ParamFlags | number,
|
|
3850
3881
|
minimum: number,
|
|
3851
3882
|
maximum: number,
|
|
3852
3883
|
defaultValue: number,
|
|
3853
3884
|
): ParamSpec<number>;
|
|
3885
|
+
/**
|
|
3886
|
+
* Creates a new GParamSpecInt instance specifying a G_TYPE_INT property.
|
|
3887
|
+
* @param name The name of the property
|
|
3888
|
+
* @param nick A human readable name for the property
|
|
3889
|
+
* @param blurb A longer description of the property
|
|
3890
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3891
|
+
* @param minimum The minimum value for this property
|
|
3892
|
+
* @param maximum The maximum value for this property
|
|
3893
|
+
* @param defaultValue The default value for this property
|
|
3894
|
+
*/
|
|
3854
3895
|
static int(
|
|
3855
3896
|
name: string,
|
|
3856
|
-
nick: string,
|
|
3857
|
-
blurb: string,
|
|
3897
|
+
nick: string | null,
|
|
3898
|
+
blurb: string | null,
|
|
3858
3899
|
flags: ParamFlags | number,
|
|
3859
3900
|
minimum: number,
|
|
3860
3901
|
maximum: number,
|
|
3861
3902
|
defaultValue: number,
|
|
3862
3903
|
): ParamSpec<number>;
|
|
3904
|
+
/**
|
|
3905
|
+
* Creates a new GParamSpecUInt instance specifying a G_TYPE_UINT property.
|
|
3906
|
+
* @param name The name of the property
|
|
3907
|
+
* @param nick A human readable name for the property
|
|
3908
|
+
* @param blurb A longer description of the property
|
|
3909
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3910
|
+
* @param minimum The minimum value for this property
|
|
3911
|
+
* @param maximum The maximum value for this property
|
|
3912
|
+
* @param defaultValue The default value for this property
|
|
3913
|
+
*/
|
|
3863
3914
|
static uint(
|
|
3864
3915
|
name: string,
|
|
3865
|
-
nick: string,
|
|
3866
|
-
blurb: string,
|
|
3916
|
+
nick: string | null,
|
|
3917
|
+
blurb: string | null,
|
|
3867
3918
|
flags: ParamFlags | number,
|
|
3868
3919
|
minimum: number,
|
|
3869
3920
|
maximum: number,
|
|
3870
3921
|
defaultValue: number,
|
|
3871
3922
|
): ParamSpec<number>;
|
|
3923
|
+
/**
|
|
3924
|
+
* Creates a new GParamSpecLong instance specifying a G_TYPE_LONG property.
|
|
3925
|
+
* @param name The name of the property
|
|
3926
|
+
* @param nick A human readable name for the property
|
|
3927
|
+
* @param blurb A longer description of the property
|
|
3928
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3929
|
+
* @param minimum The minimum value for this property
|
|
3930
|
+
* @param maximum The maximum value for this property
|
|
3931
|
+
* @param defaultValue The default value for this property
|
|
3932
|
+
*/
|
|
3872
3933
|
static long(
|
|
3873
3934
|
name: string,
|
|
3874
|
-
nick: string,
|
|
3875
|
-
blurb: string,
|
|
3935
|
+
nick: string | null,
|
|
3936
|
+
blurb: string | null,
|
|
3876
3937
|
flags: ParamFlags | number,
|
|
3877
3938
|
minimum: number,
|
|
3878
3939
|
maximum: number,
|
|
3879
3940
|
defaultValue: number,
|
|
3880
3941
|
): ParamSpec<number>;
|
|
3942
|
+
/**
|
|
3943
|
+
* Creates a new GParamSpecULong instance specifying a G_TYPE_ULONG property.
|
|
3944
|
+
* @param name The name of the property
|
|
3945
|
+
* @param nick A human readable name for the property
|
|
3946
|
+
* @param blurb A longer description of the property
|
|
3947
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3948
|
+
* @param minimum The minimum value for this property
|
|
3949
|
+
* @param maximum The maximum value for this property
|
|
3950
|
+
* @param defaultValue The default value for this property
|
|
3951
|
+
*/
|
|
3881
3952
|
static ulong(
|
|
3882
3953
|
name: string,
|
|
3883
|
-
nick: string,
|
|
3884
|
-
blurb: string,
|
|
3954
|
+
nick: string | null,
|
|
3955
|
+
blurb: string | null,
|
|
3885
3956
|
flags: ParamFlags | number,
|
|
3886
3957
|
minimum: number,
|
|
3887
3958
|
maximum: number,
|
|
3888
3959
|
defaultValue: number,
|
|
3889
3960
|
): ParamSpec<number>;
|
|
3961
|
+
/**
|
|
3962
|
+
* Creates a new GParamSpecInt64 instance specifying a G_TYPE_INT64 property.
|
|
3963
|
+
* @param name The name of the property
|
|
3964
|
+
* @param nick A human readable name for the property
|
|
3965
|
+
* @param blurb A longer description of the property
|
|
3966
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3967
|
+
* @param minimum The minimum value for this property
|
|
3968
|
+
* @param maximum The maximum value for this property
|
|
3969
|
+
* @param defaultValue The default value for this property
|
|
3970
|
+
*/
|
|
3890
3971
|
static int64(
|
|
3891
3972
|
name: string,
|
|
3892
|
-
nick: string,
|
|
3893
|
-
blurb: string,
|
|
3973
|
+
nick: string | null,
|
|
3974
|
+
blurb: string | null,
|
|
3894
3975
|
flags: ParamFlags | number,
|
|
3895
3976
|
minimum: number,
|
|
3896
3977
|
maximum: number,
|
|
3897
3978
|
defaultValue: number,
|
|
3898
3979
|
): ParamSpec<number>;
|
|
3980
|
+
/**
|
|
3981
|
+
* Creates a new GParamSpecUInt64 instance specifying a G_TYPE_UINT64 property.
|
|
3982
|
+
* @param name The name of the property
|
|
3983
|
+
* @param nick A human readable name for the property
|
|
3984
|
+
* @param blurb A longer description of the property
|
|
3985
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
3986
|
+
* @param minimum The minimum value for this property
|
|
3987
|
+
* @param maximum The maximum value for this property
|
|
3988
|
+
* @param defaultValue The default value for this property
|
|
3989
|
+
*/
|
|
3899
3990
|
static uint64(
|
|
3900
3991
|
name: string,
|
|
3901
|
-
nick: string,
|
|
3902
|
-
blurb: string,
|
|
3992
|
+
nick: string | null,
|
|
3993
|
+
blurb: string | null,
|
|
3903
3994
|
flags: ParamFlags | number,
|
|
3904
3995
|
minimum: number,
|
|
3905
3996
|
maximum: number,
|
|
3906
3997
|
defaultValue: number,
|
|
3907
3998
|
): ParamSpec<number>;
|
|
3999
|
+
/**
|
|
4000
|
+
* Creates a new GParamSpecFloat instance specifying a G_TYPE_FLOAT property.
|
|
4001
|
+
* @param name The name of the property
|
|
4002
|
+
* @param nick A human readable name for the property
|
|
4003
|
+
* @param blurb A longer description of the property
|
|
4004
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4005
|
+
* @param minimum The minimum value for this property
|
|
4006
|
+
* @param maximum The maximum value for this property
|
|
4007
|
+
* @param defaultValue The default value for this property
|
|
4008
|
+
*/
|
|
3908
4009
|
static float(
|
|
3909
4010
|
name: string,
|
|
3910
|
-
nick: string,
|
|
3911
|
-
blurb: string,
|
|
4011
|
+
nick: string | null,
|
|
4012
|
+
blurb: string | null,
|
|
3912
4013
|
flags: ParamFlags | number,
|
|
3913
4014
|
minimum: number,
|
|
3914
4015
|
maximum: number,
|
|
3915
4016
|
defaultValue: number,
|
|
3916
4017
|
): ParamSpec<number>;
|
|
4018
|
+
/**
|
|
4019
|
+
* Creates a new GParamSpecBoolean instance specifying a G_TYPE_BOOLEAN property. In many cases, it may be more appropriate to use an enum with g_param_spec_enum(), both to improve code clarity by using explicitly named values, and to allow for more values to be added in future without breaking API.
|
|
4020
|
+
* @param name The name of the property
|
|
4021
|
+
* @param nick A human readable name for the property
|
|
4022
|
+
* @param blurb A longer description of the property
|
|
4023
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4024
|
+
* @param defaultValue The default value for this property
|
|
4025
|
+
*/
|
|
3917
4026
|
static ['boolean'](
|
|
3918
4027
|
name: string,
|
|
3919
|
-
nick: string,
|
|
3920
|
-
blurb: string,
|
|
4028
|
+
nick: string | null,
|
|
4029
|
+
blurb: string | null,
|
|
3921
4030
|
flags: ParamFlags | number,
|
|
3922
4031
|
defaultValue: boolean,
|
|
3923
4032
|
): ParamSpec<boolean>;
|
|
4033
|
+
/**
|
|
4034
|
+
* Creates a new GParamSpecEnum instance specifying a G_TYPE_ENUM property.
|
|
4035
|
+
* @param name The name of the property
|
|
4036
|
+
* @param nick A human readable name for the property
|
|
4037
|
+
* @param blurb A longer description of the property
|
|
4038
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4039
|
+
* @param enumType
|
|
4040
|
+
* @param defaultValue The default value for this property
|
|
4041
|
+
*/
|
|
3924
4042
|
static ['enum']<T>(
|
|
3925
4043
|
name: string,
|
|
3926
|
-
nick: string,
|
|
3927
|
-
blurb: string,
|
|
4044
|
+
nick: string | null,
|
|
4045
|
+
blurb: string | null,
|
|
3928
4046
|
flags: ParamFlags | number,
|
|
3929
4047
|
enumType: GType<T> | { $gtype: GType<T> },
|
|
3930
4048
|
defaultValue: any,
|
|
3931
4049
|
): ParamSpec<T>;
|
|
4050
|
+
/**
|
|
4051
|
+
* Creates a new GParamSpecDouble instance specifying a G_TYPE_DOUBLE property.
|
|
4052
|
+
* @param name The name of the property
|
|
4053
|
+
* @param nick A human readable name for the property
|
|
4054
|
+
* @param blurb A longer description of the property
|
|
4055
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4056
|
+
* @param minimum The minimum value for this property
|
|
4057
|
+
* @param maximum The maximum value for this property
|
|
4058
|
+
* @param defaultValue The default value for this property
|
|
4059
|
+
*/
|
|
3932
4060
|
static double(
|
|
3933
4061
|
name: string,
|
|
3934
|
-
nick: string,
|
|
3935
|
-
blurb: string,
|
|
4062
|
+
nick: string | null,
|
|
4063
|
+
blurb: string | null,
|
|
3936
4064
|
flags: ParamFlags | number,
|
|
3937
4065
|
minimum: number,
|
|
3938
4066
|
maximum: number,
|
|
3939
4067
|
defaultValue: number,
|
|
3940
4068
|
): ParamSpec<number>;
|
|
4069
|
+
/**
|
|
4070
|
+
* Creates a new GParamSpecString instance specifying a G_TYPE_STRING property.
|
|
4071
|
+
* @param name The name of the property
|
|
4072
|
+
* @param nick A human readable name for the property
|
|
4073
|
+
* @param blurb A longer description of the property
|
|
4074
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4075
|
+
* @param defaultValue The default value for this property
|
|
4076
|
+
*/
|
|
3941
4077
|
static string(
|
|
3942
4078
|
name: string,
|
|
3943
|
-
nick: string,
|
|
3944
|
-
blurb: string,
|
|
4079
|
+
nick: string | null,
|
|
4080
|
+
blurb: string | null,
|
|
3945
4081
|
flags: ParamFlags | number,
|
|
3946
4082
|
defaultValue: string,
|
|
3947
4083
|
): ParamSpec<string>;
|
|
4084
|
+
/**
|
|
4085
|
+
* Creates a new GParamSpecBoxed instance specifying a G_TYPE_BOXED derived property.
|
|
4086
|
+
* @param name The name of the property
|
|
4087
|
+
* @param nick A human readable name for the property
|
|
4088
|
+
* @param blurb A longer description of the property
|
|
4089
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4090
|
+
* @param boxedType
|
|
4091
|
+
*/
|
|
3948
4092
|
static boxed<T>(
|
|
3949
4093
|
name: string,
|
|
3950
|
-
nick: string,
|
|
3951
|
-
blurb: string,
|
|
4094
|
+
nick: string | null,
|
|
4095
|
+
blurb: string | null,
|
|
3952
4096
|
flags: ParamFlags | number,
|
|
3953
4097
|
boxedType: GType<T> | { $gtype: GType<T> },
|
|
3954
4098
|
): ParamSpec<T>;
|
|
3955
4099
|
static object<T>(
|
|
3956
4100
|
name: string,
|
|
3957
|
-
nick: string,
|
|
3958
|
-
blurb: string,
|
|
4101
|
+
nick: string | null,
|
|
4102
|
+
blurb: string | null,
|
|
3959
4103
|
flags: string,
|
|
3960
4104
|
objectType: GType<T> | { $gtype: GType<T> },
|
|
3961
4105
|
): ParamSpec<T>;
|
|
3962
|
-
|
|
3963
|
-
|
|
4106
|
+
/**
|
|
4107
|
+
* Creates a new GParamSpecParam instance specifying a G_TYPE_PARAM property.
|
|
4108
|
+
* @param name The name of the property
|
|
4109
|
+
* @param nick A human readable name for the property
|
|
4110
|
+
* @param blurb A longer description of the property
|
|
4111
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4112
|
+
* @param paramType
|
|
4113
|
+
*/
|
|
4114
|
+
static param(
|
|
4115
|
+
name: string,
|
|
4116
|
+
nick: string | null,
|
|
4117
|
+
blurb: string | null,
|
|
4118
|
+
flags: ParamFlags | number,
|
|
4119
|
+
paramType: any,
|
|
4120
|
+
): ParamSpec;
|
|
4121
|
+
static jsobject<T>(name: string, nick: string | null, blurb: string | null, flags: any): ParamSpec<T>;
|
|
3964
4122
|
|
|
3965
4123
|
// Virtual methods
|
|
3966
4124
|
|
|
@@ -4080,7 +4238,7 @@ export namespace GObject {
|
|
|
4080
4238
|
override(name: string, oclass: Object | Function | GType): void;
|
|
4081
4239
|
}
|
|
4082
4240
|
|
|
4083
|
-
|
|
4241
|
+
namespace SignalGroup {
|
|
4084
4242
|
// Signal callback interfaces
|
|
4085
4243
|
|
|
4086
4244
|
interface Bind {
|
|
@@ -4231,7 +4389,7 @@ export namespace GObject {
|
|
|
4231
4389
|
unblock(): void;
|
|
4232
4390
|
}
|
|
4233
4391
|
|
|
4234
|
-
|
|
4392
|
+
namespace TypeModule {
|
|
4235
4393
|
// Constructor properties interface
|
|
4236
4394
|
|
|
4237
4395
|
interface ConstructorProps extends Object.ConstructorProps, TypePlugin.ConstructorProps {}
|
|
@@ -5544,24 +5702,38 @@ export namespace GObject {
|
|
|
5544
5702
|
|
|
5545
5703
|
static adjust_private_offset(g_class: any | null, private_size_or_offset: number): void;
|
|
5546
5704
|
/**
|
|
5547
|
-
*
|
|
5548
|
-
*
|
|
5705
|
+
* Retrieves the type class of the given `type`.
|
|
5706
|
+
*
|
|
5707
|
+
* This function will create the class on demand if it does not exist
|
|
5708
|
+
* already.
|
|
5709
|
+
*
|
|
5710
|
+
* If you don't want to create the class, use g_type_class_peek() instead.
|
|
5711
|
+
* @param type type ID of a classed type
|
|
5712
|
+
*/
|
|
5713
|
+
static get(type: GType): TypeClass;
|
|
5714
|
+
/**
|
|
5715
|
+
* Retrieves the class for a give type.
|
|
5716
|
+
*
|
|
5717
|
+
* This function is essentially the same as g_type_class_get(),
|
|
5718
|
+
* except that the class may have not been instantiated yet.
|
|
5719
|
+
*
|
|
5549
5720
|
* As a consequence, this function may return %NULL if the class
|
|
5550
5721
|
* of the type passed in does not currently exist (hasn't been
|
|
5551
5722
|
* referenced before).
|
|
5552
5723
|
* @param type type ID of a classed type
|
|
5553
5724
|
*/
|
|
5554
|
-
static peek(type: GType): TypeClass;
|
|
5725
|
+
static peek(type: GType): TypeClass | null;
|
|
5555
5726
|
/**
|
|
5556
5727
|
* A more efficient version of g_type_class_peek() which works only for
|
|
5557
5728
|
* static types.
|
|
5558
5729
|
* @param type type ID of a classed type
|
|
5559
5730
|
*/
|
|
5560
|
-
static peek_static(type: GType): TypeClass;
|
|
5731
|
+
static peek_static(type: GType): TypeClass | null;
|
|
5561
5732
|
/**
|
|
5562
5733
|
* Increments the reference count of the class structure belonging to
|
|
5563
|
-
* `type`.
|
|
5564
|
-
*
|
|
5734
|
+
* `type`.
|
|
5735
|
+
*
|
|
5736
|
+
* This function will demand-create the class if it doesn't exist already.
|
|
5565
5737
|
* @param type type ID of a classed type
|
|
5566
5738
|
*/
|
|
5567
5739
|
static ref(type: GType): TypeClass;
|
|
@@ -5638,19 +5810,22 @@ export namespace GObject {
|
|
|
5638
5810
|
add_private(private_size: number): void;
|
|
5639
5811
|
get_private(private_type: GType): any | null;
|
|
5640
5812
|
/**
|
|
5813
|
+
* Retrieves the class structure of the immediate parent type of the
|
|
5814
|
+
* class passed in.
|
|
5815
|
+
*
|
|
5641
5816
|
* This is a convenience function often needed in class initializers.
|
|
5642
|
-
*
|
|
5643
|
-
*
|
|
5644
|
-
*
|
|
5645
|
-
* class will always exist.
|
|
5817
|
+
*
|
|
5818
|
+
* Since derived classes hold a reference on their parent classes as
|
|
5819
|
+
* long as they are instantiated, the returned class will always exist.
|
|
5646
5820
|
*
|
|
5647
5821
|
* This function is essentially equivalent to:
|
|
5648
5822
|
* g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)))
|
|
5649
|
-
* @returns the parent class
|
|
5823
|
+
* @returns the parent class of @g_class
|
|
5650
5824
|
*/
|
|
5651
5825
|
peek_parent(): TypeClass;
|
|
5652
5826
|
/**
|
|
5653
5827
|
* Decrements the reference count of the class structure being passed in.
|
|
5828
|
+
*
|
|
5654
5829
|
* Once the last reference count of a class has been released, classes
|
|
5655
5830
|
* may be finalized by the type system, so further dereferencing of a
|
|
5656
5831
|
* class pointer after g_type_class_unref() are invalid.
|
|
@@ -5767,7 +5942,7 @@ export namespace GObject {
|
|
|
5767
5942
|
* @param instance_class a #GTypeClass structure
|
|
5768
5943
|
* @param iface_type an interface ID which this class conforms to
|
|
5769
5944
|
*/
|
|
5770
|
-
static peek(instance_class: TypeClass, iface_type: GType): TypeInterface;
|
|
5945
|
+
static peek(instance_class: TypeClass, iface_type: GType): TypeInterface | null;
|
|
5771
5946
|
/**
|
|
5772
5947
|
* Returns the prerequisites of an interfaces type.
|
|
5773
5948
|
* @param interface_type an interface type
|
|
@@ -5778,12 +5953,13 @@ export namespace GObject {
|
|
|
5778
5953
|
|
|
5779
5954
|
/**
|
|
5780
5955
|
* Returns the corresponding #GTypeInterface structure of the parent type
|
|
5781
|
-
* of the instance type to which `g_iface` belongs.
|
|
5782
|
-
*
|
|
5783
|
-
*
|
|
5784
|
-
*
|
|
5956
|
+
* of the instance type to which `g_iface` belongs.
|
|
5957
|
+
*
|
|
5958
|
+
* This is useful when deriving the implementation of an interface from the
|
|
5959
|
+
* parent type and then possibly overriding some methods.
|
|
5960
|
+
* @returns the corresponding #GTypeInterface structure of the parent type of the instance type to which @g_iface belongs, or %NULL if the parent type doesn't conform to the interface
|
|
5785
5961
|
*/
|
|
5786
|
-
peek_parent(): TypeInterface;
|
|
5962
|
+
peek_parent(): TypeInterface | null;
|
|
5787
5963
|
}
|
|
5788
5964
|
|
|
5789
5965
|
type TypeModuleClass = typeof TypeModule;
|
|
@@ -5827,6 +6003,15 @@ export namespace GObject {
|
|
|
5827
6003
|
}
|
|
5828
6004
|
|
|
5829
6005
|
/**
|
|
6006
|
+
* - `'i'`: Integers, passed as `collect_values[].v_int`
|
|
6007
|
+
* - `'l'`: Longs, passed as `collect_values[].v_long`
|
|
6008
|
+
* - `'d'`: Doubles, passed as `collect_values[].v_double`
|
|
6009
|
+
* - `'p'`: Pointers, passed as `collect_values[].v_pointer`
|
|
6010
|
+
*
|
|
6011
|
+
* It should be noted that for variable argument list construction,
|
|
6012
|
+
* ANSI C promotes every type smaller than an integer to an int, and
|
|
6013
|
+
* floats to doubles. So for collection of short int or char, `'i'`
|
|
6014
|
+
* needs to be used, and for collection of floats `'d'`.
|
|
5830
6015
|
* The #GTypeValueTable provides the functions required by the #GValue
|
|
5831
6016
|
* implementation, to serve as a container for values of a type.
|
|
5832
6017
|
*/
|
|
@@ -6330,7 +6515,7 @@ export namespace GObject {
|
|
|
6330
6515
|
*/
|
|
6331
6516
|
copy(): ValueArray;
|
|
6332
6517
|
/**
|
|
6333
|
-
* Return a pointer to the value at `index_`
|
|
6518
|
+
* Return a pointer to the value at `index_` contained in `value_array`.
|
|
6334
6519
|
* @param index_ index of the value of interest
|
|
6335
6520
|
* @returns pointer to a value at @index_ in @value_array
|
|
6336
6521
|
*/
|
|
@@ -6473,7 +6658,7 @@ export namespace GObject {
|
|
|
6473
6658
|
_init(...args: any[]): void;
|
|
6474
6659
|
}
|
|
6475
6660
|
|
|
6476
|
-
|
|
6661
|
+
namespace TypePlugin {
|
|
6477
6662
|
// Constructor properties interface
|
|
6478
6663
|
|
|
6479
6664
|
interface ConstructorProps extends Object.ConstructorProps {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gobject-2.0",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.
|
|
3
|
+
"version": "2.83.3-4.0.0-beta.21",
|
|
4
|
+
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.83.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gobject-2.0.js",
|
|
7
7
|
"main": "gobject-2.0.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.0.0-beta.
|
|
35
|
-
"@girs/glib-2.0": "^2.
|
|
34
|
+
"@girs/gjs": "^4.0.0-beta.21",
|
|
35
|
+
"@girs/glib-2.0": "^2.83.3-4.0.0-beta.21"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "*"
|