Interface TreeListModelCreateModelFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Generated("org.javagi.JavaGI") public interface TreeListModelCreateModelFunc extends FunctionPointer

Functional interface declaration of the TreeListModelCreateModelFunc callback.

See Also:
  • Method Details

    • run

      ListModel run(GObject item)

      Prototype of the function called to create new child models when gtk_tree_list_row_set_expanded() is called.

      This function can return null to indicate that item is guaranteed to be a leaf node and will never have children. If it does not have children but may get children later, it should return an empty model that is filled once children arrive.

      Parameters:
      item - The item that is being expanded
      Returns:
      The model tracking the children of item or null if item can never have children
    • upcall

      default MemorySegment upcall(MemorySegment item, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(GObject) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer