Interface TextBuffer.DeleteRangeCallback

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

@FunctionalInterface public static interface TextBuffer.DeleteRangeCallback extends FunctionPointer

Functional interface declaration of the DeleteRangeCallback callback.

See Also:
  • Method Details

    • run

      void run(@Nullable TextIter start, @Nullable TextIter end)

      Emitted to delete a range from a GtkTextBuffer.

      Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them). The default signal handler revalidates the start and end iters to both point to the location where text was deleted. Handlers which run after the default handler (see g_signal_connect_after()) do not have access to the deleted text.

      See also: TextBuffer.delete(TextIter, TextIter).

    • upcall

      default void upcall(MemorySegment sourceTextBuffer, MemorySegment start, MemorySegment end)
      The upcall method is called from native code. The parameters are marshaled and run(TextIter, TextIter) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, 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