[WIN32SS][NTUSER] Don't freeze Task Bar in switching the app (#1243)
[reactos.git] / win32ss / user / ntuser / winpos.h
1 #pragma once
2
3 typedef struct _CVR // Tag Ussw
4 {
5 WINDOWPOS pos;
6 LONG xClientNew;
7 LONG yClientNew;
8 LONG cxClientNew;
9 LONG cyClientNew;
10 RECT rcBlt;
11 LONG dxBlt;
12 LONG dyBlt;
13 UINT fsRE;
14 HRGN hrgnVisOld;
15 PTHREADINFO pti;
16 HRGN hrgnClip;
17 HRGN hrgnInterMonitor;
18 } CVR, *PCVR;
19
20 typedef struct _SMWP
21 {
22 HEAD head;
23 UINT bShellNotify:1;
24 UINT bHandle:1;
25 INT ccvr;
26 INT ccvrAlloc;
27 PCVR acvr;
28 } SMWP, *PSMWP;
29
30 FORCEINLINE BOOL IntPtInWindow(PWND pwnd, INT x, INT y)
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
47 FORCEINLINE BOOL
48 IntEqualRect(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
57 BOOL FASTCALL ActivateOtherWindowMin(PWND);
58 UINT FASTCALL co_WinPosArrangeIconicWindows(PWND parent);
59 BOOL FASTCALL IntGetClientOrigin(PWND Window, LPPOINT Point);
60 LRESULT FASTCALL co_WinPosGetNonClientSize(PWND Window, RECTL* WindowRect, RECTL* ClientRect);
61 UINT FASTCALL co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack);
62 UINT FASTCALL co_WinPosMinMaximize(PWND WindowObject, UINT ShowFlag, RECTL* NewPos);
63 BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags);
64 BOOLEAN FASTCALL co_WinPosShowWindow(PWND Window, INT Cmd);
65 void FASTCALL co_WinPosSendSizeMove(PWND Window);
66 PWND APIENTRY co_WinPosWindowFromPoint(IN PWND ScopeWin, IN POINT *WinPoint, IN OUT USHORT* HitTest, IN BOOL Ignore);
67 VOID FASTCALL co_WinPosActivateOtherWindow(PWND);
68 PWND FASTCALL IntRealChildWindowFromPoint(PWND,LONG,LONG);
69 BOOL FASTCALL IntScreenToClient(PWND,LPPOINT);
70 BOOL FASTCALL IntClientToScreen(PWND,LPPOINT);
71 BOOL FASTCALL IntGetWindowRect(PWND,RECTL*);
72 BOOL UserHasWindowEdge(DWORD,DWORD);
73 VOID UserGetWindowBorders(DWORD,DWORD,SIZE*,BOOL);