Package org.lwjgl.system.dyncall
Class DynCallback
- java.lang.Object
-
- org.lwjgl.system.dyncall.DynCallback
-
public class DynCallback extends java.lang.Object
Native bindings to \"dyncall_callback.h\".The dyncallback dyncall library has an interface to create callback objects, that can be passed to functions as callback arguments. In other words, a pointer to the callback object can be "called", directly. The callback handler then allows iterating dynamically over the arguments once called back.
-
-
Field Summary
Fields Modifier and Type Field Description static char
DCB_SIGCHAR_CC_ELLIPSIS
DCB_SIGCHAR_CC_FASTCALL_GNU
DCB_SIGCHAR_CC_FASTCALL_MS
DCB_SIGCHAR_CC_PREFIX
DCB_SIGCHAR_CC_STDCALL
DCB_SIGCHAR_CC_THISCALL_MSCallback signatures.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
dcbArgBool(long args)
Returns the nextbool
argument.static byte
dcbArgChar(long args)
Returns the nextchar
argument.static double
dcbArgDouble(long args)
Returns the nextdouble
argument.static float
dcbArgFloat(long args)
Returns the nextfloat
argument.static int
dcbArgInt(long args)
Returns the nextint
argument.static long
dcbArgLong(long args)
Returns the nextlong
argument.static long
dcbArgLongLong(long args)
Returns the nextlong long
argument.static long
dcbArgPointer(long args)
Returns the nextpointer
argument.static short
dcbArgShort(long args)
Returns the nextshort
argument.static byte
dcbArgUChar(long args)
Returns the nextunsigned char
argument.static int
dcbArgUInt(long args)
Returns the nextunsigned int
argument.static long
dcbArgULong(long args)
Returns the nextunsigned long
argument.static long
dcbArgULongLong(long args)
Returns the nextunsigned long long
argument.static short
dcbArgUShort(long args)
Returns the nextunsigned short
argument.static void
dcbFreeCallback(long pcb)
Destroys and frees the callback object.static long
dcbGetUserData(long pcb)
Returns a pointer to theuserdata
passed to the callback object on creation or initialization.static void
dcbInitCallback(long pcb, java.lang.CharSequence signature, long handler, long userdata)
(Re)initializes a callback object.static void
dcbInitCallback(long pcb, java.nio.ByteBuffer signature, long handler, long userdata)
(Re)initializes a callback object.static long
dcbNewCallback(java.lang.CharSequence signature, long funcptr, long userdata)
Creates and initializes a newCallback
object.static long
dcbNewCallback(java.nio.ByteBuffer signature, long funcptr, long userdata)
Creates and initializes a newCallback
object.static int
ndcbArgBool(long args)
Unsafe version of:ArgBool
static byte
ndcbArgChar(long args)
Unsafe version of:ArgChar
static double
ndcbArgDouble(long args)
Unsafe version of:ArgDouble
static float
ndcbArgFloat(long args)
Unsafe version of:ArgFloat
static int
ndcbArgInt(long args)
Unsafe version of:ArgInt
static long
ndcbArgLong(long args)
Unsafe version of:ArgLong
static long
ndcbArgLongLong(long args)
Unsafe version of:ArgLongLong
static long
ndcbArgPointer(long args)
Unsafe version of:ArgPointer
static short
ndcbArgShort(long args)
Unsafe version of:ArgShort
static byte
ndcbArgUChar(long args)
Unsafe version of:ArgUChar
static int
ndcbArgUInt(long args)
Unsafe version of:ArgUInt
static long
ndcbArgULong(long args)
Unsafe version of:ArgULong
static long
ndcbArgULongLong(long args)
Unsafe version of:ArgULongLong
static short
ndcbArgUShort(long args)
Unsafe version of:ArgUShort
static void
ndcbFreeCallback(long pcb)
Unsafe version of:FreeCallback
static long
ndcbGetUserData(long pcb)
Unsafe version of:GetUserData
static void
ndcbInitCallback(long pcb, long signature, long handler, long userdata)
Unsafe version of:InitCallback
static long
ndcbNewCallback(long signature, long funcptr, long userdata)
Unsafe version of:NewCallback
-
-
-
Method Detail
-
ndcbNewCallback
public static long ndcbNewCallback(long signature, long funcptr, long userdata)
Unsafe version of:NewCallback
-
dcbNewCallback
public static long dcbNewCallback(java.nio.ByteBuffer signature, long funcptr, long userdata) public static long dcbNewCallback(java.lang.CharSequence signature, long funcptr, long userdata)
Creates and initializes a newCallback
object.Use
FreeCallback
to destroy theCallback
object.- Parameters:
signature
- the function signature of the function to mimicfuncptr
- a pointer to a callback handleruserdata
- a pointer to custom data that might be useful in the handler
-
ndcbInitCallback
public static void ndcbInitCallback(long pcb, long signature, long handler, long userdata)
Unsafe version of:InitCallback
-
dcbInitCallback
public static void dcbInitCallback(long pcb, java.nio.ByteBuffer signature, long handler, long userdata) public static void dcbInitCallback(long pcb, java.lang.CharSequence signature, long handler, long userdata)
(Re)initializes a callback object.- Parameters:
pcb
- the callback objectsignature
- the function signature of the function to mimichandler
- a pointer to a callback handleruserdata
- a pointer to custom data that might be useful in the handler
-
ndcbFreeCallback
public static void ndcbFreeCallback(long pcb)
Unsafe version of:FreeCallback
-
dcbFreeCallback
public static void dcbFreeCallback(long pcb)
Destroys and frees the callback object.- Parameters:
pcb
- the callback object
-
ndcbGetUserData
public static long ndcbGetUserData(long pcb)
Unsafe version of:GetUserData
-
dcbGetUserData
public static long dcbGetUserData(long pcb)
Returns a pointer to theuserdata
passed to the callback object on creation or initialization.- Parameters:
pcb
- the callback object
-
ndcbArgBool
public static int ndcbArgBool(long args)
Unsafe version of:ArgBool
-
dcbArgBool
public static boolean dcbArgBool(long args)
Returns the nextbool
argument.- Parameters:
args
- the function arguments
-
ndcbArgChar
public static byte ndcbArgChar(long args)
Unsafe version of:ArgChar
-
dcbArgChar
public static byte dcbArgChar(long args)
Returns the nextchar
argument.- Parameters:
args
- the function arguments
-
ndcbArgShort
public static short ndcbArgShort(long args)
Unsafe version of:ArgShort
-
dcbArgShort
public static short dcbArgShort(long args)
Returns the nextshort
argument.- Parameters:
args
- the function arguments
-
ndcbArgInt
public static int ndcbArgInt(long args)
Unsafe version of:ArgInt
-
dcbArgInt
public static int dcbArgInt(long args)
Returns the nextint
argument.- Parameters:
args
- the function arguments
-
ndcbArgLong
public static long ndcbArgLong(long args)
Unsafe version of:ArgLong
-
dcbArgLong
public static long dcbArgLong(long args)
Returns the nextlong
argument.- Parameters:
args
- the function arguments
-
ndcbArgLongLong
public static long ndcbArgLongLong(long args)
Unsafe version of:ArgLongLong
-
dcbArgLongLong
public static long dcbArgLongLong(long args)
Returns the nextlong long
argument.- Parameters:
args
- the function arguments
-
ndcbArgUChar
public static byte ndcbArgUChar(long args)
Unsafe version of:ArgUChar
-
dcbArgUChar
public static byte dcbArgUChar(long args)
Returns the nextunsigned char
argument.- Parameters:
args
- the function arguments
-
ndcbArgUShort
public static short ndcbArgUShort(long args)
Unsafe version of:ArgUShort
-
dcbArgUShort
public static short dcbArgUShort(long args)
Returns the nextunsigned short
argument.- Parameters:
args
- the function arguments
-
ndcbArgUInt
public static int ndcbArgUInt(long args)
Unsafe version of:ArgUInt
-
dcbArgUInt
public static int dcbArgUInt(long args)
Returns the nextunsigned int
argument.- Parameters:
args
- the function arguments
-
ndcbArgULong
public static long ndcbArgULong(long args)
Unsafe version of:ArgULong
-
dcbArgULong
public static long dcbArgULong(long args)
Returns the nextunsigned long
argument.- Parameters:
args
- the function arguments
-
ndcbArgULongLong
public static long ndcbArgULongLong(long args)
Unsafe version of:ArgULongLong
-
dcbArgULongLong
public static long dcbArgULongLong(long args)
Returns the nextunsigned long long
argument.- Parameters:
args
- the function arguments
-
ndcbArgFloat
public static float ndcbArgFloat(long args)
Unsafe version of:ArgFloat
-
dcbArgFloat
public static float dcbArgFloat(long args)
Returns the nextfloat
argument.- Parameters:
args
- the function arguments
-
ndcbArgDouble
public static double ndcbArgDouble(long args)
Unsafe version of:ArgDouble
-
dcbArgDouble
public static double dcbArgDouble(long args)
Returns the nextdouble
argument.- Parameters:
args
- the function arguments
-
ndcbArgPointer
public static long ndcbArgPointer(long args)
Unsafe version of:ArgPointer
-
dcbArgPointer
public static long dcbArgPointer(long args)
Returns the nextpointer
argument.- Parameters:
args
- the function arguments
-
-