Package org.lwjgl.system.windows
Class MSG
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.MSG
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class MSG extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMSG.BufferAn array ofMSGstructs.
-
Constructor Summary
Constructors Constructor Description MSG(java.nio.ByteBuffer container)Creates aMSGinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MSGcalloc()Returns a newMSGinstance allocated withmemCalloc.static MSG.Buffercalloc(int capacity)Returns a newMSG.Bufferinstance allocated withmemCalloc.static MSG.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSGcalloc(org.lwjgl.system.MemoryStack stack)Returns a newMSGinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSGcallocStack()Deprecated.static MSG.BuffercallocStack(int capacity)Deprecated.static MSG.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static MSGcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static MSGcreate()Returns a newMSGinstance allocated withBufferUtils.static MSG.Buffercreate(int capacity)Returns a newMSG.Bufferinstance allocated withBufferUtils.static MSGcreate(long address)Returns a newMSGinstance for the specified memory address.static MSG.Buffercreate(long address, int capacity)Create aMSG.Bufferinstance at the specified memory.static MSGcreateSafe(long address)static MSG.BuffercreateSafe(long address, int capacity)longhwnd()a handle to the window whose window procedure receives the message.MSGhwnd(long value)Sets the specified value to thehwnd()field.longlParam()additional information about the message.MSGlParam(long value)Sets the specified value to thelParam()field.static MSGmalloc()Returns a newMSGinstance allocated withmemAlloc.static MSG.Buffermalloc(int capacity)Returns a newMSG.Bufferinstance allocated withmemAlloc.static MSG.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStack.static MSGmalloc(org.lwjgl.system.MemoryStack stack)Returns a newMSGinstance allocated on the specifiedMemoryStack.static MSGmallocStack()Deprecated.static MSG.BuffermallocStack(int capacity)Deprecated.static MSG.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static MSGmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intmessage()the message identifier.MSGmessage(int value)Sets the specified value to themessage()field.static longnhwnd(long struct)Unsafe version ofhwnd().static voidnhwnd(long struct, long value)Unsafe version ofhwnd.static longnlParam(long struct)Unsafe version oflParam().static voidnlParam(long struct, long value)Unsafe version oflParam.static intnmessage(long struct)Unsafe version ofmessage().static voidnmessage(long struct, int value)Unsafe version ofmessage.static POINTnpt(long struct)Unsafe version ofpt().static voidnpt(long struct, POINT value)Unsafe version ofpt.static intntime(long struct)Unsafe version oftime().static voidntime(long struct, int value)Unsafe version oftime.static longnwParam(long struct)Unsafe version ofwParam().static voidnwParam(long struct, long value)Unsafe version ofwParam.POINTpt()the cursor position, in screen coordinates, when the message was posted.MSGpt(java.util.function.Consumer<POINT> consumer)Passes thept()field to the specifiedConsumer.MSGpt(POINT value)MSGset(long hwnd, int message, long wParam, long lParam, int time, POINT pt)Initializes this struct with the specified values.MSGset(MSG src)Copies the specified struct data to this struct.intsizeof()inttime()the time at which the message was postedMSGtime(int value)Sets the specified value to thetime()field.longwParam()additional information about the message.MSGwParam(long value)Sets the specified value to thewParam()field.
-
-
-
Constructor Detail
-
MSG
public MSG(java.nio.ByteBuffer container)
Creates aMSGinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
hwnd
public long hwnd()
a handle to the window whose window procedure receives the message. This member isNULLwhen the message is a thread message.
-
message
public int message()
the message identifier. Applications can only use the low word; the high word is reserved by the system.
-
wParam, lParam
public long wParam() public long lParam()
additional information about the message. The exact meaning depends on the value of the message member.
-
time
public int time()
the time at which the message was posted
-
pt
public POINT pt()
the cursor position, in screen coordinates, when the message was posted.
-
pt
public MSG pt(java.util.function.Consumer<POINT> consumer)
Passes thept()field to the specifiedConsumer.
-
set
public MSG set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)
Initializes this struct with the specified values.
-
set
public MSG set(MSG src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static MSG malloc()
Returns a newMSGinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static MSG calloc()
Returns a newMSGinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static MSG create()
Returns a newMSGinstance allocated withBufferUtils.
-
create
public static MSG create(long address)
Returns a newMSGinstance for the specified memory address.
-
createSafe
@Nullable public static MSG createSafe(long address)
-
malloc
public static MSG.Buffer malloc(int capacity)
Returns a newMSG.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static MSG.Buffer calloc(int capacity)
Returns a newMSG.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static MSG.Buffer create(int capacity)
Returns a newMSG.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static MSG.Buffer create(long address, int capacity)
Create aMSG.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static MSG.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static MSG mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static MSG callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static MSG mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static MSG callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static MSG.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static MSG.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static MSG.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static MSG.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static MSG malloc(org.lwjgl.system.MemoryStack stack)
Returns a newMSGinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static MSG calloc(org.lwjgl.system.MemoryStack stack)
Returns a newMSGinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static MSG.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static MSG.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nhwnd
public static long nhwnd(long struct)
Unsafe version ofhwnd().
-
nmessage
public static int nmessage(long struct)
Unsafe version ofmessage().
-
nwParam
public static long nwParam(long struct)
Unsafe version ofwParam().
-
nlParam
public static long nlParam(long struct)
Unsafe version oflParam().
-
ntime
public static int ntime(long struct)
Unsafe version oftime().
-
nhwnd
public static void nhwnd(long struct, long value)Unsafe version ofhwnd.
-
nmessage
public static void nmessage(long struct, int value)Unsafe version ofmessage.
-
nwParam
public static void nwParam(long struct, long value)Unsafe version ofwParam.
-
nlParam
public static void nlParam(long struct, long value)Unsafe version oflParam.
-
ntime
public static void ntime(long struct, int value)Unsafe version oftime.
-
-