TypeInterfaceProtocol
public protocol TypeInterfaceProtocol
An opaque structure used as the base of all interface types.
The TypeInterfaceProtocol
protocol exposes the methods and properties of an underlying GTypeInterface
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 TypeInterface
.
Alternatively, use TypeInterfaceRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GTypeInterface
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
_ptr
Default implementationTyped pointer to the underlying
GTypeInterface
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GTypeInterface
instance.Declaration
Swift
var _ptr: UnsafeMutablePointer<GTypeInterface>! { get }
-
Required Initialiser for types conforming to
TypeInterfaceProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
peekParent()
Extension methodReturns the corresponding
GTypeInterface
structure of the parent type of the instance type to whichg_iface
belongs. This is useful when deriving the implementation of an interface from the parent type and then possibly overriding some methods.Declaration
Swift
@inlinable func peekParent() -> GLibObject.TypeInterfaceRef!
-
typeDefaultInterfaceUnref()
Extension methodDecrements 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 func typeDefaultInterfaceUnref()