Class MONITORINFOEX

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class MONITORINFOEX extends Struct<MONITORINFOEX> implements NativeResource

 struct MONITORINFOEX {
     DWORD cbSize;
     RECT rcMonitor;
     RECT rcWork;
     DWORD dwFlags;
     TCHAR szDevice[32];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CBSIZE
      The struct member offsets.
    • RCMONITOR

      public static final int RCMONITOR
      The struct member offsets.
    • RCWORK

      public static final int RCWORK
      The struct member offsets.
    • DWFLAGS

      public static final int DWFLAGS
      The struct member offsets.
    • SZDEVICE

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

    • MONITORINFOEX

      public MONITORINFOEX(ByteBuffer container)
      Creates a MONITORINFOEX 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<MONITORINFOEX>
    • cbSize

      public int cbSize()
      Returns:
      the value of the cbSize field.
    • rcMonitor

      public RECT rcMonitor()
      Returns:
      a RECT view of the rcMonitor field.
    • rcWork

      public RECT rcWork()
      Returns:
      a RECT view of the rcWork field.
    • dwFlags

      public int dwFlags()
      Returns:
      the value of the dwFlags field.
    • szDevice

      public ByteBuffer szDevice()
      Returns:
      a ByteBuffer view of the szDevice field.
    • szDeviceString

      public String szDeviceString()
      Returns:
      the null-terminated string stored in the szDevice field.
    • cbSize

      public MONITORINFOEX cbSize(int value)
      Sets the specified value to the cbSize field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ncbSize(long struct)
      Unsafe version of cbSize().
    • nrcMonitor

      public static RECT nrcMonitor(long struct)
      Unsafe version of rcMonitor().
    • nrcWork

      public static RECT nrcWork(long struct)
      Unsafe version of rcWork().
    • ndwFlags

      public static int ndwFlags(long struct)
      Unsafe version of dwFlags().
    • nszDevice

      public static ByteBuffer nszDevice(long struct)
      Unsafe version of szDevice().
    • nszDeviceString

      public static String nszDeviceString(long struct)
      Unsafe version of szDeviceString().
    • ncbSize

      public static void ncbSize(long struct, int value)
      Unsafe version of cbSize.