03f4f1b76a976ea626d831ca10b4f26bcaa38c65
[reactos.git] / 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 #include <include/dce.h>
10
11 typedef struct _PROPERTY
12 {
13   LIST_ENTRY PropListEntry;
14   HANDLE Data;
15   ATOM Atom;
16 } PROPERTY, *PPROPERTY;
17
18 VOID
19 WinPosSetupInternalPos(VOID);
20
21 typedef struct _WINDOW_OBJECT
22 {
23   /* Pointer to the window class. */
24   PWNDCLASS_OBJECT Class;
25   /* Extended style. */
26   DWORD ExStyle;
27   /* Window name. */
28   UNICODE_STRING WindowName;
29   /* Style. */
30   DWORD Style;
31   /* Initial window position. */
32   INT x;
33   INT y;
34   INT Width;
35   INT Height;
36   /* Parent window handle. */
37   HWND ParentHandle;
38   /* Window menu handle. */
39   HMENU Menu;
40   /* Handle of the module that created the window. */
41   HINSTANCE Instance;
42   /* Unknown. */
43   LPVOID Parameters;
44   /* Entry in the thread's list of windows. */
45   LIST_ENTRY ListEntry;
46   /* Entry in the global list of windows. */
47   LIST_ENTRY DesktopListEntry;
48   /* Pointer to the extra data associated with the window. */
49   PULONG ExtraData;
50   /* Size of the extra data associated with the window. */
51   ULONG ExtraDataSize;
52   /* Position of the window. */
53   RECT WindowRect;
54   /* Position of the window's client area. */
55   RECT ClientRect;
56   /* Handle for the window. */
57   HANDLE Self;
58   /* Window flags. */
59   ULONG Flags;
60   /* FIXME: Don't know. */
61   UINT IDMenu;
62   /* Handle of region of the window to be updated. */
63   HANDLE UpdateRegion;
64   /* Pointer to the message queue associated with the window. */
65   PUSER_MESSAGE_QUEUE MessageQueue;
66   /* Head of the list of child windows. */
67   LIST_ENTRY ChildrenListHead;
68   /* Lock for the list of child windows. */
69   FAST_MUTEX ChildrenListLock;
70   /* Entry in the parent's list of child windows. */
71   LIST_ENTRY SiblingListEntry;
72   /* Entry in the list of thread windows. */
73   LIST_ENTRY ThreadListEntry;
74   /* Pointer to the parent window. */
75   struct _WINDOW_OBJECT* Parent;
76   /* DC Entries (DCE) */
77   PDCE Dce;
78   /* Property list head.*/
79   LIST_ENTRY PropListHead;
80   /* Scrollbar info */
81   PSCROLLBARINFO pHScroll;
82   PSCROLLBARINFO pVScroll;
83   PSCROLLBARINFO wExtra;
84 } WINDOW_OBJECT, *PWINDOW_OBJECT;
85
86 /* Window flags. */
87 #define WINDOWOBJECT_NEED_SIZE            (0x00000001)
88 #define WINDOWOBJECT_NEED_BEGINPAINT      (0x00000002)
89 #define WINDOWOBJECT_NEED_ERASEBACKGRD    (0x00000004)
90 #define WINDOWOBJECT_NEED_NCPAINT         (0x00000008)
91 #define WINDOWOBJECT_NEED_INTERNALPAINT   (0x00000010)
92 #define WINDOWOBJECT_RESTOREMAX           (0x00000020)
93
94 NTSTATUS
95 InitWindowImpl(VOID);
96 NTSTATUS
97 CleanupWindowImpl(VOID);
98 VOID
99 W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect);
100 PWINDOW_OBJECT
101 W32kGetWindowObject(HWND hWnd);
102 VOID
103 W32kReleaseWindowObject(PWINDOW_OBJECT Window);
104 HWND STDCALL
105 W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
106                         PWNDCLASS_OBJECT DesktopClass,
107                         ULONG Width, ULONG Height);
108 BOOL
109 W32kIsDesktopWindow(HWND hWnd);
110 HWND
111 W32kGetActiveWindow(VOID);
112 BOOL
113 W32kIsWindowVisible(HWND Wnd);
114 BOOL
115 W32kIsChildWindow(HWND Parent, HWND Child);
116 HWND W32kGetDesktopWindow();
117
118 #endif /* __WIN32K_WINDOW_H */
119
120 /* EOF */