3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: Window properties
6 * FILE: subsys/win32k/ntuser/prop.c
7 * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
9 * 06-06-2001 CSH Created
11 /* INCLUDES ******************************************************************/
13 #include <ddk/ntddk.h>
14 #include <win32k/win32k.h>
15 #include <include/object.h>
16 #include <include/guicheck.h>
17 #include <include/window.h>
18 #include <include/class.h>
19 #include <include/error.h>
20 #include <include/winsta.h>
21 #include <include/winpos.h>
22 #include <include/callback.h>
23 #include <include/msgqueue.h>
24 #include <include/rect.h>
29 /* FUNCTIONS *****************************************************************/
32 W32kGetProp(PWINDOW_OBJECT WindowObject, ATOM Atom)
34 PLIST_ENTRY ListEntry;
37 ListEntry = WindowObject->PropListHead.Flink;
38 while (ListEntry != &WindowObject->PropListHead)
40 Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
41 if (Property->Atom == Atom)
45 ListEntry = ListEntry->Flink;
51 NtUserBuildPropList(DWORD Unknown0,
62 NtUserRemoveProp(HWND hWnd, ATOM Atom)
64 PWINDOW_OBJECT WindowObject;
68 WindowObject = W32kGetWindowObject(hWnd);
69 if (WindowObject == NULL)
74 Prop = W32kGetProp(WindowObject, Atom);
77 W32kReleaseWindowObject(WindowObject);
81 RemoveEntryList(&Prop->PropListEntry);
83 W32kReleaseWindowObject(WindowObject);
88 NtUserGetProp(HWND hWnd, ATOM Atom)
90 PWINDOW_OBJECT WindowObject;
94 WindowObject = W32kGetWindowObject(hWnd);
95 if (WindowObject == NULL)
100 Prop = W32kGetProp(WindowObject, Atom);
105 W32kReleaseWindowObject(WindowObject);
110 NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
112 PWINDOW_OBJECT WindowObject;
115 WindowObject = W32kGetWindowObject(hWnd);
116 if (WindowObject == NULL)
121 Prop = W32kGetProp(WindowObject, Atom);
124 Prop = ExAllocatePool(PagedPool, sizeof(PROPERTY));
127 W32kReleaseWindowObject(WindowObject);
131 InsertTailList(&WindowObject->PropListHead, &Prop->PropListEntry);
134 W32kReleaseWindowObject(WindowObject);