Top Description Inners Fields Constructors Methods
org.lwjgl.system.windows

public Class MSG

extends Struct<MSG>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Contains message information from a thread's message queue.

Layout


struct MSG {
    HWND hwnd;
    UINT message;
    WPARAM wParam;
    LPARAM lParam;
    DWORD time;
    POINT pt;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
MSG.Buffer

An array of MSG structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
HWND

The struct member offsets.

public static final int
LPARAM

The struct member offsets.

public static final int
MESSAGE

The struct member offsets.

public static final int
PT

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TIME

The struct member offsets.

public static final int
WPARAM

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
MSG(long address, ByteBuffer container)

public
MSG(ByteBuffer container)

Creates a MSG instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static MSG
calloc()

Returns a new MSG instance allocated with memCalloc.

public static MSG.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new MSG.Buffer instance allocated with memCalloc.

public static MSG
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new MSG instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static MSG.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new MSG.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static MSG
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static MSG
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static MSG.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static MSG.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected MSG
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static MSG
create()

Returns a new MSG instance allocated with BufferUtils.

public static MSG
create(long address)

Returns a new MSG instance for the specified memory address.

public static MSG.Buffer
create(int
the buffer capacity
capacity
)

Returns a new MSG.Buffer instance allocated with BufferUtils.

public static MSG.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a MSG.Buffer instance at the specified memory.

public static MSG
createSafe(long address)

Like create, but returns null if address is NULL.

public static MSG.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public long
hwnd()

a handle to the window whose window procedure receives the message.

public MSG
hwnd(long value)

Sets the specified value to the hwnd field.

public long
lParam()

additional information about the message.

public MSG
lParam(long value)

Sets the specified value to the lParam field.

public static MSG
malloc()

Returns a new MSG instance allocated with memAlloc.

public static MSG.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new MSG.Buffer instance allocated with memAlloc.

public static MSG
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new MSG instance allocated on the specified MemoryStack.

public static MSG.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new MSG.Buffer instance allocated on the specified MemoryStack.

public static MSG
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static MSG
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static MSG.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static MSG.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
message()

the message identifier.

public MSG
message(int value)

Sets the specified value to the message field.

public static long
nhwnd(long struct)

Unsafe version of hwnd.

public static void
nhwnd(long struct, long value)

Unsafe version of hwnd.

public static long
nlParam(long struct)

Unsafe version of lParam.

public static void
nlParam(long struct, long value)

Unsafe version of lParam.

public static int
nmessage(long struct)

Unsafe version of message.

public static void
nmessage(long struct, int value)

Unsafe version of message.

public static POINT
npt(long struct)

Unsafe version of pt.

public static void
npt(long struct, POINT value)

Unsafe version of pt.

public static int
ntime(long struct)

Unsafe version of time.

public static void
ntime(long struct, int value)

Unsafe version of time.

public static long
nwParam(long struct)

Unsafe version of wParam.

public static void
nwParam(long struct, long value)

Unsafe version of wParam.

public POINT
pt()

the cursor position, in screen coordinates, when the message was posted.

public MSG
pt(POINT value)

Copies the specified POINT to the pt field.

public MSG
pt(Consumer<POINT> consumer)

Passes the pt field to the specified Consumer.

public MSG
set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)

Initializes this struct with the specified values.

public MSG

Returns:

this struct
set
(MSG
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
time()

the time at which the message was posted

public MSG
time(int value)

Sets the specified value to the time field.

public long
wParam()

additional information about the message.

public MSG
wParam(long value)

Sets the specified value to the wParam field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

HWNDback to summary
public static final int HWND

The struct member offsets.

LPARAMback to summary
public static final int LPARAM

The struct member offsets.

MESSAGEback to summary
public static final int MESSAGE

The struct member offsets.

PTback to summary
public static final int PT

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TIMEback to summary
public static final int TIME

The struct member offsets.

WPARAMback to summary
public static final int WPARAM

The struct member offsets.

Constructor Detail

MSGback to summary
protected MSG(long address, ByteBuffer container)
MSGback to summary
public MSG(ByteBuffer container)

Creates a 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.

Method Detail

callocback to summary
public static MSG calloc()

Returns a new MSG instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static MSG.Buffer calloc(int capacity)

Returns a new MSG.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static MSG calloc(MemoryStack stack)

Returns a new MSG instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static MSG.Buffer calloc(int capacity, MemoryStack stack)

Returns a new MSG.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static MSG callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static MSG callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static MSG.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static MSG.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
createback to summary
protected MSG create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static MSG create()

Returns a new MSG instance allocated with BufferUtils.

createback to summary
public static MSG create(long address)

Returns a new MSG instance for the specified memory address.

createback to summary
public static MSG.Buffer create(int capacity)

Returns a new MSG.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static MSG.Buffer create(long address, int capacity)

Create a MSG.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static MSG createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static MSG.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
hwndback to summary
public long hwnd()

a handle to the window whose window procedure receives the message. This member is NULL when the message is a thread message.

Annotations
@NativeType:HWND
hwndback to summary
public MSG hwnd(long value)

Sets the specified value to the hwnd field.

lParamback to summary
public long lParam()

additional information about the message. The exact meaning depends on the value of the message member.

Annotations
@NativeType:LPARAM
lParamback to summary
public MSG lParam(long value)

Sets the specified value to the lParam field.

mallocback to summary
public static MSG malloc()

Returns a new MSG instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static MSG.Buffer malloc(int capacity)

Returns a new MSG.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static MSG malloc(MemoryStack stack)

Returns a new MSG instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static MSG.Buffer malloc(int capacity, MemoryStack stack)

Returns a new MSG.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static MSG mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static MSG mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static MSG.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static MSG.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
messageback to summary
public int message()

the message identifier. Applications can only use the low word; the high word is reserved by the system.

Annotations
@NativeType:UINT
messageback to summary
public MSG message(int value)

Sets the specified value to the message field.

nhwndback to summary
public static long nhwnd(long struct)

Unsafe version of hwnd.

nhwndback to summary
public static void nhwnd(long struct, long value)

Unsafe version of hwnd.

nlParamback to summary
public static long nlParam(long struct)

Unsafe version of lParam.

nlParamback to summary
public static void nlParam(long struct, long value)

Unsafe version of lParam.

nmessageback to summary
public static int nmessage(long struct)

Unsafe version of message.

nmessageback to summary
public static void nmessage(long struct, int value)

Unsafe version of message.

nptback to summary
public static POINT npt(long struct)

Unsafe version of pt.

nptback to summary
public static void npt(long struct, POINT value)

Unsafe version of pt.

ntimeback to summary
public static int ntime(long struct)

Unsafe version of time.

ntimeback to summary
public static void ntime(long struct, int value)

Unsafe version of time.

nwParamback to summary
public static long nwParam(long struct)

Unsafe version of wParam.

nwParamback to summary
public static void nwParam(long struct, long value)

Unsafe version of wParam.

ptback to summary
public POINT pt()

the cursor position, in screen coordinates, when the message was posted.

ptback to summary
public MSG pt(POINT value)

Copies the specified POINT to the pt field.

ptback to summary
public MSG pt(Consumer<POINT> consumer)

Passes the pt field to the specified Consumer.

setback to summary
public MSG set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)

Initializes this struct with the specified values.

setback to summary
public MSG set(MSG src)

Copies the specified struct data to this struct.

Parameters
src:MSG

the source struct

Returns:MSG

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
timeback to summary
public int time()

the time at which the message was posted

Annotations
@NativeType:DWORD
timeback to summary
public MSG time(int value)

Sets the specified value to the time field.

wParamback to summary
public long wParam()

additional information about the message. The exact meaning depends on the value of the message member.

Annotations
@NativeType:WPARAM
wParamback to summary
public MSG wParam(long value)

Sets the specified value to the wParam field.

org.lwjgl.system.windows back to summary

public Class MSG.Buffer

extends StructBuffer<MSG, MSG.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of MSG structs.

Field Summary

Modifier and TypeField and Description
private static final MSG

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new MSG.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected MSG
public long

Returns:

the value of the MSG#hwnd field.
hwnd
()

public MSG.Buffer
hwnd(long value)

Sets the specified value to the MSG#hwnd field.

public long

Returns:

the value of the MSG#lParam field.
lParam
()

public MSG.Buffer
lParam(long value)

Sets the specified value to the MSG#lParam field.

public int

Returns:

the value of the MSG#message field.
message
()

public MSG.Buffer
message(int value)

Sets the specified value to the MSG#message field.

public POINT

Returns:

a POINT view of the MSG#pt field.
pt
()

public MSG.Buffer
pt(POINT value)

Copies the specified POINT to the MSG#pt field.

public MSG.Buffer
pt(Consumer<POINT> consumer)

Passes the MSG#pt field to the specified Consumer.

protected MSG.Buffer
public int

Returns:

the value of the MSG#time field.
time
()

public MSG.Buffer
time(int value)

Sets the specified value to the MSG#time field.

public long

Returns:

the value of the MSG#wParam field.
wParam
()

public MSG.Buffer
wParam(long value)

Sets the specified value to the MSG#wParam field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final MSG ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new MSG.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by MSG#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected MSG getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
hwndback to summary
public long hwnd()
Returns:long

the value of the MSG#hwnd field.

Annotations
@NativeType:HWND
hwndback to summary
public MSG.Buffer hwnd(long value)

Sets the specified value to the MSG#hwnd field.

lParamback to summary
public long lParam()
Returns:long

the value of the MSG#lParam field.

Annotations
@NativeType:LPARAM
lParamback to summary
public MSG.Buffer lParam(long value)

Sets the specified value to the MSG#lParam field.

messageback to summary
public int message()
Returns:int

the value of the MSG#message field.

Annotations
@NativeType:UINT
messageback to summary
public MSG.Buffer message(int value)

Sets the specified value to the MSG#message field.

ptback to summary
public POINT pt()
Returns:POINT

a POINT view of the MSG#pt field.

ptback to summary
public MSG.Buffer pt(POINT value)

Copies the specified POINT to the MSG#pt field.

ptback to summary
public MSG.Buffer pt(Consumer<POINT> consumer)

Passes the MSG#pt field to the specified Consumer.

selfback to summary
protected MSG.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
timeback to summary
public int time()
Returns:int

the value of the MSG#time field.

Annotations
@NativeType:DWORD
timeback to summary
public MSG.Buffer time(int value)

Sets the specified value to the MSG#time field.

wParamback to summary
public long wParam()
Returns:long

the value of the MSG#wParam field.

Annotations
@NativeType:WPARAM
wParamback to summary
public MSG.Buffer wParam(long value)

Sets the specified value to the MSG#wParam field.