Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GtkCustomSorter

[12:7] extends: object

Sorts items via a callback function.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GtkCustomSorter (sort_func = null, user_data = null, user_destroy = null)

    Creates a new GtkSorter that works by calling @sort_func to compare items. If @sort_func is %NULL, all items are considered equal.

    • @p sort_func is the GCompareDataFunc to use for sorting.
    • @p user_data is user data to pass to @sort_func.
    • @p user_destroy is destroy notify for @user_data.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asSorter ()

    Wraps this handle as GtkSorter.

    • @r A GtkSorter object.
  • set_sort_func (object user_destroy)

    Sets (or unsets) the function used for sorting items. If @sort_func is %NULL, 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.

    • @p sort_func is function to sort items.
    • @p user_data is user data to pass to @match_func.
    • @p user_destroy is destroy notify for @user_data.
    • @r None.