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
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class WINDOWPLACEMENT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Contains information about the placement of a window on the screen.Layout
struct WINDOWPLACEMENT { UINT
length()
; UINTflags()
; UINTshowCmd()
;POINT
ptMinPosition()
;POINT
ptMaxPosition()
;RECT
rcNormalPosition()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WINDOWPLACEMENT.Buffer
An array ofWINDOWPLACEMENT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
FLAGS
LENGTH
PTMAXPOSITION
PTMINPOSITION
RCNORMALPOSITION
SHOWCMDThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description WINDOWPLACEMENT(java.nio.ByteBuffer container)
Creates aWINDOWPLACEMENT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static WINDOWPLACEMENT
calloc()
Returns a newWINDOWPLACEMENT
instance allocated withmemCalloc
.static WINDOWPLACEMENT.Buffer
calloc(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withmemCalloc
.static WINDOWPLACEMENT.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static WINDOWPLACEMENT
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static WINDOWPLACEMENT
callocStack()
Deprecated.static WINDOWPLACEMENT.Buffer
callocStack(int capacity)
Deprecated.static WINDOWPLACEMENT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static WINDOWPLACEMENT
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static WINDOWPLACEMENT
create()
Returns a newWINDOWPLACEMENT
instance allocated withBufferUtils
.static WINDOWPLACEMENT.Buffer
create(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withBufferUtils
.static WINDOWPLACEMENT
create(long address)
Returns a newWINDOWPLACEMENT
instance for the specified memory address.static WINDOWPLACEMENT.Buffer
create(long address, int capacity)
Create aWINDOWPLACEMENT.Buffer
instance at the specified memory.static WINDOWPLACEMENT
createSafe(long address)
static WINDOWPLACEMENT.Buffer
createSafe(long address, int capacity)
int
flags()
the flags that control the position of the minimized window and the method by which the window is restored.WINDOWPLACEMENT
flags(int value)
Sets the specified value to theflags()
field.int
length()
the length of the structure, in bytes.WINDOWPLACEMENT
length(int value)
Sets the specified value to thelength()
field.static WINDOWPLACEMENT
malloc()
Returns a newWINDOWPLACEMENT
instance allocated withmemAlloc
.static WINDOWPLACEMENT.Buffer
malloc(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withmemAlloc
.static WINDOWPLACEMENT.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated on the specifiedMemoryStack
.static WINDOWPLACEMENT
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT
instance allocated on the specifiedMemoryStack
.static WINDOWPLACEMENT
mallocStack()
Deprecated.static WINDOWPLACEMENT.Buffer
mallocStack(int capacity)
Deprecated.static WINDOWPLACEMENT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static WINDOWPLACEMENT
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static int
nlength(long struct)
Unsafe version oflength()
.static void
nlength(long struct, int value)
Unsafe version oflength
.static POINT
nptMaxPosition(long struct)
Unsafe version ofptMaxPosition()
.static void
nptMaxPosition(long struct, POINT value)
Unsafe version ofptMaxPosition
.static POINT
nptMinPosition(long struct)
Unsafe version ofptMinPosition()
.static void
nptMinPosition(long struct, POINT value)
Unsafe version ofptMinPosition
.static RECT
nrcNormalPosition(long struct)
Unsafe version ofrcNormalPosition()
.static void
nrcNormalPosition(long struct, RECT value)
Unsafe version ofrcNormalPosition
.static int
nshowCmd(long struct)
Unsafe version ofshowCmd()
.static void
nshowCmd(long struct, int value)
Unsafe version ofshowCmd
.POINT
ptMaxPosition()
the coordinates of the window's upper-left corner when the window is maximizedWINDOWPLACEMENT
ptMaxPosition(java.util.function.Consumer<POINT> consumer)
Passes theptMaxPosition()
field to the specifiedConsumer
.WINDOWPLACEMENT
ptMaxPosition(POINT value)
Copies the specifiedPOINT
to theptMaxPosition()
field.POINT
ptMinPosition()
the coordinates of the window's upper-left corner when the window is minimizedWINDOWPLACEMENT
ptMinPosition(java.util.function.Consumer<POINT> consumer)
Passes theptMinPosition()
field to the specifiedConsumer
.WINDOWPLACEMENT
ptMinPosition(POINT value)
Copies the specifiedPOINT
to theptMinPosition()
field.RECT
rcNormalPosition()
the window's coordinates when the window is in the restored positionWINDOWPLACEMENT
rcNormalPosition(java.util.function.Consumer<RECT> consumer)
Passes thercNormalPosition()
field to the specifiedConsumer
.WINDOWPLACEMENT
rcNormalPosition(RECT value)
Copies the specifiedRECT
to thercNormalPosition()
field.WINDOWPLACEMENT
set(int length, int flags, int showCmd, POINT ptMinPosition, POINT ptMaxPosition, RECT rcNormalPosition)
Initializes this struct with the specified values.WINDOWPLACEMENT
set(WINDOWPLACEMENT src)
Copies the specified struct data to this struct.int
showCmd()
the current show state of the windowWINDOWPLACEMENT
showCmd(int value)
Sets the specified value to theshowCmd()
field.int
sizeof()
-
-
-
Constructor Detail
-
WINDOWPLACEMENT
public WINDOWPLACEMENT(java.nio.ByteBuffer container)
Creates aWINDOWPLACEMENT
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
length
public int 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 toSIZEOF
.
-
flags
public int 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_SETMINPOSITION
User32.WPF_RESTORETOMAXIMIZED
User32.WPF_ASYNCWINDOWPLACEMENT
-
showCmd
public int showCmd()
the current show state of the window
-
ptMinPosition
public POINT ptMinPosition()
the coordinates of the window's upper-left corner when the window is minimized
-
ptMaxPosition
public POINT ptMaxPosition()
the coordinates of the window's upper-left corner when the window is maximized
-
rcNormalPosition
public RECT rcNormalPosition()
the window's coordinates when the window is in the restored position
-
length
public WINDOWPLACEMENT length(int value)
Sets the specified value to thelength()
field.
-
flags
public WINDOWPLACEMENT flags(int value)
Sets the specified value to theflags()
field.
-
showCmd
public WINDOWPLACEMENT showCmd(int value)
Sets the specified value to theshowCmd()
field.
-
ptMinPosition
public WINDOWPLACEMENT ptMinPosition(POINT value)
Copies the specifiedPOINT
to theptMinPosition()
field.
-
ptMinPosition
public WINDOWPLACEMENT ptMinPosition(java.util.function.Consumer<POINT> consumer)
Passes theptMinPosition()
field to the specifiedConsumer
.
-
ptMaxPosition
public WINDOWPLACEMENT ptMaxPosition(POINT value)
Copies the specifiedPOINT
to theptMaxPosition()
field.
-
ptMaxPosition
public WINDOWPLACEMENT ptMaxPosition(java.util.function.Consumer<POINT> consumer)
Passes theptMaxPosition()
field to the specifiedConsumer
.
-
rcNormalPosition
public WINDOWPLACEMENT rcNormalPosition(RECT value)
Copies the specifiedRECT
to thercNormalPosition()
field.
-
rcNormalPosition
public WINDOWPLACEMENT rcNormalPosition(java.util.function.Consumer<RECT> consumer)
Passes thercNormalPosition()
field to the specifiedConsumer
.
-
set
public WINDOWPLACEMENT set(int length, int flags, int showCmd, POINT ptMinPosition, POINT ptMaxPosition, RECT rcNormalPosition)
Initializes this struct with the specified values.
-
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 newWINDOWPLACEMENT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static WINDOWPLACEMENT calloc()
Returns a newWINDOWPLACEMENT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static WINDOWPLACEMENT create()
Returns a newWINDOWPLACEMENT
instance allocated withBufferUtils
.
-
create
public static WINDOWPLACEMENT create(long address)
Returns a newWINDOWPLACEMENT
instance for the specified memory address.
-
createSafe
@Nullable public static WINDOWPLACEMENT createSafe(long address)
-
malloc
public static WINDOWPLACEMENT.Buffer malloc(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static WINDOWPLACEMENT.Buffer calloc(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static WINDOWPLACEMENT.Buffer create(int capacity)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static WINDOWPLACEMENT.Buffer create(long address, int capacity)
Create aWINDOWPLACEMENT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static WINDOWPLACEMENT.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static WINDOWPLACEMENT mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static WINDOWPLACEMENT callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static WINDOWPLACEMENT mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static WINDOWPLACEMENT callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static WINDOWPLACEMENT.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static WINDOWPLACEMENT.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static WINDOWPLACEMENT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static WINDOWPLACEMENT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static WINDOWPLACEMENT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static WINDOWPLACEMENT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static WINDOWPLACEMENT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static WINDOWPLACEMENT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newWINDOWPLACEMENT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nlength
public static int nlength(long struct)
Unsafe version oflength()
.
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
nshowCmd
public static int nshowCmd(long struct)
Unsafe version ofshowCmd()
.
-
nptMinPosition
public static POINT nptMinPosition(long struct)
Unsafe version ofptMinPosition()
.
-
nptMaxPosition
public static POINT nptMaxPosition(long struct)
Unsafe version ofptMaxPosition()
.
-
nrcNormalPosition
public static RECT nrcNormalPosition(long struct)
Unsafe version ofrcNormalPosition()
.
-
nlength
public static void nlength(long struct, int value)
Unsafe version oflength
.
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
nshowCmd
public static void nshowCmd(long struct, int value)
Unsafe version ofshowCmd
.
-
nptMinPosition
public static void nptMinPosition(long struct, POINT value)
Unsafe version ofptMinPosition
.
-
nptMaxPosition
public static void nptMaxPosition(long struct, POINT value)
Unsafe version ofptMaxPosition
.
-
nrcNormalPosition
public static void nrcNormalPosition(long struct, RECT value)
Unsafe version ofrcNormalPosition
.
-
-