Package org.lwjgl.system.windows
Class MONITORINFOEX
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.MONITORINFOEX
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,NativeResource
,Pointer
public class MONITORINFOEX extends Struct implements NativeResource
Contains information about a display monitor.Member documentation
cbSize
– the size, in bytes, of the structure.Set this member to
SIZEOF
before calling theUser32.GetMonitorInfo(long, org.lwjgl.system.windows.MONITORINFOEX)
function. Doing so lets the function determine the type of structure you are passing to it.rcMonitor
– aRECT
structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.rcWork
– aRECT
structure that specifies the work area rectangle of the display monitor that can be used by applications, expressed in virtual-screen coordinates. Windows uses this rectangle to maximize an application on the monitor. The rest of the area inrcMonitor
contains system windows such as the task bar and side bars. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.dwFlags
– the attributes of the display monitor. May be:User32.MONITORINFOF_PRIMARY
szDevice[32]
– a string that specifies the device name of the monitor being used
Layout
struct MONITORINFOEX { DWORD cbSize;
RECT
rcMonitor;RECT
rcWork; DWORD dwFlags; TCHAR szDevice[32]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MONITORINFOEX.Buffer
An array ofMONITORINFOEX
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
CBSIZE
DWFLAGS
RCMONITOR
RCWORKThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SZDEVICE
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 MONITORINFOEX(java.nio.ByteBuffer container)
Creates aMONITORINFOEX
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 MONITORINFOEX
calloc()
Returns a newMONITORINFOEX
instance allocated withmemCalloc
.static MONITORINFOEX.Buffer
calloc(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withmemCalloc
.static MONITORINFOEX
callocStack()
Returns a newMONITORINFOEX
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MONITORINFOEX.Buffer
callocStack(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MONITORINFOEX.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newMONITORINFOEX.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MONITORINFOEX
callocStack(MemoryStack stack)
Returns a newMONITORINFOEX
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
cbSize()
Returns the value of thecbSize
field.MONITORINFOEX
cbSize(int value)
Sets the specified value to thecbSize
field.static MONITORINFOEX
create()
Returns a newMONITORINFOEX
instance allocated withBufferUtils
.static MONITORINFOEX.Buffer
create(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withBufferUtils
.static MONITORINFOEX
create(long address)
Returns a newMONITORINFOEX
instance for the specified memory address.static MONITORINFOEX.Buffer
create(long address, int capacity)
Create aMONITORINFOEX.Buffer
instance at the specified memory.static MONITORINFOEX
createSafe(long address)
static MONITORINFOEX.Buffer
createSafe(long address, int capacity)
int
dwFlags()
Returns the value of thedwFlags
field.static MONITORINFOEX
malloc()
Returns a newMONITORINFOEX
instance allocated withmemAlloc
.static MONITORINFOEX.Buffer
malloc(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withmemAlloc
.static MONITORINFOEX
mallocStack()
Returns a newMONITORINFOEX
instance allocated on the thread-localMemoryStack
.static MONITORINFOEX.Buffer
mallocStack(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated on the thread-localMemoryStack
.static MONITORINFOEX.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newMONITORINFOEX.Buffer
instance allocated on the specifiedMemoryStack
.static MONITORINFOEX
mallocStack(MemoryStack stack)
Returns a newMONITORINFOEX
instance allocated on the specifiedMemoryStack
.static int
ncbSize(long struct)
Unsafe version ofcbSize()
.static void
ncbSize(long struct, int value)
Unsafe version ofcbSize
.static int
ndwFlags(long struct)
Unsafe version ofdwFlags()
.static RECT
nrcMonitor(long struct)
Unsafe version ofrcMonitor()
.static RECT
nrcWork(long struct)
Unsafe version ofrcWork()
.static java.nio.ByteBuffer
nszDevice(long struct)
Unsafe version ofszDevice()
.static java.lang.String
nszDeviceString(long struct)
Unsafe version ofszDeviceString()
.RECT
rcMonitor()
Returns aRECT
view of thercMonitor
field.RECT
rcWork()
Returns aRECT
view of thercWork
field.MONITORINFOEX
set(MONITORINFOEX src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.java.nio.ByteBuffer
szDevice()
Returns aByteBuffer
view of theszDevice
field.java.lang.String
szDeviceString()
Decodes the null-terminated string stored in theszDevice
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
-
MONITORINFOEX
public MONITORINFOEX(java.nio.ByteBuffer container)
Creates aMONITORINFOEX
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)
.
-
cbSize
public int cbSize()
Returns the value of thecbSize
field.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlags
field.
-
szDevice
public java.nio.ByteBuffer szDevice()
Returns aByteBuffer
view of theszDevice
field.
-
szDeviceString
public java.lang.String szDeviceString()
Decodes the null-terminated string stored in theszDevice
field.
-
cbSize
public MONITORINFOEX cbSize(int value)
Sets the specified value to thecbSize
field.
-
set
public MONITORINFOEX set(MONITORINFOEX src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static MONITORINFOEX malloc()
Returns a newMONITORINFOEX
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static MONITORINFOEX calloc()
Returns a newMONITORINFOEX
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static MONITORINFOEX create()
Returns a newMONITORINFOEX
instance allocated withBufferUtils
.
-
create
public static MONITORINFOEX create(long address)
Returns a newMONITORINFOEX
instance for the specified memory address.
-
createSafe
@Nullable public static MONITORINFOEX createSafe(long address)
-
malloc
public static MONITORINFOEX.Buffer malloc(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static MONITORINFOEX.Buffer calloc(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static MONITORINFOEX.Buffer create(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static MONITORINFOEX.Buffer create(long address, int capacity)
Create aMONITORINFOEX.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static MONITORINFOEX.Buffer createSafe(long address, int capacity)
-
mallocStack
public static MONITORINFOEX mallocStack()
Returns a newMONITORINFOEX
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static MONITORINFOEX callocStack()
Returns a newMONITORINFOEX
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static MONITORINFOEX mallocStack(MemoryStack stack)
Returns a newMONITORINFOEX
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static MONITORINFOEX callocStack(MemoryStack stack)
Returns a newMONITORINFOEX
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static MONITORINFOEX.Buffer mallocStack(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static MONITORINFOEX.Buffer callocStack(int capacity)
Returns a newMONITORINFOEX.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static MONITORINFOEX.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newMONITORINFOEX.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static MONITORINFOEX.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newMONITORINFOEX.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ncbSize
public static int ncbSize(long struct)
Unsafe version ofcbSize()
.
-
nrcMonitor
public static RECT nrcMonitor(long struct)
Unsafe version ofrcMonitor()
.
-
ndwFlags
public static int ndwFlags(long struct)
Unsafe version ofdwFlags()
.
-
nszDevice
public static java.nio.ByteBuffer nszDevice(long struct)
Unsafe version ofszDevice()
.
-
nszDeviceString
public static java.lang.String nszDeviceString(long struct)
Unsafe version ofszDeviceString()
.
-
ncbSize
public static void ncbSize(long struct, int value)
Unsafe version ofcbSize
.
-
-