Functions

The following functions are available globally.

  • Provide a copy of a boxed structure src_boxed which is of type boxed_type.

    Declaration

    Swift

    @inlinable
    public func boxedCopy(boxedType: GType, srcBoxed: gconstpointer?) -> gpointer!
  • Free the boxed structure boxed which is of type boxed_type.

    Declaration

    Swift

    @inlinable
    public func boxedFree(boxedType: GType, boxed: gpointer!)
  • This function creates a new G_TYPE_BOXED derived type id for a new boxed type with name name.

    Boxed type handling functions have to be provided to copy and free opaque boxed structures of this type.

    For the general case, it is recommended to use G_DEFINE_BOXED_TYPE() instead of calling g_boxed_type_register_static() directly. The macro will create the appropriate *_get_type() function for the boxed type.

    Declaration

    Swift

    @inlinable
    public func boxedTypeRegisterStatic(name: UnsafePointer<gchar>!, boxedCopy: GBoxedCopyFunc?, boxedFree: GBoxedFreeFunc?) -> GType
  • 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().

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalBOOLEANBOXEDBOXED<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalBOOLEANFLAGS<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalSTRINGOBJECTPOINTER<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDBOOLEAN<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDBOXED<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gchar arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDCHAR<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDDOUBLE<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • 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..

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDENUM<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDFLAGS<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDFLOAT<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDINT<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, glong arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDLONG<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDOBJECT<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDPARAM<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDPOINTER<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDSTRING<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guchar arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDUCHAR<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDUINT<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDUINTPOINTER<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gulong arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDULONG<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDVARIANT<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gpointer user_data).

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalVOIDVOID<ClosureT, ValueT>(closure: ClosureT, returnValue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • 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 nil marshaller.

    Declaration

    Swift

    @inlinable
    public func cclosureMarshalGeneric<ClosureT, ValueT>(closure: ClosureT, returnGvalue: ValueT, nParamValues: Int, paramValues: ValueT, invocationHint: gpointer? = nil, marshalData: gpointer? = nil) where ClosureT : ClosureProtocol, ValueT : ValueProtocol
  • Creates a new closure which invokes callback_func with user_data as the last parameter.

    destroy_data will be called as a finalize notifier on the GClosure.

    Declaration

    Swift

    @inlinable
    public func cclosureNew(callbackFunc: GCallback! = nil, userData: gpointer? = nil, destroyData: GClosureNotify?) -> GLibObject.ClosureRef!
  • A variant of g_cclosure_new() which uses object as user_data and calls g_object_watch_closure() on object and the created closure. This function is useful when you have a callback closely associated with a GObject, and want the callback to no longer run after the object is is freed.

    Declaration

    Swift

    @inlinable
    public func cclosureNewObject<ObjectT>(callbackFunc: @escaping GCallback, object: ObjectT) -> GLibObject.ClosureRef! where ObjectT : ObjectProtocol
  • A variant of g_cclosure_new_swap() which uses object as user_data and calls g_object_watch_closure() on object and the created closure. This function is useful when you have a callback closely associated with a GObject, and want the callback to no longer run after the object is is freed.

    Declaration

    Swift

    @inlinable
    public func cclosureNewObjectSwap<ObjectT>(callbackFunc: @escaping GCallback, object: ObjectT) -> GLibObject.ClosureRef! where ObjectT : ObjectProtocol
  • Creates a new closure which invokes callback_func with user_data as the first parameter.

    destroy_data will be called as a finalize notifier on the GClosure.

    Declaration

    Swift

    @inlinable
    public func cclosureNewSwap(callbackFunc: GCallback! = nil, userData: gpointer? = nil, destroyData: GClosureNotify?) -> GLibObject.ClosureRef!
  • Clears a reference to a GObject.

    object_ptr must not be nil.

    If the reference is nil then this function does nothing. Otherwise, the reference count of the object is decreased and the pointer is set to nil.

    A macro is also included that allows this function to be used without pointer casts.

    Declaration

    Swift

    @inlinable
    public func clearObject(objectPtr: UnsafeMutablePointer<UnsafeMutablePointer<GObject>?>!)
  • 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.

    Declaration

    Swift

    @inlinable
    public func clearSignalHandler<ObjectT>(handlerIDPtr: UnsafeMutablePointer<gulong>!, instance: ObjectT) where ObjectT : ObjectProtocol
  • This function is meant to be called from the complete_type_info function of a GTypePlugin implementation, as in the following example:

    (C Language 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);
    }
    

    Declaration

    Swift

    @inlinable
    public func enumCompleteTypeInfo<EnumValueT, TypeInfoT>(gEnumType: GType, info: TypeInfoT, constValues: EnumValueT) where EnumValueT : EnumValueProtocol, TypeInfoT : TypeInfoProtocol
  • Returns the GEnumValue for a value.

    Declaration

    Swift

    @inlinable
    public func enumGetValue<EnumClassT>(enumClass: EnumClassT, value: Int) -> GLibObject.EnumValueRef! where EnumClassT : EnumClassProtocol
  • Looks up a GEnumValue by name.

    Declaration

    Swift

    @inlinable
    public func enumGetValueByName<EnumClassT>(enumClass: EnumClassT, name: UnsafePointer<gchar>!) -> GLibObject.EnumValueRef! where EnumClassT : EnumClassProtocol
  • Looks up a GEnumValue by nickname.

    Declaration

    Swift

    @inlinable
    public func enumGetValueByNick<EnumClassT>(enumClass: EnumClassT, nick: UnsafePointer<gchar>!) -> GLibObject.EnumValueRef! where EnumClassT : EnumClassProtocol
  • Registers a new static enumeration type with the name name.

    It is normally more convenient to let 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().

    Declaration

    Swift

    @inlinable
    public func enumRegisterStatic<EnumValueT>(name: UnsafePointer<gchar>!, constStaticValues: EnumValueT) -> GType where EnumValueT : EnumValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func enumToString(gEnumType: GType, value: Int) -> 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.

    Declaration

    Swift

    @inlinable
    public func flagsCompleteTypeInfo<FlagsValueT, TypeInfoT>(gFlagsType: GType, info: TypeInfoT, constValues: FlagsValueT) where FlagsValueT : FlagsValueProtocol, TypeInfoT : TypeInfoProtocol
  • Returns the first GFlagsValue which is set in value.

    Declaration

    Swift

    @inlinable
    public func flagsGetFirstValue<FlagsClassT>(flagsClass: FlagsClassT, value: Int) -> GLibObject.FlagsValueRef! where FlagsClassT : FlagsClassProtocol
  • Looks up a GFlagsValue by name.

    Declaration

    Swift

    @inlinable
    public func flagsGetValueByName<FlagsClassT>(flagsClass: FlagsClassT, name: UnsafePointer<gchar>!) -> GLibObject.FlagsValueRef! where FlagsClassT : FlagsClassProtocol
  • Looks up a GFlagsValue by nickname.

    Declaration

    Swift

    @inlinable
    public func flagsGetValueByNick<FlagsClassT>(flagsClass: FlagsClassT, nick: UnsafePointer<gchar>!) -> GLibObject.FlagsValueRef! where FlagsClassT : FlagsClassProtocol
  • Registers a new static flags type with the name name.

    It is normally more convenient to let 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().

    Declaration

    Swift

    @inlinable
    public func flagsRegisterStatic<FlagsValueT>(name: UnsafePointer<gchar>!, constStaticValues: FlagsValueT) -> GType where FlagsValueT : FlagsValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func flagsToString(flagsType: GType, value: Int) -> String!
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func gtypeGetType() -> GType
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramSpecBoolean(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, defaultValue: Bool, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecBoxed instance specifying a G_TYPE_BOXED derived property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecBoxed(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, boxedType: GType, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecChar instance specifying a G_TYPE_CHAR property.

    Declaration

    Swift

    @inlinable
    public func paramSpecChar(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: gint8, maximum: gint8, defaultValue: gint8, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecDouble instance specifying a G_TYPE_DOUBLE property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecDouble(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Double, maximum: Double, defaultValue: Double, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecEnum instance specifying a G_TYPE_ENUM property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecEnum(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, enumType: GType, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecFlags instance specifying a G_TYPE_FLAGS property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecFlags(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, flagsType: GType, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecFloat instance specifying a G_TYPE_FLOAT property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecFloat(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Double, maximum: Double, defaultValue: Double, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecGType instance specifying a G_TYPE_GTYPE property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecGtype(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, isAType: GType, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecInt instance specifying a G_TYPE_INT property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecInt(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Int, maximum: Int, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecInt64 instance specifying a G_TYPE_INT64 property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecInt64(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: gint64, maximum: gint64, defaultValue: gint64, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecLong instance specifying a G_TYPE_LONG property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecLong(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Int, maximum: Int, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecBoxed instance specifying a G_TYPE_OBJECT derived property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecObject(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, objectType: GType, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new property of type GParamSpecOverride. This is used to direct operations to another paramspec, and will not be directly useful unless you are implementing a new base type similar to GObject.

    Declaration

    Swift

    @inlinable
    public func paramSpecOverride<ParamSpecT>(name: UnsafePointer<gchar>!, overridden: ParamSpecT) -> GLibObject.ParamSpecRef! where ParamSpecT : ParamSpecProtocol
  • Creates a new GParamSpecParam instance specifying a G_TYPE_PARAM property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecParam(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, paramType: GType, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramSpecPointer(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecString instance.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecString(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, defaultValue: UnsafePointer<gchar>? = nil, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecUChar instance specifying a G_TYPE_UCHAR property.

    Declaration

    Swift

    @inlinable
    public func paramSpecUchar(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: guint8, maximum: guint8, defaultValue: guint8, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecUInt instance specifying a G_TYPE_UINT property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecUint(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Int, maximum: Int, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecUInt64 instance specifying a G_TYPE_UINT64 property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecUint64(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: guint64, maximum: guint64, defaultValue: guint64, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecULong instance specifying a G_TYPE_ULONG property.

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecUlong(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, minimum: Int, maximum: Int, defaultValue: Int, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramSpecUnichar(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, defaultValue: gunichar, flags: ParamFlags) -> GLibObject.ParamSpecRef!
  • Creates a new GParamSpecValueArray instance specifying a G_TYPE_VALUE_ARRAY property. G_TYPE_VALUE_ARRAY is a G_TYPE_BOXED type, as such, GValue structures for this property can be accessed with g_value_set_boxed() and g_value_get_boxed().

    See g_param_spec_internal() for details on property names.

    Declaration

    Swift

    @inlinable
    public func paramSpecValueArray<ParamSpecT>(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, elementSpec: ParamSpecT, flags: ParamFlags) -> GLibObject.ParamSpecRef! where ParamSpecT : ParamSpecProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramSpecVariant<GLibVariantTypeT>(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, type: GLibVariantTypeT, defaultValue: GLib.VariantRef? = nil, flags: ParamFlags) -> GLibObject.ParamSpecRef! where GLibVariantTypeT : VariantTypeProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramSpecVariant<GLibVariantT, GLibVariantTypeT>(name: UnsafePointer<gchar>!, nick: UnsafePointer<gchar>!, blurb: UnsafePointer<gchar>!, type: GLibVariantTypeT, defaultValue: GLibVariantT?, flags: ParamFlags) -> GLibObject.ParamSpecRef! where GLibVariantT : VariantProtocol, GLibVariantTypeT : VariantTypeProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramTypeRegisterStatic<ParamSpecTypeInfoT>(name: UnsafePointer<gchar>!, pspecInfo: ParamSpecTypeInfoT) -> GType where ParamSpecTypeInfoT : ParamSpecTypeInfoProtocol
  • 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().

    Declaration

    Swift

    @inlinable
    public func paramValueConvert<ParamSpecT, ValueT>(pspec: ParamSpecT, srcValue: ValueT, destValue: ValueT, strictValidation: Bool) -> Bool where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol
  • Checks whether value contains the default value as specified in pspec.

    Declaration

    Swift

    @inlinable
    public func paramValueDefaults<ParamSpecT, ValueT>(pspec: ParamSpecT, value: ValueT) -> Bool where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol
  • Sets value to its default value as specified in pspec.

    Declaration

    Swift

    @inlinable
    public func paramValueSetDefault<ParamSpecT, ValueT>(pspec: ParamSpecT, value: ValueT) where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramValueValidate<ParamSpecT, ValueT>(pspec: ParamSpecT, value: ValueT) -> Bool where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func paramValuesCmp<ParamSpecT, ValueT>(pspec: ParamSpecT, value1: ValueT, value2: ValueT) -> Int where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol
  • Creates a new G_TYPE_POINTER derived type id for a new pointer type with name name.

    Declaration

    Swift

    @inlinable
    public func pointerTypeRegisterStatic(name: UnsafePointer<gchar>!) -> GType
  • 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”).

    Declaration

    Swift

    @inlinable
    public func signalAccumulatorFirstWins<SignalInvocationHintT, ValueT>(ihint: SignalInvocationHintT, returnAccu: ValueT, handlerReturn: ValueT, dummy: gpointer? = nil) -> Bool where SignalInvocationHintT : SignalInvocationHintProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalAccumulatorTrueHandled<SignalInvocationHintT, ValueT>(ihint: SignalInvocationHintT, returnAccu: ValueT, handlerReturn: ValueT, dummy: gpointer? = nil) -> Bool where SignalInvocationHintT : SignalInvocationHintProtocol, ValueT : ValueProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalAddEmissionHook(signalID: Int, detail: GQuark, hookFunc: @escaping GSignalEmissionHook, hookData: gpointer? = nil, dataDestroy: GDestroyNotify? = nil) -> Int
  • 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().

    Declaration

    Swift

    @inlinable
    public func signalChainFromOverridden<ValueT>(instanceAndParams: UnsafePointer<GValue>!, returnValue: ValueT) where ValueT : ValueProtocol
  • Connects a closure to a signal for a particular object.

    Declaration

    Swift

    @inlinable
    public func signalConnectClosure<ClosureT, ObjectT>(instance: ObjectT, detailedSignal: UnsafePointer<gchar>!, closure: ClosureT, after: Bool) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • Connects a closure to a signal for a particular object.

    Declaration

    Swift

    @inlinable
    public func signalConnectClosureByID<ClosureT, ObjectT>(instance: ObjectT, signalID: Int, detail: GQuark, closure: ClosureT, after: Bool) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • Connects a GCallback function to a signal for a particular object. Similar to g_signal_connect(), but allows to provide a GClosureNotify for the data which will be called when the signal handler is disconnected and no longer used. Specify connect_flags if you need ..._after() or ..._swapped() variants of this function.

    Declaration

    Swift

    @inlinable
    public func signalConnectData<ObjectT>(instance: ObjectT, detailedSignal: UnsafePointer<gchar>!, cHandler: @escaping GCallback, data: gpointer? = nil, destroyData: GClosureNotify? = nil, connectFlags: ConnectFlags) -> Int where ObjectT : ObjectProtocol
  • This is similar to g_signal_connect_data(), but uses a closure which ensures that the gobject stays alive during the call to c_handler by temporarily adding a reference count to gobject.

    When the gobject is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal while gobject is being destroyed in another thread is not safe).

    Declaration

    Swift

    @inlinable
    public func signalConnectObject<TypeInstanceT>(instance: TypeInstanceT, detailedSignal: UnsafePointer<gchar>!, cHandler: @escaping GCallback, gobject: ObjectRef? = nil, connectFlags: ConnectFlags) -> Int where TypeInstanceT : TypeInstanceProtocol
  • This is similar to g_signal_connect_data(), but uses a closure which ensures that the gobject stays alive during the call to c_handler by temporarily adding a reference count to gobject.

    When the gobject is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal while gobject is being destroyed in another thread is not safe).

    Declaration

    Swift

    @inlinable
    public func signalConnectObject<ObjectT, TypeInstanceT>(instance: TypeInstanceT, detailedSignal: UnsafePointer<gchar>!, cHandler: @escaping GCallback, gobject: ObjectT?, connectFlags: ConnectFlags) -> Int where ObjectT : ObjectProtocol, TypeInstanceT : TypeInstanceProtocol
  • 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_emit_valist() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv().

    Declaration

    Swift

    @inlinable
    public func signalEmitValist<TypeInstanceT>(instance: TypeInstanceT, signalID: Int, detail: GQuark, varArgs: CVaListPointer) where TypeInstanceT : TypeInstanceProtocol
  • 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().

    Declaration

    Swift

    @inlinable
    public func signalEmitv<ValueT>(instanceAndParams: UnsafePointer<GValue>!, signalID: Int, detail: GQuark, returnValue: ValueT) where ValueT : ValueProtocol
  • Returns the invocation hint of the innermost signal emission of instance.

    Declaration

    Swift

    @inlinable
    public func signalGetInvocationHint<ObjectT>(instance: ObjectT) -> GLibObject.SignalInvocationHintRef! where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlerBlock<ObjectT>(instance: ObjectT, handlerID: Int) where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlerDisconnect<ObjectT>(instance: ObjectT, handlerID: Int) where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlerFind<ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureRef? = nil, func: gpointer? = nil, data: gpointer? = nil) -> Int where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlerFind<ClosureT, ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureT?, func: gpointer? = nil, data: gpointer? = nil) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • Returns whether handler_id is the ID of a handler connected to instance.

    Declaration

    Swift

    @inlinable
    public func signalHandlerIsConnected<ObjectT>(instance: ObjectT, handlerID: Int) -> Bool where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlerUnblock<ObjectT>(instance: ObjectT, handlerID: Int) where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersBlockMatched<ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureRef? = nil, func: gpointer? = nil, data: gpointer? = nil) -> Int where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersBlockMatched<ClosureT, ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureT?, func: gpointer? = nil, data: gpointer? = nil) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersDestroy<ObjectT>(instance: ObjectT) where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersDisconnectMatched<ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureRef? = nil, func: gpointer? = nil, data: gpointer? = nil) -> Int where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersDisconnectMatched<ClosureT, ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureT?, func: gpointer? = nil, data: gpointer? = nil) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersUnblockMatched<ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureRef? = nil, func: gpointer? = nil, data: gpointer? = nil) -> Int where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHandlersUnblockMatched<ClosureT, ObjectT>(instance: ObjectT, mask: SignalMatchType, signalID: Int, detail: GQuark, closure: ClosureT?, func: gpointer? = nil, data: gpointer? = nil) -> Int where ClosureT : ClosureProtocol, ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalHasHandlerPending<ObjectT>(instance: ObjectT, signalID: Int, detail: GQuark, mayBeBlocked: Bool) -> Bool where ObjectT : ObjectProtocol
  • 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 for details of the rules for valid names. The rules for signal names are the same as those for property names.

    Declaration

    Swift

    @inlinable
    public func signalIsValid(name: UnsafePointer<gchar>!) -> Bool
  • 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().

    Declaration

    Swift

    @inlinable
    public func signalListIDs(itype: GType, nIDs: UnsafeMutablePointer<guint>!) -> UnsafeMutablePointer<guint>!
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalLookup(name: UnsafePointer<gchar>!, itype: GType) -> Int
  • Given the signal’s identifier, finds its name.

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

    Declaration

    Swift

    @inlinable
    public func signalName(signalID: Int) -> String!
  • Creates a new signal. (This is usually done in the class initializer.)

    See g_signal_new() for details on allowed signal names.

    If c_marshaller is nil, g_cclosure_marshal_generic() will be used as the marshaller for this signal.

    Declaration

    Swift

    @inlinable
    public func signalNewValist(signalName: UnsafePointer<gchar>!, itype: GType, signalFlags: SignalFlags, classClosure: ClosureRef? = nil, accumulator: GSignalAccumulator! = nil, accuData: gpointer? = nil, cMarshaller: GSignalCMarshaller! = nil, returnType: GType, nParams: Int, args: CVaListPointer) -> Int
  • Creates a new signal. (This is usually done in the class initializer.)

    See g_signal_new() for details on allowed signal names.

    If c_marshaller is nil, g_cclosure_marshal_generic() will be used as the marshaller for this signal.

    Declaration

    Swift

    @inlinable
    public func signalNewValist<ClosureT>(signalName: UnsafePointer<gchar>!, itype: GType, signalFlags: SignalFlags, classClosure: ClosureT?, accumulator: GSignalAccumulator! = nil, accuData: gpointer? = nil, cMarshaller: GSignalCMarshaller! = nil, returnType: GType, nParams: Int, args: CVaListPointer) -> Int where ClosureT : ClosureProtocol
  • Creates a new signal. (This is usually done in the class initializer.)

    See g_signal_new() for details on allowed signal names.

    If c_marshaller is nil, g_cclosure_marshal_generic() will be used as the marshaller for this signal.

    Declaration

    Swift

    @inlinable
    public func signalNewv(signalName: UnsafePointer<gchar>!, itype: GType, signalFlags: SignalFlags, classClosure: ClosureRef? = nil, accumulator: GSignalAccumulator! = nil, accuData: gpointer? = nil, cMarshaller: GSignalCMarshaller! = nil, returnType: GType, nParams: Int, paramTypes: UnsafeMutablePointer<GType>! = nil) -> Int
  • Creates a new signal. (This is usually done in the class initializer.)

    See g_signal_new() for details on allowed signal names.

    If c_marshaller is nil, g_cclosure_marshal_generic() will be used as the marshaller for this signal.

    Declaration

    Swift

    @inlinable
    public func signalNewv<ClosureT>(signalName: UnsafePointer<gchar>!, itype: GType, signalFlags: SignalFlags, classClosure: ClosureT?, accumulator: GSignalAccumulator! = nil, accuData: gpointer? = nil, cMarshaller: GSignalCMarshaller! = nil, returnType: GType, nParams: Int, paramTypes: UnsafeMutablePointer<GType>! = nil) -> Int where ClosureT : ClosureProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalOverrideClassClosure<ClosureT>(signalID: Int, instanceType: GType, classClosure: ClosureT) where ClosureT : ClosureProtocol
  • Overrides the class closure (i.e. the default handler) for the given signal for emissions on instances of instance_type with callback class_handler. 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.

    Declaration

    Swift

    @inlinable
    public func signalOverrideClassHandler(signalName: UnsafePointer<gchar>!, instanceType: GType, classHandler: @escaping GCallback)
  • Internal function to parse a signal name into its signal_id and detail quark.

    Declaration

    Swift

    @inlinable
    public func signalParseName(detailedSignal: UnsafePointer<gchar>!, itype: GType, signalIDP: UnsafeMutablePointer<guint>!, detailP: UnsafeMutablePointer<GQuark>!, forceDetailQuark: Bool) -> Bool
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalQuery<SignalQueryT>(signalID: Int, query: SignalQueryT) where SignalQueryT : SignalQueryProtocol
  • Deletes an emission hook.

    Declaration

    Swift

    @inlinable
    public func signalRemoveEmissionHook(signalID: Int, hookID: Int)
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalStopEmission<ObjectT>(instance: ObjectT, signalID: Int, detail: GQuark) where ObjectT : ObjectProtocol
  • Stops a signal’s current emission.

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

    Declaration

    Swift

    @inlinable
    public func signalStopEmissionByName<ObjectT>(instance: ObjectT, detailedSignal: UnsafePointer<gchar>!) where ObjectT : ObjectProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func signalTypeCclosureNew(itype: GType, structOffset: Int) -> GLibObject.ClosureRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func sourceSetClosure<ClosureT, GLibSourceT>(source: GLibSourceT, closure: ClosureT) where ClosureT : ClosureProtocol, GLibSourceT : SourceProtocol
  • 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/nil 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.

    Declaration

    Swift

    @inlinable
    public func sourceSetDummyCallback<GLibSourceT>(source: GLibSourceT) where GLibSourceT : SourceProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func strdupValueContents<ValueT>(value: ValueT) -> String! where ValueT : ValueProtocol
  • Adds a GTypeClassCacheFunc to be called before the reference count of a class goes from one to zero. This can be used to prevent premature class destruction. All installed GTypeClassCacheFunc functions will be chained until one of them returns true. The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same GTypeClassCacheFunc chain.

    Declaration

    Swift

    @inlinable
    public func typeAddClassCacheFunc(cacheData: gpointer? = nil, cacheFunc: GTypeClassCacheFunc?)
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeAddClassPrivate(classType: GType, privateSize: Int)
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeAddInstancePrivate(classType: GType, privateSize: Int) -> Int
  • Adds a function to be called after an interface vtable is initialized for any class (i.e. after the interface_init member of GInterfaceInfo has been called).

    This function is useful when you want to check an invariant that depends on the interfaces of a class. For instance, the implementation of GObject uses this facility to check that an object implements all of the properties that are defined on its interfaces.

    Declaration

    Swift

    @inlinable
    public func typeAddInterfaceCheck(checkData: gpointer? = nil, checkFunc: GTypeInterfaceCheckFunc?)
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeAddInterfaceDynamic<TypePluginT>(instanceType: GType, interfaceType: GType, plugin: TypePluginT) where TypePluginT : TypePluginProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeAddInterfaceStatic<InterfaceInfoT>(instanceType: GType, interfaceType: GType, info: InterfaceInfoT) where InterfaceInfoT : InterfaceInfoProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckClassCast<TypeClassT>(gClass: TypeClassT, isAType: GType) -> GLibObject.TypeClassRef! where TypeClassT : TypeClassProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckClassIsA<TypeClassT>(gClass: TypeClassT, isAType: GType) -> Bool where TypeClassT : TypeClassProtocol
  • Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro.

    Declaration

    Swift

    @inlinable
    public func typeCheck<TypeInstanceT>(instance: TypeInstanceT) -> Bool where TypeInstanceT : TypeInstanceProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckInstanceCast<TypeInstanceT>(instance: TypeInstanceT, ifaceType: GType) -> GLibObject.TypeInstanceRef! where TypeInstanceT : TypeInstanceProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckInstanceIsA<TypeInstanceT>(instance: TypeInstanceT, ifaceType: GType) -> Bool where TypeInstanceT : TypeInstanceProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckInstanceIsFundamentallyA<TypeInstanceT>(instance: TypeInstanceT, fundamentalType: GType) -> Bool where TypeInstanceT : TypeInstanceProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckIsValue(type: GType) -> Bool
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheck<ValueT>(value: ValueT) -> Bool where ValueT : ValueProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeCheckValueHolds<ValueT>(value: ValueT, type: GType) -> Bool where ValueT : ValueProtocol
  • Return a newly allocated and 0-terminated array of type IDs, listing the child types of type.

    Declaration

    Swift

    @inlinable
    public func typeChildren(type: GType, nChildren: UnsafeMutablePointer<guint>! = nil) -> UnsafeMutablePointer<GType>!
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeClassAdjustPrivateOffset(gClass: gpointer? = nil, privateSizeOrOffset: UnsafeMutablePointer<gint>!)
  • 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 nil if the class of the type passed in does not currently exist (hasn’t been referenced before).

    Declaration

    Swift

    @inlinable
    public func typeClassPeek(type: GType) -> GLibObject.TypeClassRef!
  • A more efficient version of g_type_class_peek() which works only for static types.

    Declaration

    Swift

    @inlinable
    public func typeClassPeekStatic(type: GType) -> GLibObject.TypeClassRef!
  • Increments the reference count of the class structure belonging to type. This function will demand-create the class if it doesn’t exist already.

    Declaration

    Swift

    @inlinable
    public func typeClassRef(type: GType) -> GLibObject.TypeClassRef!
  • Creates and initializes an instance of type if type is valid and can be instantiated. The type system only performs basic allocation and structure setups for instances: actual instance creation should happen through functions supplied by the type’s fundamental type implementation. So use of g_type_create_instance() is reserved for implementers of fundamental types only. E.g. instances of the GObject hierarchy should be created via g_object_new() and never directly through g_type_create_instance() which doesn’t handle things like singleton objects or object construction.

    The extended members of the returned instance are guaranteed to be filled with zeros.

    Note: Do not use this function, unless you’re implementing a fundamental type. Also language bindings should not use this function, but g_object_new() instead.

    Declaration

    Swift

    @inlinable
    public func typeCreateInstance(type: GType) -> GLibObject.TypeInstanceRef!
  • If the interface type g_type is currently in use, returns its default interface vtable.

    Declaration

    Swift

    @inlinable
    public func typeDefaultInterfacePeek(gType: GType) -> GLibObject.TypeInterfaceRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeDefaultInterfaceRef(gType: GType) -> GLibObject.TypeInterfaceRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeDefaultInterfaceUnref<TypeInterfaceT>(gIface: TypeInterfaceT) where TypeInterfaceT : TypeInterfaceProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeDepth(type: GType) -> Int
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeEnsure(type: GType)
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeFree<TypeInstanceT>(instance: TypeInstanceT) where TypeInstanceT : TypeInstanceProtocol
  • Look up the type ID from a given type name, returning 0 if no type has been registered under this name (this is the preferred method to find out by name whether a specific type has been registered yet).

    Declaration

    Swift

    @inlinable
    public func typeFrom(name: UnsafePointer<gchar>!) -> GType
  • Internal function, used to extract the fundamental type ID portion. Use G_TYPE_FUNDAMENTAL() instead.

    Declaration

    Swift

    @inlinable
    public func typeFundamental(typeID: GType) -> 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.

    Declaration

    Swift

    @inlinable
    public func typeFundamentalNext() -> GType
  • 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).

    Declaration

    Swift

    @inlinable
    public func typeGetInstanceCount(type: GType) -> Int
  • Returns the GTypePlugin structure for type.

    Declaration

    Swift

    @inlinable
    public func typeGetPlugin(type: GType) -> GLibObject.TypePluginRef!
  • 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().

    Declaration

    Swift

    @inlinable
    public func typeGetQdata(type: GType, quark: GQuark) -> gpointer?
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeGetTypeRegistrationSerial() -> Int
  • This function used to initialise the type system. Since GLib 2.36, the type system is initialised automatically and this function does nothing.

    type_init is deprecated: the type system is now initialised automatically

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    public func typeInit()
  • 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.

    type_init_with_debug_flags is deprecated: the type system is now initialised automatically

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    public func typeInitWith(debugFlags: TypeDebugFlags)
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeInterfaceAddPrerequisite(interfaceType: GType, prerequisiteType: GType)
  • Returns the GTypePlugin structure for the dynamic interface interface_type which has been added to instance_type, or nil if interface_type has not been added to instance_type or does not have a GTypePlugin structure. See g_type_add_interface_dynamic().

    Declaration

    Swift

    @inlinable
    public func typeInterfaceGetPlugin(instanceType: GType, interfaceType: GType) -> GLibObject.TypePluginRef!
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeInterfaceInstantiatablePrerequisite(interfaceType: GType) -> GType
  • Returns the GTypeInterface structure of an interface to which the passed in class conforms.

    Declaration

    Swift

    @inlinable
    public func typeInterfacePeek<TypeClassT>(instanceClass: TypeClassT, ifaceType: GType) -> GLibObject.TypeInterfaceRef! where TypeClassT : TypeClassProtocol
  • Returns the prerequisites of an interfaces type.

    Declaration

    Swift

    @inlinable
    public func typeInterfacePrerequisites(interfaceType: GType, nPrerequisites: UnsafeMutablePointer<guint>! = nil) -> UnsafeMutablePointer<GType>!
  • Return a newly allocated and 0-terminated array of type IDs, listing the interface types that type conforms to.

    Declaration

    Swift

    @inlinable
    public func typeInterfaces(type: GType, nInterfaces: UnsafeMutablePointer<guint>! = nil) -> UnsafeMutablePointer<GType>!
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeIsA(type: GType, isAType: GType) -> Bool
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeName(type: GType) -> String!
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeNameFromClass<TypeClassT>(gClass: TypeClassT) -> String! where TypeClassT : TypeClassProtocol
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeNameFrom<TypeInstanceT>(instance: TypeInstanceT) -> String! where TypeInstanceT : TypeInstanceProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeNextBase(leafType: GType, rootType: GType) -> 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.

    Declaration

    Swift

    @inlinable
    public func typeParent(type: GType) -> GType
  • Get the corresponding quark of the type IDs name.

    Declaration

    Swift

    @inlinable
    public func typeQname(type: GType) -> GQuark
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeQuery<TypeQueryT>(type: GType, query: TypeQueryT) where TypeQueryT : TypeQueryProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeRegisterDynamic<TypePluginT>(parentType: GType, typeName: UnsafePointer<gchar>!, plugin: TypePluginT, flags: TypeFlags) -> GType where TypePluginT : TypePluginProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeRegisterFundamental<TypeFundamentalInfoT, TypeInfoT>(typeID: GType, typeName: UnsafePointer<gchar>!, info: TypeInfoT, finfo: TypeFundamentalInfoT, flags: TypeFlags) -> GType where TypeFundamentalInfoT : TypeFundamentalInfoProtocol, TypeInfoT : TypeInfoProtocol
  • 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.

    Declaration

    Swift

    @inlinable
    public func typeRegisterStatic<TypeInfoT>(parentType: GType, typeName: UnsafePointer<gchar>!, info: TypeInfoT, flags: TypeFlags) -> GType where TypeInfoT : TypeInfoProtocol
  • Registers type_name as the name of a new static type derived from parent_type. The value of flags determines the nature (e.g. abstract or not) of the type. It works by filling a GTypeInfo struct and calling g_type_register_static().

    Declaration

    Swift

    @inlinable
    public func typeRegisterStaticSimple(parentType: GType, typeName: UnsafePointer<gchar>!, classSize: Int, classInit: GClassInitFunc?, instanceSize: Int, instanceInit: GInstanceInitFunc?, flags: TypeFlags) -> GType
  • Removes a previously installed GTypeClassCacheFunc. The cache maintained by cache_func has to be empty when calling g_type_remove_class_cache_func() to avoid leaks.

    Declaration

    Swift

    @inlinable
    public func typeRemoveClassCacheFunc(cacheData: gpointer? = nil, cacheFunc: GTypeClassCacheFunc?)
  • Removes an interface check function added with g_type_add_interface_check().

    Declaration

    Swift

    @inlinable
    public func typeRemoveInterfaceCheck(checkData: gpointer? = nil, checkFunc: GTypeInterfaceCheckFunc?)
  • Attaches arbitrary data to a type.

    Declaration

    Swift

    @inlinable
    public func typeSetQdata(type: GType, quark: GQuark, data: gpointer? = nil)
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func typeTestFlags(type: GType, flags: Int) -> Bool
  • Returns the location of the GTypeValueTable associated with type.

    Note that this function should only be used from source code that implements or has internal knowledge of the implementation of type.

    Declaration

    Swift

    @inlinable
    public func typeValueTablePeek(type: GType) -> GLibObject.TypeValueTableRef!
  • Registers a value transformation function for use in g_value_transform(). A previously registered transformation function for src_type and dest_type will be replaced.

    Declaration

    Swift

    @inlinable
    public func valueRegisterTransformFunc(srcType: GType, destType: GType, transformFunc: @escaping GValueTransform)
  • Returns whether a GValue of type src_type can be copied into a GValue of type dest_type.

    Declaration

    Swift

    @inlinable
    public func valueTypeCompatible(srcType: GType, destType: GType) -> Bool
  • 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.

    Declaration

    Swift

    @inlinable
    public func valueTypeTransformable(srcType: GType, destType: GType) -> Bool
  • Fetches the swift object from the given pointers, if any. Assume pointer is a GObject, so only call this function if this is known.

    Declaration

    Swift

    @inlinable
    public func swiftObj(fromRaw raw: UnsafeMutableRawPointer) -> AnyObject?