TargetListProtocol
public protocol TargetListProtocol
A GtkTargetList-struct
is a reference counted list
of GtkTargetPair
and should be treated as
opaque.
The TargetListProtocol
protocol exposes the methods and properties of an underlying GtkTargetList
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 TargetList
.
Alternatively, use TargetListRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkTargetList
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
target_list_ptr
Default implementationTyped pointer to the underlying
GtkTargetList
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkTargetList
instance.Declaration
Swift
var target_list_ptr: UnsafeMutablePointer<GtkTargetList>! { get }
-
Required Initialiser for types conforming to
TargetListProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
add(target:
Extension methodflags: info: ) Appends another target to a
GtkTargetList
.Declaration
Swift
@inlinable func add(target: GdkAtom, flags: Int, info: Int)
-
addImageTargets(info:
Extension methodwritable: ) Appends the image targets supported by
GtkSelectionData
to the target list. All targets are added with the sameinfo
.Declaration
Swift
@inlinable func addImageTargets(info: Int, writable: Bool)
-
addRichTextTargets(info:
Extension methoddeserializable: buffer: ) Appends the rich text targets registered with
gtk_text_buffer_register_serialize_format()
orgtk_text_buffer_register_deserialize_format()
to the target list. All targets are added with the sameinfo
.Declaration
Swift
@inlinable func addRichTextTargets<TextBufferT>(info: Int, deserializable: Bool, buffer: TextBufferT) where TextBufferT : TextBufferProtocol
-
addTable(targets:
Extension methodntargets: ) Prepends a table of
GtkTargetEntry
to a target list.Declaration
Swift
@inlinable func addTable(targets: UnsafePointer<GtkTargetEntry>!, ntargets: Int)
-
addTextTargets(info:
Extension method) Appends the text targets supported by
GtkSelectionData
to the target list. All targets are added with the sameinfo
.Declaration
Swift
@inlinable func addTextTargets(info: Int)
-
addURITargets(info:
Extension method) Appends the URI targets supported by
GtkSelectionData
to the target list. All targets are added with the sameinfo
.Declaration
Swift
@inlinable func addURITargets(info: Int)
-
find(target:
Extension methodinfo: ) Looks up a given target in a
GtkTargetList
.Declaration
Swift
@inlinable func find(target: GdkAtom, info: UnsafeMutablePointer<guint>! = nil) -> Bool
-
ref()
Extension methodIncreases the reference count of a
GtkTargetList
by one.Declaration
Swift
@discardableResult @inlinable func ref() -> TargetListRef!
-
remove(target:
Extension method) Removes a target from a target list.
Declaration
Swift
@inlinable func remove(target: GdkAtom)
-
unref()
Extension methodDecreases the reference count of a
GtkTargetList
by one. If the resulting reference count is zero, frees the list.Declaration
Swift
@inlinable func unref()
-
targetTableNewFromList(nTargets:
Extension method) This function creates an
GtkTargetEntry
array that contains the same targets as the passedlist
. The returned table is newly allocated and should be freed usinggtk_target_table_free()
when no longer needed.Declaration
Swift
@inlinable func targetTableNewFromList(nTargets: UnsafeMutablePointer<gint>!) -> UnsafeMutablePointer<GtkTargetEntry>!