Class GPU_DEVICE

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class GPU_DEVICE extends Struct<GPU_DEVICE> implements NativeResource
Receives information about the display device specified by the deviceIndex parameter of the EnumGpuDevicesNV function.

Layout


 struct GPU_DEVICE {
     DWORD cb();
     CHAR DeviceName()[32];
     CHAR DeviceString()[128];
     DWORD Flags();
     RECT rcVirtualScreen();
 }
  • 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.
    • FLAGS

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

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

    • GPU_DEVICE

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

      public int cb()
      the size of the GPU_DEVICE structure. Before calling EnumGpuDevicesNV, set cb to the size, in bytes, of GPU_DEVICE.
    • DeviceName

      public ByteBuffer DeviceName()
      a string identifying the display device name. This will be the same string as stored in the DeviceName field of the DISPLAY_DEVICE structure, which is filled in by EnumDisplayDevices.
    • DeviceNameString

      public String DeviceNameString()
      a string identifying the display device name. This will be the same string as stored in the DeviceName field of the DISPLAY_DEVICE structure, which is filled in by EnumDisplayDevices.
    • DeviceString

      public ByteBuffer DeviceString()
      a string describing the GPU for this display device. It is the same string as stored in the DeviceString field in the DISPLAY_DEVICE structure that is filled in by EnumDisplayDevices when it describes a display adapter (and not a monitor).
    • DeviceStringString

      public String DeviceStringString()
      a string describing the GPU for this display device. It is the same string as stored in the DeviceString field in the DISPLAY_DEVICE structure that is filled in by EnumDisplayDevices when it describes a display adapter (and not a monitor).
    • Flags

      public int Flags()
      indicates the state of the display device
    • rcVirtualScreen

      public RECT rcVirtualScreen()
      specifies the display device rectangle, in virtual screen coordinates. The value of rcVirtualScreen is undefined if the device is not part of the desktop, i.e. DISPLAY_DEVICE_ATTACHED_TO_DESKTOP is not set in the Flags field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static GPU_DEVICE calloc(MemoryStack stack)
      Returns a new GPU_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 GPU_DEVICE.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

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

      public static int nFlags(long struct)
      Unsafe version of Flags().
    • nrcVirtualScreen

      public static RECT nrcVirtualScreen(long struct)
      Unsafe version of rcVirtualScreen().