Class WINDOWPLACEMENT

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class WINDOWPLACEMENT extends Struct<WINDOWPLACEMENT> implements NativeResource

 struct WINDOWPLACEMENT {
     UINT length;
     UINT flags;
     UINT showCmd;
     POINT ptMinPosition;
     POINT ptMaxPosition;
     RECT rcNormalPosition;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int LENGTH
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • SHOWCMD

      public static final int SHOWCMD
      The struct member offsets.
    • PTMINPOSITION

      public static final int PTMINPOSITION
      The struct member offsets.
    • PTMAXPOSITION

      public static final int PTMAXPOSITION
      The struct member offsets.
    • RCNORMALPOSITION

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

    • WINDOWPLACEMENT

      public WINDOWPLACEMENT(ByteBuffer container)
      Creates a WINDOWPLACEMENT 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<WINDOWPLACEMENT>
    • length

      public int length()
      Returns:
      the value of the length field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • showCmd

      public int showCmd()
      Returns:
      the value of the showCmd field.
    • ptMinPosition

      public POINT ptMinPosition()
      Returns:
      a POINT view of the ptMinPosition field.
    • ptMaxPosition

      public POINT ptMaxPosition()
      Returns:
      a POINT view of the ptMaxPosition field.
    • rcNormalPosition

      public RECT rcNormalPosition()
      Returns:
      a RECT view of the rcNormalPosition field.
    • length

      public WINDOWPLACEMENT length(int value)
      Sets the specified value to the length field.
    • flags

      public WINDOWPLACEMENT flags(int value)
      Sets the specified value to the flags field.
    • showCmd

      public WINDOWPLACEMENT showCmd(int value)
      Sets the specified value to the showCmd field.
    • ptMinPosition

      public WINDOWPLACEMENT ptMinPosition(POINT value)
      Copies the specified POINT to the ptMinPosition field.
    • ptMinPosition

      public WINDOWPLACEMENT ptMinPosition(Consumer<POINT> consumer)
      Passes the ptMinPosition field to the specified Consumer.
    • ptMaxPosition

      public WINDOWPLACEMENT ptMaxPosition(POINT value)
      Copies the specified POINT to the ptMaxPosition field.
    • ptMaxPosition

      public WINDOWPLACEMENT ptMaxPosition(Consumer<POINT> consumer)
      Passes the ptMaxPosition field to the specified Consumer.
    • rcNormalPosition

      public WINDOWPLACEMENT rcNormalPosition(RECT value)
      Copies the specified RECT to the rcNormalPosition field.
    • rcNormalPosition

      public WINDOWPLACEMENT rcNormalPosition(Consumer<RECT> consumer)
      Passes the rcNormalPosition field to the specified Consumer.
    • set

      public WINDOWPLACEMENT set(int length, int flags, int showCmd, POINT ptMinPosition, POINT ptMaxPosition, RECT rcNormalPosition)
      Initializes this struct with the specified values.
    • set

      public WINDOWPLACEMENT set(WINDOWPLACEMENT src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static WINDOWPLACEMENT malloc()
      Returns a new WINDOWPLACEMENT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static WINDOWPLACEMENT calloc(MemoryStack stack)
      Returns a new WINDOWPLACEMENT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static WINDOWPLACEMENT.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new WINDOWPLACEMENT.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static WINDOWPLACEMENT.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new WINDOWPLACEMENT.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
    • nlength

      public static int nlength(long struct)
      Unsafe version of length().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nshowCmd

      public static int nshowCmd(long struct)
      Unsafe version of showCmd().
    • nptMinPosition

      public static POINT nptMinPosition(long struct)
      Unsafe version of ptMinPosition().
    • nptMaxPosition

      public static POINT nptMaxPosition(long struct)
      Unsafe version of ptMaxPosition().
    • nrcNormalPosition

      public static RECT nrcNormalPosition(long struct)
      Unsafe version of rcNormalPosition().
    • nlength

      public static void nlength(long struct, int value)
      Unsafe version of length.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nshowCmd

      public static void nshowCmd(long struct, int value)
      Unsafe version of showCmd.
    • nptMinPosition

      public static void nptMinPosition(long struct, POINT value)
      Unsafe version of ptMinPosition.
    • nptMaxPosition

      public static void nptMaxPosition(long struct, POINT value)
      Unsafe version of ptMaxPosition.
    • nrcNormalPosition

      public static void nrcNormalPosition(long struct, RECT value)
      Unsafe version of rcNormalPosition.