Fixed some bugs.
[reactos.git] / reactos / subsys / win32k / include / window.h
1 #ifndef __WIN32K_WINDOW_H
2 #define __WIN32K_WINDOW_H
3
4 #include <windows.h>
5 #include <ddk/ntddk.h>
6 #include <include/class.h>
7 #include <include/msgqueue.h>
8 #include <include/winsta.h>
9
10 typedef struct _INTERNALPOS
11 {
12 RECT NormalRect;
13 POINT IconPos;
14 POINT MaxPos;
15 HWND IconTitle;
16 } INTERNALPOS, *PINTERNALPOS;
17
18 typedef struct _WINDOW_OBJECT
19 {
20 /* Internal position. */
21 PINTERNALPOS InternalPos;
22 /* Pointer to the window class. */
23 PWNDCLASS_OBJECT Class;
24 /* Extended style. */
25 DWORD ExStyle;
26 /* Window name. */
27 UNICODE_STRING WindowName;
28 /* Style. */
29 DWORD Style;
30 /* Initial window position. */
31 INT x;
32 INT y;
33 INT Width;
34 INT Height;
35 /* Parent window handle. */
36 HWND ParentHandle;
37 /* Window menu handle. */
38 HMENU Menu;
39 /* Handle of the module that created the window. */
40 HINSTANCE Instance;
41 /* Unknown. */
42 LPVOID Parameters;
43 /* Entry in the thread's list of windows. */
44 LIST_ENTRY ListEntry;
45 /* Entry in the global list of windows. */
46 LIST_ENTRY DesktopListEntry;
47 /* Pointer to the extra data associated with the window. */
48 PULONG ExtraData;
49 /* Size of the extra data associated with the window. */
50 ULONG ExtraDataSize;
51 /* Position of the window. */
52 RECT WindowRect;
53 /* Position of the window's client area. */
54 RECT ClientRect;
55 /* Handle for the window. */
56 HANDLE Self;
57 /* Window flags. */
58 ULONG Flags;
59 /* FIXME: Don't know. */
60 UINT IDMenu;
61 /* Handle of region of the window to be updated. */
62 HANDLE UpdateRegion;
63 /* Pointer to the message queue associated with the window. */
64 PUSER_MESSAGE_QUEUE MessageQueue;
65 /* Head of the list of child windows. */
66 LIST_ENTRY ChildrenListHead;
67 /* Lock for the list of child windows. */
68 FAST_MUTEX ChildrenListLock;
69 /* Entry in the parent's list of child windows. */
70 LIST_ENTRY SiblingListEntry;
71 /* Entry in the list of thread windows. */
72 LIST_ENTRY ThreadListEntry;
73 /* Pointer to the parent window. */
74 struct _WINDOW_OBJECT* Parent;
75 } WINDOW_OBJECT, *PWINDOW_OBJECT;
76
77 /* Window flags. */
78 #define WINDOWOBJECT_NEED_SIZE (0x00000001)
79 #define WINDOWOBJECT_NEED_BEGINPAINT (0x00000002)
80 #define WINDOWOBJECT_NEED_ERASEBACKGRD (0x00000004)
81 #define WINDOWOBJECT_NEED_NCPAINT (0x00000008)
82 #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000010)
83 #define WINDOWOBJECT_RESTOREMAX (0x00000020)
84
85 NTSTATUS
86 InitWindowImpl(VOID);
87 NTSTATUS
88 CleanupWindowImpl(VOID);
89 VOID
90 W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect);
91 PWINDOW_OBJECT
92 W32kGetWindowObject(HWND hWnd);
93 VOID
94 W32kReleaseWindowObject(PWINDOW_OBJECT Window);
95 HWND STDCALL
96 W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
97 PWNDCLASS_OBJECT DesktopClass,
98 ULONG Width, ULONG Height);
99 BOOL
100 W32kIsDesktopWindow(HWND hWnd);
101 HWND
102 W32kGetActiveWindow(VOID);
103 BOOL
104 W32kIsWindowVisible(HWND Wnd);
105 BOOL
106 W32kIsChildWindow(HWND Parent, HWND Child);
107
108 #endif /* __WIN32K_WINDOW_H */
109
110 /* EOF */