Package org.gnome.gdk
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("io.github.jwharm.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 dynamicGdkCursor
to generate a texture for the cursor image at the givencursorSize
andscale
.default MemorySegment
toCallback
(Arena arena) default MemorySegment
upcall
(MemorySegment cursor, int cursorSize, double scale, MemorySegment width, MemorySegment height, MemorySegment hotspotX, MemorySegment hotspotY, MemorySegment data) Theupcall
method 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 @Nullable MemorySegment data) The type of callback used by a dynamicGdkCursor
to generate a texture for the cursor image at the givencursorSize
andscale
.The actual cursor size in application pixels may be different from
cursorSize
xcursorSize
, 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. -
upcall
default MemorySegment upcall(MemorySegment cursor, int cursorSize, double scale, MemorySegment width, MemorySegment height, MemorySegment hotspotX, MemorySegment hotspotY, MemorySegment data) Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gdk.Cursor, int, double, io.github.jwharm.javagi.base.Out<java.lang.Integer>, io.github.jwharm.javagi.base.Out<java.lang.Integer>, io.github.jwharm.javagi.base.Out<java.lang.Integer>, io.github.jwharm.javagi.base.Out<java.lang.Integer>, java.lang.foreign.MemorySegment)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, double, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-