Top Description Inners Fields Constructors Methods
org.lwjgl.system.windows

public Class DISPLAY_DEVICE

extends Struct<DISPLAY_DEVICE>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Receives information about the display device specified by the iDevNum parameter of the User32#EnumDisplayDevices function.

The four string members are set based on the parameters passed to EnumDisplayDevices. If the lpDevice param is NULL, then DISPLAY_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;
    TCHAR DeviceName[32];
    TCHAR DeviceString[128];
    DWORD StateFlags;
    TCHAR DeviceID[128];
    TCHAR DeviceKey[128];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CB

The struct member offsets.

public static final int
DEVICEID

The struct member offsets.

public static final int
DEVICEKEY

The struct member offsets.

public static final int
DEVICENAME

The struct member offsets.

public static final int
DEVICESTRING

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STATEFLAGS

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
DISPLAY_DEVICE(long address, ByteBuffer container)

public
DISPLAY_DEVICE(ByteBuffer container)

Creates a DISPLAY_DEVICE instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static DISPLAY_DEVICE
calloc()

Returns a new DISPLAY_DEVICE instance allocated with memCalloc.

public static DISPLAY_DEVICE.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with memCalloc.

public static DISPLAY_DEVICE
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new DISPLAY_DEVICE instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static DISPLAY_DEVICE.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new DISPLAY_DEVICE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static DISPLAY_DEVICE
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
cb()

size, in bytes, of the DISPLAY_DEVICE structure.

public DISPLAY_DEVICE
cb(int value)

Sets the specified value to the cb field.

protected DISPLAY_DEVICE
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static DISPLAY_DEVICE
create()

Returns a new DISPLAY_DEVICE instance allocated with BufferUtils.

public static DISPLAY_DEVICE
create(long address)

Returns a new DISPLAY_DEVICE instance for the specified memory address.

public static DISPLAY_DEVICE.Buffer
create(int
the buffer capacity
capacity
)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with BufferUtils.

public static DISPLAY_DEVICE.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a DISPLAY_DEVICE.Buffer instance at the specified memory.

public static DISPLAY_DEVICE
createSafe(long address)

Like create, but returns null if address is NULL.

public static DISPLAY_DEVICE.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public ByteBuffer
DeviceID()

not used

public String
DeviceIDString()

not used

public ByteBuffer
DeviceKey()

reserved

public String
DeviceKeyString()

reserved

public ByteBuffer
DeviceName()

an array of characters identifying the device name.

public String
DeviceNameString()

an array of characters identifying the device name.

public ByteBuffer
DeviceString()

an array of characters containing the device context string.

public String
DeviceStringString()

an array of characters containing the device context string.

public static DISPLAY_DEVICE
malloc()

Returns a new DISPLAY_DEVICE instance allocated with memAlloc.

public static DISPLAY_DEVICE.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with memAlloc.

public static DISPLAY_DEVICE
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new DISPLAY_DEVICE instance allocated on the specified MemoryStack.

public static DISPLAY_DEVICE.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new DISPLAY_DEVICE.Buffer instance allocated on the specified MemoryStack.

public static DISPLAY_DEVICE
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static DISPLAY_DEVICE.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ncb(long struct)

Unsafe version of cb.

public static void
ncb(long struct, int value)

Unsafe version of cb.

public static ByteBuffer
nDeviceID(long struct)

Unsafe version of DeviceID.

public static String
nDeviceIDString(long struct)

Unsafe version of DeviceIDString.

public static ByteBuffer
nDeviceKey(long struct)

Unsafe version of DeviceKey.

public static String
nDeviceKeyString(long struct)

Unsafe version of DeviceKeyString.

public static ByteBuffer
nDeviceName(long struct)

Unsafe version of DeviceName.

public static String
nDeviceNameString(long struct)

Unsafe version of DeviceNameString.

public static ByteBuffer
nDeviceString(long struct)

Unsafe version of DeviceString.

public static String
nDeviceStringString(long struct)

Unsafe version of DeviceStringString.

public static int
nStateFlags(long struct)

Unsafe version of StateFlags.

public DISPLAY_DEVICE

Returns:

this struct
set
(DISPLAY_DEVICE
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
StateFlags()

device state flags

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

CBback to summary
public static final int CB

The struct member offsets.

DEVICEIDback to summary
public static final int DEVICEID

The struct member offsets.

DEVICEKEYback to summary
public static final int DEVICEKEY

The struct member offsets.

DEVICENAMEback to summary
public static final int DEVICENAME

The struct member offsets.

DEVICESTRINGback to summary
public static final int DEVICESTRING

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STATEFLAGSback to summary
public static final int STATEFLAGS

The struct member offsets.

Constructor Detail

DISPLAY_DEVICEback to summary
protected DISPLAY_DEVICE(long address, ByteBuffer container)
DISPLAY_DEVICEback to summary
public DISPLAY_DEVICE(ByteBuffer container)

Creates a DISPLAY_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 Detail

callocback to summary
public static DISPLAY_DEVICE calloc()

Returns a new DISPLAY_DEVICE instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static DISPLAY_DEVICE.Buffer calloc(int capacity)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static DISPLAY_DEVICE calloc(MemoryStack stack)

Returns a new DISPLAY_DEVICE instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static DISPLAY_DEVICE.Buffer calloc(int capacity, MemoryStack stack)

Returns a new DISPLAY_DEVICE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static DISPLAY_DEVICE callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static DISPLAY_DEVICE callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static DISPLAY_DEVICE.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static DISPLAY_DEVICE.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
cbback to summary
public int cb()

size, in bytes, of the DISPLAY_DEVICE structure. This must be initialized prior to calling User32#EnumDisplayDevices.

Annotations
@NativeType:DWORD
cbback to summary
public DISPLAY_DEVICE cb(int value)

Sets the specified value to the cb field.

createback to summary
protected DISPLAY_DEVICE create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static DISPLAY_DEVICE create()

Returns a new DISPLAY_DEVICE instance allocated with BufferUtils.

createback to summary
public static DISPLAY_DEVICE create(long address)

Returns a new DISPLAY_DEVICE instance for the specified memory address.

createback to summary
public static DISPLAY_DEVICE.Buffer create(int capacity)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static DISPLAY_DEVICE.Buffer create(long address, int capacity)

Create a DISPLAY_DEVICE.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static DISPLAY_DEVICE createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static DISPLAY_DEVICE.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
DeviceIDback to summary
public ByteBuffer DeviceID()

not used

Annotations
@NativeType:TCHAR[128]
DeviceIDStringback to summary
public String DeviceIDString()

not used

Annotations
@NativeType:TCHAR[128]
DeviceKeyback to summary
public ByteBuffer DeviceKey()

reserved

Annotations
@NativeType:TCHAR[128]
DeviceKeyStringback to summary
public String DeviceKeyString()

reserved

Annotations
@NativeType:TCHAR[128]
DeviceNameback to summary
public ByteBuffer DeviceName()

an array of characters identifying the device name. This is either the adapter device or the monitor device.

Annotations
@NativeType:TCHAR[32]
DeviceNameStringback to summary
public String DeviceNameString()

an array of characters identifying the device name. This is either the adapter device or the monitor device.

Annotations
@NativeType:TCHAR[32]
DeviceStringback to summary
public ByteBuffer DeviceString()

an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.

Annotations
@NativeType:TCHAR[128]
DeviceStringStringback to summary
public 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.

Annotations
@NativeType:TCHAR[128]
mallocback to summary
public static DISPLAY_DEVICE malloc()

Returns a new DISPLAY_DEVICE instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static DISPLAY_DEVICE.Buffer malloc(int capacity)

Returns a new DISPLAY_DEVICE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static DISPLAY_DEVICE malloc(MemoryStack stack)

Returns a new DISPLAY_DEVICE instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static DISPLAY_DEVICE.Buffer malloc(int capacity, MemoryStack stack)

Returns a new DISPLAY_DEVICE.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static DISPLAY_DEVICE mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static DISPLAY_DEVICE mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static DISPLAY_DEVICE.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static DISPLAY_DEVICE.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
ncbback to summary
public static int ncb(long struct)

Unsafe version of cb.

ncbback to summary
public static void ncb(long struct, int value)

Unsafe version of cb.

nDeviceIDback to summary
public static ByteBuffer nDeviceID(long struct)

Unsafe version of DeviceID.

nDeviceIDStringback to summary
public static String nDeviceIDString(long struct)

Unsafe version of DeviceIDString.

nDeviceKeyback to summary
public static ByteBuffer nDeviceKey(long struct)

Unsafe version of DeviceKey.

nDeviceKeyStringback to summary
public static String nDeviceKeyString(long struct)

Unsafe version of DeviceKeyString.

nDeviceNameback to summary
public static ByteBuffer nDeviceName(long struct)

Unsafe version of DeviceName.

nDeviceNameStringback to summary
public static String nDeviceNameString(long struct)

Unsafe version of DeviceNameString.

nDeviceStringback to summary
public static ByteBuffer nDeviceString(long struct)

Unsafe version of DeviceString.

nDeviceStringStringback to summary
public static String nDeviceStringString(long struct)

Unsafe version of DeviceStringString.

nStateFlagsback to summary
public static int nStateFlags(long struct)

Unsafe version of StateFlags.

setback to summary
public DISPLAY_DEVICE set(DISPLAY_DEVICE src)

Copies the specified struct data to this struct.

Parameters
src:DISPLAY_DEVICE

the source struct

Returns:DISPLAY_DEVICE

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
StateFlagsback to summary
public int StateFlags()

device state flags

Annotations
@NativeType:DWORD
org.lwjgl.system.windows back to summary

public Class DISPLAY_DEVICE.Buffer

extends StructBuffer<DISPLAY_DEVICE, DISPLAY_DEVICE.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of DISPLAY_DEVICE structs.

Field Summary

Modifier and TypeField and Description
private static final DISPLAY_DEVICE

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new DISPLAY_DEVICE.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the DISPLAY_DEVICE#cb field.
cb
()

public DISPLAY_DEVICE.Buffer
cb(int value)

Sets the specified value to the DISPLAY_DEVICE#cb field.

public ByteBuffer

Returns:

a ByteBuffer view of the DISPLAY_DEVICE#DeviceID field.
DeviceID
()

public String

Returns:

the null-terminated string stored in the DISPLAY_DEVICE#DeviceID field.
DeviceIDString
()

public ByteBuffer

Returns:

a ByteBuffer view of the DISPLAY_DEVICE#DeviceKey field.
DeviceKey
()

public String

Returns:

the null-terminated string stored in the DISPLAY_DEVICE#DeviceKey field.
DeviceKeyString
()

public ByteBuffer

Returns:

a ByteBuffer view of the DISPLAY_DEVICE#DeviceName field.
DeviceName
()

public String

Returns:

the null-terminated string stored in the DISPLAY_DEVICE#DeviceName field.
DeviceNameString
()

public ByteBuffer

Returns:

a ByteBuffer view of the DISPLAY_DEVICE#DeviceString field.
DeviceString
()

public String

Returns:

the null-terminated string stored in the DISPLAY_DEVICE#DeviceString field.
DeviceStringString
()

protected DISPLAY_DEVICE
protected DISPLAY_DEVICE.Buffer
public int

Returns:

the value of the DISPLAY_DEVICE#StateFlags field.
StateFlags
()

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final DISPLAY_DEVICE ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new DISPLAY_DEVICE.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by DISPLAY_DEVICE#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

cbback to summary
public int cb()
Returns:int

the value of the DISPLAY_DEVICE#cb field.

Annotations
@NativeType:DWORD
cbback to summary
public DISPLAY_DEVICE.Buffer cb(int value)

Sets the specified value to the DISPLAY_DEVICE#cb field.

DeviceIDback to summary
public ByteBuffer DeviceID()
Returns:ByteBuffer

a ByteBuffer view of the DISPLAY_DEVICE#DeviceID field.

Annotations
@NativeType:TCHAR[128]
DeviceIDStringback to summary
public String DeviceIDString()
Returns:String

the null-terminated string stored in the DISPLAY_DEVICE#DeviceID field.

Annotations
@NativeType:TCHAR[128]
DeviceKeyback to summary
public ByteBuffer DeviceKey()
Returns:ByteBuffer

a ByteBuffer view of the DISPLAY_DEVICE#DeviceKey field.

Annotations
@NativeType:TCHAR[128]
DeviceKeyStringback to summary
public String DeviceKeyString()
Returns:String

the null-terminated string stored in the DISPLAY_DEVICE#DeviceKey field.

Annotations
@NativeType:TCHAR[128]
DeviceNameback to summary
public ByteBuffer DeviceName()
Returns:ByteBuffer

a ByteBuffer view of the DISPLAY_DEVICE#DeviceName field.

Annotations
@NativeType:TCHAR[32]
DeviceNameStringback to summary
public String DeviceNameString()
Returns:String

the null-terminated string stored in the DISPLAY_DEVICE#DeviceName field.

Annotations
@NativeType:TCHAR[32]
DeviceStringback to summary
public ByteBuffer DeviceString()
Returns:ByteBuffer

a ByteBuffer view of the DISPLAY_DEVICE#DeviceString field.

Annotations
@NativeType:TCHAR[128]
DeviceStringStringback to summary
public String DeviceStringString()
Returns:String

the null-terminated string stored in the DISPLAY_DEVICE#DeviceString field.

Annotations
@NativeType:TCHAR[128]
getElementFactoryback to summary
protected DISPLAY_DEVICE getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
selfback to summary
protected DISPLAY_DEVICE.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
StateFlagsback to summary
public int StateFlags()
Returns:int

the value of the DISPLAY_DEVICE#StateFlags field.

Annotations
@NativeType:DWORD