Interface EntryCompletion.InsertPrefixCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
EntryCompletion
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 EntryCompletion.InsertPrefixCallback extends FunctionPointer

Functional interface declaration of the InsertPrefixCallback callback.

See Also:
  • Method Details

    • run

      boolean run(String prefix)

      Emitted when the inline autocompletion is triggered.

      The default behaviour is to make the entry display the whole prefix and select the newly inserted part.

      Applications may connect to this signal in order to insert only a smaller part of the prefix into the entry - e.g. the entry used in the GtkFileChooser inserts only the part of the prefix up to the next '/'.

    • upcall

      default int upcall(MemorySegment sourceEntryCompletion, MemorySegment prefix)
      The upcall method is called from native code. The parameters are marshaled and run(String) 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