@girs/gobject-2.0 2.82.4-4.0.0-beta.20 → 2.84.0-4.0.0-beta.23
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 +268 -112
- 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.84.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.23.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/gobject-2.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 GLib from '@girs/glib-2.0';
|
|
12
14
|
|
|
@@ -856,10 +858,10 @@ export namespace GObject {
|
|
|
856
858
|
* generate a my_enum_get_type() function from a usual C enumeration
|
|
857
859
|
* definition than to write one yourself using g_enum_register_static().
|
|
858
860
|
* @param name A nul-terminated string used as the name of the new type.
|
|
859
|
-
* @param const_static_values An array of
|
|
861
|
+
* @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
862
|
* @returns The new type identifier.
|
|
861
863
|
*/
|
|
862
|
-
function enum_register_static(name: string, const_static_values: EnumValue): GType;
|
|
864
|
+
function enum_register_static(name: string, const_static_values: EnumValue[]): GType;
|
|
863
865
|
/**
|
|
864
866
|
* Pretty-prints `value` in the form of the enum’s name.
|
|
865
867
|
*
|
|
@@ -906,10 +908,10 @@ export namespace GObject {
|
|
|
906
908
|
* generate a my_flags_get_type() function from a usual C enumeration
|
|
907
909
|
* definition than to write one yourself using g_flags_register_static().
|
|
908
910
|
* @param name A nul-terminated string used as the name of the new type.
|
|
909
|
-
* @param const_static_values An array of
|
|
911
|
+
* @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
912
|
* @returns The new type identifier.
|
|
911
913
|
*/
|
|
912
|
-
function flags_register_static(name: string, const_static_values: FlagsValue): GType;
|
|
914
|
+
function flags_register_static(name: string, const_static_values: FlagsValue[]): GType;
|
|
913
915
|
/**
|
|
914
916
|
* Pretty-prints `value` in the form of the flag names separated by ` | ` and
|
|
915
917
|
* sorted. Any extra bits will be shown at the end as a hexadecimal number.
|
|
@@ -1491,12 +1493,14 @@ export namespace GObject {
|
|
|
1491
1493
|
* for signals which don't have %G_SIGNAL_NO_HOOKS flag set.
|
|
1492
1494
|
* @param signal_id the signal identifier, as returned by g_signal_lookup().
|
|
1493
1495
|
* @param detail the detail on which to call the hook.
|
|
1496
|
+
* @param hook_func a #GSignalEmissionHook function.
|
|
1494
1497
|
* @param data_destroy a #GDestroyNotify for @hook_data.
|
|
1495
1498
|
* @returns the hook id, for later use with g_signal_remove_emission_hook().
|
|
1496
1499
|
*/
|
|
1497
1500
|
function signal_add_emission_hook(
|
|
1498
1501
|
signal_id: number,
|
|
1499
1502
|
detail: GLib.Quark,
|
|
1503
|
+
hook_func: SignalEmissionHook,
|
|
1500
1504
|
data_destroy?: GLib.DestroyNotify | null,
|
|
1501
1505
|
): number;
|
|
1502
1506
|
/**
|
|
@@ -1513,11 +1517,19 @@ export namespace GObject {
|
|
|
1513
1517
|
*
|
|
1514
1518
|
* If `closure` is a floating reference (see g_closure_sink()), this function
|
|
1515
1519
|
* takes ownership of `closure`.
|
|
1520
|
+
*
|
|
1521
|
+
* This function cannot fail. If the given signal name doesn’t exist,
|
|
1522
|
+
* a critical warning is emitted. No validation is performed on the
|
|
1523
|
+
* ‘detail’ string when specified in `detailed_signal,` other than a
|
|
1524
|
+
* non-empty check.
|
|
1525
|
+
*
|
|
1526
|
+
* Refer to the [signals documentation](signals.html) for more
|
|
1527
|
+
* details.
|
|
1516
1528
|
* @param instance the instance to connect to.
|
|
1517
1529
|
* @param detailed_signal a string of the form "signal-name::detail".
|
|
1518
1530
|
* @param closure the closure to connect.
|
|
1519
1531
|
* @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
|
|
1532
|
+
* @returns the handler ID (always greater than 0)
|
|
1521
1533
|
*/
|
|
1522
1534
|
function signal_connect_closure(
|
|
1523
1535
|
instance: Object,
|
|
@@ -1530,12 +1542,20 @@ export namespace GObject {
|
|
|
1530
1542
|
*
|
|
1531
1543
|
* If `closure` is a floating reference (see g_closure_sink()), this function
|
|
1532
1544
|
* takes ownership of `closure`.
|
|
1545
|
+
*
|
|
1546
|
+
* This function cannot fail. If the given signal name doesn’t exist,
|
|
1547
|
+
* a critical warning is emitted. No validation is performed on the
|
|
1548
|
+
* ‘detail’ string when specified in `detailed_signal,` other than a
|
|
1549
|
+
* non-empty check.
|
|
1550
|
+
*
|
|
1551
|
+
* Refer to the [signals documentation](signals.html) for more
|
|
1552
|
+
* details.
|
|
1533
1553
|
* @param instance the instance to connect to.
|
|
1534
1554
|
* @param signal_id the id of the signal.
|
|
1535
1555
|
* @param detail the detail.
|
|
1536
1556
|
* @param closure the closure to connect.
|
|
1537
1557
|
* @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
|
|
1558
|
+
* @returns the handler ID (always greater than 0)
|
|
1539
1559
|
*/
|
|
1540
1560
|
function signal_connect_closure_by_id(
|
|
1541
1561
|
instance: Object,
|
|
@@ -1634,6 +1654,7 @@ export namespace GObject {
|
|
|
1634
1654
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1635
1655
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1636
1656
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1657
|
+
* @param closure The closure the handlers will invoke.
|
|
1637
1658
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1638
1659
|
* @param data The closure data of the handlers' closures.
|
|
1639
1660
|
* @returns The number of handlers that matched.
|
|
@@ -1643,6 +1664,7 @@ export namespace GObject {
|
|
|
1643
1664
|
mask: SignalMatchType | null,
|
|
1644
1665
|
signal_id: number,
|
|
1645
1666
|
detail: GLib.Quark,
|
|
1667
|
+
closure?: Closure | null,
|
|
1646
1668
|
func?: any | null,
|
|
1647
1669
|
data?: any | null,
|
|
1648
1670
|
): number;
|
|
@@ -1672,6 +1694,7 @@ export namespace GObject {
|
|
|
1672
1694
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1673
1695
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1674
1696
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1697
|
+
* @param closure The closure the handlers will invoke.
|
|
1675
1698
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1676
1699
|
* @param data The closure data of the handlers' closures.
|
|
1677
1700
|
* @returns The number of handlers that matched.
|
|
@@ -1681,6 +1704,7 @@ export namespace GObject {
|
|
|
1681
1704
|
mask: SignalMatchType | null,
|
|
1682
1705
|
signal_id: number,
|
|
1683
1706
|
detail: GLib.Quark,
|
|
1707
|
+
closure?: Closure | null,
|
|
1684
1708
|
func?: any | null,
|
|
1685
1709
|
data?: any | null,
|
|
1686
1710
|
): number;
|
|
@@ -1704,6 +1728,7 @@ export namespace GObject {
|
|
|
1704
1728
|
* @param mask Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
|
|
1705
1729
|
* @param signal_id Signal the handlers have to be connected to.
|
|
1706
1730
|
* @param detail Signal detail the handlers have to be connected to.
|
|
1731
|
+
* @param closure The closure the handlers will invoke.
|
|
1707
1732
|
* @param func The C closure callback of the handlers (useless for non-C closures).
|
|
1708
1733
|
* @param data The closure data of the handlers' closures.
|
|
1709
1734
|
* @returns The number of handlers that matched.
|
|
@@ -1713,6 +1738,7 @@ export namespace GObject {
|
|
|
1713
1738
|
mask: SignalMatchType | null,
|
|
1714
1739
|
signal_id: number,
|
|
1715
1740
|
detail: GLib.Quark,
|
|
1741
|
+
closure?: Closure | null,
|
|
1716
1742
|
func?: any | null,
|
|
1717
1743
|
data?: any | null,
|
|
1718
1744
|
): number;
|
|
@@ -1749,9 +1775,8 @@ export namespace GObject {
|
|
|
1749
1775
|
* Validate a signal name. This can be useful for dynamically-generated signals
|
|
1750
1776
|
* which need to be validated at run-time before actually trying to create them.
|
|
1751
1777
|
*
|
|
1752
|
-
* See [
|
|
1753
|
-
*
|
|
1754
|
-
* for property names.
|
|
1778
|
+
* See [func`GObject`.signal_new] for details of the rules for valid names.
|
|
1779
|
+
* The rules for signal names are the same as those for property names.
|
|
1755
1780
|
* @param name the canonical name of the signal
|
|
1756
1781
|
* @returns %TRUE if @name is a valid signal name, %FALSE otherwise.
|
|
1757
1782
|
*/
|
|
@@ -1789,31 +1814,6 @@ export namespace GObject {
|
|
|
1789
1814
|
* @returns the signal name, or %NULL if the signal number was invalid.
|
|
1790
1815
|
*/
|
|
1791
1816
|
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
1817
|
/**
|
|
1818
1818
|
* Overrides the class closure (i.e. the default handler) for the given signal
|
|
1819
1819
|
* for emissions on instances of `instance_type`. `instance_type` must be derived
|
|
@@ -1870,20 +1870,6 @@ export namespace GObject {
|
|
|
1870
1870
|
* @param hook_id the id of the emission hook, as returned by g_signal_add_emission_hook()
|
|
1871
1871
|
*/
|
|
1872
1872
|
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
1873
|
/**
|
|
1888
1874
|
* Stops a signal's current emission.
|
|
1889
1875
|
*
|
|
@@ -2004,35 +1990,68 @@ export namespace GObject {
|
|
|
2004
1990
|
function type_children(type: GType): GType[];
|
|
2005
1991
|
function type_class_adjust_private_offset(g_class: any | null, private_size_or_offset: number): void;
|
|
2006
1992
|
/**
|
|
2007
|
-
*
|
|
2008
|
-
*
|
|
1993
|
+
* Retrieves the type class of the given `type`.
|
|
1994
|
+
*
|
|
1995
|
+
* This function will create the class on demand if it does not exist
|
|
1996
|
+
* already.
|
|
1997
|
+
*
|
|
1998
|
+
* If you don't want to create the class, use g_type_class_peek() instead.
|
|
1999
|
+
* @param type type ID of a classed type
|
|
2000
|
+
* @returns the class structure for the type
|
|
2001
|
+
*/
|
|
2002
|
+
function type_class_get(type: GType): TypeClass;
|
|
2003
|
+
/**
|
|
2004
|
+
* Retrieves the class for a give type.
|
|
2005
|
+
*
|
|
2006
|
+
* This function is essentially the same as g_type_class_get(),
|
|
2007
|
+
* except that the class may have not been instantiated yet.
|
|
2008
|
+
*
|
|
2009
2009
|
* As a consequence, this function may return %NULL if the class
|
|
2010
2010
|
* of the type passed in does not currently exist (hasn't been
|
|
2011
2011
|
* referenced before).
|
|
2012
2012
|
* @param type type ID of a classed type
|
|
2013
|
-
* @returns the
|
|
2013
|
+
* @returns the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist
|
|
2014
2014
|
*/
|
|
2015
|
-
function type_class_peek(type: GType): TypeClass;
|
|
2015
|
+
function type_class_peek(type: GType): TypeClass | null;
|
|
2016
2016
|
/**
|
|
2017
2017
|
* A more efficient version of g_type_class_peek() which works only for
|
|
2018
2018
|
* static types.
|
|
2019
2019
|
* @param type type ID of a classed type
|
|
2020
|
-
* @returns the
|
|
2020
|
+
* @returns the #GTypeClass structure for the given type ID or %NULL if the class does not currently exist or is dynamically loaded
|
|
2021
2021
|
*/
|
|
2022
|
-
function type_class_peek_static(type: GType): TypeClass;
|
|
2022
|
+
function type_class_peek_static(type: GType): TypeClass | null;
|
|
2023
2023
|
/**
|
|
2024
2024
|
* Increments the reference count of the class structure belonging to
|
|
2025
|
-
* `type`.
|
|
2026
|
-
*
|
|
2025
|
+
* `type`.
|
|
2026
|
+
*
|
|
2027
|
+
* This function will demand-create the class if it doesn't exist already.
|
|
2027
2028
|
* @param type type ID of a classed type
|
|
2028
|
-
* @returns the #GTypeClass
|
|
2029
|
+
* @returns the #GTypeClass structure for the given type ID
|
|
2029
2030
|
*/
|
|
2030
2031
|
function type_class_ref(type: GType): TypeClass;
|
|
2032
|
+
/**
|
|
2033
|
+
* Returns the default interface vtable for the given `g_type`.
|
|
2034
|
+
*
|
|
2035
|
+
* If the type is not currently in use, then the default vtable
|
|
2036
|
+
* for the type will be created and initialized by calling
|
|
2037
|
+
* the base interface init and default vtable init functions for
|
|
2038
|
+
* the type (the `base_init` and `class_init` members of #GTypeInfo).
|
|
2039
|
+
*
|
|
2040
|
+
* If you don't want to create the interface vtable, you should use
|
|
2041
|
+
* g_type_default_interface_peek() instead.
|
|
2042
|
+
*
|
|
2043
|
+
* Calling g_type_default_interface_get() is useful when you
|
|
2044
|
+
* want to make sure that signals and properties for an interface
|
|
2045
|
+
* have been installed.
|
|
2046
|
+
* @param g_type an interface type
|
|
2047
|
+
* @returns the default vtable for the interface.
|
|
2048
|
+
*/
|
|
2049
|
+
function type_default_interface_get(g_type: GType): TypeInterface;
|
|
2031
2050
|
/**
|
|
2032
2051
|
* If the interface type `g_type` is currently in use, returns its
|
|
2033
2052
|
* default interface vtable.
|
|
2034
2053
|
* @param g_type an interface type
|
|
2035
|
-
* @returns the default
|
|
2054
|
+
* @returns the default vtable for the interface, or %NULL if the type is not currently in use
|
|
2036
2055
|
*/
|
|
2037
2056
|
function type_default_interface_peek(g_type: GType): TypeInterface;
|
|
2038
2057
|
/**
|
|
@@ -2047,15 +2066,16 @@ export namespace GObject {
|
|
|
2047
2066
|
* want to make sure that signals and properties for an interface
|
|
2048
2067
|
* have been installed.
|
|
2049
2068
|
* @param g_type an interface type
|
|
2050
|
-
* @returns the default
|
|
2069
|
+
* @returns the default vtable for the interface; call g_type_default_interface_unref() when you are done using the interface.
|
|
2051
2070
|
*/
|
|
2052
2071
|
function type_default_interface_ref(g_type: GType): TypeInterface;
|
|
2053
2072
|
/**
|
|
2054
2073
|
* Decrements the reference count for the type corresponding to the
|
|
2055
|
-
* interface default vtable `g_iface`.
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
2058
|
-
*
|
|
2074
|
+
* interface default vtable `g_iface`.
|
|
2075
|
+
*
|
|
2076
|
+
* If the type is dynamic, then when no one is using the interface and all
|
|
2077
|
+
* references have been released, the finalize function for the interface's
|
|
2078
|
+
* default vtable (the `class_finalize` member of #GTypeInfo) will be called.
|
|
2059
2079
|
* @param g_iface the default vtable structure for an interface, as returned by g_type_default_interface_ref()
|
|
2060
2080
|
*/
|
|
2061
2081
|
function type_default_interface_unref(g_iface: TypeInterface): void;
|
|
@@ -2203,9 +2223,9 @@ export namespace GObject {
|
|
|
2203
2223
|
* passed in class conforms.
|
|
2204
2224
|
* @param instance_class a #GTypeClass structure
|
|
2205
2225
|
* @param iface_type an interface ID which this class conforms to
|
|
2206
|
-
* @returns the #GTypeInterface
|
|
2226
|
+
* @returns the #GTypeInterface structure of @iface_type if implemented by @instance_class, %NULL otherwise
|
|
2207
2227
|
*/
|
|
2208
|
-
function type_interface_peek(instance_class: TypeClass, iface_type: GType): TypeInterface;
|
|
2228
|
+
function type_interface_peek(instance_class: TypeClass, iface_type: GType): TypeInterface | null;
|
|
2209
2229
|
/**
|
|
2210
2230
|
* Returns the prerequisites of an interfaces type.
|
|
2211
2231
|
* @param interface_type an interface type
|
|
@@ -2229,11 +2249,12 @@ export namespace GObject {
|
|
|
2229
2249
|
*/
|
|
2230
2250
|
function type_is_a(type: GType, is_a_type: GType): boolean;
|
|
2231
2251
|
/**
|
|
2232
|
-
* Get the unique name that is assigned to a type ID.
|
|
2233
|
-
*
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2236
|
-
*
|
|
2252
|
+
* Get the unique name that is assigned to a type ID.
|
|
2253
|
+
*
|
|
2254
|
+
* Note that this function (like all other GType API) cannot cope with
|
|
2255
|
+
* invalid type IDs. %G_TYPE_INVALID may be passed to this function, as
|
|
2256
|
+
* may be any other validly registered type ID, but randomized type IDs
|
|
2257
|
+
* should not be passed in and will most likely lead to a crash.
|
|
2237
2258
|
* @param type type to return name for
|
|
2238
2259
|
* @returns static type name or %NULL
|
|
2239
2260
|
*/
|
|
@@ -2628,11 +2649,13 @@ export namespace GObject {
|
|
|
2628
2649
|
*/
|
|
2629
2650
|
READWRITE,
|
|
2630
2651
|
/**
|
|
2631
|
-
* the parameter will be set upon object construction
|
|
2652
|
+
* the parameter will be set upon object construction.
|
|
2653
|
+
* See [vfunc`Object`.constructed] for more details
|
|
2632
2654
|
*/
|
|
2633
2655
|
CONSTRUCT,
|
|
2634
2656
|
/**
|
|
2635
|
-
* the parameter can only be set upon object construction
|
|
2657
|
+
* the parameter can only be set upon object construction.
|
|
2658
|
+
* See [vfunc`Object`.constructed] for more details
|
|
2636
2659
|
*/
|
|
2637
2660
|
CONSTRUCT_ONLY,
|
|
2638
2661
|
/**
|
|
@@ -2729,20 +2752,23 @@ export namespace GObject {
|
|
|
2729
2752
|
*/
|
|
2730
2753
|
NO_HOOKS,
|
|
2731
2754
|
/**
|
|
2732
|
-
* Varargs signal emission will always collect the
|
|
2733
|
-
*
|
|
2755
|
+
* Varargs signal emission will always collect the arguments, even if there
|
|
2756
|
+
* are no signal handlers connected.
|
|
2734
2757
|
*/
|
|
2735
2758
|
MUST_COLLECT,
|
|
2736
2759
|
/**
|
|
2737
|
-
* The signal is deprecated and will be removed
|
|
2738
|
-
*
|
|
2739
|
-
*
|
|
2760
|
+
* The signal is deprecated and will be removed in a future version.
|
|
2761
|
+
*
|
|
2762
|
+
* A warning will be generated if it is connected while running with
|
|
2763
|
+
* `G_ENABLE_DIAGNOSTIC=1`.
|
|
2740
2764
|
*/
|
|
2741
2765
|
DEPRECATED,
|
|
2742
2766
|
/**
|
|
2743
|
-
*
|
|
2744
|
-
*
|
|
2745
|
-
*
|
|
2767
|
+
* The signal accumulator was invoked for the first time.
|
|
2768
|
+
*
|
|
2769
|
+
* This flag is only used in [callback`GObject`.SignalAccumulator][accumulator functions]
|
|
2770
|
+
* for the `run_type` field of the [struct`GObject`.SignalInvocationHint], to
|
|
2771
|
+
* mark the first call to the accumulator function for a signal emission.
|
|
2746
2772
|
*/
|
|
2747
2773
|
ACCUMULATOR_FIRST_RUN,
|
|
2748
2774
|
}
|
|
@@ -3573,7 +3599,21 @@ export namespace GObject {
|
|
|
3573
3599
|
* @returns the data if found, or %NULL if no such data exists.
|
|
3574
3600
|
*/
|
|
3575
3601
|
get_data(key: string): any | null;
|
|
3576
|
-
|
|
3602
|
+
/**
|
|
3603
|
+
* Gets a property of an object.
|
|
3604
|
+
*
|
|
3605
|
+
* The value can be:
|
|
3606
|
+
* - 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)
|
|
3607
|
+
* - a GObject.Value initialized with the expected type of the property
|
|
3608
|
+
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
|
|
3609
|
+
*
|
|
3610
|
+
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
|
|
3611
|
+
*
|
|
3612
|
+
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
|
|
3613
|
+
* @param property_name The name of the property to get
|
|
3614
|
+
* @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
|
|
3615
|
+
*/
|
|
3616
|
+
get_property(property_name: string, value: Value | any): any;
|
|
3577
3617
|
/**
|
|
3578
3618
|
* This function gets back user data pointers stored via
|
|
3579
3619
|
* g_object_set_qdata().
|
|
@@ -3701,7 +3741,12 @@ export namespace GObject {
|
|
|
3701
3741
|
* @param data data to associate with that key
|
|
3702
3742
|
*/
|
|
3703
3743
|
set_data(key: string, data?: any | null): void;
|
|
3704
|
-
|
|
3744
|
+
/**
|
|
3745
|
+
* Sets a property on an object.
|
|
3746
|
+
* @param property_name The name of the property to set
|
|
3747
|
+
* @param value The value to set the property to
|
|
3748
|
+
*/
|
|
3749
|
+
set_property(property_name: string, value: Value | any): void;
|
|
3705
3750
|
/**
|
|
3706
3751
|
* Remove a specified datum from the object's data associations,
|
|
3707
3752
|
* without invoking the association's destroy handler.
|
|
@@ -3786,11 +3831,31 @@ export namespace GObject {
|
|
|
3786
3831
|
* @param closure #GClosure to watch
|
|
3787
3832
|
*/
|
|
3788
3833
|
watch_closure(closure: Closure): void;
|
|
3834
|
+
/**
|
|
3835
|
+
* 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.
|
|
3836
|
+
* @param id Handler ID of the handler to be disconnected
|
|
3837
|
+
*/
|
|
3789
3838
|
disconnect(id: number): void;
|
|
3839
|
+
/**
|
|
3840
|
+
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
|
|
3841
|
+
* @param properties Object containing the properties to set
|
|
3842
|
+
*/
|
|
3790
3843
|
set(properties: { [key: string]: any }): void;
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3844
|
+
/**
|
|
3845
|
+
* Blocks a handler of an instance so it will not be called during any signal emissions
|
|
3846
|
+
* @param id Handler ID of the handler to be blocked
|
|
3847
|
+
*/
|
|
3848
|
+
block_signal_handler(id: number): void;
|
|
3849
|
+
/**
|
|
3850
|
+
* Unblocks a handler so it will be called again during any signal emissions
|
|
3851
|
+
* @param id Handler ID of the handler to be unblocked
|
|
3852
|
+
*/
|
|
3853
|
+
unblock_signal_handler(id: number): void;
|
|
3854
|
+
/**
|
|
3855
|
+
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
|
|
3856
|
+
* @param detailedName Name of the signal to stop emission of
|
|
3857
|
+
*/
|
|
3858
|
+
stop_emission_by_name(detailedName: string): void;
|
|
3794
3859
|
}
|
|
3795
3860
|
|
|
3796
3861
|
/**
|
|
@@ -3818,8 +3883,8 @@ export namespace GObject {
|
|
|
3818
3883
|
* dynamically-generated properties which need to be validated at run-time
|
|
3819
3884
|
* before actually trying to create them.
|
|
3820
3885
|
*
|
|
3821
|
-
* See [canonical parameter names][
|
|
3822
|
-
* the rules for valid names.
|
|
3886
|
+
* See [canonical parameter names][class`GObject`.ParamSpec#parameter-names]
|
|
3887
|
+
* for details of the rules for valid names.
|
|
3823
3888
|
* @param name the canonical name of the property
|
|
3824
3889
|
*/
|
|
3825
3890
|
static is_valid_name(name: string): boolean;
|
|
@@ -4075,11 +4140,19 @@ export namespace GObject {
|
|
|
4075
4140
|
flags: ParamFlags | number,
|
|
4076
4141
|
boxedType: GType<T> | { $gtype: GType<T> },
|
|
4077
4142
|
): ParamSpec<T>;
|
|
4143
|
+
/**
|
|
4144
|
+
* Creates a new GParamSpecObject instance specifying a property holding object references.
|
|
4145
|
+
* @param name The name of the property
|
|
4146
|
+
* @param nick A human readable name for the property (can be null)
|
|
4147
|
+
* @param blurb A longer description of the property (can be null)
|
|
4148
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4149
|
+
* @param objectType The GType of the object
|
|
4150
|
+
*/
|
|
4078
4151
|
static object<T>(
|
|
4079
4152
|
name: string,
|
|
4080
4153
|
nick: string | null,
|
|
4081
4154
|
blurb: string | null,
|
|
4082
|
-
flags:
|
|
4155
|
+
flags: ParamFlags | number,
|
|
4083
4156
|
objectType: GType<T> | { $gtype: GType<T> },
|
|
4084
4157
|
): ParamSpec<T>;
|
|
4085
4158
|
/**
|
|
@@ -4097,7 +4170,19 @@ export namespace GObject {
|
|
|
4097
4170
|
flags: ParamFlags | number,
|
|
4098
4171
|
paramType: any,
|
|
4099
4172
|
): ParamSpec;
|
|
4100
|
-
|
|
4173
|
+
/**
|
|
4174
|
+
* Creates a new ParamSpec instance for JavaScript object properties.
|
|
4175
|
+
* @param name The name of the property
|
|
4176
|
+
* @param nick A human readable name for the property (can be null)
|
|
4177
|
+
* @param blurb A longer description of the property (can be null)
|
|
4178
|
+
* @param flags The flags for this property (e.g. READABLE, WRITABLE)
|
|
4179
|
+
*/
|
|
4180
|
+
static jsobject<T>(
|
|
4181
|
+
name: string,
|
|
4182
|
+
nick: string | null,
|
|
4183
|
+
blurb: string | null,
|
|
4184
|
+
flags: ParamFlags | number,
|
|
4185
|
+
): ParamSpec<T>;
|
|
4101
4186
|
|
|
4102
4187
|
// Virtual methods
|
|
4103
4188
|
|
|
@@ -4214,6 +4299,11 @@ export namespace GObject {
|
|
|
4214
4299
|
* @returns the user data pointer set, or %NULL
|
|
4215
4300
|
*/
|
|
4216
4301
|
steal_qdata(quark: GLib.Quark): any | null;
|
|
4302
|
+
/**
|
|
4303
|
+
* Registers a property override for a property introduced in a parent class or inherited interface.
|
|
4304
|
+
* @param name The name of the property to override
|
|
4305
|
+
* @param oclass The object class or type that contains the property to override
|
|
4306
|
+
*/
|
|
4217
4307
|
override(name: string, oclass: Object | Function | GType): void;
|
|
4218
4308
|
}
|
|
4219
4309
|
|
|
@@ -4666,7 +4756,21 @@ export namespace GObject {
|
|
|
4666
4756
|
* @returns the data if found, or %NULL if no such data exists.
|
|
4667
4757
|
*/
|
|
4668
4758
|
get_data(key: string): any | null;
|
|
4669
|
-
|
|
4759
|
+
/**
|
|
4760
|
+
* Gets a property of an object.
|
|
4761
|
+
*
|
|
4762
|
+
* The value can be:
|
|
4763
|
+
* - 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)
|
|
4764
|
+
* - a GObject.Value initialized with the expected type of the property
|
|
4765
|
+
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
|
|
4766
|
+
*
|
|
4767
|
+
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
|
|
4768
|
+
*
|
|
4769
|
+
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
|
|
4770
|
+
* @param property_name The name of the property to get
|
|
4771
|
+
* @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
|
|
4772
|
+
*/
|
|
4773
|
+
get_property(property_name: string, value: Value | any): any;
|
|
4670
4774
|
/**
|
|
4671
4775
|
* This function gets back user data pointers stored via
|
|
4672
4776
|
* g_object_set_qdata().
|
|
@@ -4794,7 +4898,12 @@ export namespace GObject {
|
|
|
4794
4898
|
* @param data data to associate with that key
|
|
4795
4899
|
*/
|
|
4796
4900
|
set_data(key: string, data?: any | null): void;
|
|
4797
|
-
|
|
4901
|
+
/**
|
|
4902
|
+
* Sets a property on an object.
|
|
4903
|
+
* @param property_name The name of the property to set
|
|
4904
|
+
* @param value The value to set the property to
|
|
4905
|
+
*/
|
|
4906
|
+
set_property(property_name: string, value: Value | any): void;
|
|
4798
4907
|
/**
|
|
4799
4908
|
* Remove a specified datum from the object's data associations,
|
|
4800
4909
|
* without invoking the association's destroy handler.
|
|
@@ -4944,11 +5053,31 @@ export namespace GObject {
|
|
|
4944
5053
|
* @param pspec
|
|
4945
5054
|
*/
|
|
4946
5055
|
vfunc_set_property(property_id: number, value: Value | any, pspec: ParamSpec): void;
|
|
5056
|
+
/**
|
|
5057
|
+
* 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.
|
|
5058
|
+
* @param id Handler ID of the handler to be disconnected
|
|
5059
|
+
*/
|
|
4947
5060
|
disconnect(id: number): void;
|
|
5061
|
+
/**
|
|
5062
|
+
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
|
|
5063
|
+
* @param properties Object containing the properties to set
|
|
5064
|
+
*/
|
|
4948
5065
|
set(properties: { [key: string]: any }): void;
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
5066
|
+
/**
|
|
5067
|
+
* Blocks a handler of an instance so it will not be called during any signal emissions
|
|
5068
|
+
* @param id Handler ID of the handler to be blocked
|
|
5069
|
+
*/
|
|
5070
|
+
block_signal_handler(id: number): void;
|
|
5071
|
+
/**
|
|
5072
|
+
* Unblocks a handler so it will be called again during any signal emissions
|
|
5073
|
+
* @param id Handler ID of the handler to be unblocked
|
|
5074
|
+
*/
|
|
5075
|
+
unblock_signal_handler(id: number): void;
|
|
5076
|
+
/**
|
|
5077
|
+
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
|
|
5078
|
+
* @param detailedName Name of the signal to stop emission of
|
|
5079
|
+
*/
|
|
5080
|
+
stop_emission_by_name(detailedName: string): void;
|
|
4952
5081
|
}
|
|
4953
5082
|
|
|
4954
5083
|
/**
|
|
@@ -5681,24 +5810,38 @@ export namespace GObject {
|
|
|
5681
5810
|
|
|
5682
5811
|
static adjust_private_offset(g_class: any | null, private_size_or_offset: number): void;
|
|
5683
5812
|
/**
|
|
5684
|
-
*
|
|
5685
|
-
*
|
|
5813
|
+
* Retrieves the type class of the given `type`.
|
|
5814
|
+
*
|
|
5815
|
+
* This function will create the class on demand if it does not exist
|
|
5816
|
+
* already.
|
|
5817
|
+
*
|
|
5818
|
+
* If you don't want to create the class, use g_type_class_peek() instead.
|
|
5819
|
+
* @param type type ID of a classed type
|
|
5820
|
+
*/
|
|
5821
|
+
static get(type: GType): TypeClass;
|
|
5822
|
+
/**
|
|
5823
|
+
* Retrieves the class for a give type.
|
|
5824
|
+
*
|
|
5825
|
+
* This function is essentially the same as g_type_class_get(),
|
|
5826
|
+
* except that the class may have not been instantiated yet.
|
|
5827
|
+
*
|
|
5686
5828
|
* As a consequence, this function may return %NULL if the class
|
|
5687
5829
|
* of the type passed in does not currently exist (hasn't been
|
|
5688
5830
|
* referenced before).
|
|
5689
5831
|
* @param type type ID of a classed type
|
|
5690
5832
|
*/
|
|
5691
|
-
static peek(type: GType): TypeClass;
|
|
5833
|
+
static peek(type: GType): TypeClass | null;
|
|
5692
5834
|
/**
|
|
5693
5835
|
* A more efficient version of g_type_class_peek() which works only for
|
|
5694
5836
|
* static types.
|
|
5695
5837
|
* @param type type ID of a classed type
|
|
5696
5838
|
*/
|
|
5697
|
-
static peek_static(type: GType): TypeClass;
|
|
5839
|
+
static peek_static(type: GType): TypeClass | null;
|
|
5698
5840
|
/**
|
|
5699
5841
|
* Increments the reference count of the class structure belonging to
|
|
5700
|
-
* `type`.
|
|
5701
|
-
*
|
|
5842
|
+
* `type`.
|
|
5843
|
+
*
|
|
5844
|
+
* This function will demand-create the class if it doesn't exist already.
|
|
5702
5845
|
* @param type type ID of a classed type
|
|
5703
5846
|
*/
|
|
5704
5847
|
static ref(type: GType): TypeClass;
|
|
@@ -5775,19 +5918,22 @@ export namespace GObject {
|
|
|
5775
5918
|
add_private(private_size: number): void;
|
|
5776
5919
|
get_private(private_type: GType): any | null;
|
|
5777
5920
|
/**
|
|
5921
|
+
* Retrieves the class structure of the immediate parent type of the
|
|
5922
|
+
* class passed in.
|
|
5923
|
+
*
|
|
5778
5924
|
* This is a convenience function often needed in class initializers.
|
|
5779
|
-
*
|
|
5780
|
-
*
|
|
5781
|
-
*
|
|
5782
|
-
* class will always exist.
|
|
5925
|
+
*
|
|
5926
|
+
* Since derived classes hold a reference on their parent classes as
|
|
5927
|
+
* long as they are instantiated, the returned class will always exist.
|
|
5783
5928
|
*
|
|
5784
5929
|
* This function is essentially equivalent to:
|
|
5785
5930
|
* g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)))
|
|
5786
|
-
* @returns the parent class
|
|
5931
|
+
* @returns the parent class of @g_class
|
|
5787
5932
|
*/
|
|
5788
5933
|
peek_parent(): TypeClass;
|
|
5789
5934
|
/**
|
|
5790
5935
|
* Decrements the reference count of the class structure being passed in.
|
|
5936
|
+
*
|
|
5791
5937
|
* Once the last reference count of a class has been released, classes
|
|
5792
5938
|
* may be finalized by the type system, so further dereferencing of a
|
|
5793
5939
|
* class pointer after g_type_class_unref() are invalid.
|
|
@@ -5904,7 +6050,7 @@ export namespace GObject {
|
|
|
5904
6050
|
* @param instance_class a #GTypeClass structure
|
|
5905
6051
|
* @param iface_type an interface ID which this class conforms to
|
|
5906
6052
|
*/
|
|
5907
|
-
static peek(instance_class: TypeClass, iface_type: GType): TypeInterface;
|
|
6053
|
+
static peek(instance_class: TypeClass, iface_type: GType): TypeInterface | null;
|
|
5908
6054
|
/**
|
|
5909
6055
|
* Returns the prerequisites of an interfaces type.
|
|
5910
6056
|
* @param interface_type an interface type
|
|
@@ -5915,12 +6061,13 @@ export namespace GObject {
|
|
|
5915
6061
|
|
|
5916
6062
|
/**
|
|
5917
6063
|
* Returns the corresponding #GTypeInterface structure of the parent type
|
|
5918
|
-
* of the instance type to which `g_iface` belongs.
|
|
5919
|
-
*
|
|
5920
|
-
*
|
|
5921
|
-
*
|
|
6064
|
+
* of the instance type to which `g_iface` belongs.
|
|
6065
|
+
*
|
|
6066
|
+
* This is useful when deriving the implementation of an interface from the
|
|
6067
|
+
* parent type and then possibly overriding some methods.
|
|
6068
|
+
* @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
|
|
5922
6069
|
*/
|
|
5923
|
-
peek_parent(): TypeInterface;
|
|
6070
|
+
peek_parent(): TypeInterface | null;
|
|
5924
6071
|
}
|
|
5925
6072
|
|
|
5926
6073
|
type TypeModuleClass = typeof TypeModule;
|
|
@@ -5964,6 +6111,15 @@ export namespace GObject {
|
|
|
5964
6111
|
}
|
|
5965
6112
|
|
|
5966
6113
|
/**
|
|
6114
|
+
* - `'i'`: Integers, passed as `collect_values[].v_int`
|
|
6115
|
+
* - `'l'`: Longs, passed as `collect_values[].v_long`
|
|
6116
|
+
* - `'d'`: Doubles, passed as `collect_values[].v_double`
|
|
6117
|
+
* - `'p'`: Pointers, passed as `collect_values[].v_pointer`
|
|
6118
|
+
*
|
|
6119
|
+
* It should be noted that for variable argument list construction,
|
|
6120
|
+
* ANSI C promotes every type smaller than an integer to an int, and
|
|
6121
|
+
* floats to doubles. So for collection of short int or char, `'i'`
|
|
6122
|
+
* needs to be used, and for collection of floats `'d'`.
|
|
5967
6123
|
* The #GTypeValueTable provides the functions required by the #GValue
|
|
5968
6124
|
* implementation, to serve as a container for values of a type.
|
|
5969
6125
|
*/
|
|
@@ -6467,7 +6623,7 @@ export namespace GObject {
|
|
|
6467
6623
|
*/
|
|
6468
6624
|
copy(): ValueArray;
|
|
6469
6625
|
/**
|
|
6470
|
-
* Return a pointer to the value at `index_`
|
|
6626
|
+
* Return a pointer to the value at `index_` contained in `value_array`.
|
|
6471
6627
|
* @param index_ index of the value of interest
|
|
6472
6628
|
* @returns pointer to a value at @index_ in @value_array
|
|
6473
6629
|
*/
|
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.84.0-4.0.0-beta.23",
|
|
4
|
+
"description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.84.0",
|
|
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.23",
|
|
35
|
+
"@girs/glib-2.0": "^2.84.0-4.0.0-beta.23"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "*"
|