Class MONITORINFOEX

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class MONITORINFOEX extends Struct<MONITORINFOEX> implements NativeResource
Contains information about a display monitor.

Layout


 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()
      the size, in bytes, of the structure.

      Set this member to SIZEOF before calling the User32.GetMonitorInfo(long, org.lwjgl.system.windows.MONITORINFOEX) function. Doing so lets the function determine the type of structure you are passing to it.

    • rcMonitor

      public RECT rcMonitor()
      a RECT structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
    • rcWork

      public RECT rcWork()
      a RECT structure that specifies the work area rectangle of the display monitor that can be used by applications, expressed in virtual-screen coordinates. Windows uses this rectangle to maximize an application on the monitor. The rest of the area in rcMonitor contains system windows such as the task bar and side bars. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.
    • dwFlags

      public int dwFlags()
      the attributes of the display monitor. May be:
      User32.MONITORINFOF_PRIMARY
    • szDevice

      public ByteBuffer szDevice()
      a string that specifies the device name of the monitor being used
    • szDeviceString

      public String szDeviceString()
      a string that specifies the device name of the monitor being used
    • 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

      @Nullable public static 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

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

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

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

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

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

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

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

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

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