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 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
– 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 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 and Description static int
SIZEOF
The 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_DEVICE
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and 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 ornull
if the address isNULL
.static DISPLAY_DEVICE.Buffer
create(long address, int capacity)
Create aDISPLAY_DEVICE.Buffer
instance at the specified memory.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
.DISPLAY_DEVICE
nset(long struct)
Unsafe version ofset
.DISPLAY_DEVICE
set(DISPLAY_DEVICE src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
StateFlags()
Returns the value of theStateFlags
field.-
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_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
Returns thesizeof(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.
-
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_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 ornull
if the address isNULL
.
-
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
-
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
-
-