TypeInstanceProtocol
public protocol TypeInstanceProtocol
An opaque structure used as the base of all type instances.
The TypeInstanceProtocol
protocol exposes the methods and properties of an underlying GTypeInstance
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see TypeInstance
.
Alternatively, use TypeInstanceRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GTypeInstance
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
_ptr
Default implementationTyped pointer to the underlying
GTypeInstance
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GTypeInstance
instance.Declaration
Swift
var _ptr: UnsafeMutablePointer<GTypeInstance>! { get }
-
Required Initialiser for types conforming to
TypeInstanceProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getPrivate(privateType:
Extension method) Undocumented
Declaration
Swift
@inlinable func getPrivate(privateType: GType) -> gpointer?
-
signalConnectObject(detailedSignal:
Extension methodcHandler: gobject: connectFlags: ) 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 func signalConnectObject(detailedSignal: UnsafePointer<gchar>!, cHandler: @escaping GCallback, gobject: ObjectRef? = nil, connectFlags: ConnectFlags) -> Int
-
signalConnectObject(detailedSignal:
Extension methodcHandler: gobject: connectFlags: ) 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 func signalConnectObject<ObjectT>(detailedSignal: UnsafePointer<gchar>!, cHandler: @escaping GCallback, gobject: ObjectT?, connectFlags: ConnectFlags) -> Int where ObjectT : ObjectProtocol
-
signalEmitValist(signalID:
Extension methoddetail: varArgs: ) 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 func signalEmitValist(signalID: Int, detail: GQuark, varArgs: CVaListPointer)
-
typeCheckInstance()
Extension methodPrivate helper function to aid implementation of the
G_TYPE_CHECK_INSTANCE()
macro.Declaration
Swift
@inlinable func typeCheckInstance() -> Bool
-
typeCheckInstanceCast(ifaceType:
Extension method) Undocumented
Declaration
Swift
@inlinable func typeCheckInstanceCast(ifaceType: GType) -> GLibObject.TypeInstanceRef!
-
typeCheckInstanceIsA(ifaceType:
Extension method) Undocumented
Declaration
Swift
@inlinable func typeCheckInstanceIsA(ifaceType: GType) -> Bool
-
typeCheckInstanceIsFundamentallyA(fundamentalType:
Extension method) Undocumented
Declaration
Swift
@inlinable func typeCheckInstanceIsFundamentallyA(fundamentalType: GType) -> Bool
-
typeFreeInstance()
Extension methodFrees 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 func typeFreeInstance()
-
typeNameFromInstance()
Extension methodUndocumented
Declaration
Swift
@inlinable func typeNameFromInstance() -> String!