Class DISPLAY_DEVICE

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

public class DISPLAY_DEVICE extends org.lwjgl.system.Struct<DISPLAY_DEVICE> implements org.lwjgl.system.NativeResource
Receives information about the display device specified by the iDevNum parameter of the User32.EnumDisplayDevices(java.nio.ByteBuffer, int, org.lwjgl.system.windows.DISPLAY_DEVICE, int) function.

The four string members are set based on the parameters passed to EnumDisplayDevices. If the lpDevice param is NULL, then DISPLAY_DEVICE is filled in with information about the display adapter(s). If it is a valid device name, then it is filled in with information about the monitor(s) for that device.

Layout


 struct DISPLAY_DEVICE {
     DWORD cb();
     TCHAR DeviceName()[32];
     TCHAR DeviceString()[128];
     DWORD StateFlags();
     TCHAR DeviceID()[128];
     TCHAR DeviceKey()[128];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CB
      The struct member offsets.
    • DEVICENAME

      public static final int DEVICENAME
      The struct member offsets.
    • DEVICESTRING

      public static final int DEVICESTRING
      The struct member offsets.
    • STATEFLAGS

      public static final int STATEFLAGS
      The struct member offsets.
    • DEVICEID

      public static final int DEVICEID
      The struct member offsets.
    • DEVICEKEY

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

    • DISPLAY_DEVICE

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

      public int cb()
      size, in bytes, of the DISPLAY_DEVICE structure. This must be initialized prior to calling User32.EnumDisplayDevices(java.nio.ByteBuffer, int, org.lwjgl.system.windows.DISPLAY_DEVICE, int).
    • DeviceName

      public ByteBuffer DeviceName()
      an array of characters identifying the device name. This is either the adapter device or the monitor device.
    • DeviceNameString

      public String DeviceNameString()
      an array of characters identifying the device name. This is either the adapter device or the monitor device.
    • DeviceString

      public ByteBuffer DeviceString()
      an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.
    • DeviceStringString

      public String DeviceStringString()
      an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.
    • StateFlags

      public int StateFlags()
      device state flags
    • DeviceID

      public ByteBuffer DeviceID()
      not used
    • DeviceIDString

      public String DeviceIDString()
      not used
    • DeviceKey

      public ByteBuffer DeviceKey()
      reserved
    • DeviceKeyString

      public String DeviceKeyString()
      reserved
    • cb

      public DISPLAY_DEVICE cb(int value)
      Sets the specified value to the cb() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static DISPLAY_DEVICE.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 DISPLAY_DEVICE.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 DISPLAY_DEVICE malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new DISPLAY_DEVICE instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

      public static DISPLAY_DEVICE.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new DISPLAY_DEVICE.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
    • ncb

      public static int ncb(long struct)
      Unsafe version of cb().
    • nDeviceName

      public static ByteBuffer nDeviceName(long struct)
      Unsafe version of DeviceName().
    • nDeviceNameString

      public static String nDeviceNameString(long struct)
      Unsafe version of DeviceNameString().
    • nDeviceString

      public static ByteBuffer nDeviceString(long struct)
      Unsafe version of DeviceString().
    • nDeviceStringString

      public static String nDeviceStringString(long struct)
      Unsafe version of DeviceStringString().
    • nStateFlags

      public static int nStateFlags(long struct)
      Unsafe version of StateFlags().
    • nDeviceID

      public static ByteBuffer nDeviceID(long struct)
      Unsafe version of DeviceID().
    • nDeviceIDString

      public static String nDeviceIDString(long struct)
      Unsafe version of DeviceIDString().
    • nDeviceKey

      public static ByteBuffer nDeviceKey(long struct)
      Unsafe version of DeviceKey().
    • nDeviceKeyString

      public static String nDeviceKeyString(long struct)
      Unsafe version of DeviceKeyString().
    • ncb

      public static void ncb(long struct, int value)
      Unsafe version of cb.