Class MONITORINFOEX

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer


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

    Member documentation

    • cbSize – the size, in bytes, of the structure.

      Set this member to MONITORINFOEX.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 – 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 – 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 – the attributes of the display monitor. May be:
      User32.MONITORINFOF_PRIMARY
    • szDevice – a string that specifies the device name of the monitor being used

    Layout

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

      • SIZEOF

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

      • MONITORINFOEX

        public MONITORINFOEX(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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 java.nio.ByteBuffer szDevice()
        Returns a ByteBuffer view of the szDevice field.
      • szDeviceString

        public java.lang.String szDeviceString()
        Decodes 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
      • create

        public static MONITORINFOEX create(long address)
        Returns a new MONITORINFOEX instance for the specified memory address or null if the address is NULL.
      • 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
      • callocStack

        public static MONITORINFOEX callocStack(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