TreeDragSourceProtocol

public protocol TreeDragSourceProtocol

Interface for Drag-and-Drop destinations in GtkTreeView.

The TreeDragSourceProtocol protocol exposes the methods and properties of an underlying GtkTreeDragSource 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 TreeDragSource. Alternatively, use TreeDragSourceRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkTreeDragSource instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkTreeDragSource instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkTreeDragSource instance.

    Declaration

    Swift

    var tree_drag_source_ptr: UnsafeMutablePointer<GtkTreeDragSource>! { get }
  • Required Initialiser for types conforming to TreeDragSourceProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TreeDragSource Interface: TreeDragSourceProtocol extension (methods and fields)

  • dragDataDelete(path:) Extension method

    Asks the GtkTreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop. Returns false if the deletion fails because path no longer exists, or for some model-specific reason. Should robustly handle a path no longer found in the model!

    Declaration

    Swift

    @inlinable
    func dragDataDelete<TreePathT>(path: TreePathT) -> Bool where TreePathT : TreePathProtocol
  • dragDataGet(path:) Extension method

    Asks the GtkTreeDragSource to return a GdkContentProvider representing the row at path. Should robustly handle a path no longer found in the model!

    Declaration

    Swift

    @inlinable
    func dragDataGet<TreePathT>(path: TreePathT) -> Gdk.ContentProviderRef! where TreePathT : TreePathProtocol
  • rowDraggable(path:) Extension method

    Asks the GtkTreeDragSource whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable.

    Declaration

    Swift

    @inlinable
    func rowDraggable<TreePathT>(path: TreePathT) -> Bool where TreePathT : TreePathProtocol