Functions
The following functions are available globally.
-
Provide a copy of a boxed structure
src_boxed
which is of typeboxed_type
.Declaration
Swift
@inlinable public func boxedCopy(boxedType: GType, srcBoxed: gconstpointer?) -> gpointer!
-
Free the boxed structure
boxed
which is of typeboxed_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 namename
.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 callingg_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
-
cclosureMarshalBOOLEANBOXEDBOXED(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) 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 asg_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
-
cclosureMarshalBOOLEANFLAGS(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typegboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)
where thegint
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
-
cclosureMarshalSTRINGOBJECTPOINTER(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typegchar* (*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
-
cclosureMarshalVOIDBOOLEAN(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typevoid (*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 typevoid (*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 typevoid (*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 typevoid (*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 typevoid (*callback) (gpointer instance, gint arg1, gpointer user_data)
where thegint
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 typevoid (*callback) (gpointer instance, gint arg1, gpointer user_data)
where thegint
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 typevoid (*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 typevoid (*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 typevoid (*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 typevoid (*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 typevoid (*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
-
cclosureMarshalVOIDPOINTER(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typevoid (*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 typevoid (*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 typevoid (*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 typevoid (*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
-
cclosureMarshalVOIDUINTPOINTER(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typevoid (*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 typevoid (*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
-
cclosureMarshalVOIDVARIANT(closure:
returnValue: nParamValues: paramValues: invocationHint: marshalData: ) A marshaller for a
GCClosure
with a callback of typevoid (*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 typevoid (*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 anil
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
withuser_data
as the last parameter.destroy_data
will be called as a finalize notifier on theGClosure
.Declaration
Swift
@inlinable public func cclosureNew(callbackFunc: GCallback! = nil, userData: gpointer? = nil, destroyData: GClosureNotify?) -> GLibObject.ClosureRef!
-
A variant of
g_cclosure_new()
which usesobject
asuser_data
and callsg_object_watch_closure()
onobject
and the created closure. This function is useful when you have a callback closely associated with aGObject
, 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 usesobject
asuser_data
and callsg_object_watch_closure()
onobject
and the created closure. This function is useful when you have a callback closely associated with aGObject
, 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
withuser_data
as the first parameter.destroy_data
will be called as a finalize notifier on theGClosure
.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 benil
.If the reference is
nil
then this function does nothing. Otherwise, the reference count of the object is decreased and the pointer is set tonil
.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. Thehandler_id_ptr
is then set to zero, which is never a valid handler ID value (seeg_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 aGTypePlugin
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 usingg_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 aGTypePlugin
implementation, see the example forg_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 invalue
.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 usingg_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 aG_TYPE_BOOLEAN
property. In many cases, it may be more appropriate to use an enum withg_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 aG_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 useg_param_spec_object()
org_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 aG_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 aG_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 aG_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 aG_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 aG_TYPE_UINT
property.GValue
structures for this property can be accessed withg_value_set_uint()
andg_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 aG_TYPE_VALUE_ARRAY
property.G_TYPE_VALUE_ARRAY
is aG_TYPE_BOXED
type, as such,GValue
structures for this property can be accessed withg_value_set_boxed()
andg_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 aGVariant
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 aGVariant
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 fromG_TYPE_PARAM
.The type system uses the information contained in the
GParamSpecTypeInfo
structure pointed to byinfo
to manage theGParamSpec
type and its instances.Declaration
Swift
@inlinable public func paramTypeRegisterStatic<ParamSpecTypeInfoT>(name: UnsafePointer<gchar>!, pspecInfo: ParamSpecTypeInfoT) -> GType where ParamSpecTypeInfoT : ParamSpecTypeInfoProtocol
-
Transforms
src_value
intodest_value
if possible, and then validatesdest_value
, in order for it to conform topspec
. Ifstrict_validation
istrue
this function will only succeed if the transformeddest_value
complied topspec
without modifications.See also
g_value_type_transformable()
,g_value_transform()
andg_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 inpspec
.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 inpspec
.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 bypspec
. For example, aGParamSpecInt
might require that integers stored invalue
may not be smaller than -42 and not be greater than +42. Ifvalue
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
withvalue2
according topspec
, and return -1, 0 or +1, ifvalue1
is found to be less than, equal to or greater thanvalue2
, 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 namename
.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 oftrue
stops the signal emission: no further callbacks will be invoked, while a return offalse
allows the emission to continue. The idea here is that atrue
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()
andg_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 tog_signal_connect()
, but allows to provide aGClosureNotify
for the data which will be called when the signal handler is disconnected and no longer used. Specifyconnect_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 thegobject
stays alive during the call toc_handler
by temporarily adding a reference count togobject
.When the
gobject
is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal whilegobject
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 thegobject
stays alive during the call toc_handler
by temporarily adding a reference count togobject
.When the
gobject
is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal whilegobject
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 tog_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 changereturn_value
if no handlers are connected, in contrast tog_signal_emit()
andg_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 ofinstance
.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 ofinstance
.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 matchmask
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 matchmask
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 toinstance
.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 ofinstance
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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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 theG_SIGNAL_MATCH_CLOSURE
,G_SIGNAL_MATCH_FUNC
orG_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. Ifdetail
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 withdetail
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, usingg_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!
-
signalNewValist(signalName:
itype: signalFlags: classClosure: accumulator: accuData: cMarshaller: returnType: nParams: args: ) 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
-
signalNewValist(signalName:
itype: signalFlags: classClosure: accumulator: accuData: cMarshaller: returnType: nParams: args: ) 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
-
signalNewv(signalName:
itype: signalFlags: classClosure: accumulator: accuData: cMarshaller: returnType: nParams: paramTypes: ) 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
-
signalNewv(signalName:
itype: signalFlags: classClosure: accumulator: accuData: cMarshaller: returnType: nParams: paramTypes: ) 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()
andg_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 callbackclass_handler
.instance_type
must be derived from the type to which the signal belongs.See
g_signal_chain_from_overridden()
andg_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
anddetail
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 theGSignalQuery
is 0. All members filled into theGSignalQuery
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 byitype
.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
andclosure_marshal
fields of theGSourceFuncs
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 agboolean
return value, it will returntrue
. (If the source expects any other type of return value, it will return a 0/nil
value; whateverg_value_init()
initializes aGValue
to for that type.)If the source is not one of the standard GLib types, the
closure_callback
andclosure_marshal
fields of theGSourceFuncs
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 describeGValue
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 installedGTypeClassCacheFunc
functions will be chained until one of them returnstrue
. 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 sameGTypeClassCacheFunc
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 theG_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 ofGInterfaceInfo
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 dynamicinstance_type
. The information contained in theGTypePlugin
structure pointed to byplugin
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 staticinstance_type
. The information contained in theGInterfaceInfo
structure pointed to byinfo
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 returnnil
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
iftype
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 ofg_type_create_instance()
is reserved for implementers of fundamental types only. E.g. instances of theGObject
hierarchy should be created viag_object_new()
and never directly throughg_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
andclass_init
members ofGTypeInfo
). Callingg_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 (theclass_finalize
member ofGTypeInfo
) 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 markedG_GNUC_CONST
for performance reasons, even though this is technically incorrect (sinceG_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. Usingg_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 fortype
.Declaration
Swift
@inlinable public func typeGetPlugin(type: GType) -> GLibObject.TypePluginRef!
-
Obtains data which has previously been attached to
type
withg_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 usingg_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 ofinterface_type
. This means that any type implementinginterface_type
must also implementprerequisite_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 interfaceinterface_type
which has been added toinstance_type
, ornil
ifinterface_type
has not been added toinstance_type
or does not have aGTypePlugin
structure. Seeg_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 whethertype
is a descendant ofis_a_type
. Ifis_a_type
is an interface, check whethertype
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 aroot_type
which is contained in its ancestry, return the type thatroot_type
is the immediate parent of. In other words, this function determines the type that is derived directly fromroot_type
which is also a base class ofleaf_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, thetype
member of theGTypeQuery
is 0. All members filled into theGTypeQuery
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 fromparent_type
. The type system uses the information contained in theGTypePlugin
structure pointed to byplugin
to manage the type and its instances (if not abstract). The value offlags
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 andtype_name
as the name of a fundamental type. Iftype_id
is already registered, or a type namedtype_name
is already registered, the behaviour is undefined. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
and theGTypeFundamentalInfo
structure pointed to byfinfo
to manage the type and its instances. The value offlags
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 fromparent_type
. The type system uses the information contained in theGTypeInfo
structure pointed to byinfo
to manage the type and its instances (if not abstract). The value offlags
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 fromparent_type
. The value offlags
determines the nature (e.g. abstract or not) of the type. It works by filling aGTypeInfo
struct and callingg_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 bycache_func
has to be empty when callingg_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 withtype
.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 forsrc_type
anddest_type
will be replaced.Declaration
Swift
@inlinable public func valueRegisterTransformFunc(srcType: GType, destType: GType, transformFunc: @escaping GValueTransform)
-
Returns whether a
GValue
of typesrc_type
can be copied into aGValue
of typedest_type
.Declaration
Swift
@inlinable public func valueTypeCompatible(srcType: GType, destType: GType) -> Bool
-
Check whether
g_value_transform()
is able to transform values of typesrc_type
into values of typedest_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?