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.

  • ptr

    Untyped pointer to the underlying GtkTargetList instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • target_list_ptr Default implementation

    Typed 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)

TargetList Record: TargetListProtocol extension (methods and fields)

  • add(target:flags:info:) Extension method

    Appends another target to a GtkTargetList.

    Declaration

    Swift

    @inlinable
    func add(target: GdkAtom, flags: Int, info: Int)
  • Appends the image targets supported by GtkSelectionData to the target list. All targets are added with the same info.

    Declaration

    Swift

    @inlinable
    func addImageTargets(info: Int, writable: Bool)
  • Appends the rich text targets registered with gtk_text_buffer_register_serialize_format() or gtk_text_buffer_register_deserialize_format() to the target list. All targets are added with the same info.

    Declaration

    Swift

    @inlinable
    func addRichTextTargets<TextBufferT>(info: Int, deserializable: Bool, buffer: TextBufferT) where TextBufferT : TextBufferProtocol
  • addTable(targets:ntargets:) Extension method

    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 same info.

    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 same info.

    Declaration

    Swift

    @inlinable
    func addURITargets(info: Int)
  • find(target:info:) Extension method

    Looks up a given target in a GtkTargetList.

    Declaration

    Swift

    @inlinable
    func find(target: GdkAtom, info: UnsafeMutablePointer<guint>! = nil) -> Bool
  • ref() Extension method

    Increases 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 method

    Decreases the reference count of a GtkTargetList by one. If the resulting reference count is zero, frees the list.

    Declaration

    Swift

    @inlinable
    func unref()
  • This function creates an GtkTargetEntry array that contains the same targets as the passed list. The returned table is newly allocated and should be freed using gtk_target_table_free() when no longer needed.

    Declaration

    Swift

    @inlinable
    func targetTableNewFromList(nTargets: UnsafeMutablePointer<gint>!) -> UnsafeMutablePointer<GtkTargetEntry>!