Package org.lwjgl.system.windows
Class DISPLAY_DEVICE
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.DISPLAY_DEVICE
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class DISPLAY_DEVICE extends Struct
Receives information about the display device specified by theiDevNumparameter of theUser32.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 thelpDeviceparam isNULL, thenDISPLAY_DEVICEis 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.Member documentation
cb– size, in bytes, of theDISPLAY_DEVICEstructure. This must be initialized prior to callingUser32.EnumDisplayDevices(java.nio.ByteBuffer, int, org.lwjgl.system.windows.DISPLAY_DEVICE, int).DeviceName– an array of characters identifying the device name. This is either the adapter device or the monitor device.DeviceString– an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.StateFlags– device state flagsDeviceID– not usedDeviceKey– reserved
Layout
struct DISPLAY_DEVICE { DWORD cb; TCHAR[32] DeviceName; TCHAR[128] DeviceString; DWORD StateFlags; TCHAR[128] DeviceID; TCHAR[128] DeviceKey; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classDISPLAY_DEVICE.BufferAn array ofDISPLAY_DEVICEstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description DISPLAY_DEVICE(java.nio.ByteBuffer container)Creates aDISPLAY_DEVICEinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static DISPLAY_DEVICEcalloc()Returns a newDISPLAY_DEVICEinstance allocated withmemCalloc.static DISPLAY_DEVICE.Buffercalloc(int capacity)Returns a newDISPLAY_DEVICE.Bufferinstance allocated withmemCalloc.static DISPLAY_DEVICEcallocStack()Returns a newDISPLAY_DEVICEinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static DISPLAY_DEVICE.BuffercallocStack(int capacity)Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static DISPLAY_DEVICE.BuffercallocStack(int capacity, MemoryStack stack)Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static DISPLAY_DEVICEcallocStack(MemoryStack stack)Returns a newDISPLAY_DEVICEinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcb()Returns the value of thecbfield.DISPLAY_DEVICEcb(int value)Sets the specified value to thecbfield.static DISPLAY_DEVICEcreate()Returns a newDISPLAY_DEVICEinstance allocated withBufferUtils.static DISPLAY_DEVICE.Buffercreate(int capacity)Returns a newDISPLAY_DEVICE.Bufferinstance allocated withBufferUtils.static DISPLAY_DEVICEcreate(long address)Returns a newDISPLAY_DEVICEinstance for the specified memory address ornullif the address isNULL.static DISPLAY_DEVICE.Buffercreate(long address, int capacity)Create aDISPLAY_DEVICE.Bufferinstance at the specified memory.java.nio.ByteBufferDeviceID()Returns aByteBufferview of theDeviceIDfield.java.lang.StringDeviceIDString()Decodes the null-terminated string stored in theDeviceIDfield.java.nio.ByteBufferDeviceKey()Returns aByteBufferview of theDeviceKeyfield.java.lang.StringDeviceKeyString()Decodes the null-terminated string stored in theDeviceKeyfield.java.nio.ByteBufferDeviceName()Returns aByteBufferview of theDeviceNamefield.java.lang.StringDeviceNameString()Decodes the null-terminated string stored in theDeviceNamefield.java.nio.ByteBufferDeviceString()Returns aByteBufferview of theDeviceStringfield.java.lang.StringDeviceStringString()Decodes the null-terminated string stored in theDeviceStringfield.static DISPLAY_DEVICEmalloc()Returns a newDISPLAY_DEVICEinstance allocated withmemAlloc.static DISPLAY_DEVICE.Buffermalloc(int capacity)Returns a newDISPLAY_DEVICE.Bufferinstance allocated withmemAlloc.static DISPLAY_DEVICEmallocStack()Returns a newDISPLAY_DEVICEinstance allocated on the thread-localMemoryStack.static DISPLAY_DEVICE.BuffermallocStack(int capacity)Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the thread-localMemoryStack.static DISPLAY_DEVICE.BuffermallocStack(int capacity, MemoryStack stack)Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the specifiedMemoryStack.static DISPLAY_DEVICEmallocStack(MemoryStack stack)Returns a newDISPLAY_DEVICEinstance allocated on the specifiedMemoryStack.DISPLAY_DEVICEnset(long struct)Unsafe version ofset.DISPLAY_DEVICEset(DISPLAY_DEVICE src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intStateFlags()Returns the value of theStateFlagsfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
DISPLAY_DEVICE
public DISPLAY_DEVICE(java.nio.ByteBuffer container)
Creates aDISPLAY_DEVICEinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
cb
public int cb()
Returns the value of thecbfield.
-
DeviceName
public java.nio.ByteBuffer DeviceName()
Returns aByteBufferview of theDeviceNamefield.
-
DeviceNameString
public java.lang.String DeviceNameString()
Decodes the null-terminated string stored in theDeviceNamefield.
-
DeviceString
public java.nio.ByteBuffer DeviceString()
Returns aByteBufferview of theDeviceStringfield.
-
DeviceStringString
public java.lang.String DeviceStringString()
Decodes the null-terminated string stored in theDeviceStringfield.
-
StateFlags
public int StateFlags()
Returns the value of theStateFlagsfield.
-
DeviceID
public java.nio.ByteBuffer DeviceID()
Returns aByteBufferview of theDeviceIDfield.
-
DeviceIDString
public java.lang.String DeviceIDString()
Decodes the null-terminated string stored in theDeviceIDfield.
-
DeviceKey
public java.nio.ByteBuffer DeviceKey()
Returns aByteBufferview of theDeviceKeyfield.
-
DeviceKeyString
public java.lang.String DeviceKeyString()
Decodes the null-terminated string stored in theDeviceKeyfield.
-
cb
public DISPLAY_DEVICE cb(int value)
Sets the specified value to thecbfield.
-
nset
public DISPLAY_DEVICE nset(long struct)
Unsafe version ofset.
-
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 newDISPLAY_DEVICEinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static DISPLAY_DEVICE calloc()
Returns a newDISPLAY_DEVICEinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static DISPLAY_DEVICE create()
Returns a newDISPLAY_DEVICEinstance allocated withBufferUtils.
-
create
public static DISPLAY_DEVICE create(long address)
Returns a newDISPLAY_DEVICEinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static DISPLAY_DEVICE.Buffer malloc(int capacity)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static DISPLAY_DEVICE.Buffer calloc(int capacity)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static DISPLAY_DEVICE.Buffer create(int capacity)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static DISPLAY_DEVICE.Buffer create(long address, int capacity)
Create aDISPLAY_DEVICE.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static DISPLAY_DEVICE mallocStack()
Returns a newDISPLAY_DEVICEinstance allocated on the thread-localMemoryStack.
-
callocStack
public static DISPLAY_DEVICE callocStack()
Returns a newDISPLAY_DEVICEinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static DISPLAY_DEVICE mallocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICEinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static DISPLAY_DEVICE callocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICEinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static DISPLAY_DEVICE.Buffer mallocStack(int capacity)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static DISPLAY_DEVICE.Buffer callocStack(int capacity)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static DISPLAY_DEVICE.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static DISPLAY_DEVICE.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newDISPLAY_DEVICE.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-