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, NativeResource, Pointer
public class MSG extends Struct
Contains message information from a thread's message queue.Member documentation
hwnd– a handle to the window whose window procedure receives the message. This member isNULLwhen the message is a thread message.message– the message identifier. Applications can only use the low word; the high word is reserved by the system.wParam– additional information about the message. The exact meaning depends on the value of the message member.lParam– additional information about the message. The exact meaning depends on the value of the message member.time– the time at which the message was postedpt– the cursor position, in screen coordinates, when the message was posted.
Layout
struct MSG { HWND hwnd; UINT message; WPARAM wParam; LPARAM lParam; DWORD time;POINTpt; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classMSG.BufferAn array ofMSGstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static MSGcalloc()static MSG.Buffercalloc(int capacity)Returns a newMSG.Bufferinstance allocated withmemCalloc.static MSGcallocStack()Returns a newMSGinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static MSG.BuffercallocStack(int capacity)Returns a newMSG.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static MSG.BuffercallocStack(int capacity, MemoryStack stack)Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSGcallocStack(MemoryStack stack)Returns a newMSGinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSGcreate()Returns a newMSGinstance allocated withBufferUtils.static MSG.Buffercreate(int capacity)Returns a newMSG.Bufferinstance allocated withBufferUtils.static MSGcreate(long address)static MSG.Buffercreate(long address, int capacity)Create aMSG.Bufferinstance at the specified memory.longhwnd()Returns the value of thehwndfield.MSGhwnd(long value)Sets the specified value to thehwndfield.longlParam()Returns the value of thelParamfield.MSGlParam(long value)Sets the specified value to thelParamfield.static MSGmalloc()static MSG.Buffermalloc(int capacity)Returns a newMSG.Bufferinstance allocated withmemAlloc.static MSGmallocStack()Returns a newMSGinstance allocated on the thread-localMemoryStack.static MSG.BuffermallocStack(int capacity)Returns a newMSG.Bufferinstance allocated on the thread-localMemoryStack.static MSG.BuffermallocStack(int capacity, MemoryStack stack)Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStack.static MSGmallocStack(MemoryStack stack)Returns a newMSGinstance allocated on the specifiedMemoryStack.intmessage()Returns the value of themessagefield.MSGmessage(int value)Sets the specified value to themessagefield.MSGnset(long struct)Unsafe version ofset.POINTpt()Returns aPOINTview of theptfield.MSGpt(POINT value)Copies the specifiedPOINTto theptfield.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()Returns thesizeof(struct).inttime()Returns the value of thetimefield.MSGtime(int value)Sets the specified value to thetimefield.longwParam()Returns the value of thewParamfield.MSGwParam(long value)Sets the specified value to thewParamfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
hwnd
public long hwnd()
Returns the value of thehwndfield.
-
message
public int message()
Returns the value of themessagefield.
-
wParam
public long wParam()
Returns the value of thewParamfield.
-
lParam
public long lParam()
Returns the value of thelParamfield.
-
time
public int time()
Returns the value of thetimefield.
-
hwnd
public MSG hwnd(long value)
Sets the specified value to thehwndfield.
-
message
public MSG message(int value)
Sets the specified value to themessagefield.
-
wParam
public MSG wParam(long value)
Sets the specified value to thewParamfield.
-
lParam
public MSG lParam(long value)
Sets the specified value to thelParamfield.
-
time
public MSG time(int value)
Sets the specified value to thetimefield.
-
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()
-
calloc
public static MSG calloc()
-
create
public static MSG create()
Returns a newMSGinstance allocated withBufferUtils.
-
create
public static MSG create(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
-
mallocStack
public static MSG mallocStack()
Returns a newMSGinstance allocated on the thread-localMemoryStack.
-
callocStack
public static MSG callocStack()
Returns a newMSGinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static MSG mallocStack(MemoryStack stack)
Returns a newMSGinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static MSG callocStack(MemoryStack stack)
Returns a newMSGinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static MSG.Buffer mallocStack(int capacity)
Returns a newMSG.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static MSG.Buffer callocStack(int capacity)
Returns a newMSG.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static MSG.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newMSG.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static MSG.Buffer callocStack(int capacity, 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
-
-