CustomSorterProtocol

public protocol CustomSorterProtocol : SorterProtocol

GtkCustomSorter is a GtkSorter implementation that sorts via a callback function.

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

  • ptr

    Untyped pointer to the underlying GtkCustomSorter instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkCustomSorter instance.

    Default Implementation

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

    Declaration

    Swift

    var custom_sorter_ptr: UnsafeMutablePointer<GtkCustomSorter>! { get }
  • Required Initialiser for types conforming to CustomSorterProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

CustomSorter Class: CustomSorterProtocol extension (methods and fields)

  • Sets (or unsets) the function used for sorting items.

    If sort_func is nil, all items are considered equal.

    If the sort func changes its sorting behavior, gtk_sorter_changed() needs to be called.

    If a previous function was set, its user_destroy will be called now.

    Declaration

    Swift

    @inlinable
    func set(sortFunc: GCompareDataFunc? = nil, userData: gpointer! = nil, userDestroy: GDestroyNotify?)