Class MSG

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<MSG>
org.lwjgl.system.windows.MSG
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class MSG extends org.lwjgl.system.Struct<MSG> implements org.lwjgl.system.NativeResource
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 Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of MSG structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MSG(ByteBuffer container)
    Creates a MSG instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static MSG
    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.Buffer
    calloc(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
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new MSG instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static MSG
    Deprecated.
    static MSG.Buffer
    callocStack(int capacity)
    Deprecated.
    static MSG.Buffer
    callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MSG
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MSG
    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)
    Like create, but returns null if address is NULL.
    static MSG.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    long
    a handle to the window whose window procedure receives the message.
    hwnd(long value)
    Sets the specified value to the hwnd() field.
    long
    additional information about the message.
    lParam(long value)
    Sets the specified value to the lParam() field.
    static MSG
    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.Buffer
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new MSG.Buffer instance allocated on the specified MemoryStack.
    static MSG
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new MSG instance allocated on the specified MemoryStack.
    static MSG
    Deprecated.
    static MSG.Buffer
    mallocStack(int capacity)
    Deprecated.
    static MSG.Buffer
    mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MSG
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    int
    the message identifier.
    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.
    pt()
    the cursor position, in screen coordinates, when the message was posted.
    pt(Consumer<POINT> consumer)
    Passes the pt() field to the specified Consumer.
    pt(POINT value)
    Copies the specified POINT to the pt() field.
    set(long hwnd, int message, long wParam, long lParam, int time, POINT pt)
    Initializes this struct with the specified values.
    set(MSG src)
    Copies the specified struct data to this struct.
    int
     
    int
    the time at which the message was posted
    time(int value)
    Sets the specified value to the time() field.
    long
    additional information about the message.
    wParam(long value)
    Sets the specified value to the wParam() field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • HWND

      public static final int HWND
      The struct member offsets.
    • MESSAGE

      public static final int MESSAGE
      The struct member offsets.
    • WPARAM

      public static final int WPARAM
      The struct member offsets.
    • LPARAM

      public static final int LPARAM
      The struct member offsets.
    • TIME

      public static final int TIME
      The struct member offsets.
    • PT

      public static final int PT
      The struct member offsets.
  • Constructor Details

    • MSG

      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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<MSG>
    • hwnd

      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.
    • message

      public int message()
      the message identifier. Applications can only use the low word; the high word is reserved by the system.
    • wParam

      public long wParam()
      additional information about the message. The exact meaning depends on the value of the message member.
    • lParam

      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.
    • hwnd

      public MSG hwnd(long value)
      Sets the specified value to the hwnd() field.
    • message

      public MSG message(int value)
      Sets the specified value to the message() field.
    • wParam

      public MSG wParam(long value)
      Sets the specified value to the wParam() field.
    • lParam

      public MSG lParam(long value)
      Sets the specified value to the lParam() field.
    • time

      public MSG time(int value)
      Sets the specified value to the time() field.
    • pt

      public MSG pt(POINT value)
      Copies the specified POINT to the pt() field.
    • pt

      public MSG pt(Consumer<POINT> consumer)
      Passes the pt() field to the specified Consumer.
    • 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 new MSG instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static MSG calloc()
      Returns a new MSG instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static MSG create()
      Returns a new MSG instance allocated with BufferUtils.
    • create

      public static MSG create(long address)
      Returns a new MSG instance for the specified memory address.
    • createSafe

      @Nullable public static MSG createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static MSG.Buffer malloc(int capacity)
      Returns a new MSG.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static MSG.Buffer calloc(int capacity)
      Returns a new MSG.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static MSG.Buffer create(int capacity)
      Returns a new MSG.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static MSG.Buffer create(long address, int capacity)
      Create a MSG.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static MSG.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static MSG mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static MSG callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static MSG mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static MSG callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static MSG.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static MSG.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static MSG malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new MSG instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static MSG calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new MSG instance allocated on the specified MemoryStack and 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 new MSG.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static MSG.Buffer calloc(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.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nhwnd

      public static long nhwnd(long struct)
      Unsafe version of hwnd().
    • nmessage

      public static int nmessage(long struct)
      Unsafe version of message().
    • nwParam

      public static long nwParam(long struct)
      Unsafe version of wParam().
    • nlParam

      public static long nlParam(long struct)
      Unsafe version of lParam().
    • ntime

      public static int ntime(long struct)
      Unsafe version of time().
    • npt

      public static POINT npt(long struct)
      Unsafe version of pt().
    • nhwnd

      public static void nhwnd(long struct, long value)
      Unsafe version of hwnd.
    • nmessage

      public static void nmessage(long struct, int value)
      Unsafe version of message.
    • nwParam

      public static void nwParam(long struct, long value)
      Unsafe version of wParam.
    • nlParam

      public static void nlParam(long struct, long value)
      Unsafe version of lParam.
    • ntime

      public static void ntime(long struct, int value)
      Unsafe version of time.
    • npt

      public static void npt(long struct, POINT value)
      Unsafe version of pt.