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
Contains information about a display monitor.Member documentation
cbSize– the size, in bytes, of the structure.Set this member to
MONITORINFOEX.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– a string that specifies the device name of the monitor being used
Layout
struct MONITORINFOEX { DWORD cbSize;RECTrcMonitor;RECTrcWork; DWORD dwFlags; TCHAR[32] szDevice; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and 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 and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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 ornullif the address isNULL.static MONITORINFOEX.Buffercreate(long address, int capacity)Create aMONITORINFOEX.Bufferinstance at the specified memory.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.MONITORINFOEXnset(long struct)Unsafe version ofset.RECTrcMonitor()Returns aRECTview of thercMonitorfield.RECTrcWork()Returns aRECTview of thercWorkfield.MONITORINFOEXset(MONITORINFOEX src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).java.nio.ByteBufferszDevice()Returns aByteBufferview of theszDevicefield.java.lang.StringszDeviceString()Decodes the null-terminated string stored in theszDevicefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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:StructReturns thesizeof(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.
-
nset
public MONITORINFOEX nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
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
-
-