- All Superinterfaces:
Callback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
IGLFWCursorPosFun
relies on preview features of the Java platform:
IGLFWCursorPosFun
refers to one or more preview APIs:FunctionDescriptor
,MemorySegment
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This is the function pointer type for cursor position callbacks. A cursor
position callback function has the following signature:
@Invoker(IGLFWCursorPosFun::invoke)
void functionName(MemorySegment window, double xpos, double ypos);
- Since:
- 0.1.0
- Author:
- squid233
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault FunctionDescriptorPREVIEW
Returns the function descriptor of this callback.default MethodHandle
handle
(MethodHandles.Lookup lookup) Finds the method handle from the given method handles lookup.void
invoke
(MemorySegmentPREVIEW window, double xpos, double ypos) The function pointer type for cursor position callbacks.
-
Field Details
-
DESC
-
MTYPE
-
-
Method Details
-
invoke
The function pointer type for cursor position callbacks.- Parameters:
window
- The window that received the event.xpos
- The new cursor x-coordinate, relative to the left edge of the content area.ypos
- The new cursor y-coordinate, relative to the top edge of the content area.
-
descriptor
Description copied from interface:Callback
Returns the function descriptor of this callback.- Specified by:
descriptor
in interfaceCallback
- Returns:
- the function descriptor of this callback
-
handle
default MethodHandle handle(MethodHandles.Lookup lookup) throws NoSuchMethodException, IllegalAccessException Description copied from interface:Callback
Finds the method handle from the given method handles lookup.- Specified by:
handle
in interfaceCallback
- Parameters:
lookup
- the lookup- Returns:
- the method handle
- Throws:
NoSuchMethodException
- if the method does not existIllegalAccessException
- if access checking fails, or if the method isstatic
, or if the method's variable arity modifier bit is set andasVarargsCollector
fails
-
IGLFWCursorPosFun
when preview features are enabled.