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
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class DISPLAY_DEVICE extends org.lwjgl.system.Struct implements org.lwjgl.system.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.Layout
struct DISPLAY_DEVICE { DWORD
cb()
; TCHARDeviceName()
[32]; TCHARDeviceString()
[128]; DWORDStateFlags()
; TCHARDeviceID()
[128]; TCHARDeviceKey()
[128]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DISPLAY_DEVICE.Buffer
An array ofDISPLAY_DEVICE
structs.
-
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.
-
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 Deprecated 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.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DISPLAY_DEVICE
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DISPLAY_DEVICE
callocStack()
Deprecated.static DISPLAY_DEVICE.Buffer
callocStack(int capacity)
Deprecated.static DISPLAY_DEVICE.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static DISPLAY_DEVICE
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.int
cb()
size, in bytes, of theDISPLAY_DEVICE
structure.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()
not usedjava.lang.String
DeviceIDString()
not usedjava.nio.ByteBuffer
DeviceKey()
reservedjava.lang.String
DeviceKeyString()
reservedjava.nio.ByteBuffer
DeviceName()
an array of characters identifying the device name.java.lang.String
DeviceNameString()
an array of characters identifying the device name.java.nio.ByteBuffer
DeviceString()
an array of characters containing the device context string.java.lang.String
DeviceStringString()
an array of characters containing the device context string.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.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
.static DISPLAY_DEVICE
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
.static DISPLAY_DEVICE
mallocStack()
Deprecated.static DISPLAY_DEVICE.Buffer
mallocStack(int capacity)
Deprecated.static DISPLAY_DEVICE.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static DISPLAY_DEVICE
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.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()
int
StateFlags()
device state flags
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
cb
public int 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, DeviceNameString
public java.nio.ByteBuffer DeviceName() public java.lang.String DeviceNameString()
an array of characters identifying the device name. This is either the adapter device or the monitor device.
-
DeviceString, DeviceStringString
public java.nio.ByteBuffer DeviceString() public java.lang.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, DeviceIDString
public java.nio.ByteBuffer DeviceID() public java.lang.String DeviceIDString()
not used
-
DeviceKey, DeviceKeyString
public java.nio.ByteBuffer DeviceKey() public java.lang.String DeviceKeyString()
reserved
-
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
@Deprecated public static DISPLAY_DEVICE mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static DISPLAY_DEVICE callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static DISPLAY_DEVICE mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static DISPLAY_DEVICE callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static DISPLAY_DEVICE.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static DISPLAY_DEVICE.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(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. Usemalloc(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. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static DISPLAY_DEVICE malloc(org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static DISPLAY_DEVICE calloc(org.lwjgl.system.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
-
malloc
public static DISPLAY_DEVICE.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDISPLAY_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static DISPLAY_DEVICE.Buffer calloc(int capacity, org.lwjgl.system.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
.
-
-