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
SIZEOFbefore 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– aRECTstructure 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– aRECTstructure 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 inrcMonitorcontains 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_PRIMARYszDevice[32]– a string that specifies the device name of the monitor being used
Layout
struct MONITORINFOEX { DWORD cbSize;RECTrcMonitor;RECTrcWork; DWORD dwFlags; TCHAR szDevice[32]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMONITORINFOEX.BufferAn array ofMONITORINFOEXstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCBSIZE
DWFLAGS
RCMONITOR
RCWORKThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSZDEVICEThe 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 aMONITORINFOEXinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MONITORINFOEXcalloc()Returns a newMONITORINFOEXinstance allocated withmemCalloc.static MONITORINFOEX.Buffercalloc(int capacity)Returns a newMONITORINFOEX.Bufferinstance allocated withmemCalloc.static MONITORINFOEXcallocStack()Returns a newMONITORINFOEXinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static MONITORINFOEX.BuffercallocStack(int capacity)Returns a newMONITORINFOEX.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static MONITORINFOEX.BuffercallocStack(int capacity, MemoryStack stack)Returns a newMONITORINFOEX.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MONITORINFOEXcallocStack(MemoryStack stack)Returns a newMONITORINFOEXinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcbSize()Returns the value of thecbSizefield.MONITORINFOEXcbSize(int value)Sets the specified value to thecbSizefield.static MONITORINFOEXcreate()Returns a newMONITORINFOEXinstance allocated withBufferUtils.static MONITORINFOEX.Buffercreate(int capacity)Returns a newMONITORINFOEX.Bufferinstance allocated withBufferUtils.static MONITORINFOEXcreate(long address)Returns a newMONITORINFOEXinstance for the specified memory address.static MONITORINFOEX.Buffercreate(long address, int capacity)Create aMONITORINFOEX.Bufferinstance at the specified memory.static MONITORINFOEXcreateSafe(long address)static MONITORINFOEX.BuffercreateSafe(long address, int capacity)intdwFlags()Returns the value of thedwFlagsfield.static MONITORINFOEXmalloc()Returns a newMONITORINFOEXinstance allocated withmemAlloc.static MONITORINFOEX.Buffermalloc(int capacity)Returns a newMONITORINFOEX.Bufferinstance allocated withmemAlloc.static MONITORINFOEXmallocStack()Returns a newMONITORINFOEXinstance allocated on the thread-localMemoryStack.static MONITORINFOEX.BuffermallocStack(int capacity)Returns a newMONITORINFOEX.Bufferinstance allocated on the thread-localMemoryStack.static MONITORINFOEX.BuffermallocStack(int capacity, MemoryStack stack)Returns a newMONITORINFOEX.Bufferinstance allocated on the specifiedMemoryStack.static MONITORINFOEXmallocStack(MemoryStack stack)Returns a newMONITORINFOEXinstance allocated on the specifiedMemoryStack.static intncbSize(long struct)Unsafe version ofcbSize().static voidncbSize(long struct, int value)Unsafe version ofcbSize.static intndwFlags(long struct)Unsafe version ofdwFlags().static RECTnrcMonitor(long struct)Unsafe version ofrcMonitor().static RECTnrcWork(long struct)Unsafe version ofrcWork().static java.nio.ByteBuffernszDevice(long struct)Unsafe version ofszDevice().static java.lang.StringnszDeviceString(long struct)Unsafe version ofszDeviceString().RECTrcMonitor()Returns aRECTview of thercMonitorfield.RECTrcWork()Returns aRECTview of thercWorkfield.MONITORINFOEXset(MONITORINFOEX src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).java.nio.ByteBufferszDevice()Returns aByteBufferview of theszDevicefield.java.lang.StringszDeviceString()Decodes the null-terminated string stored in theszDevicefield.-
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 aMONITORINFOEXinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).
-
cbSize
public int cbSize()
Returns the value of thecbSizefield.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlagsfield.
-
szDevice
public java.nio.ByteBuffer szDevice()
Returns aByteBufferview of theszDevicefield.
-
szDeviceString
public java.lang.String szDeviceString()
Decodes the null-terminated string stored in theszDevicefield.
-
cbSize
public MONITORINFOEX cbSize(int value)
Sets the specified value to thecbSizefield.
-
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 newMONITORINFOEXinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static MONITORINFOEX calloc()
Returns a newMONITORINFOEXinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static MONITORINFOEX create()
Returns a newMONITORINFOEXinstance allocated withBufferUtils.
-
create
public static MONITORINFOEX create(long address)
Returns a newMONITORINFOEXinstance for the specified memory address.
-
createSafe
@Nullable public static MONITORINFOEX createSafe(long address)
-
malloc
public static MONITORINFOEX.Buffer malloc(int capacity)
Returns a newMONITORINFOEX.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static MONITORINFOEX.Buffer calloc(int capacity)
Returns a newMONITORINFOEX.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static MONITORINFOEX.Buffer create(int capacity)
Returns a newMONITORINFOEX.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static MONITORINFOEX.Buffer create(long address, int capacity)
Create aMONITORINFOEX.Bufferinstance 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 newMONITORINFOEXinstance allocated on the thread-localMemoryStack.
-
callocStack
public static MONITORINFOEX callocStack()
Returns a newMONITORINFOEXinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static MONITORINFOEX mallocStack(MemoryStack stack)
Returns a newMONITORINFOEXinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static MONITORINFOEX callocStack(MemoryStack stack)
Returns a newMONITORINFOEXinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static MONITORINFOEX.Buffer callocStack(int capacity)
Returns a newMONITORINFOEX.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static MONITORINFOEX.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newMONITORINFOEX.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-