xref: /reactos/win32ss/user/ntuser/window.h (revision 3435c3b5)
1 #pragma once
2 
3 extern ATOM AtomMessage;
4 extern ATOM AtomWndObj; /* WNDOBJ list */
5 extern ATOM AtomLayer;
6 extern ATOM AtomFlashWndState;
7 
8 #define HAS_DLGFRAME(Style, ExStyle) \
9             (((ExStyle) & WS_EX_DLGMODALFRAME) || \
10             (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
11 
12 #define HAS_THICKFRAME(Style, ExStyle) \
13             (((Style) & WS_THICKFRAME) && \
14             (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
15 
16 #define HAS_THINFRAME(Style, ExStyle) \
17             (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
18 
19 #define HAS_CLIENTFRAME(Style, ExStyle) \
20             (((ExStyle) & WS_EX_CLIENTEDGE) || (!((Style) & (WS_CHILD | WS_POPUP))))
21 
22 #define HAS_MENU(pWnd,style)  ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && (pWnd->IDMenu) && IntIsMenu(UlongToHandle(pWnd->IDMenu)))
23 
24 #define IntIsDesktopWindow(WndObj) \
25   (WndObj->spwndParent == NULL)
26 
27 #define IntIsBroadcastHwnd(hWnd) \
28   (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
29 
30 
31 #define IntWndBelongsToThread(WndObj, W32Thread) \
32   ((WndObj->head.pti) && (WndObj->head.pti == W32Thread))
33 
34 #define IntGetWndThreadId(WndObj) \
35   PsGetThreadId(WndObj->head.pti->pEThread)
36 
37 #define IntGetWndProcessId(WndObj) \
38   PsGetProcessId(WndObj->head.pti->ppi->peProcess)
39 
40 PWND FASTCALL ValidateHwndNoErr(HWND);
41 BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam);
42 BOOL FASTCALL IntIsWindow(HWND hWnd);
43 HWND* FASTCALL IntWinListChildren(PWND Window);
44 HWND* FASTCALL IntWinListOwnedPopups(PWND Window);
45 VOID FASTCALL IntGetClientRect (PWND WindowObject, RECTL *Rect);
46 INT FASTCALL  IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints);
47 BOOL FASTCALL IntIsChildWindow (PWND Parent, PWND Child);
48 VOID FASTCALL IntUnlinkWindow(PWND Wnd);
49 VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev);
50 PWND FASTCALL IntGetParent(PWND Wnd);
51 VOID FASTCALL IntGetWindowBorderMeasures(PWND WindowObject, UINT *cx, UINT *cy);
52 BOOL FASTCALL IntShowOwnedPopups( PWND owner, BOOL fShow );
53 LRESULT FASTCALL IntDefWindowProc( PWND Window, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi);
54 VOID FASTCALL IntNotifyWinEvent(DWORD, PWND, LONG, LONG, DWORD);
55 #define WINVER_WIN2K  _WIN32_WINNT_WIN2K
56 #define WINVER_WINNT4 _WIN32_WINNT_NT4
57 #define WINVER_WIN31  0x30A
58 PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
59                                         PLARGE_STRING WindowName,
60                                         PCLS Class,
61                                         PWND ParentWindow,
62                                         PWND OwnerWindow,
63                                         PVOID acbiBuffer,
64                                         PDESKTOP pdeskCreated,
65                                         DWORD dwVer );
66 PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW* Cs,
67                                     PUNICODE_STRING ClassName,
68                                     PLARGE_STRING WindowName,
69                                     PVOID acbiBuffer,
70                                     DWORD dwVer );
71 BOOL FASTCALL IntEnableWindow(HWND,BOOL);
72 BOOL FASTCALL IntIsWindowVisible(PWND);
73 DWORD FASTCALL GetNCHitEx(PWND,POINT);
74 ULONG FASTCALL IntSetStyle(PWND,ULONG,ULONG);
75 PWND FASTCALL VerifyWnd(PWND);
76 PWND FASTCALL IntGetNonChildAncestor(PWND);
77 LONG FASTCALL co_UserSetWindowLong(HWND,DWORD,LONG,BOOL);
78 LONG_PTR FASTCALL co_UserSetWindowLongPtr(HWND, DWORD, LONG_PTR, BOOL);
79 HWND FASTCALL IntGetWindow(HWND,UINT);
80 LRESULT co_UserFreeWindow(PWND,PPROCESSINFO,PTHREADINFO,BOOLEAN);
81 
82 /* EOF */
83