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 theiDevNum
parameter 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 thelpDevice
param isNULL
, thenDISPLAY_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.Member documentation
cb
– size, in bytes, of theDISPLAY_DEVICE
structure. 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 class
DISPLAY_DEVICE.Buffer
An array ofDISPLAY_DEVICE
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CB
DEVICEID
DEVICEKEY
DEVICENAME
DEVICESTRINGThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STATEFLAGS
The 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_DEVICE
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DISPLAY_DEVICE
calloc()
Returns a newDISPLAY_DEVICE
instance allocated withmemCalloc
.static DISPLAY_DEVICE.Buffer
calloc(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated withmemCalloc
.static DISPLAY_DEVICE
callocStack()
Returns a newDISPLAY_DEVICE
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DISPLAY_DEVICE.Buffer
callocStack(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DISPLAY_DEVICE.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DISPLAY_DEVICE
callocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
cb()
Returns the value of thecb
field.DISPLAY_DEVICE
cb(int value)
Sets the specified value to thecb
field.static DISPLAY_DEVICE
create()
Returns a newDISPLAY_DEVICE
instance allocated withBufferUtils
.static DISPLAY_DEVICE.Buffer
create(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated withBufferUtils
.static DISPLAY_DEVICE
create(long address)
Returns a newDISPLAY_DEVICE
instance for the specified memory address.static DISPLAY_DEVICE.Buffer
create(long address, int capacity)
Create aDISPLAY_DEVICE.Buffer
instance at the specified memory.static DISPLAY_DEVICE
createSafe(long address)
static DISPLAY_DEVICE.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
DeviceID()
Returns aByteBuffer
view of theDeviceID
field.java.lang.String
DeviceIDString()
Decodes the null-terminated string stored in theDeviceID
field.java.nio.ByteBuffer
DeviceKey()
Returns aByteBuffer
view of theDeviceKey
field.java.lang.String
DeviceKeyString()
Decodes the null-terminated string stored in theDeviceKey
field.java.nio.ByteBuffer
DeviceName()
Returns aByteBuffer
view of theDeviceName
field.java.lang.String
DeviceNameString()
Decodes the null-terminated string stored in theDeviceName
field.java.nio.ByteBuffer
DeviceString()
Returns aByteBuffer
view of theDeviceString
field.java.lang.String
DeviceStringString()
Decodes the null-terminated string stored in theDeviceString
field.static DISPLAY_DEVICE
malloc()
Returns a newDISPLAY_DEVICE
instance allocated withmemAlloc
.static DISPLAY_DEVICE.Buffer
malloc(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated withmemAlloc
.static DISPLAY_DEVICE
mallocStack()
Returns a newDISPLAY_DEVICE
instance allocated on the thread-localMemoryStack
.static DISPLAY_DEVICE.Buffer
mallocStack(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
.static DISPLAY_DEVICE.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
.static DISPLAY_DEVICE
mallocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
.static int
ncb(long struct)
Unsafe version ofcb()
.static void
ncb(long struct, int value)
Unsafe version ofcb
.static java.nio.ByteBuffer
nDeviceID(long struct)
Unsafe version ofDeviceID()
.static java.lang.String
nDeviceIDString(long struct)
Unsafe version ofDeviceIDString()
.static java.nio.ByteBuffer
nDeviceKey(long struct)
Unsafe version ofDeviceKey()
.static java.lang.String
nDeviceKeyString(long struct)
Unsafe version ofDeviceKeyString()
.static java.nio.ByteBuffer
nDeviceName(long struct)
Unsafe version ofDeviceName()
.static java.lang.String
nDeviceNameString(long struct)
Unsafe version ofDeviceNameString()
.static java.nio.ByteBuffer
nDeviceString(long struct)
Unsafe version ofDeviceString()
.static java.lang.String
nDeviceStringString(long struct)
Unsafe version ofDeviceStringString()
.static int
nStateFlags(long struct)
Unsafe version ofStateFlags()
.DISPLAY_DEVICE
set(DISPLAY_DEVICE src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
StateFlags()
Returns the value of theStateFlags
field.-
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_DEVICE
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.
-
cb
public int cb()
Returns the value of thecb
field.
-
DeviceName
public java.nio.ByteBuffer DeviceName()
Returns aByteBuffer
view of theDeviceName
field.
-
DeviceNameString
public java.lang.String DeviceNameString()
Decodes the null-terminated string stored in theDeviceName
field.
-
DeviceString
public java.nio.ByteBuffer DeviceString()
Returns aByteBuffer
view of theDeviceString
field.
-
DeviceStringString
public java.lang.String DeviceStringString()
Decodes the null-terminated string stored in theDeviceString
field.
-
StateFlags
public int StateFlags()
Returns the value of theStateFlags
field.
-
DeviceID
public java.nio.ByteBuffer DeviceID()
Returns aByteBuffer
view of theDeviceID
field.
-
DeviceIDString
public java.lang.String DeviceIDString()
Decodes the null-terminated string stored in theDeviceID
field.
-
DeviceKey
public java.nio.ByteBuffer DeviceKey()
Returns aByteBuffer
view of theDeviceKey
field.
-
DeviceKeyString
public java.lang.String DeviceKeyString()
Decodes the null-terminated string stored in theDeviceKey
field.
-
cb
public DISPLAY_DEVICE cb(int value)
Sets the specified value to thecb
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 newDISPLAY_DEVICE
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static DISPLAY_DEVICE calloc()
Returns a newDISPLAY_DEVICE
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static DISPLAY_DEVICE create()
Returns a newDISPLAY_DEVICE
instance allocated withBufferUtils
.
-
create
public static DISPLAY_DEVICE create(long address)
Returns a newDISPLAY_DEVICE
instance 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.Buffer
instance 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.Buffer
instance 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.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static DISPLAY_DEVICE.Buffer create(long address, int capacity)
Create aDISPLAY_DEVICE.Buffer
instance 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_DEVICE
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static DISPLAY_DEVICE callocStack()
Returns a newDISPLAY_DEVICE
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static DISPLAY_DEVICE mallocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static DISPLAY_DEVICE callocStack(MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static DISPLAY_DEVICE.Buffer callocStack(int capacity)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-