:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[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 } WINDOW_OBJECT, *PWINDOW_OBJECT;
81
82 /* Window flags. */
83 #define WINDOWOBJECT_NEED_SIZE            (0x00000001)
84 #define WINDOWOBJECT_NEED_BEGINPAINT      (0x00000002)
85 #define WINDOWOBJECT_NEED_ERASEBACKGRD    (0x00000004)
86 #define WINDOWOBJECT_NEED_NCPAINT         (0x00000008)
87 #define WINDOWOBJECT_NEED_INTERNALPAINT   (0x00000010)
88 #define WINDOWOBJECT_RESTOREMAX           (0x00000020)
89
90 NTSTATUS
91 InitWindowImpl(VOID);
92 NTSTATUS
93 CleanupWindowImpl(VOID);
94 VOID
95 W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect);
96 PWINDOW_OBJECT
97 W32kGetWindowObject(HWND hWnd);
98 VOID
99 W32kReleaseWindowObject(PWINDOW_OBJECT Window);
100 HWND STDCALL
101 W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
102                         PWNDCLASS_OBJECT DesktopClass,
103                         ULONG Width, ULONG Height);
104 BOOL
105 W32kIsDesktopWindow(HWND hWnd);
106 HWND
107 W32kGetActiveWindow(VOID);
108 BOOL
109 W32kIsWindowVisible(HWND Wnd);
110 BOOL
111 W32kIsChildWindow(HWND Parent, HWND Child);
112 HWND W32kGetDesktopWindow();
113
114 #endif /* __WIN32K_WINDOW_H */
115
116 /* EOF */