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 Summary
Modifier and TypeMethodDescriptionrun(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 dynamicGdkCursorto generate a texture for the cursor image at the givencursorSizeandscale.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, int, double, MemorySegment, MemorySegment, MemorySegment, MemorySegment, MemorySegment)method.default MemorySegmentupcall(MemorySegment cursor, int cursorSize, double scale, MemorySegment width, MemorySegment height, MemorySegment hotspotX, MemorySegment hotspotY, MemorySegment data) Theupcallmethod is called from native code.
-
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
GdkCursorto generate a texture for the cursor image at the givencursorSizeandscale.The actual cursor size in application pixels may be different from
cursorSizexcursorSize,and will be returned inwidth,height.The returned texture should have a size that corresponds to the actual cursor size, in device pixels (i.e. application pixels, multiplied byscale).This function may fail and return
NULL, in which case the fallback cursor will be used.- Parameters:
cursor- theGdkCursorcursorSize- the nominal cursor size, in application pixelsscale- the device scalewidth- return location for the actual cursor width, in application pixelsheight- return location for the actual cursor height, in application pixelshotspotX- return location for the hotspot X position, in application pixelshotspotY- return location for the hotspot Y position, in application pixelsdata- User data for the callback- Returns:
- the cursor image, or
NULLif none could be produced.
-
upcall
default MemorySegment upcall(MemorySegment cursor, int cursorSize, double scale, MemorySegment width, MemorySegment height, MemorySegment hotspotX, MemorySegment hotspotY, MemorySegment data) Theupcallmethod is called from native code. The parameters are marshaled andrun(Cursor, int, double, Out, Out, Out, Out, MemorySegment)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, int, double, MemorySegment, MemorySegment, MemorySegment, MemorySegment, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-