Package org.lwjgl.system.windows
Class KEYBDINPUT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.KEYBDINPUT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,NativeResource,Pointer
public class KEYBDINPUT extends Struct implements NativeResource
Contains information about a simulated keyboard event.Member documentation
wVk– A virtual-key code.The code must be a value in the range 1 to 254. If the
dwFlagsmember specifiesUser32.KEYEVENTF_UNICODE,wVkmust be 0.wScan– A hardware scan code for the key.If
dwFlagsspecifiesUser32.KEYEVENTF_UNICODE,wScanspecifies a Unicode character which is to be sent to the foreground application.dwFlags– specifies various aspects of a keystroke. One of:User32.KEYEVENTF_EXTENDEDKEYUser32.KEYEVENTF_KEYUPUser32.KEYEVENTF_SCANCODEUser32.KEYEVENTF_UNICODEtime– the time stamp for the event, in milliseconds. If this parameter is zero, the system will provide its own time stamp.dwExtraInfo– an additional value associated with the keystroke. Use theUser32.GetMessageExtraInfo()function to obtain this information.
Layout
struct KEYBDINPUT { WORD wVk; WORD wScan; DWORD dwFlags; DWORD time; ULONG_PTR dwExtraInfo; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKEYBDINPUT.BufferAn array ofKEYBDINPUTstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDWEXTRAINFO
DWFLAGSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTIME
WSCAN
WVKThe struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description KEYBDINPUT(java.nio.ByteBuffer container)Creates aKEYBDINPUTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KEYBDINPUTcalloc()Returns a newKEYBDINPUTinstance allocated withmemCalloc.static KEYBDINPUT.Buffercalloc(int capacity)Returns a newKEYBDINPUT.Bufferinstance allocated withmemCalloc.static KEYBDINPUTcallocStack()Returns a newKEYBDINPUTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static KEYBDINPUT.BuffercallocStack(int capacity)Returns a newKEYBDINPUT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static KEYBDINPUT.BuffercallocStack(int capacity, MemoryStack stack)Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static KEYBDINPUTcallocStack(MemoryStack stack)Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static KEYBDINPUTcreate()Returns a newKEYBDINPUTinstance allocated withBufferUtils.static KEYBDINPUT.Buffercreate(int capacity)Returns a newKEYBDINPUT.Bufferinstance allocated withBufferUtils.static KEYBDINPUTcreate(long address)Returns a newKEYBDINPUTinstance for the specified memory address.static KEYBDINPUT.Buffercreate(long address, int capacity)Create aKEYBDINPUT.Bufferinstance at the specified memory.static KEYBDINPUTcreateSafe(long address)static KEYBDINPUT.BuffercreateSafe(long address, int capacity)longdwExtraInfo()Returns the value of thedwExtraInfofield.KEYBDINPUTdwExtraInfo(long value)Sets the specified value to thedwExtraInfofield.intdwFlags()Returns the value of thedwFlagsfield.KEYBDINPUTdwFlags(int value)Sets the specified value to thedwFlagsfield.static KEYBDINPUTmalloc()Returns a newKEYBDINPUTinstance allocated withmemAlloc.static KEYBDINPUT.Buffermalloc(int capacity)Returns a newKEYBDINPUT.Bufferinstance allocated withmemAlloc.static KEYBDINPUTmallocStack()Returns a newKEYBDINPUTinstance allocated on the thread-localMemoryStack.static KEYBDINPUT.BuffermallocStack(int capacity)Returns a newKEYBDINPUT.Bufferinstance allocated on the thread-localMemoryStack.static KEYBDINPUT.BuffermallocStack(int capacity, MemoryStack stack)Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStack.static KEYBDINPUTmallocStack(MemoryStack stack)Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStack.static longndwExtraInfo(long struct)Unsafe version ofdwExtraInfo().static voidndwExtraInfo(long struct, long value)Unsafe version ofdwExtraInfo.static intndwFlags(long struct)Unsafe version ofdwFlags().static voidndwFlags(long struct, int value)Unsafe version ofdwFlags.static intntime(long struct)Unsafe version oftime().static voidntime(long struct, int value)Unsafe version oftime.static shortnwScan(long struct)Unsafe version ofwScan().static voidnwScan(long struct, short value)Unsafe version ofwScan.static shortnwVk(long struct)Unsafe version ofwVk().static voidnwVk(long struct, short value)Unsafe version ofwVk.KEYBDINPUTset(short wVk, short wScan, int dwFlags, int time, long dwExtraInfo)Initializes this struct with the specified values.KEYBDINPUTset(KEYBDINPUT src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).inttime()Returns the value of thetimefield.KEYBDINPUTtime(int value)Sets the specified value to thetimefield.shortwScan()Returns the value of thewScanfield.KEYBDINPUTwScan(short value)Sets the specified value to thewScanfield.shortwVk()Returns the value of thewVkfield.KEYBDINPUTwVk(short value)Sets the specified value to thewVkfield.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
KEYBDINPUT
public KEYBDINPUT(java.nio.ByteBuffer container)
Creates aKEYBDINPUTinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturnssizeof(struct).
-
wVk
public short wVk()
Returns the value of thewVkfield.
-
wScan
public short wScan()
Returns the value of thewScanfield.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlagsfield.
-
time
public int time()
Returns the value of thetimefield.
-
dwExtraInfo
public long dwExtraInfo()
Returns the value of thedwExtraInfofield.
-
wVk
public KEYBDINPUT wVk(short value)
Sets the specified value to thewVkfield.
-
wScan
public KEYBDINPUT wScan(short value)
Sets the specified value to thewScanfield.
-
dwFlags
public KEYBDINPUT dwFlags(int value)
Sets the specified value to thedwFlagsfield.
-
time
public KEYBDINPUT time(int value)
Sets the specified value to thetimefield.
-
dwExtraInfo
public KEYBDINPUT dwExtraInfo(long value)
Sets the specified value to thedwExtraInfofield.
-
set
public KEYBDINPUT set(short wVk, short wScan, int dwFlags, int time, long dwExtraInfo)
Initializes this struct with the specified values.
-
set
public KEYBDINPUT set(KEYBDINPUT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static KEYBDINPUT malloc()
Returns a newKEYBDINPUTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static KEYBDINPUT calloc()
Returns a newKEYBDINPUTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static KEYBDINPUT create()
Returns a newKEYBDINPUTinstance allocated withBufferUtils.
-
create
public static KEYBDINPUT create(long address)
Returns a newKEYBDINPUTinstance for the specified memory address.
-
createSafe
@Nullable public static KEYBDINPUT createSafe(long address)
-
malloc
public static KEYBDINPUT.Buffer malloc(int capacity)
Returns a newKEYBDINPUT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static KEYBDINPUT.Buffer calloc(int capacity)
Returns a newKEYBDINPUT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static KEYBDINPUT.Buffer create(int capacity)
Returns a newKEYBDINPUT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static KEYBDINPUT.Buffer create(long address, int capacity)
Create aKEYBDINPUT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static KEYBDINPUT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static KEYBDINPUT mallocStack()
Returns a newKEYBDINPUTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static KEYBDINPUT callocStack()
Returns a newKEYBDINPUTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static KEYBDINPUT mallocStack(MemoryStack stack)
Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static KEYBDINPUT callocStack(MemoryStack stack)
Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static KEYBDINPUT.Buffer mallocStack(int capacity)
Returns a newKEYBDINPUT.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static KEYBDINPUT.Buffer callocStack(int capacity)
Returns a newKEYBDINPUT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static KEYBDINPUT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static KEYBDINPUT.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nwVk
public static short nwVk(long struct)
Unsafe version ofwVk().
-
nwScan
public static short nwScan(long struct)
Unsafe version ofwScan().
-
ndwFlags
public static int ndwFlags(long struct)
Unsafe version ofdwFlags().
-
ntime
public static int ntime(long struct)
Unsafe version oftime().
-
ndwExtraInfo
public static long ndwExtraInfo(long struct)
Unsafe version ofdwExtraInfo().
-
nwVk
public static void nwVk(long struct, short value)Unsafe version ofwVk.
-
nwScan
public static void nwScan(long struct, short value)Unsafe version ofwScan.
-
ndwFlags
public static void ndwFlags(long struct, int value)Unsafe version ofdwFlags.
-
ntime
public static void ntime(long struct, int value)Unsafe version oftime.
-
ndwExtraInfo
public static void ndwExtraInfo(long struct, long value)Unsafe version ofdwExtraInfo.
-
-