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 implements NativeResource
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 isNULL
when 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;
POINT
pt; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
MSG.Buffer
An array ofMSG
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 MSG
calloc()
static MSG.Buffer
calloc(int capacity)
Returns a newMSG.Buffer
instance allocated withmemCalloc
.static MSG
callocStack()
Returns a newMSG
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MSG.Buffer
callocStack(int capacity)
Returns a newMSG.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MSG.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newMSG.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MSG
callocStack(MemoryStack stack)
Returns a newMSG
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MSG
create()
Returns a newMSG
instance allocated withBufferUtils
.static MSG.Buffer
create(int capacity)
Returns a newMSG.Buffer
instance allocated withBufferUtils
.static MSG
create(long address)
static MSG.Buffer
create(long address, int capacity)
Create aMSG.Buffer
instance at the specified memory.long
hwnd()
Returns the value of thehwnd
field.MSG
hwnd(long value)
Sets the specified value to thehwnd
field.long
lParam()
Returns the value of thelParam
field.MSG
lParam(long value)
Sets the specified value to thelParam
field.static MSG
malloc()
static MSG.Buffer
malloc(int capacity)
Returns a newMSG.Buffer
instance allocated withmemAlloc
.static MSG
mallocStack()
Returns a newMSG
instance allocated on the thread-localMemoryStack
.static MSG.Buffer
mallocStack(int capacity)
Returns a newMSG.Buffer
instance allocated on the thread-localMemoryStack
.static MSG.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newMSG.Buffer
instance allocated on the specifiedMemoryStack
.static MSG
mallocStack(MemoryStack stack)
Returns a newMSG
instance allocated on the specifiedMemoryStack
.int
message()
Returns the value of themessage
field.MSG
message(int value)
Sets the specified value to themessage
field.POINT
pt()
Returns aPOINT
view of thept
field.MSG
pt(POINT value)
Copies the specifiedPOINT
to thept
field.MSG
set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)
Initializes this struct with the specified values.MSG
set(MSG src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
time()
Returns the value of thetime
field.MSG
time(int value)
Sets the specified value to thetime
field.long
wParam()
Returns the value of thewParam
field.MSG
wParam(long value)
Sets the specified value to thewParam
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
-
-
-
Constructor Detail
-
MSG
public MSG(java.nio.ByteBuffer container)
Creates aMSG
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.
-
hwnd
public long hwnd()
Returns the value of thehwnd
field.
-
message
public int message()
Returns the value of themessage
field.
-
wParam
public long wParam()
Returns the value of thewParam
field.
-
lParam
public long lParam()
Returns the value of thelParam
field.
-
time
public int time()
Returns the value of thetime
field.
-
hwnd
public MSG hwnd(long value)
Sets the specified value to thehwnd
field.
-
message
public MSG message(int value)
Sets the specified value to themessage
field.
-
wParam
public MSG wParam(long value)
Sets the specified value to thewParam
field.
-
lParam
public MSG lParam(long value)
Sets the specified value to thelParam
field.
-
time
public MSG time(int value)
Sets the specified value to thetime
field.
-
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 newMSG
instance allocated withBufferUtils
.
-
create
public static MSG create(long address)
-
malloc
public static MSG.Buffer malloc(int capacity)
Returns a newMSG.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static MSG.Buffer calloc(int capacity)
Returns a newMSG.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static MSG.Buffer create(int capacity)
Returns a newMSG.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static MSG.Buffer create(long address, int capacity)
Create aMSG.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static MSG mallocStack()
Returns a newMSG
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static MSG callocStack()
Returns a newMSG
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static MSG mallocStack(MemoryStack stack)
Returns a newMSG
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static MSG callocStack(MemoryStack stack)
Returns a newMSG
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static MSG.Buffer callocStack(int capacity)
Returns a newMSG.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static MSG.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newMSG.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-