Interface CursorGetTextureCallback

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

Functional interface declaration of the CursorGetTextureCallback callback.

See Also:
  • Method Details

    • run

      Texture run(Cursor cursor, int cursorSize, double scale, Out<Integer> width, Out<Integer> height, Out<Integer> hotspotX, Out<Integer> hotspotY, @Nullable MemorySegment data)

      The type of callback used by a dynamic GdkCursor to generate a texture for the cursor image at the given cursorSize and scale.

      The actual cursor size in application pixels may be different from cursorSize x cursorSize, and will be returned in width, height. The returned texture should have a size that corresponds to the actual cursor size, in device pixels (i.e. application pixels, multiplied by scale).

      This function may fail and return NULL, in which case the fallback cursor will be used.

      Parameters:
      cursor - the GdkCursor
      cursorSize - the nominal cursor size, in application pixels
      scale - the device scale
      width - return location for the actual cursor width, in application pixels
      height - return location for the actual cursor height, in application pixels
      hotspotX - return location for the hotspot X position, in application pixels
      hotspotY - return location for the hotspot Y position, in application pixels
      data - User data for the callback
      Returns:
      the cursor image, or NULL if none could be produced.
    • upcall

      default MemorySegment upcall(MemorySegment cursor, int cursorSize, double scale, MemorySegment width, MemorySegment height, MemorySegment hotspotX, MemorySegment hotspotY, MemorySegment data)
      The upcall method is called from native code. The parameters are marshaled and run(Cursor, int, double, Out, Out, Out, Out, MemorySegment) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer