Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

GType<T>: { name: string; __type__: any }

Type Parameters

  • T = unknown

Type declaration

  • name: string
  • __type__:function
    • __type__(arg: never): T
SignalCMarshaller: ClosureMarshal
SignalCVaMarshaller: any
TClosure<R, P>: ((...args: P[]) => R)

Type Parameters

  • R = any

  • P = any

Type declaration

    • (...args: P[]): R
    • Parameters

      • Rest ...args: P[]

      Returns R

Variables

PARAM_MASK: number

Mask containing the bits of #GParamSpec.flags which are reserved for GLib.

PARAM_STATIC_STRINGS: number

#GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.

Since 2.13.0

PARAM_USER_SHIFT: number

Minimum shift count to be used for user defined flags, to be stored in #GParamSpec.flags. The maximum allowed is 10.

SIGNAL_FLAGS_MASK: number

A mask for all #GSignalFlags bits.

SIGNAL_MATCH_MASK: number

A mask for all #GSignalMatchType bits.

TYPE_BOOLEAN: GType<boolean>
TYPE_BOXED: GType<unknown>
TYPE_CHAR: GType<string>
TYPE_DOUBLE: GType<number>
TYPE_ENUM: GType<number>
TYPE_FLAGS: GType<number>
TYPE_FLAG_RESERVED_ID_BIT: GLib.Type

A bit in the type number that's supposed to be left untouched.

TYPE_FLOAT: GType<number>
TYPE_FUNDAMENTAL_MAX: number

An integer constant that represents the number of identifiers reserved for types that are assigned at compile-time.

TYPE_FUNDAMENTAL_SHIFT: number

Shift value used in converting numbers to type IDs.

TYPE_GTYPE: GType<unknown>
TYPE_INT: GType<number>
TYPE_INT64: GType<number>
TYPE_INTERFACE: GType<unknown>
TYPE_INVALID: 0n
TYPE_LONG: GType<number>
TYPE_NONE: GType<undefined>
TYPE_OBJECT: GType<object>
TYPE_PARAM: GType<unknown>
TYPE_POINTER: GType<undefined>
TYPE_RESERVED_BSE_FIRST: number

First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.

TYPE_RESERVED_BSE_LAST: number

Last fundamental type number reserved for BSE.

TYPE_RESERVED_GLIB_FIRST: number

First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.

TYPE_RESERVED_GLIB_LAST: number

Last fundamental type number reserved for GLib.

TYPE_RESERVED_USER_FIRST: number

First available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL().

TYPE_STRING: GType<string>
TYPE_UCHAR: GType<string>
TYPE_UINT: GType<number>
TYPE_UINT64: GType<number>
TYPE_ULONG: GType<number>
TYPE_UNICHAR: GType<number>
TYPE_VARIANT: GType<unknown>
VALUE_INTERNED_STRING: number

For string values, indicates that the string contained is canonical and will exist for the duration of the process. See g_value_set_interned_string().

VALUE_NOCOPY_CONTENTS: number

If passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. This does not affect usage of g_value_copy(), the data will be copied if it is not ref-counted.

Functions

  • boxedCopy(boxedType: GType<unknown>, srcBoxed: object): object
  • Provide a copy of a boxed structure src_boxed which is of type boxed_type.

    Parameters

    • boxedType: GType<unknown>

      The type of src_boxed.

    • srcBoxed: object

      The boxed structure to be copied.

    Returns object

  • boxedFree(boxedType: GType<unknown>, boxed: object): void
  • Free the boxed structure boxed which is of type boxed_type.

    Parameters

    • boxedType: GType<unknown>

      The type of boxed.

    • boxed: object

      The boxed structure to be freed.

    Returns void

  • cclosureMarshalBOOLEANBOXEDBOXED(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A #GClosureMarshal function for use with signals with handlers that take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled().

    Parameters

    • closure: TClosure<any, any>

      A #GClosure.

    • returnValue: any

      A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.

    • nParamValues: number

      The length of the param_values array.

    • paramValues: any

      An array of #GValues holding the arguments on which to invoke the callback of closure.

    • invocationHint: object

      The invocation hint given as the last argument to g_closure_invoke().

    • marshalData: object

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • cclosureMarshalBOOLEANFLAGS(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data) where the #gint parameter denotes a flags type.

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      a #GValue which can store the returned #gboolean

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding instance and arg1

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalGeneric(closure: TClosure<any, any>, returnGvalue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A generic marshaller function implemented via libffi.

    Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a %NULL marshaller.

    Parameters

    • closure: TClosure<any, any>

      A #GClosure.

    • returnGvalue: any

      A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.

    • nParamValues: number

      The length of the param_values array.

    • paramValues: any

      An array of #GValues holding the arguments on which to invoke the callback of closure.

    • invocationHint: object

      The invocation hint given as the last argument to g_closure_invoke().

    • marshalData: object

      Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()

    Returns void

  • cclosureMarshalSTRINGOBJECTPOINTER(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      a #GValue, which can store the returned string

    • nParamValues: number

      3

    • paramValues: any

      a #GValue array holding instance, arg1 and arg2

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDBOOLEAN(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gboolean parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDBOXED(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #GBoxed* parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDCHAR(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gchar arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gchar parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDDOUBLE(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gdouble parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDENUM(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the #gint parameter denotes an enumeration type..

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the enumeration parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDFLAGS(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the #gint parameter denotes a flags type.

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the flags parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDFLOAT(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gfloat parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDINT(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gint parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDLONG(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, glong arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #glong parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDOBJECT(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #GObject* parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDPARAM(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #GParamSpec* parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDPOINTER(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gpointer parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDSTRING(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gchar* parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDUCHAR(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, guchar arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #guchar parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDUINT(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #guint parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDUINTPOINTER(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      3

    • paramValues: any

      a #GValue array holding instance, arg1 and arg2

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDULONG(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gulong arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #gulong parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDVARIANT(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      2

    • paramValues: any

      a #GValue array holding the instance and the #GVariant* parameter

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • cclosureMarshalVOIDVOID(closure: TClosure<any, any>, returnValue: any, nParamValues: number, paramValues: any, invocationHint: object, marshalData: object): void
  • A marshaller for a #GCClosure with a callback of type void (*callback) (gpointer instance, gpointer user_data).

    Parameters

    • closure: TClosure<any, any>

      the #GClosure to which the marshaller belongs

    • returnValue: any

      ignored

    • nParamValues: number

      1

    • paramValues: any

      a #GValue array holding only the instance

    • invocationHint: object

      the invocation hint given as the last argument to g_closure_invoke()

    • marshalData: object

      additional data specified when registering the marshaller

    Returns void

  • clearSignalHandler(handlerIdPtr: number, instance: GObject.Object): void
  • Disconnects a handler from instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. The handler_id_ptr is then set to zero, which is never a valid handler ID value (see g_signal_connect()).

    If the handler ID is 0 then this function does nothing.

    There is also a macro version of this function so that the code will be inlined.

    Parameters

    • handlerIdPtr: number

      A pointer to a handler ID (of type #gulong) of the handler to be disconnected.

    • instance: GObject.Object

      The instance to remove the signal handler from. This pointer may be %NULL or invalid, if the handler ID is zero.

    Returns void

  • This function is meant to be called from the complete_type_info function of a #GTypePlugin implementation, as in the following example:

    static void
    my_enum_complete_type_info (GTypePlugin *plugin,
    GType g_type,
    GTypeInfo *info,
    GTypeValueTable *value_table)
    {
    static const GEnumValue values[] = {
    { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
    { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
    { 0, NULL, NULL }
    };

    g_enum_complete_type_info (type, info, values);
    }

    Parameters

    • gEnumType: GType<unknown>

      the type identifier of the type being completed

    • constValues: GObject.EnumValue

      An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.

    Returns GObject.TypeInfo

  • Registers a new static enumeration type with the name name.

    It is normally more convenient to let [glib-mkenums][glib-mkenums], generate a my_enum_get_type() function from a usual C enumeration definition than to write one yourself using g_enum_register_static().

    Parameters

    • name: string

      A nul-terminated string used as the name of the new type.

    • constStaticValues: GObject.EnumValue

      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.

    Returns GType

  • enumToString(gEnumType: GType<unknown>, value: number): string
  • Pretty-prints value in the form of the enum’s name.

    This is intended to be used for debugging purposes. The format of the output may change in the future.

    Parameters

    • gEnumType: GType<unknown>

      the type identifier of a #GEnumClass type

    • value: number

      the value

    Returns string

  • This function is meant to be called from the complete_type_info() function of a #GTypePlugin implementation, see the example for g_enum_complete_type_info() above.

    Parameters

    • gFlagsType: GType<unknown>

      the type identifier of the type being completed

    • constValues: FlagsValue

      An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.

    Returns GObject.TypeInfo

  • Registers a new static flags type with the name name.

    It is normally more convenient to let [glib-mkenums][glib-mkenums] generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using g_flags_register_static().

    Parameters

    • name: string

      A nul-terminated string used as the name of the new type.

    • constStaticValues: FlagsValue

      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.

    Returns GType

  • flagsToString(flagsType: GType<unknown>, value: number): string
  • Pretty-prints value in the form of the flag names separated by | and sorted. Any extra bits will be shown at the end as a hexadecimal number.

    This is intended to be used for debugging purposes. The format of the output may change in the future.

    Parameters

    • flagsType: GType<unknown>

      the type identifier of a #GFlagsClass type

    • value: number

      the value

    Returns string

  • 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.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • defaultValue: boolean

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED derived property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • boxedType: GType<unknown>

      %G_TYPE_BOXED derived type of this property

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecChar(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecDouble(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • enumType: GType<unknown>

      a #GType derived from %G_TYPE_ENUM

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • flagsType: GType<unknown>

      a #GType derived from %G_TYPE_FLAGS

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecFloat(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecGType instance specifying a %G_TYPE_GTYPE property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • isAType: GType<unknown>

      a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecInt(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecInt64(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecLong(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT derived property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • objectType: GType<unknown>

      %G_TYPE_OBJECT derived type of this property

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • paramType: GType<unknown>

      a #GType derived from %G_TYPE_PARAM

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecPointer instance specifying a pointer property. Where possible, it is better to use g_param_spec_object() or g_param_spec_boxed() to expose memory management information.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecString instance.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • defaultValue: string

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecUchar(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecUint(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecUint64(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64 property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • paramSpecUlong(name: string, nick: string, blurb: string, minimum: number, maximum: number, defaultValue: number, flags: GObject.ParamFlags): ParamSpec
  • Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • minimum: number

      minimum value for the property specified

    • maximum: number

      maximum value for the property specified

    • defaultValue: number

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT property. #GValue structures for this property can be accessed with g_value_set_uint() and g_value_get_uint().

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • defaultValue: string

      default value for the property specified

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Creates a new #GParamSpecVariant instance specifying a #GVariant property.

    If default_value is floating, it is consumed.

    See g_param_spec_internal() for details on property names.

    Parameters

    • name: string

      canonical name of the property specified

    • nick: string

      nick name for the property specified

    • blurb: string

      description of the property specified

    • type: VariantType

      a #GVariantType

    • defaultValue: GLib.Variant

      a #GVariant of type type to use as the default value, or %NULL

    • flags: GObject.ParamFlags

      flags for the property specified

    Returns ParamSpec

  • Registers name as the name of a new static type derived from %G_TYPE_PARAM.

    The type system uses the information contained in the #GParamSpecTypeInfo structure pointed to by info to manage the #GParamSpec type and its instances.

    Parameters

    • name: string

      0-terminated string used as the name of the new #GParamSpec type.

    • pspecInfo: ParamSpecTypeInfo

      The #GParamSpecTypeInfo for this #GParamSpec type.

    Returns GType

  • paramValueConvert(pspec: ParamSpec, srcValue: any, destValue: any, strictValidation: boolean): boolean
  • Transforms src_value into dest_value if possible, and then validates dest_value, in order for it to conform to pspec. If strict_validation is %TRUE this function will only succeed if the transformed dest_value complied to pspec without modifications.

    See also g_value_type_transformable(), g_value_transform() and g_param_value_validate().

    Parameters

    • pspec: ParamSpec

      a valid #GParamSpec

    • srcValue: any

      source #GValue

    • destValue: any

      destination #GValue of correct type for pspec

    • strictValidation: boolean

      %TRUE requires dest_value to conform to pspec without modifications

    Returns boolean

  • paramValueDefaults(pspec: ParamSpec, value: any): boolean
  • Checks whether value contains the default value as specified in pspec.

    Parameters

    • pspec: ParamSpec

      a valid #GParamSpec

    • value: any

      a #GValue of correct type for pspec

    Returns boolean

  • paramValueSetDefault(pspec: ParamSpec, value: any): void
  • Sets value to its default value as specified in pspec.

    Parameters

    • pspec: ParamSpec

      a valid #GParamSpec

    • value: any

      a #GValue of correct type for pspec; since 2.64, you can also pass an empty #GValue, initialized with %G_VALUE_INIT

    Returns void

  • paramValueValidate(pspec: ParamSpec, value: any): boolean
  • Ensures that the contents of value comply with the specifications set out by pspec. For example, a #GParamSpecInt might require that integers stored in value may not be smaller than -42 and not be greater than +42. If value contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42.

    Parameters

    • pspec: ParamSpec

      a valid #GParamSpec

    • value: any

      a #GValue of correct type for pspec

    Returns boolean

  • paramValuesCmp(pspec: ParamSpec, value1: any, value2: any): number
  • Compares value1 with value2 according to pspec, and return -1, 0 or +1, if value1 is found to be less than, equal to or greater than value2, respectively.

    Parameters

    • pspec: ParamSpec

      a valid #GParamSpec

    • value1: any

      a #GValue of correct type for pspec

    • value2: any

      a #GValue of correct type for pspec

    Returns number

  • pointerTypeRegisterStatic(name: string): GType
  • Creates a new %G_TYPE_POINTER derived type id for a new pointer type with name name.

    Parameters

    • name: string

      the name of the new pointer type.

    Returns GType

  • signalAccumulatorFirstWins(ihint: SignalInvocationHint, returnAccu: any, handlerReturn: any, dummy: object): boolean
  • A predefined #GSignalAccumulator for signals intended to be used as a hook for application code to provide a particular value. Usually only one such value is desired and multiple handlers for the same signal don't make much sense (except for the case of the default handler defined in the class structure, in which case you will usually want the signal connection to override the class handler).

    This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler "wins").

    Parameters

    • ihint: SignalInvocationHint

      standard #GSignalAccumulator parameter

    • returnAccu: any

      standard #GSignalAccumulator parameter

    • handlerReturn: any

      standard #GSignalAccumulator parameter

    • dummy: object

      standard #GSignalAccumulator parameter

    Returns boolean

  • signalAccumulatorTrueHandled(ihint: SignalInvocationHint, returnAccu: any, handlerReturn: any, dummy: object): boolean
  • A predefined #GSignalAccumulator for signals that return a boolean values. The behavior that this accumulator gives is that a return of %TRUE stops the signal emission: no further callbacks will be invoked, while a return of %FALSE allows the emission to continue. The idea here is that a %TRUE return indicates that the callback handled the signal, and no further handling is needed.

    Parameters

    • ihint: SignalInvocationHint

      standard #GSignalAccumulator parameter

    • returnAccu: any

      standard #GSignalAccumulator parameter

    • handlerReturn: any

      standard #GSignalAccumulator parameter

    • dummy: object

      standard #GSignalAccumulator parameter

    Returns boolean

  • signalAddEmissionHook(signalId: number, detail: number): number
  • Adds an emission hook for a signal, which will get called for any emission of that signal, independent of the instance. This is possible only for signals which don't have %G_SIGNAL_NO_HOOKS flag set.

    Parameters

    • signalId: number

      the signal identifier, as returned by g_signal_lookup().

    • detail: number

      the detail on which to call the hook.

    Returns number

  • signalChainFromOverridden(instanceAndParams: any[], returnValue: any): void
  • Calls the original class closure of a signal. This function should only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler().

    Parameters

    • instanceAndParams: any[]

      the argument list of the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.

    • returnValue: any

      Location for the return value.

    Returns void

  • signalConnectClosure(instance: GObject.Object, detailedSignal: string, closure: TClosure<any, any>, after: boolean): number
  • Connects a closure to a signal for a particular object.

    Parameters

    • instance: GObject.Object

      the instance to connect to.

    • detailedSignal: string

      a string of the form "signal-name::detail".

    • closure: TClosure<any, any>

      the closure to connect.

    • after: boolean

      whether the handler should be called before or after the default handler of the signal.

    Returns number

  • signalConnectClosureById(instance: GObject.Object, signalId: number, detail: number, closure: TClosure<any, any>, after: boolean): number
  • Connects a closure to a signal for a particular object.

    Parameters

    • instance: GObject.Object

      the instance to connect to.

    • signalId: number

      the id of the signal.

    • detail: number

      the detail.

    • closure: TClosure<any, any>

      the closure to connect.

    • after: boolean

      whether the handler should be called before or after the default handler of the signal.

    Returns number

  • signalEmitv(instanceAndParams: any[], signalId: number, detail: number, returnValue?: any): any
  • Emits a signal. Signal emission is done synchronously. The method will only return control after all handlers are called or signal emission was stopped.

    Note that g_signal_emitv() doesn't change return_value if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist().

    Parameters

    • instanceAndParams: any[]

      argument list for the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.

    • signalId: number

      the signal id

    • detail: number

      the detail

    • Optional returnValue: any

      Location to store the return value of the signal emission. This must be provided if the specified signal returns a value, but may be ignored otherwise.

    Returns any

  • signalHandlerBlock(instance: GObject.Object, handlerId: number): void
  • Blocks a handler of an instance so it will not be called during any signal emissions unless it is unblocked again. Thus "blocking" a signal handler means to temporarily deactivate it, a signal handler has to be unblocked exactly the same amount of times it has been blocked before to become active again.

    The handler_id has to be a valid signal handler id, connected to a signal of instance.

    Parameters

    • instance: GObject.Object

      The instance to block the signal handler of.

    • handlerId: number

      Handler id of the handler to be blocked.

    Returns void

  • signalHandlerDisconnect(instance: GObject.Object, handlerId: number): void
  • 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. The handler_id becomes invalid and may be reused.

    The handler_id has to be a valid signal handler id, connected to a signal of instance.

    Parameters

    • instance: GObject.Object

      The instance to remove the signal handler from.

    • handlerId: number

      Handler id of the handler to be disconnected.

    Returns void

  • Finds the first signal handler that matches certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. The match mask has to be non-0 for successful matches. If no handler was found, 0 is returned.

    Parameters

    • instance: GObject.Object

      The instance owning the signal handler to be found.

    • mask: SignalMatchType

      Mask indicating which of signal_id, detail, closure, func and/or data the handler has to match.

    • signalId: number

      Signal the handler has to be connected to.

    • detail: number

      Signal detail the handler has to be connected to.

    • func: object

      The C closure callback of the handler (useless for non-C closures).

    • data: object

      The closure data of the handler's closure.

    Returns number

  • signalHandlerIsConnected(instance: GObject.Object, handlerId: number): boolean
  • Returns whether handler_id is the ID of a handler connected to instance.

    Parameters

    • instance: GObject.Object

      The instance where a signal handler is sought.

    • handlerId: number

      the handler ID.

    Returns boolean

  • signalHandlerUnblock(instance: GObject.Object, handlerId: number): void
  • Undoes the effect of a previous g_signal_handler_block() call. A blocked handler is skipped during signal emissions and will not be invoked, unblocking it (for exactly the amount of times it has been blocked before) reverts its "blocked" state, so the handler will be recognized by the signal system and is called upon future or currently ongoing signal emissions (since the order in which handlers are called during signal emissions is deterministic, whether the unblocked handler in question is called as part of a currently ongoing emission depends on how far that emission has proceeded yet).

    The handler_id has to be a valid id of a signal handler that is connected to a signal of instance and is currently blocked.

    Parameters

    • instance: GObject.Object

      The instance to unblock the signal handler of.

    • handlerId: number

      Handler id of the handler to be unblocked.

    Returns void

  • signalHandlersBlockMatched(instance: GObject.Object, mask: SignalMatchType, signalId: number, detail: number, func: object, data: object): number
  • Blocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise.

    Parameters

    • instance: GObject.Object

      The instance to block handlers from.

    • mask: SignalMatchType

      Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.

    • signalId: number

      Signal the handlers have to be connected to.

    • detail: number

      Signal detail the handlers have to be connected to.

    • func: object

      The C closure callback of the handlers (useless for non-C closures).

    • data: object

      The closure data of the handlers' closures.

    Returns number

  • Destroy all signal handlers of a type instance. This function is an implementation detail of the #GObject dispose implementation, and should not be used outside of the type system.

    Parameters

    • instance: GObject.Object

      The instance whose signal handlers are destroyed

    Returns void

  • signalHandlersDisconnectMatched(instance: GObject.Object, mask: SignalMatchType, signalId: number, detail: number, func: object, data: object): number
  • Disconnects all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise.

    Parameters

    • instance: GObject.Object

      The instance to remove handlers from.

    • mask: SignalMatchType

      Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.

    • signalId: number

      Signal the handlers have to be connected to.

    • detail: number

      Signal detail the handlers have to be connected to.

    • func: object

      The C closure callback of the handlers (useless for non-C closures).

    • data: object

      The closure data of the handlers' closures.

    Returns number

  • signalHandlersUnblockMatched(instance: GObject.Object, mask: SignalMatchType, signalId: number, detail: number, func: object, data: object): number
  • Unblocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of unblocked handlers otherwise. The match criteria should not apply to any handlers that are not currently blocked.

    Parameters

    • instance: GObject.Object

      The instance to unblock handlers from.

    • mask: SignalMatchType

      Mask indicating which of signal_id, detail, closure, func and/or data the handlers have to match.

    • signalId: number

      Signal the handlers have to be connected to.

    • detail: number

      Signal detail the handlers have to be connected to.

    • func: object

      The C closure callback of the handlers (useless for non-C closures).

    • data: object

      The closure data of the handlers' closures.

    Returns number

  • signalHasHandlerPending(instance: GObject.Object, signalId: number, detail: number, mayBeBlocked: boolean): boolean
  • Returns whether there are any handlers connected to instance for the given signal id and detail.

    If detail is 0 then it will only match handlers that were connected without detail. If detail is non-zero then it will match handlers connected both without detail and with the given detail. This is consistent with how a signal emitted with detail would be delivered to those handlers.

    Since 2.46 this also checks for a non-default class closure being installed, as this is basically always what you want.

    One example of when you might use this is when the arguments to the signal are difficult to compute. A class implementor may opt to not emit the signal if no one is attached anyway, thus saving the cost of building the arguments.

    Parameters

    • instance: GObject.Object

      the object whose signal handlers are sought.

    • signalId: number

      the signal id.

    • detail: number

      the detail.

    • mayBeBlocked: boolean

      whether blocked handlers should count as match.

    Returns boolean

  • signalIsValidName(name: string): boolean
  • Validate a signal name. This can be useful for dynamically-generated signals which need to be validated at run-time before actually trying to create them.

    See [canonical parameter names][canonical-parameter-names] for details of the rules for valid names. The rules for signal names are the same as those for property names.

    Parameters

    • name: string

      the canonical name of the signal

    Returns boolean

  • signalListIds(itype: GType<unknown>): number[]
  • Lists the signals by id that a certain instance or interface type created. Further information about the signals can be acquired through g_signal_query().

    Parameters

    • itype: GType<unknown>

      Instance or interface type.

    Returns number[]

  • signalLookup(name: string, itype: GType<unknown>): number
  • Given the name of the signal and the type of object it connects to, gets the signal's identifying integer. Emitting the signal by number is somewhat faster than using the name each time.

    Also tries the ancestors of the given type.

    The type class passed as itype must already have been instantiated (for example, using g_type_class_ref()) for this function to work, as signals are always installed during class initialization.

    See g_signal_new() for details on allowed signal names.

    Parameters

    • name: string

      the signal's name.

    • itype: GType<unknown>

      the type that the signal operates on.

    Returns number

  • signalName(signalId: number): string | null
  • Given the signal's identifier, finds its name.

    Two different signals may have the same name, if they have differing types.

    Parameters

    • signalId: number

      the signal's identifying number.

    Returns string | null

  • signalOverrideClassClosure(signalId: number, instanceType: GType<unknown>, classClosure: TClosure<any, any>): void
  • Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances of instance_type. instance_type must be derived from the type to which the signal belongs.

    See g_signal_chain_from_overridden() and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one.

    Parameters

    • signalId: number

      the signal id

    • instanceType: GType<unknown>

      the instance type on which to override the class closure for the signal.

    • classClosure: TClosure<any, any>

      the closure.

    Returns void

  • signalParseName(detailedSignal: string, itype: GType<unknown>, forceDetailQuark: boolean): [boolean, number, Quark]
  • Internal function to parse a signal name into its signal_id and detail quark.

    Parameters

    • detailedSignal: string

      a string of the form "signal-name::detail".

    • itype: GType<unknown>

      The interface/instance type that introduced "signal-name".

    • forceDetailQuark: boolean

      %TRUE forces creation of a #GQuark for the detail.

    Returns [boolean, number, Quark]

  • Queries the signal system for in-depth information about a specific signal. This function will fill in a user-provided structure to hold signal-specific information. If an invalid signal id is passed in, the signal_id member of the #GSignalQuery is 0. All members filled into the #GSignalQuery structure should be considered constant and have to be left untouched.

    Parameters

    • signalId: number

      The signal id of the signal to query information for.

    Returns SignalQuery

  • signalRemoveEmissionHook(signalId: number, hookId: number): void
  • Deletes an emission hook.

    Parameters

    • signalId: number

      the id of the signal

    • hookId: number

      the id of the emission hook, as returned by g_signal_add_emission_hook()

    Returns void

  • signalSetVaMarshaller(signalId: number, instanceType: GType<unknown>, vaMarshaller: any): void
  • Change the #GSignalCVaMarshaller used for a given signal. This is a specialised form of the marshaller that can often be used for the common case of a single connected signal handler and avoids the overhead of #GValue. Its use is optional.

    Parameters

    • signalId: number

      the signal id

    • instanceType: GType<unknown>

      the instance type on which to set the marshaller.

    • vaMarshaller: any

      the marshaller to set.

    Returns void

  • signalStopEmission(instance: GObject.Object, signalId: number, detail: number): void
  • Stops a signal's current emission.

    This will prevent the default method from running, if the signal was %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after" flag).

    Prints a warning if used on a signal which isn't being emitted.

    Parameters

    • instance: GObject.Object

      the object whose signal handlers you wish to stop.

    • signalId: number

      the signal identifier, as returned by g_signal_lookup().

    • detail: number

      the detail which the signal was emitted with.

    Returns void

  • signalStopEmissionByName(instance: GObject.Object, detailedSignal: string): void
  • Stops a signal's current emission.

    This is just like g_signal_stop_emission() except it will look up the signal id for you.

    Parameters

    • instance: GObject.Object

      the object whose signal handlers you wish to stop.

    • detailedSignal: string

      a string of the form "signal-name::detail".

    Returns void

  • signalTypeCclosureNew(itype: GType<unknown>, structOffset: number): TClosure
  • Creates a new closure which invokes the function found at the offset struct_offset in the class structure of the interface or classed type identified by itype.

    Parameters

    • itype: GType<unknown>

      the #GType identifier of an interface or classed type

    • structOffset: number

      the offset of the member function of itype's class structure which is to be invoked by the new closure

    Returns TClosure

  • Set the callback for a source as a #GClosure.

    If the source is not one of the standard GLib types, the closure_callback and closure_marshal fields of the #GSourceFuncs structure must have been filled in with pointers to appropriate functions.

    Parameters

    Returns void

  • Sets a dummy callback for source. The callback will do nothing, and if the source expects a #gboolean return value, it will return %TRUE. (If the source expects any other type of return value, it will return a 0/%NULL value; whatever g_value_init() initializes a #GValue to for that type.)

    If the source is not one of the standard GLib types, the closure_callback and closure_marshal fields of the #GSourceFuncs structure must have been filled in with pointers to appropriate functions.

    Parameters

    Returns void

  • strdupValueContents(value: any): string
  • Return a newly allocated string, which describes the contents of a #GValue. The main purpose of this function is to describe #GValue contents for debugging output, the way in which the contents are described may change between different GLib versions.

    Parameters

    • value: any

      #GValue which contents are to be described.

    Returns string

  • typeAddClassPrivate(classType: GType<unknown>, privateSize: number): void
  • Registers a private class structure for a classed type; when the class is allocated, the private structures for the class and all of its parent types are allocated sequentially in the same memory block as the public structures, and are zero-filled.

    This function should be called in the type's get_type() function after the type is registered. The private structure can be retrieved using the G_TYPE_CLASS_GET_PRIVATE() macro.

    Parameters

    • classType: GType<unknown>

      GType of a classed type

    • privateSize: number

      size of private structure

    Returns void

  • typeAddInstancePrivate(classType: GType<unknown>, privateSize: number): number
  • typeAddInterfaceDynamic(instanceType: GType<unknown>, interfaceType: GType<unknown>, plugin: TypePlugin): void
  • Adds interface_type to the dynamic instance_type. The information contained in the #GTypePlugin structure pointed to by plugin is used to manage the relationship.

    Parameters

    • instanceType: GType<unknown>

      #GType value of an instantiatable type

    • interfaceType: GType<unknown>

      #GType value of an interface type

    • plugin: TypePlugin

      #GTypePlugin structure to retrieve the #GInterfaceInfo from

    Returns void

  • Adds interface_type to the static instance_type. The information contained in the #GInterfaceInfo structure pointed to by info is used to manage the relationship.

    Parameters

    • instanceType: GType<unknown>

      #GType value of an instantiatable type

    • interfaceType: GType<unknown>

      #GType value of an interface type

    • info: GObject.InterfaceInfo

      #GInterfaceInfo structure for this (instance_type, interface_type) combination

    Returns void

  • Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.

    Parameters

    Returns boolean

  • typeCheckInstanceIsFundamentallyA(instance: TypeInstance, fundamentalType: GType<unknown>): boolean
  • typeCheckIsValueType(type: GType<unknown>): boolean
  • typeCheckValue(value: any): boolean
  • typeCheckValueHolds(value: any, type: GType<unknown>): boolean
  • Return a newly allocated and 0-terminated array of type IDs, listing the child types of type.

    Parameters

    • type: GType<unknown>

      the parent type

    Returns GType[]

  • typeClassAdjustPrivateOffset(gClass: object, privateSizeOrOffset: number): void
  • This function is essentially the same as g_type_class_ref(), except that the classes reference count isn't incremented. As a consequence, this function may return %NULL if the class of the type passed in does not currently exist (hasn't been referenced before).

    Parameters

    • type: GType<unknown>

      type ID of a classed type

    Returns GObject.TypeClass

  • Increments the reference count of the class structure belonging to type. This function will demand-create the class if it doesn't exist already.

    Parameters

    • type: GType<unknown>

      type ID of a classed type

    Returns GObject.TypeClass

  • Increments the reference count for the interface type g_type, and returns the default interface vtable for the type.

    If the type is not currently in use, then the default vtable for the type will be created and initialized by calling the base interface init and default vtable init functions for the type (the base_init and class_init members of #GTypeInfo). Calling g_type_default_interface_ref() is useful when you want to make sure that signals and properties for an interface have been installed.

    Parameters

    • gType: GType<unknown>

      an interface type

    Returns TypeInterface

  • Decrements the reference count for the type corresponding to the interface default vtable g_iface. If the type is dynamic, then when no one is using the interface and all references have been released, the finalize function for the interface's default vtable (the class_finalize member of #GTypeInfo) will be called.

    Parameters

    • gIface: TypeInterface

      the default vtable structure for an interface, as returned by g_type_default_interface_ref()

    Returns void

  • typeDepth(type: GType<unknown>): number
  • Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a fundamental type has depth 1.

    Parameters

    • type: GType<unknown>

      a #GType

    Returns number

  • typeEnsure(type: GType<unknown>): void
  • Ensures that the indicated type has been registered with the type system, and its _class_init() method has been run.

    In theory, simply calling the type's _get_type() method (or using the corresponding macro) is supposed take care of this. However, _get_type() methods are often marked %G_GNUC_CONST for performance reasons, even though this is technically incorrect (since %G_GNUC_CONST requires that the function not have side effects, which _get_type() methods do on the first call). As a result, if you write a bare call to a _get_type() macro, it may get optimized out by the compiler. Using g_type_ensure() guarantees that the type's _get_type() method is called.

    Parameters

    • type: GType<unknown>

      a #GType

    Returns void

  • Frees an instance of a type, returning it to the instance pool for the type, if there is one.

    Like g_type_create_instance(), this function is reserved for implementors of fundamental types.

    Parameters

    Returns void

  • Internal function, used to extract the fundamental type ID portion. Use G_TYPE_FUNDAMENTAL() instead.

    Parameters

    • typeId: GType<unknown>

      valid type ID

    Returns GType

  • typeFundamentalNext(): GType
  • Returns the next free fundamental type id which can be used to register a new fundamental type with g_type_register_fundamental(). The returned type ID represents the highest currently registered fundamental type identifier.

    Returns GType

  • typeGetInstanceCount(type: GType<unknown>): number
  • Returns the number of instances allocated of the particular type; this is only available if GLib is built with debugging support and the instance_count debug flag is set (by setting the GOBJECT_DEBUG variable to include instance-count).

    Parameters

    • type: GType<unknown>

      a #GType

    Returns number

  • typeGetQdata(type: GType<unknown>, quark: number): object | null
  • Obtains data which has previously been attached to type with g_type_set_qdata().

    Note that this does not take subtyping into account; data attached to one type with g_type_set_qdata() cannot be retrieved from a subtype using g_type_get_qdata().

    Parameters

    • type: GType<unknown>

      a #GType

    • quark: number

      a #GQuark id to identify the data

    Returns object | null

  • typeGetTypeRegistrationSerial(): number
  • Returns an opaque serial number that represents the state of the set of registered types. Any time a type is registered this serial changes, which means you can cache information based on type lookups (such as g_type_from_name()) and know if the cache is still valid at a later time by comparing the current serial with the one at the type lookup.

    Returns number

  • typeInit(): void
  • This function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing.

    Returns void

  • This function used to initialise the type system with debugging flags. Since GLib 2.36, the type system is initialised automatically and this function does nothing.

    If you need to enable debugging features, use the GOBJECT_DEBUG environment variable.

    Parameters

    • debugFlags: TypeDebugFlags

      bitwise combination of #GTypeDebugFlags values for debugging purposes

    Returns void

  • typeInterfaceAddPrerequisite(interfaceType: GType<unknown>, prerequisiteType: GType<unknown>): void
  • Adds prerequisite_type to the list of prerequisites of interface_type. This means that any type implementing interface_type must also implement prerequisite_type. Prerequisites can be thought of as an alternative to interface derivation (which GType doesn't support). An interface can have at most one instantiatable prerequisite type.

    Parameters

    • interfaceType: GType<unknown>

      #GType value of an interface type

    • prerequisiteType: GType<unknown>

      #GType value of an interface or instantiatable type

    Returns void

  • Returns the #GTypePlugin structure for the dynamic interface interface_type which has been added to instance_type, or %NULL if interface_type has not been added to instance_type or does not have a #GTypePlugin structure. See g_type_add_interface_dynamic().

    Parameters

    • instanceType: GType<unknown>

      #GType of an instantiatable type

    • interfaceType: GType<unknown>

      #GType of an interface type

    Returns TypePlugin

  • typeInterfaceInstantiatablePrerequisite(interfaceType: GType<unknown>): GType
  • Returns the most specific instantiatable prerequisite of an interface type. If the interface type has no instantiatable prerequisite, %G_TYPE_INVALID is returned.

    See g_type_interface_add_prerequisite() for more information about prerequisites.

    Parameters

    • interfaceType: GType<unknown>

      an interface type

    Returns GType

  • Returns the #GTypeInterface structure of an interface to which the passed in class conforms.

    Parameters

    • instanceClass: GObject.TypeClass

      a #GTypeClass structure

    • ifaceType: GType<unknown>

      an interface ID which this class conforms to

    Returns TypeInterface

  • typeInterfacePrerequisites(interfaceType: GType<unknown>): GType[]
  • Returns the prerequisites of an interfaces type.

    Parameters

    • interfaceType: GType<unknown>

      an interface type

    Returns GType[]

  • Return a newly allocated and 0-terminated array of type IDs, listing the interface types that type conforms to.

    Parameters

    • type: GType<unknown>

      the type to list interface types for

    Returns GType[]

  • typeIsA(type: GType<unknown>, isAType: GType<unknown>): boolean
  • If is_a_type is a derivable type, check whether type is a descendant of is_a_type. If is_a_type is an interface, check whether type conforms to it.

    Parameters

    • type: GType<unknown>

      type to check ancestry for

    • isAType: GType<unknown>

      possible ancestor of type or interface that type could conform to

    Returns boolean

  • typeName(type: GType<unknown>): string
  • Get the unique name that is assigned to a type ID. Note that this function (like all other GType API) cannot cope with invalid type IDs. %G_TYPE_INVALID may be passed to this function, as may be any other validly registered type ID, but randomized type IDs should not be passed in and will most likely lead to a crash.

    Parameters

    • type: GType<unknown>

      type to return name for

    Returns string

  • Given a leaf_type and a root_type which is contained in its ancestry, return the type that root_type is the immediate parent of. In other words, this function determines the type that is derived directly from root_type which is also a base class of leaf_type. Given a root type and a leaf type, this function can be used to determine the types and order in which the leaf type is descended from the root type.

    Parameters

    • leafType: GType<unknown>

      descendant of root_type and the type to be returned

    • rootType: GType<unknown>

      immediate parent of the returned type

    Returns GType

  • Return the direct parent type of the passed in type. If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.

    Parameters

    • type: GType<unknown>

      the derived type

    Returns GType

  • Get the corresponding quark of the type IDs name.

    Parameters

    • type: GType<unknown>

      type to return quark of type name for

    Returns Quark

  • Queries the type system for information about a specific type. This function will fill in a user-provided structure to hold type-specific information. If an invalid #GType is passed in, the type member of the #GTypeQuery is 0. All members filled into the #GTypeQuery structure should be considered constant and have to be left untouched.

    Parameters

    • type: GType<unknown>

      #GType of a static, classed type

    Returns TypeQuery

  • Registers type_name as the name of a new dynamic type derived from parent_type. The type system uses the information contained in the #GTypePlugin structure pointed to by plugin to manage the type and its instances (if not abstract). The value of flags determines the nature (e.g. abstract or not) of the type.

    Parameters

    • parentType: GType<unknown>

      type from which this type will be derived

    • typeName: string

      0-terminated string used as the name of the new type

    • plugin: TypePlugin

      #GTypePlugin structure to retrieve the #GTypeInfo from

    • flags: TypeFlags

      bitwise combination of #GTypeFlags values

    Returns GType

  • Registers type_id as the predefined identifier and type_name as the name of a fundamental type. If type_id is already registered, or a type named type_name is already registered, the behaviour is undefined. The type system uses the information contained in the #GTypeInfo structure pointed to by info and the #GTypeFundamentalInfo structure pointed to by finfo to manage the type and its instances. The value of flags determines additional characteristics of the fundamental type.

    Parameters

    • typeId: GType<unknown>

      a predefined type identifier

    • typeName: string

      0-terminated string used as the name of the new type

    • info: GObject.TypeInfo

      #GTypeInfo structure for this type

    • finfo: TypeFundamentalInfo

      #GTypeFundamentalInfo structure for this type

    • flags: TypeFlags

      bitwise combination of #GTypeFlags values

    Returns GType

  • Registers type_name as the name of a new static type derived from parent_type. The type system uses the information contained in the #GTypeInfo structure pointed to by info to manage the type and its instances (if not abstract). The value of flags determines the nature (e.g. abstract or not) of the type.

    Parameters

    • parentType: GType<unknown>

      type from which this type will be derived

    • typeName: string

      0-terminated string used as the name of the new type

    • info: GObject.TypeInfo

      #GTypeInfo structure for this type

    • flags: TypeFlags

      bitwise combination of #GTypeFlags values

    Returns GType

  • typeSetQdata(type: GType<unknown>, quark: number, data: object): void
  • Attaches arbitrary data to a type.

    Parameters

    • type: GType<unknown>

      a #GType

    • quark: number

      a #GQuark id to identify the data

    • data: object

      the data

    Returns void

  • typeTestFlags(type: GType<unknown>, flags: number): boolean
  • valueTypeCompatible(srcType: GType<unknown>, destType: GType<unknown>): boolean
  • Returns whether a #GValue of type src_type can be copied into a #GValue of type dest_type.

    Parameters

    • srcType: GType<unknown>

      source type to be copied.

    • destType: GType<unknown>

      destination type for copying.

    Returns boolean

  • valueTypeTransformable(srcType: GType<unknown>, destType: GType<unknown>): boolean
  • Check whether g_value_transform() is able to transform values of type src_type into values of type dest_type. Note that for the types to be transformable, they must be compatible or a transformation function must be registered.

    Parameters

    • srcType: GType<unknown>

      Source type.

    • destType: GType<unknown>

      Target type.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method