public class MSG
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
hwnd – a handle to the window whose window procedure receives the message. This member is NULL 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.
struct MSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
}| Modifier and Type | Class and Description |
|---|---|
static class |
MSG.Buffer
An array of
MSG structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
HWND
The struct member offsets.
|
static int |
LPARAM
The struct member offsets.
|
static int |
MESSAGE
The struct member offsets.
|
static int |
PT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TIME
The struct member offsets.
|
static int |
WPARAM
The struct member offsets.
|
| Constructor and Description |
|---|
MSG(java.nio.ByteBuffer container)
Creates a
MSG instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static MSG |
calloc()
Returns a new
MSG instance allocated with memCalloc. |
static MSG.Buffer |
calloc(int capacity)
Returns a new
MSG.Buffer instance allocated with memCalloc. |
static MSG |
callocStack()
Returns a new
MSG instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MSG.Buffer |
callocStack(int capacity)
Returns a new
MSG.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MSG.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MSG.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MSG |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MSG instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MSG |
create()
Returns a new
MSG instance allocated with BufferUtils. |
static MSG.Buffer |
create(int capacity)
Returns a new
MSG.Buffer instance allocated with BufferUtils. |
static MSG |
create(long address)
Returns a new
MSG instance for the specified memory address. |
static MSG.Buffer |
create(long address,
int capacity)
Create a
MSG.Buffer instance at the specified memory. |
static MSG |
createSafe(long address)
|
static MSG.Buffer |
createSafe(long address,
int capacity)
|
long |
hwnd()
Returns the value of the
hwnd field. |
MSG |
hwnd(long value)
Sets the specified value to the
hwnd field. |
long |
lParam()
Returns the value of the
lParam field. |
MSG |
lParam(long value)
Sets the specified value to the
lParam field. |
static MSG |
malloc()
Returns a new
MSG instance allocated with memAlloc. |
static MSG.Buffer |
malloc(int capacity)
Returns a new
MSG.Buffer instance allocated with memAlloc. |
static MSG |
mallocStack()
Returns a new
MSG instance allocated on the thread-local MemoryStack. |
static MSG.Buffer |
mallocStack(int capacity)
Returns a new
MSG.Buffer instance allocated on the thread-local MemoryStack. |
static MSG.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MSG.Buffer instance allocated on the specified MemoryStack. |
static MSG |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MSG instance allocated on the specified MemoryStack. |
int |
message()
Returns the value of the
message field. |
MSG |
message(int value)
Sets the specified value to the
message field. |
static long |
nhwnd(long struct)
Unsafe version of
hwnd(). |
static void |
nhwnd(long struct,
long value)
Unsafe version of
hwnd. |
static long |
nlParam(long struct)
Unsafe version of
lParam(). |
static void |
nlParam(long struct,
long value)
Unsafe version of
lParam. |
static int |
nmessage(long struct)
Unsafe version of
message(). |
static void |
nmessage(long struct,
int value)
Unsafe version of
message. |
static POINT |
npt(long struct)
Unsafe version of
pt(). |
static void |
npt(long struct,
POINT value)
Unsafe version of
pt. |
static int |
ntime(long struct)
Unsafe version of
time(). |
static void |
ntime(long struct,
int value)
Unsafe version of
time. |
static long |
nwParam(long struct)
Unsafe version of
wParam(). |
static void |
nwParam(long struct,
long value)
Unsafe version of
wParam. |
POINT |
pt()
Returns a
POINT view of the pt field. |
MSG |
pt(java.util.function.Consumer<POINT> consumer)
Passes the
pt field to the specified Consumer. |
MSG |
pt(POINT value)
Copies the specified
POINT to the pt 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() |
int |
time()
Returns the value of the
time field. |
MSG |
time(int value)
Sets the specified value to the
time field. |
long |
wParam()
Returns the value of the
wParam field. |
MSG |
wParam(long value)
Sets the specified value to the
wParam field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int HWND
public static final int MESSAGE
public static final int WPARAM
public static final int LPARAM
public static final int TIME
public static final int PT
public MSG(java.nio.ByteBuffer container)
MSG instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic long hwnd()
hwnd field.public int message()
message field.public long wParam()
wParam field.public long lParam()
lParam field.public int time()
time field.public MSG hwnd(long value)
hwnd field.public MSG message(int value)
message field.public MSG wParam(long value)
wParam field.public MSG lParam(long value)
lParam field.public MSG time(int value)
time field.public MSG pt(java.util.function.Consumer<POINT> consumer)
pt field to the specified Consumer.public MSG set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)
public MSG set(MSG src)
src - the source structpublic static MSG malloc()
MSG instance allocated with memAlloc. The instance must be explicitly freed.public static MSG calloc()
MSG instance allocated with memCalloc. The instance must be explicitly freed.public static MSG create()
MSG instance allocated with BufferUtils.public static MSG create(long address)
MSG instance for the specified memory address.@Nullable public static MSG createSafe(long address)
public static MSG.Buffer malloc(int capacity)
MSG.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MSG.Buffer calloc(int capacity)
MSG.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MSG.Buffer create(int capacity)
MSG.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static MSG.Buffer create(long address, int capacity)
MSG.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static MSG.Buffer createSafe(long address, int capacity)
public static MSG mallocStack()
MSG instance allocated on the thread-local MemoryStack.public static MSG callocStack()
MSG instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static MSG mallocStack(org.lwjgl.system.MemoryStack stack)
MSG instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static MSG callocStack(org.lwjgl.system.MemoryStack stack)
MSG instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static MSG.Buffer mallocStack(int capacity)
MSG.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static MSG.Buffer callocStack(int capacity)
MSG.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static MSG.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MSG.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static MSG.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MSG.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static long nhwnd(long struct)
hwnd().public static int nmessage(long struct)
message().public static long nwParam(long struct)
wParam().public static long nlParam(long struct)
lParam().public static int ntime(long struct)
time().public static void nhwnd(long struct,
long value)
hwnd.public static void nmessage(long struct,
int value)
message.public static void nwParam(long struct,
long value)
wParam.public static void nlParam(long struct,
long value)
lParam.public static void ntime(long struct,
int value)
time.Copyright LWJGL. All Rights Reserved. License terms.