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 implements NativeResource
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[32]– an array of characters identifying the device name. This is either the adapter device or the monitor device.DeviceString[128]– 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[128]– not usedDeviceKey[128]– reserved
Layout
struct DISPLAY_DEVICE { DWORD cb; TCHAR DeviceName[32]; TCHAR DeviceString[128]; DWORD StateFlags; TCHAR DeviceID[128]; TCHAR DeviceKey[128]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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 Description static intALIGNOFThe struct alignment in bytes.static intCB
DEVICEID
DEVICEKEY
DEVICENAME
DEVICESTRINGThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTATEFLAGSThe struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor 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 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.static DISPLAY_DEVICE.Buffercreate(long address, int capacity)Create aDISPLAY_DEVICE.Bufferinstance at the specified memory.static DISPLAY_DEVICEcreateSafe(long address)static DISPLAY_DEVICE.BuffercreateSafe(long address, int capacity)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.static intncb(long struct)Unsafe version ofcb().static voidncb(long struct, int value)Unsafe version ofcb.static java.nio.ByteBuffernDeviceID(long struct)Unsafe version ofDeviceID().static java.lang.StringnDeviceIDString(long struct)Unsafe version ofDeviceIDString().static java.nio.ByteBuffernDeviceKey(long struct)Unsafe version ofDeviceKey().static java.lang.StringnDeviceKeyString(long struct)Unsafe version ofDeviceKeyString().static java.nio.ByteBuffernDeviceName(long struct)Unsafe version ofDeviceName().static java.lang.StringnDeviceNameString(long struct)Unsafe version ofDeviceNameString().static java.nio.ByteBuffernDeviceString(long struct)Unsafe version ofDeviceString().static java.lang.StringnDeviceStringString(long struct)Unsafe version ofDeviceStringString().static intnStateFlags(long struct)Unsafe version ofStateFlags().DISPLAY_DEVICEset(DISPLAY_DEVICE src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).intStateFlags()Returns the value of theStateFlagsfield.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
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:StructReturnssizeof(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.
-
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.
-
createSafe
@Nullable public static DISPLAY_DEVICE createSafe(long address)
-
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
-
createSafe
@Nullable public static DISPLAY_DEVICE.Buffer createSafe(long address, int 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
-
ncb
public static int ncb(long struct)
Unsafe version ofcb().
-
nDeviceName
public static java.nio.ByteBuffer nDeviceName(long struct)
Unsafe version ofDeviceName().
-
nDeviceNameString
public static java.lang.String nDeviceNameString(long struct)
Unsafe version ofDeviceNameString().
-
nDeviceString
public static java.nio.ByteBuffer nDeviceString(long struct)
Unsafe version ofDeviceString().
-
nDeviceStringString
public static java.lang.String nDeviceStringString(long struct)
Unsafe version ofDeviceStringString().
-
nStateFlags
public static int nStateFlags(long struct)
Unsafe version ofStateFlags().
-
nDeviceID
public static java.nio.ByteBuffer nDeviceID(long struct)
Unsafe version ofDeviceID().
-
nDeviceIDString
public static java.lang.String nDeviceIDString(long struct)
Unsafe version ofDeviceIDString().
-
nDeviceKey
public static java.nio.ByteBuffer nDeviceKey(long struct)
Unsafe version ofDeviceKey().
-
nDeviceKeyString
public static java.lang.String nDeviceKeyString(long struct)
Unsafe version ofDeviceKeyString().
-
ncb
public static void ncb(long struct, int value)Unsafe version ofcb.
-
-