Package org.lwjgl.system.windows
Class WINDOWPLACEMENT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.WINDOWPLACEMENT
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class WINDOWPLACEMENT extends Struct
Contains information about the placement of a window on the screen.Member documentation
length– the length of the structure, in bytes. Before calling theUser32.GetWindowPlacement(long, org.lwjgl.system.windows.WINDOWPLACEMENT)orUser32.SetWindowPlacement(long, org.lwjgl.system.windows.WINDOWPLACEMENT)functions, set this member toWINDOWPLACEMENT.SIZEOF.flags– the flags that control the position of the minimized window and the method by which the window is restored. This member can be one or more of thefollowing values:User32.WPF_SETMINPOSITIONUser32.WPF_RESTORETOMAXIMIZEDUser32.WPF_ASYNCWINDOWPLACEMENTshowCmd– the current show state of the windowptMinPosition– the coordinates of the window's upper-left corner when the window is minimizedptMaxPosition– the coordinates of the window's upper-left corner when the window is maximizedrcNormalPosition– the window's coordinates when the window is in the restored position
Layout
struct WINDOWPLACEMENT { UINT length; UINT flags; UINT showCmd;POINTptMinPosition;POINTptMaxPosition;RECTrcNormalPosition; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classWINDOWPLACEMENT.BufferAn array ofWINDOWPLACEMENTstructs.-
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 WINDOWPLACEMENT(java.nio.ByteBuffer container)Creates aWINDOWPLACEMENTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static WINDOWPLACEMENTcalloc()Returns a newWINDOWPLACEMENTinstance allocated withmemCalloc.static WINDOWPLACEMENT.Buffercalloc(int capacity)Returns a newWINDOWPLACEMENT.Bufferinstance allocated withmemCalloc.static WINDOWPLACEMENTcallocStack()Returns a newWINDOWPLACEMENTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static WINDOWPLACEMENT.BuffercallocStack(int capacity)Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static WINDOWPLACEMENT.BuffercallocStack(int capacity, MemoryStack stack)Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static WINDOWPLACEMENTcallocStack(MemoryStack stack)Returns a newWINDOWPLACEMENTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static WINDOWPLACEMENTcreate()Returns a newWINDOWPLACEMENTinstance allocated withBufferUtils.static WINDOWPLACEMENT.Buffercreate(int capacity)Returns a newWINDOWPLACEMENT.Bufferinstance allocated withBufferUtils.static WINDOWPLACEMENTcreate(long address)Returns a newWINDOWPLACEMENTinstance for the specified memory address ornullif the address isNULL.static WINDOWPLACEMENT.Buffercreate(long address, int capacity)Create aWINDOWPLACEMENT.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.WINDOWPLACEMENTflags(int value)Sets the specified value to theflagsfield.intlength()Returns the value of thelengthfield.WINDOWPLACEMENTlength(int value)Sets the specified value to thelengthfield.static WINDOWPLACEMENTmalloc()Returns a newWINDOWPLACEMENTinstance allocated withmemAlloc.static WINDOWPLACEMENT.Buffermalloc(int capacity)Returns a newWINDOWPLACEMENT.Bufferinstance allocated withmemAlloc.static WINDOWPLACEMENTmallocStack()Returns a newWINDOWPLACEMENTinstance allocated on the thread-localMemoryStack.static WINDOWPLACEMENT.BuffermallocStack(int capacity)Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the thread-localMemoryStack.static WINDOWPLACEMENT.BuffermallocStack(int capacity, MemoryStack stack)Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the specifiedMemoryStack.static WINDOWPLACEMENTmallocStack(MemoryStack stack)Returns a newWINDOWPLACEMENTinstance allocated on the specifiedMemoryStack.WINDOWPLACEMENTnset(long struct)Unsafe version ofset.POINTptMaxPosition()Returns aPOINTview of theptMaxPositionfield.WINDOWPLACEMENTptMaxPosition(POINT value)Copies the specifiedPOINTto theptMaxPositionfield.POINTptMinPosition()Returns aPOINTview of theptMinPositionfield.WINDOWPLACEMENTptMinPosition(POINT value)Copies the specifiedPOINTto theptMinPositionfield.RECTrcNormalPosition()Returns aRECTview of thercNormalPositionfield.WINDOWPLACEMENTrcNormalPosition(RECT value)Copies the specifiedRECTto thercNormalPositionfield.WINDOWPLACEMENTset(int length, int flags, int showCmd, POINT ptMinPosition, POINT ptMaxPosition, RECT rcNormalPosition)Initializes this struct with the specified values.WINDOWPLACEMENTset(WINDOWPLACEMENT src)Copies the specified struct data to this struct.intshowCmd()Returns the value of theshowCmdfield.WINDOWPLACEMENTshowCmd(int value)Sets the specified value to theshowCmdfield.intsizeof()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
WINDOWPLACEMENT
public WINDOWPLACEMENT(java.nio.ByteBuffer container)
Creates aWINDOWPLACEMENTinstance 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).
-
length
public int length()
Returns the value of thelengthfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
showCmd
public int showCmd()
Returns the value of theshowCmdfield.
-
length
public WINDOWPLACEMENT length(int value)
Sets the specified value to thelengthfield.
-
flags
public WINDOWPLACEMENT flags(int value)
Sets the specified value to theflagsfield.
-
showCmd
public WINDOWPLACEMENT showCmd(int value)
Sets the specified value to theshowCmdfield.
-
ptMinPosition
public WINDOWPLACEMENT ptMinPosition(POINT value)
Copies the specifiedPOINTto theptMinPositionfield.
-
ptMaxPosition
public WINDOWPLACEMENT ptMaxPosition(POINT value)
Copies the specifiedPOINTto theptMaxPositionfield.
-
rcNormalPosition
public WINDOWPLACEMENT rcNormalPosition(RECT value)
Copies the specifiedRECTto thercNormalPositionfield.
-
set
public WINDOWPLACEMENT set(int length, int flags, int showCmd, POINT ptMinPosition, POINT ptMaxPosition, RECT rcNormalPosition)
Initializes this struct with the specified values.
-
nset
public WINDOWPLACEMENT nset(long struct)
Unsafe version ofset.
-
set
public WINDOWPLACEMENT set(WINDOWPLACEMENT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static WINDOWPLACEMENT malloc()
Returns a newWINDOWPLACEMENTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static WINDOWPLACEMENT calloc()
Returns a newWINDOWPLACEMENTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static WINDOWPLACEMENT create()
Returns a newWINDOWPLACEMENTinstance allocated withBufferUtils.
-
create
public static WINDOWPLACEMENT create(long address)
Returns a newWINDOWPLACEMENTinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static WINDOWPLACEMENT.Buffer malloc(int capacity)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static WINDOWPLACEMENT.Buffer calloc(int capacity)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static WINDOWPLACEMENT.Buffer create(int capacity)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static WINDOWPLACEMENT.Buffer create(long address, int capacity)
Create aWINDOWPLACEMENT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static WINDOWPLACEMENT mallocStack()
Returns a newWINDOWPLACEMENTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static WINDOWPLACEMENT callocStack()
Returns a newWINDOWPLACEMENTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static WINDOWPLACEMENT mallocStack(MemoryStack stack)
Returns a newWINDOWPLACEMENTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static WINDOWPLACEMENT callocStack(MemoryStack stack)
Returns a newWINDOWPLACEMENTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static WINDOWPLACEMENT.Buffer mallocStack(int capacity)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static WINDOWPLACEMENT.Buffer callocStack(int capacity)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static WINDOWPLACEMENT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static WINDOWPLACEMENT.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newWINDOWPLACEMENT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-