Interface BufferMessageFunc

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 BufferMessageFunc extends FunctionPointer

Functional interface declaration of the BufferMessageFunc callback.

See Also:
  • Method Details

    • run

      Bool run(Buffer buffer, Font font, String message)
      A callback method for hb_buffer_t. The method gets called with the hb_buffer_t it was set on, the hb_font_t the buffer is shaped with and a message describing what step of the shaping process will be performed. Returning false from this method will skip this shaping step and move to the next one.
      Parameters:
      buffer - An hb_buffer_t to work upon
      font - The hb_font_t the buffer is shaped with
      message - NULL-terminated message passed to the function
      Returns:
      true to perform the shaping step, false to skip it.
      Since:
      1.1.3
    • upcall

      default int upcall(MemorySegment buffer, MemorySegment font, MemorySegment message, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(Buffer, Font, String) is executed.
    • toCallback

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