ReactOS 0.4.15-dev-8636-g945e856
winpos.h
Go to the documentation of this file.
1#pragma once
2
3typedef struct _CVR // Tag Ussw
4{
19
20typedef struct _SMWP
21{
29
31{
32 if(!RECTL_bPointInRect(&pwnd->rcWindow, x, y))
33 {
34 return FALSE;
35 }
36
37 if(!pwnd->hrgnClip || pwnd->style & WS_MINIMIZE)
38 {
39 return TRUE;
40 }
41
42 return NtGdiPtInRegion(pwnd->hrgnClip,
43 x - pwnd->rcWindow.left,
44 y - pwnd->rcWindow.top);
45}
46
48IntEqualRect(RECTL *lprc1, RECTL *lprc2)
49{
50 if (lprc1 == NULL || lprc2 == NULL)
51 return FALSE;
52
53 return (lprc1->left == lprc2->left) && (lprc1->top == lprc2->top) &&
54 (lprc1->right == lprc2->right) && (lprc1->bottom == lprc2->bottom);
55}
56
61UINT FASTCALL co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack);
62UINT FASTCALL co_WinPosMinMaximize(PWND WindowObject, UINT ShowFlag, RECTL* NewPos);
66PWND APIENTRY co_WinPosWindowFromPoint(IN PWND ScopeWin, IN POINT *WinPoint, IN OUT USHORT* HitTest, IN BOOL Ignore);
74
80
83{
85}
86
89{
91}
92
95{
96 /* We want to forbid snapping operations on the TaskBar and on child windows.
97 * We use a heuristic for detecting the TaskBar by its typical Style & ExStyle. */
98 const UINT style = Wnd->style;
100 const UINT tbes = WS_EX_TOOLWINDOW;
101 BOOLEAN istb = (style & tbws) == tbws && (Wnd->ExStyle & (tbes | WS_EX_APPWINDOW)) == tbes;
102 BOOLEAN thickframe = (style & WS_THICKFRAME) && (style & (WS_DLGFRAME | WS_BORDER)) != WS_DLGFRAME;
103 return thickframe && !(style & WS_CHILD) && !istb;
104}
unsigned char BOOLEAN
Arabic default style
Definition: afstyles.h:94
ush Pos
Definition: deflate.h:92
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
r parent
Definition: btrfs.c:3010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLbitfield flags
Definition: glext.h:7161
#define WS_EX2_VERTICALLYMAXIMIZEDLEFT
Definition: ntuser.h:680
#define WS_EX2_VERTICALLYMAXIMIZEDRIGHT
Definition: ntuser.h:681
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPtInRegion(_In_ HRGN hrgn, _In_ INT x, _In_ INT y)
Definition: region.c:3996
#define WS_CHILD
Definition: pedump.c:617
#define WS_BORDER
Definition: pedump.c:625
#define WS_POPUP
Definition: pedump.c:616
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define WS_DLGFRAME
Definition: pedump.c:626
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
unsigned short USHORT
Definition: pedump.c:61
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_THICKFRAME
Definition: pedump.c:630
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
@ Cmd
Definition: sacdrv.h:278
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
Definition: window.c:28
Definition: winpos.h:4
LONG dxBlt
Definition: winpos.h:11
UINT fsRE
Definition: winpos.h:13
HRGN hrgnVisOld
Definition: winpos.h:14
WINDOWPOS pos
Definition: winpos.h:5
LONG cxClientNew
Definition: winpos.h:8
RECT rcBlt
Definition: winpos.h:10
LONG cyClientNew
Definition: winpos.h:9
LONG xClientNew
Definition: winpos.h:6
HRGN hrgnClip
Definition: winpos.h:16
HRGN hrgnInterMonitor
Definition: winpos.h:17
LONG dyBlt
Definition: winpos.h:12
PTHREADINFO pti
Definition: winpos.h:15
LONG yClientNew
Definition: winpos.h:7
Definition: ntuser.h:180
Definition: winpos.h:21
HEAD head
Definition: winpos.h:22
PCVR acvr
Definition: winpos.h:27
INT ccvr
Definition: winpos.h:25
UINT bHandle
Definition: winpos.h:24
UINT bShellNotify
Definition: winpos.h:23
INT ccvrAlloc
Definition: winpos.h:26
Definition: ntuser.h:694
DWORD ExStyle
Definition: ntuser.h:704
HRGN hrgnClip
Definition: ntuser.h:733
DWORD ExStyle2
Definition: ntuser.h:745
DWORD style
Definition: ntuser.h:706
RECT rcWindow
Definition: ntuser.h:716
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
#define FORCEINLINE
Definition: wdftypes.h:67
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
Definition: rect.h:52
LONG_PTR LRESULT
Definition: windef.h:209
void FASTCALL co_WinPosSendSizeMove(PWND Window)
Definition: winpos.c:2392
struct _CVR * PCVR
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1792
LRESULT FASTCALL co_WinPosGetNonClientSize(PWND Window, RECTL *WindowRect, RECTL *ClientRect)
VOID FASTCALL IntSetSnapInfo(PWND Wnd, UINT Edge, IN const RECT *Pos OPTIONAL)
Definition: winpos.c:4004
UINT FASTCALL co_WinPosArrangeIconicWindows(PWND parent)
Definition: winpos.c:737
VOID FASTCALL co_IntSnapWindow(PWND Wnd, UINT Edge)
Definition: winpos.c:3932
BOOL FASTCALL IntClientToScreen(PWND, LPPOINT)
Definition: winpos.c:199
BOOL FASTCALL IntGetClientOrigin(PWND Window, LPPOINT Point)
Definition: winpos.c:71
struct _SMWP SMWP
VOID FASTCALL co_WinPosActivateOtherWindow(PWND)
Definition: winpos.c:397
VOID FASTCALL co_IntCalculateSnapPosition(PWND Wnd, UINT Edge, OUT RECT *Pos)
Definition: winpos.c:3902
VOID UserGetWindowBorders(DWORD, DWORD, SIZE *, BOOL)
Definition: winpos.c:894
FORCEINLINE BOOLEAN IntIsWindowSnapped(PWND Wnd)
Definition: winpos.h:88
PWND APIENTRY co_WinPosWindowFromPoint(IN PWND ScopeWin, IN POINT *WinPoint, IN OUT USHORT *HitTest, IN BOOL Ignore)
Definition: winpos.c:2951
UINT FASTCALL co_WinPosMinMaximize(PWND WindowObject, UINT ShowFlag, RECTL *NewPos)
BOOL FASTCALL IntGetWindowRect(PWND, RECTL *)
Definition: winpos.c:121
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Window, INT Cmd)
Definition: winpos.c:2584
PWND FASTCALL IntRealChildWindowFromPoint(PWND, LONG, LONG)
Definition: winpos.c:2985
UINT FASTCALL co_WinPosGetMinMaxInfo(PWND Window, POINT *MaxSize, POINT *MaxPos, POINT *MinTrack, POINT *MaxTrack)
Definition: winpos.c:940
FORCEINLINE BOOL IntPtInWindow(PWND pwnd, INT x, INT y)
Definition: winpos.h:30
BOOL FASTCALL IntScreenToClient(PWND, LPPOINT)
Definition: winpos.c:213
BOOL FASTCALL ActivateOtherWindowMin(PWND)
Definition: winpos.c:285
FORCEINLINE VOID co_IntUnsnapWindow(PWND Wnd)
Definition: winpos.h:82
FORCEINLINE BOOL IntEqualRect(RECTL *lprc1, RECTL *lprc2)
Definition: winpos.h:48
struct _SMWP * PSMWP
FORCEINLINE BOOLEAN IntIsSnapAllowedForWindow(PWND Wnd)
Definition: winpos.h:94
struct _CVR CVR
UINT FASTCALL IntGetWindowSnapEdge(PWND Wnd)
Definition: winpos.c:3894
VOID FASTCALL IntSetSnapEdge(PWND Wnd, UINT Edge)
Definition: winpos.c:3979
BOOL UserHasWindowEdge(DWORD, DWORD)
Definition: winpos.c:850
#define WS_EX_APPWINDOW
Definition: winuser.h:383
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define HTNOWHERE
Definition: winuser.h:2477