my 1st
Added: branches/hardons1stbranch/win32k/
Modified: branches/hardons1stbranch/win32k/eng/window.c
Modified: branches/hardons1stbranch/win32k/include/caret.h
Modified: branches/hardons1stbranch/win32k/include/class.h
Modified: branches/hardons1stbranch/win32k/include/cursoricon.h
Modified: branches/hardons1stbranch/win32k/include/dce.h
Modified: branches/hardons1stbranch/win32k/include/desktop.h
Modified: branches/hardons1stbranch/win32k/include/focus.h
Modified: branches/hardons1stbranch/win32k/include/guicheck.h
Modified: branches/hardons1stbranch/win32k/include/hook.h
Modified: branches/hardons1stbranch/win32k/include/intgdi.h
Added: branches/hardons1stbranch/win32k/include/keyboard.h
Modified: branches/hardons1stbranch/win32k/include/menu.h
Modified: branches/hardons1stbranch/win32k/include/msgqueue.h
Added: branches/hardons1stbranch/win32k/include/ntuser.h
Modified: branches/hardons1stbranch/win32k/include/object.h
Modified: branches/hardons1stbranch/win32k/include/painting.h
Modified: branches/hardons1stbranch/win32k/include/timer.h
Modified: branches/hardons1stbranch/win32k/include/win32k.h
Modified: branches/hardons1stbranch/win32k/include/window.h
Modified: branches/hardons1stbranch/win32k/include/winpos.h
Modified: branches/hardons1stbranch/win32k/include/winsta.h
Modified: branches/hardons1stbranch/win32k/main/dllmain.c
Deleted: branches/hardons1stbranch/win32k/misc/object.c
Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c
Modified: branches/hardons1stbranch/win32k/ntuser/callback.c
Modified: branches/hardons1stbranch/win32k/ntuser/caret.c
Modified: branches/hardons1stbranch/win32k/ntuser/class.c
Modified: branches/hardons1stbranch/win32k/ntuser/clipboard.c
Modified: branches/hardons1stbranch/win32k/ntuser/csr.c
Modified: branches/hardons1stbranch/win32k/ntuser/cursoricon.c
Modified: branches/hardons1stbranch/win32k/ntuser/desktop.c
Modified: branches/hardons1stbranch/win32k/ntuser/focus.c
Modified: branches/hardons1stbranch/win32k/ntuser/guicheck.c
Added: branches/hardons1stbranch/win32k/ntuser/handle.c
Modified: branches/hardons1stbranch/win32k/ntuser/hook.c
Modified: branches/hardons1stbranch/win32k/ntuser/hotkey.c
Modified: branches/hardons1stbranch/win32k/ntuser/input.c
Modified: branches/hardons1stbranch/win32k/ntuser/keyboard.c
Modified: branches/hardons1stbranch/win32k/ntuser/menu.c
Modified: branches/hardons1stbranch/win32k/ntuser/message.c
Modified: branches/hardons1stbranch/win32k/ntuser/metric.c
Modified: branches/hardons1stbranch/win32k/ntuser/misc.c
Modified: branches/hardons1stbranch/win32k/ntuser/monitor.c
Modified: branches/hardons1stbranch/win32k/ntuser/msgqueue.c
Added: branches/hardons1stbranch/win32k/ntuser/ntuser.c
Modified: branches/hardons1stbranch/win32k/ntuser/painting.c
Modified: branches/hardons1stbranch/win32k/ntuser/prop.c
Modified: branches/hardons1stbranch/win32k/ntuser/scrollbar.c
Modified: branches/hardons1stbranch/win32k/ntuser/timer.c
Modified: branches/hardons1stbranch/win32k/ntuser/vis.c
Modified: branches/hardons1stbranch/win32k/ntuser/windc.c
Modified: branches/hardons1stbranch/win32k/ntuser/window.c
Modified: branches/hardons1stbranch/win32k/ntuser/winpos.c
Modified: branches/hardons1stbranch/win32k/ntuser/winsta.c
Modified: branches/hardons1stbranch/win32k/objects/color.c
Modified: branches/hardons1stbranch/win32k/objects/dc.c
Modified: branches/hardons1stbranch/win32k/win32k.xml
_____
Copied: branches/hardons1stbranch/win32k (from rev 16681,
trunk/reactos/subsys/win32k)
_____
Modified: branches/hardons1stbranch/win32k/eng/window.c
--- trunk/reactos/subsys/win32k/eng/window.c 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/eng/window.c 2005-07-27
11:08:35 UTC (rev 16794)
@@ -155,7 +155,6 @@
ASSERT_IRQL(PASSIVE_LEVEL);
- ExAcquireFastMutex(&Window->WndObjListLock);
CurrentEntry = Window->WndObjListHead.Flink;
while (CurrentEntry != &Window->WndObjListHead)
{
@@ -189,7 +188,6 @@
}
}
- ExReleaseFastMutex(&Window->WndObjListLock);
}
/*
@@ -222,7 +220,6 @@
WndObjInt = EngAllocMem(0, sizeof (WNDGDI), TAG_WNDOBJ);
if (WndObjInt == NULL)
{
- IntReleaseWindowObject(Window);
DPRINT1("Failed to allocate memory for a WND structure!\n");
return NULL;
}
@@ -231,7 +228,6 @@
WndObjInt->ClientClipObj = NULL;
if (!IntEngWndUpdateClipObj(WndObjInt, Window))
{
- IntReleaseWindowObject(Window);
EngFreeMem(WndObjInt);
return NULL;
}
@@ -248,13 +244,8 @@
WndObjInt->PixelFormat = iPixelFormat;
/* associate object with window */
- ExAcquireFastMutex(&Window->WndObjListLock);
InsertTailList(&Window->WndObjListHead, &WndObjInt->ListEntry);
- ExReleaseFastMutex(&Window->WndObjListLock);
- /* release resources */
- IntReleaseWindowObject(Window);
-
DPRINT("EngCreateWnd: SUCCESS!\n");
return WndObjUser;
@@ -284,10 +275,7 @@
else
{
/* Remove object from window */
- ExAcquireFastMutex(&Window->WndObjListLock);
RemoveEntryList(&WndObjInt->ListEntry);
- ExReleaseFastMutex(&Window->WndObjListLock);
- IntReleaseWindowObject(Window);
}
/* Free resources */
_____
Modified: branches/hardons1stbranch/win32k/include/caret.h
--- trunk/reactos/subsys/win32k/include/caret.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/caret.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -4,19 +4,16 @@
#define IDCARETTIMER (0xffff)
BOOL FASTCALL
-IntDestroyCaret(PW32THREAD Win32Thread);
+UserDestroyCaret(PW32THREAD Win32Thread);
BOOL FASTCALL
-IntSetCaretBlinkTime(UINT uMSeconds);
+UserSetCaretBlinkTime(UINT uMSeconds);
BOOL FASTCALL
-IntSetCaretPos(int X, int Y);
+UserSwitchCaretShowing(PVOID Info);
-BOOL FASTCALL
-IntSwitchCaretShowing(PVOID Info);
-
VOID FASTCALL
-IntDrawCaret(HWND hWnd);
+UserDrawCaret(HWND hWnd);
#endif /* _WIN32K_CARET_H */
_____
Modified: branches/hardons1stbranch/win32k/include/class.h
--- trunk/reactos/subsys/win32k/include/class.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/class.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -24,7 +24,6 @@
LIST_ENTRY ListEntry;
PCHAR ExtraData;
/* list of windows */
- FAST_MUTEX ClassWindowsListLock;
LIST_ENTRY ClassWindowsListHead;
} WNDCLASS_OBJECT, *PWNDCLASS_OBJECT;
@@ -34,18 +33,6 @@
NTSTATUS FASTCALL
CleanupClassImpl(VOID);
-#define IntLockProcessClasses(W32Process) \
- ExAcquireFastMutex(&(W32Process)->ClassListLock)
-
-#define IntUnLockProcessClasses(W32Process) \
- ExReleaseFastMutex(&(W32Process)->ClassListLock)
-
-#define IntLockClassWindows(ClassObj) \
- ExAcquireFastMutex(&(ClassObj)->ClassWindowsListLock)
-
-#define IntUnLockClassWindows(ClassObj) \
- ExReleaseFastMutex(&(ClassObj)->ClassWindowsListLock)
-
#define ClassDereferenceObject(ClassObj) \
ObmDereferenceObject(ClassObj)
@@ -67,9 +54,9 @@
LPCWSTR ClassNameOrAtom,
HINSTANCE hInstance);
-struct _WINDOW_OBJECT;
+//PWINDOW_OBJECT;
ULONG FASTCALL
-IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL
Ansi);
+UserGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, BOOL Ansi);
#endif /* _WIN32K_CLASS_H */
_____
Modified: branches/hardons1stbranch/win32k/include/cursoricon.h
--- trunk/reactos/subsys/win32k/include/cursoricon.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/cursoricon.h
2005-07-27 11:08:35 UTC (rev 16794)
@@ -13,7 +13,6 @@
{
LIST_ENTRY ListEntry;
HANDLE Self;
- FAST_MUTEX Lock;
LIST_ENTRY ProcessList;
HMODULE hModule;
HRSRC hRsrc;
@@ -37,7 +36,6 @@
BOOL Enabled;
BOOL SwapButtons;
UINT ButtonsDown;
- FAST_MUTEX CursorMutex;
CURSORCLIP_INFO CursorClipInfo;
PCURICON_OBJECT CurrentCursorObject;
BYTE ShowingCursor;
@@ -50,26 +48,17 @@
HANDLE LastClkWnd;
} SYSTEM_CURSORINFO, *PSYSTEM_CURSORINFO;
-HCURSOR FASTCALL IntSetCursor(PWINSTATION_OBJECT WinStaObject,
PCURICON_OBJECT NewCursor, BOOL ForceChange);
-BOOL FASTCALL IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject);
-PCURICON_OBJECT FASTCALL IntGetCurIconObject(PWINSTATION_OBJECT
WinStaObject, HANDLE Handle);
-PCURICON_OBJECT FASTCALL IntCreateCurIconHandle(PWINSTATION_OBJECT
WinStaObject);
-VOID FASTCALL IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS
Win32Process);
+HCURSOR FASTCALL UserSetCursor(PCURICON_OBJECT NewCursor, BOOL
ForceChange);
+BOOL FASTCALL UserSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject);
+PCURICON_OBJECT FASTCALL UserCreateCurIconHandle(PWINSTATION_OBJECT
WinStaObject);
+VOID FASTCALL UserCleanupCurIcons(struct _EPROCESS *Process,
PW32PROCESS Win32Process);
-BOOL FASTCALL IntGetCursorLocation(PWINSTATION_OBJECT WinStaObject,
POINT *loc);
+BOOL FASTCALL
+UserGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc);
-#define IntGetSysCursorInfo(WinStaObj) \
+#define UserGetSysCursorInfo(WinStaObj) \
(PSYSTEM_CURSORINFO)((WinStaObj)->SystemCursor)
-#define IntReleaseCurIconObject(CurIconObj) \
- ObmDereferenceObject(CurIconObj)
-
-#define IntLockProcessCursorIcons(W32Process) \
- ExAcquireFastMutex(&W32Process->CursorIconListLock)
-
-#define IntUnLockProcessCursorIcons(W32Process) \
- ExReleaseFastMutex(&W32Process->CursorIconListLock)
-
#endif /* _WIN32K_CURSORICON_H */
/* EOF */
_____
Modified: branches/hardons1stbranch/win32k/include/dce.h
--- trunk/reactos/subsys/win32k/include/dce.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/dce.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -50,7 +50,7 @@
#define DCEOBJ_UnlockDCE(pDCE) GDIOBJ_UnlockObjByPtr(pDCE)
BOOL INTERNAL_CALL DCE_Cleanup(PVOID ObjectBody);
-PDCE FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type);
+PDCE FASTCALL UserDceAllocDCE(HWND hWnd, DCE_TYPE Type);
PDCE FASTCALL DCE_FreeDCE(PDCE dce);
VOID FASTCALL DCE_FreeWindowDCE(HWND);
HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild,
ULONG CFlags);
_____
Modified: branches/hardons1stbranch/win32k/include/desktop.h
--- trunk/reactos/subsys/win32k/include/desktop.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/desktop.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -64,23 +64,23 @@
HDC FASTCALL
IntGetScreenDC(VOID);
-HWND FASTCALL
-IntGetDesktopWindow (VOID);
+PWINDOW_OBJECT FASTCALL
+UserGetDesktopWindow (VOID);
HWND FASTCALL
IntGetCurrentThreadDesktopWindow(VOID);
PUSER_MESSAGE_QUEUE FASTCALL
-IntGetFocusMessageQueue(VOID);
+UserGetFocusMessageQueue(VOID);
VOID FASTCALL
IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue);
PDESKTOP_OBJECT FASTCALL
-IntGetActiveDesktop(VOID);
+UserGetActiveDesktop(VOID);
NTSTATUS FASTCALL
-IntShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height);
+UserShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height);
NTSTATUS FASTCALL
IntHideDesktop(PDESKTOP_OBJECT Desktop);
_____
Modified: branches/hardons1stbranch/win32k/include/focus.h
--- trunk/reactos/subsys/win32k/include/focus.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/focus.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -4,22 +4,25 @@
/*
* These functions take the window handles from current message queue.
*/
-HWND FASTCALL
-IntGetCaptureWindow();
-HWND FASTCALL
-IntGetFocusWindow();
+PWINDOW_OBJECT FASTCALL
+UserGetCaptureWindow();
+PWINDOW_OBJECT FASTCALL
+UserGetFocusWindow();
+PWINDOW_OBJECT FASTCALL
+IntGetForegroundWindow(VOID);
+
/*
* These functions take the window handles from current thread queue.
*/
-HWND FASTCALL
-IntGetThreadFocusWindow();
+PWINDOW_OBJECT FASTCALL
+UserGetThreadFocusWindow();
BOOL FASTCALL
IntMouseActivateWindow(PWINDOW_OBJECT Window);
BOOL FASTCALL
IntSetForegroundWindow(PWINDOW_OBJECT Window);
-HWND FASTCALL
+PWINDOW_OBJECT FASTCALL
IntSetActiveWindow(PWINDOW_OBJECT Window);
#endif /* _WIN32K_FOCUS_H */
_____
Modified: branches/hardons1stbranch/win32k/include/guicheck.h
--- trunk/reactos/subsys/win32k/include/guicheck.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/guicheck.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -1,12 +1,14 @@
#ifndef _WIN32K_GUICHECK_H
#define _WIN32K_GUICHECK_H
-BOOL FASTCALL IntGraphicsCheck(BOOL Create);
BOOL FASTCALL IntCreatePrimarySurface();
VOID FASTCALL IntDestroyPrimarySurface();
NTSTATUS FASTCALL InitGuiCheckImpl (VOID);
+BOOL FASTCALL
+UserGraphicsCheck(BOOL Create);
+
#endif /* _WIN32K_GUICHECK_H */
/* EOF */
_____
Modified: branches/hardons1stbranch/win32k/include/hook.h
--- trunk/reactos/subsys/win32k/include/hook.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/hook.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -19,7 +19,6 @@
typedef struct tagHOOKTABLE
{
- FAST_MUTEX Lock;
LIST_ENTRY Hooks[NB_HOOKS]; /* array of hook chains */
UINT Counts[NB_HOOKS]; /* use counts for each hook chain */
} HOOKTABLE, *PHOOKTABLE;
@@ -27,12 +26,6 @@
LRESULT FASTCALL HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam,
LPARAM lParam);
VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread);
-#define IntLockHookTable(HookTable) \
- ExAcquireFastMutex(&HookTable->Lock)
-
-#define IntUnLockHookTable(HookTable) \
- ExReleaseFastMutex(&HookTable->Lock)
-
#endif /* _WIN32K_HOOK_H */
/* EOF */
_____
Modified: branches/hardons1stbranch/win32k/include/intgdi.h
--- trunk/reactos/subsys/win32k/include/intgdi.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/intgdi.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -144,7 +144,8 @@
PUNICODE_STRING Device,
PUNICODE_STRING Output,
CONST PDEVMODEW InitData,
- BOOL CreateAsIC);
+ BOOL CreateAsIC,
+ BOOL CalledFromUser);
COLORREF FASTCALL
IntGetDCColor(HDC hDC, ULONG Object);
@@ -206,17 +207,19 @@
LPCSTR InData,
LPVOID OutData);
+//FIXME: move to user hdrs
BOOL
FASTCALL
-IntEnumDisplaySettings(
+UserEnumDisplaySettings(
IN PUNICODE_STRING pDeviceName OPTIONAL,
IN DWORD iModeNum,
IN OUT LPDEVMODEW pDevMode,
IN DWORD dwFlags);
+//FIXME: move to user hdrs
LONG
FASTCALL
-IntChangeDisplaySettings(
+UserChangeDisplaySettings(
IN PUNICODE_STRING pDeviceName OPTIONAL,
IN LPDEVMODEW pDevMode,
IN DWORD dwflags,
_____
Added: branches/hardons1stbranch/win32k/include/keyboard.h
--- trunk/reactos/subsys/win32k/include/keyboard.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -0,0 +1,226 @@
+#ifndef _WIN32K_KEYBOARD_H
+#define _WIN32K_KEYBOARD_H
+
+DWORD FASTCALL
+UserGetKeyState(DWORD key);
+
+/* handle.h */
+
+VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG
bytes);
+HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object,
USER_OBJECT_TYPE type );
+PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle,
USER_OBJECT_TYPE type );
+PVOID UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle );
+PVOID UserGetNextHandle(PUSER_HANDLE_TABLE ht, HANDLE* handle,
USER_OBJECT_TYPE type );
+
+
+/************* DESKTOP.C *****************/
+
+inline PDESKTOP_OBJECT FASTCALL UserGetCurrentDesktop();
+
+
+
+
+/* accelerator.c */
+
+PACCELERATOR_TABLE UserGetAcceleratorTable(HACCEL hAccel);
+PACCELERATOR_TABLE UserAllocAcceleratorTable(HACCEL* h);
+
+PACCELERATOR_TABLE UserCreateAcceleratorTableObject(HACCEL* h);
+
+
+/* metric.c */
+ULONG FASTCALL
+UserGetSystemMetrics(ULONG Index);
+
+/* input.h */
+NTSTATUS FASTCALL
+UserAcquireOrReleaseInputOwnership(BOOLEAN Release);
+
+/* focus.c */
+PWINDOW_OBJECT FASTCALL
+UserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL);
+
+
+/* painting.c */
+DWORD FASTCALL
+UserInvalidateRect(PWINDOW_OBJECT Wnd, CONST RECT *Rect, BOOL Erase);
+
+DWORD FASTCALL
+UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll,
+ const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate);
+
+INT FASTCALL
+UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase);
+
+/* message.c */
+BOOL FASTCALL
+UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
+
+/* window.c */
+PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd);
+
+PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes);
+
+PWINDOW_OBJECT FASTCALL
+UserGetWindow(PWINDOW_OBJECT Wnd, UINT Relationship);
+
+LONG FASTCALL
+UserGetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, BOOL Ansi);
+
+LONG FASTCALL
+UserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL
Ansi);
+
+BOOLEAN FASTCALL
+UserDestroyWindow(PWINDOW_OBJECT Wnd);
+
+HWND FASTCALL
+GetHwnd(PWINDOW_OBJECT Wnd);
+
+/************************* WINSTA.C ****************************/
+
+inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta();
+
+/************************* MENU.C ****************************/
+
+inline PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
+
+HMENU FASTCALL
+UserCreateMenu(BOOL PopupMenu);
+
+PMENU_OBJECT FASTCALL
+UserCreateMenuObject(HANDLE* h);
+
+
+/* caret.c */
+BOOL FASTCALL
+UserShowCaret(PWINDOW_OBJECT Wnd);
+
+BOOL FASTCALL
+UserSetCaretPos(int X, int Y);
+
+BOOL FASTCALL
+UserHideCaret(PWINDOW_OBJECT Wnd);
+
+/* winpos.c */
+
+BOOL FASTCALL
+UserGetClientOrigin(PWINDOW_OBJECT hWnd, LPPOINT Point);
+
+/* scrollbar.c */
+DWORD FASTCALL
+UserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow);
+
+/* timer.c */
+
+inline VOID FASTCALL
+UserFreeTimer(PTIMER_ENTRY Timer);
+
+VOID FASTCALL
+UserRemoveTimersWindow(PWINDOW_OBJECT Wnd);
+
+VOID FASTCALL
+UserInsertTimer(PTIMER_ENTRY NewTimer);
+
+VOID FASTCALL
+UserSetNextPendingTimer();
+
+VOID FASTCALL
+UserRemoveTimersQueue(PUSER_MESSAGE_QUEUE Queue);
+
+/* hook.c*/
+PHOOK FASTCALL
+HookCreate(HHOOK* hHook);
+
+PHOOK FASTCALL HookGet(HHOOK hHook);
+
+/* class.c */
+
+VOID FASTCALL
+ClassReferenceClass(PWNDCLASS_OBJECT Class);
+
+VOID FASTCALL
+ClassDereferenceClass(PWNDCLASS_OBJECT Class);
+
+PWNDCLASS_OBJECT FASTCALL
+ClassCreateClass(DWORD bytes);
+
+
+/********************* CURSORI(ICON).C *****************/
+
+inline PCURICON_OBJECT FASTCALL
+UserGetCursorObject(HCURSOR hCursor);
+
+VOID FASTCALL
+CurIconReferenceCurIcon(PCURICON_OBJECT CurIcon);
+
+PCURICON_OBJECT UserAllocCursorIcon(HCURSOR* h);
+PCURICON_OBJECT UserGetCursorIcon(HCURSOR hCursor);
+
+VOID FASTCALL
+UserDereferenceCurIcon(PCURICON_OBJECT CurIcon);
+
+VOID FASTCALL
+CursorDereference(PCURICON_OBJECT Cursor);
+
+PCURICON_OBJECT FASTCALL
+UserCreateCursorObject(HCURSOR* hCursor, ULONG extraBytes);
+
+PCURICON_OBJECT FASTCALL
+CursorGet(HCURSOR hCursor);
+
+inline PCURICON_OBJECT FASTCALL
+UserGetCursorIconObject(HCURSOR hCursor);
+
+/* monitor.c */
+
+PMONITOR_OBJECT FASTCALL UserCreateMonitorObject(HANDLE* h);
+
+PMONITOR_OBJECT UserGetMonitorObject(HANDLE hCursor);
+
+
+/* msgqueue.c */
+
+VOID FASTCALL
+MsqRemoveWindowMessagesFromQueue(PWINDOW_OBJECT pWindow);
+
+inline BOOL FASTCALL
+UserMessageFilter(UINT Message, UINT FilterMin, UINT FilterMax);
+
+VOID FASTCALL
+MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT
Wnd);
+
+VOID FASTCALL
+MsqInsertExpiredTimer(PTIMER_ENTRY Timer);
+
+PTIMER_ENTRY FASTCALL
+UserFindExpiredTimer(
+ PUSER_MESSAGE_QUEUE Queue,
+ PWINDOW_OBJECT Wnd OPTIONAL,
+ UINT MsgFilterMin,
+ UINT MsgFilterMax,
+ BOOL Remove
+ );
+
+PTIMER_ENTRY FASTCALL
+MsqRemoveTimer(
+ PWINDOW_OBJECT Wnd,
+ UINT_PTR IDEvent,
+ UINT Message
+ );
+
+/* windc.c */
+
+HDC FASTCALL
+UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG
Flags);
+
+INT FASTCALL
+UserReleaseDC(PWINDOW_OBJECT Wnd, HDC hDc);
+
+DWORD FASTCALL
+UserGetWindowDC(PWINDOW_OBJECT Wnd);
+
+/* div */
+#define UserGetCurrentQueue() \
+((PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue)
+
+#endif /* _WIN32K_KEYBOARD_H */
_____
Modified: branches/hardons1stbranch/win32k/include/menu.h
--- trunk/reactos/subsys/win32k/include/menu.h 2005-07-21 16:28:20 UTC
(rev 16681)
+++ branches/hardons1stbranch/win32k/include/menu.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -33,7 +33,6 @@
{
PEPROCESS Process;
LIST_ENTRY ListEntry;
- FAST_MUTEX MenuItemsLock;
PMENU_ITEM MenuItemList;
ROSMENUINFO MenuInfo;
BOOL RtoL;
@@ -42,21 +41,6 @@
PMENU_OBJECT FASTCALL
IntGetMenuObject(HMENU hMenu);
-#define IntLockMenuItems(MenuObj) \
- ExAcquireFastMutex(&(MenuObj)->MenuItemsLock)
-
-#define IntUnLockMenuItems(MenuObj) \
- ExReleaseFastMutex(&(MenuObj)->MenuItemsLock)
-
-#define IntLockProcessMenus(W32Process) \
- ExAcquireFastMutex(&(W32Process)->MenuListLock)
-
-#define IntUnLockProcessMenus(W32Process) \
- ExReleaseFastMutex(&(W32Process)->MenuListLock)
-
-#define IntReleaseMenuObject(MenuObj) \
- ObmDereferenceObject(MenuObj)
-
BOOL FASTCALL
IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem,
BOOL RemoveFromList, BOOL bRecurse);
@@ -78,22 +62,31 @@
IntCloneMenu(PMENU_OBJECT Source);
BOOL FASTCALL
-IntSetMenuFlagRtoL(PMENU_OBJECT MenuObject);
+UserSetMenuFlagRtoL(PMENU_OBJECT MenuObject);
BOOL FASTCALL
IntSetMenuContextHelpId(PMENU_OBJECT MenuObject, DWORD
dwContextHelpId);
BOOL FASTCALL
-IntGetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi);
+UserGetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi);
BOOL FASTCALL
IntIsMenu(HMENU hMenu);
BOOL FASTCALL
-IntSetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi);
+UserSetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi);
+BOOL FASTCALL
+UserMenuItemInfo(
+ PMENU_OBJECT Menu,
+ UINT Item,
+ BOOL ByPosition,
+ PROSMENUITEMINFO ItemInfo,
+ BOOL Set
+ );
+
int FASTCALL
-IntGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT
fFlag,
+UserGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT
fFlag,
PMENU_ITEM *MenuItem, PMENU_ITEM *PrevMenuItem);
UINT FASTCALL
_____
Modified: branches/hardons1stbranch/win32k/include/msgqueue.h
--- trunk/reactos/subsys/win32k/include/msgqueue.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/msgqueue.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -39,16 +39,8 @@
LIST_ENTRY ListEntry;
} USER_SENT_MESSAGE_NOTIFY, *PUSER_SENT_MESSAGE_NOTIFY;
-typedef struct _TIMER_ENTRY{
- LIST_ENTRY ListEntry;
- LARGE_INTEGER ExpiryTime;
- HWND Wnd;
- UINT_PTR IDEvent;
- UINT Period;
- TIMERPROC TimerFunc;
- UINT Msg;
-} TIMER_ENTRY, *PTIMER_ENTRY;
+
typedef struct _USER_MESSAGE_QUEUE
{
/* Reference counter, only access this variable with interlocked
functions! */
@@ -64,12 +56,11 @@
LIST_ENTRY NotifyMessagesListHead;
/* Queue for hardware messages for the queue. */
LIST_ENTRY HardwareMessagesListHead;
- /* List of timers, sorted on expiry time (earliest first) */
- LIST_ENTRY TimerListHead;
+ /* List of expired timers */
+ //LIST_ENTRY ExpiredTimersList;
+ ULONG TimerCount;
/* Lock for the hardware message list. */
KMUTEX HardwareLock;
- /* Lock for the queue. */
- FAST_MUTEX Lock;
/* Pointer to the current WM_MOUSEMOVE message */
PUSER_MESSAGE MouseMoveMsg;
/* True if a WM_QUIT message is pending. */
@@ -87,7 +78,7 @@
/* True if a window needs painting. */
BOOLEAN PaintPosted;
/* Count of paints pending. */
- ULONG PaintCount;
+ LONG PaintCount;
/* Current active window for this queue. */
HWND ActiveWindow;
/* Current capture window for this queue. */
@@ -106,8 +97,10 @@
/* queue state tracking */
WORD WakeMask;
- WORD QueueBits;
+ WORD WakeBits;
+// WORD QueueBits;
WORD ChangedBits;
+ WORD ChangedMask;
/* extra message information */
LPARAM ExtraInfo;
@@ -169,6 +162,11 @@
MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
VOID FASTCALL
MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
+
+void cp(char* f, int l);
+//#define IntSendMessage(a,b,c,d) (cp(__FILE__,__LINE__),
IIntSendMessage(a,b,c,d))
+
+
LRESULT FASTCALL
IntSendMessage(HWND hWnd,
UINT Msg,
@@ -215,14 +213,7 @@
LPARAM FASTCALL MsqSetMessageExtraInfo(LPARAM lParam);
LPARAM FASTCALL MsqGetMessageExtraInfo(VOID);
-VOID STDCALL MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$
headers, will be gone in the rewrite! */
-#define IntLockMessageQueue(MsgQueue) \
- ExAcquireFastMutex(&(MsgQueue)->Lock)
-
-#define IntUnLockMessageQueue(MsgQueue) \
- ExReleaseFastMutex(&(MsgQueue)->Lock)
-
#define IntLockHardwareMessageQueue(MsgQueue) \
KeWaitForMutexObject(&(MsgQueue)->HardwareLock, UserRequest,
KernelMode, FALSE, NULL)
@@ -232,19 +223,10 @@
#define IntReferenceMessageQueue(MsgQueue) \
InterlockedIncrement(&(MsgQueue)->References)
-#define IntDereferenceMessageQueue(MsgQueue) \
- do { \
- if(InterlockedDecrement(&(MsgQueue)->References) == 0) \
- { \
- DPRINT("Free message queue 0x%x\n", (MsgQueue)); \
- if ((MsgQueue)->NewMessages != NULL) \
- ObDereferenceObject((MsgQueue)->NewMessages); \
- if ((MsgQueue)->NewMessagesHandle != NULL) \
- ZwClose((MsgQueue)->NewMessagesHandle); \
- ExFreePool((MsgQueue)); \
- } \
- } while(0)
+VOID FASTCALL
+IntDereferenceMessageQueue(PUSER_MESSAGE_QUEUE MsgQueue);
+
#define IS_BTN_MESSAGE(message,code) \
((message) == WM_LBUTTON##code || \
(message) == WM_MBUTTON##code || \
@@ -276,8 +258,6 @@
MsqGetFirstTimerExpiry(PUSER_MESSAGE_QUEUE MessageQueue,
HWND WndFilter, UINT MsgFilterMin, UINT
MsgFilterMax,
PLARGE_INTEGER FirstTimerExpiry);
-VOID FASTCALL
-MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, HWND Wnd);
#endif /* _WIN32K_MSGQUEUE_H */
_____
Added: branches/hardons1stbranch/win32k/include/ntuser.h
--- trunk/reactos/subsys/win32k/include/ntuser.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/ntuser.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -0,0 +1,147 @@
+#ifndef _WIN32K_NTUSER_H
+#define _WIN32K_NTUSER_H
+
+extern char* _file;
+extern DWORD _line;
+extern DWORD _locked;
+
+extern FAST_MUTEX UserLock;
+
+#define DECLARE_RETURN(type) type _ret_
+#define RETURN(value) { _ret_ = value; goto _cleanup_; }
+#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_
+#define END_CLEANUP return _ret_;
+
+#if 0
+
+#define UserEnterShared() { \
+ UUserEnterShared(); ASSERT(InterlockedIncrement(&_locked) > 0); \
+ }
+ #define UserEnterExclusive() {\
+ UUserEnterExclusive(); ASSERT(InterlockedIncrement(&_locked) > 0); \
+ }
+
+#define UserLeave() { ASSERT(InterlockedDecrement(&_locked) >= 0); \
+ UUserLeave(); }
+
+#endif
+
+
+VOID FASTCALL UserStackTrace();
+
+#define UserEnterShared() \
+{ \
+ DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \
+ ASSERT(UserLock.Owner != KeGetCurrentThread()); \
+ UUserEnterShared(); \
+ ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \
+ DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \
+}
+
+#define UserEnterExclusive() \
+{ \
+ /* DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \
+ ASSERT(UserLock.Owner != KeGetCurrentThread()); \
+ UUserEnterExclusive(); \
+ ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \
+ /* DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \
+}
+
+#define UserLeave() \
+{ \
+ ASSERT(InterlockedDecrement(&_locked) == 0/*>= 0*/); \
+ /*DPRINT("unlock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \
+ ASSERT(UserLock.Owner == KeGetCurrentThread()); \
+ UUserLeave(); \
+}
+
+
+
+
+
+#define GetWnd(hwnd) IntGetWindowObject(hwnd)
+
+
+
+
+#if 0
+#define IntLockUserShared() {if(_locked){ DPRINT1("last %s,
%i\n",_file,_line);} \
+ IIntLockUserShared(); \
+ _locked++; _file = __FILE__; _line = __LINE__; \
+ }
+
+ #define IntUserEnterExclusive() {if(_locked){ DPRINT1("last %s,
%i\n",_file,_line);} \
+ IIntUserEnterExclusive(); \
+ _locked++; _file = __FILE__; _line = __LINE__; \
+ }
+
+
+#define IntUserLeave() { if(!_locked){ DPRINT1("not locked %s,
%i\n",__FILE__,__LINE__);} \
+ _locked--; IIntUserLeave(); }
+#endif
+
+NTSTATUS FASTCALL InitUserImpl(VOID);
+VOID FASTCALL UninitUser(VOID);
+VOID FASTCALL UUserEnterShared(VOID);
+VOID FASTCALL UUserEnterExclusive(VOID);
+VOID FASTCALL UUserLeave(VOID);
+BOOL FASTCALL UserIsEntered();
+
+
+
+
+#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word
of user handle */
+#define LAST_USER_HANDLE 0xffef /* last possible value for low word
of user handle */
+
+
+typedef struct _USER_HANDLE_ENTRY
+{
+ void *ptr; /* pointer to object */
+ unsigned short type; /* object type (0 if free) */
+ unsigned short generation; /* generation counter */
+} USER_HANDLE_ENTRY, * PUSER_HANDLE_ENTRY;
+
+
+
+typedef struct _USER_HANDLE_TABLE
+{
+ PUSER_HANDLE_ENTRY handles;
+ PUSER_HANDLE_ENTRY freelist;
+ int nb_handles;
+ int allocated_handles;
+} USER_HANDLE_TABLE, * PUSER_HANDLE_TABLE;
+
+/*
+typedef enum {
+ otUnknown = 0,
+ otClass,
+ otWindow,
+ otMenu,
+ otAcceleratorTable,
+ otCursorIcon,
+ otHookProc,
+ otMonitor
+} USER_OBJECT_TYPE;
+*/
+
+typedef enum _USER_OBJECT_TYPE
+{
+ /* 0 = free */
+ USER_CLASS = 1,
+ USER_WINDOW,
+ USER_MENU,
+ USER_ACCELERATOR_TABLE,
+ USER_CURSOR_ICON,
+ USER_HOOK_PROC,
+ USER_MONITOR
+} USER_OBJECT_TYPE;
+
+
+
+
+
+
+
+#endif /* _WIN32K_NTUSER_H */
+
+/* EOF */
_____
Modified: branches/hardons1stbranch/win32k/include/object.h
--- trunk/reactos/subsys/win32k/include/object.h 2005-07-21
16:28:20 UTC (rev 16681)
+++ branches/hardons1stbranch/win32k/include/object.h 2005-07-27
11:08:35 UTC (rev 16794)
@@ -5,120 +5,16 @@
#include <win32k/bitmaps.h>
#include <win32k/pen.h>
-typedef enum {
- otUnknown = 0,
- otClass,
- otWindow,
- otMenu,
- otAcceleratorTable,
- otCursorIcon,
- otHookProc,
- otMonitor
-} USER_OBJECT_TYPE;
-typedef struct _USER_OBJECT_HEADER
-/*
- * Header for user object
- */
-{
- USER_OBJECT_TYPE Type;
- LONG HandleCount;
- LONG RefCount;
- CSHORT Size;
-} USER_OBJECT_HEADER, *PUSER_OBJECT_HEADER;
-typedef struct _USER_HANDLE
-{
- PVOID ObjectBody;
-} USER_HANDLE, *PUSER_HANDLE;
-
-#define HANDLE_BLOCK_ENTRIES
((PAGE_SIZE-sizeof(LIST_ENTRY))/sizeof(USER_HANDLE))
-
-typedef struct _USER_HANDLE_BLOCK
-{
- LIST_ENTRY ListEntry;
- USER_HANDLE Handles[HANDLE_BLOCK_ENTRIES];
-} USER_HANDLE_BLOCK, *PUSER_HANDLE_BLOCK;
-
-typedef struct _USER_HANDLE_TABLE
-{
- LIST_ENTRY ListHead;
- FAST_MUTEX ListLock;
-} USER_HANDLE_TABLE, *PUSER_HANDLE_TABLE;
-
-
-#define ObmpLockHandleTable(HandleTable) \
- ExAcquireFastMutex(&HandleTable->ListLock)
-
-#define ObmpUnlockHandleTable(HandleTable) \
- ExReleaseFastMutex(&HandleTable->ListLock)
-
-ULONG FASTCALL
-ObmGetReferenceCount(
- PVOID ObjectBody);
-
-ULONG FASTCALL
-ObmGetHandleCount(
- PVOID ObjectBody);
-
-VOID FASTCALL
-ObmReferenceObject(
- PVOID ObjectBody);
-
-VOID FASTCALL
-ObmDereferenceObject(
- PVOID ObjectBody);
-
-NTSTATUS FASTCALL
-ObmReferenceObjectByPointer(
- PVOID ObjectBody,
- USER_OBJECT_TYPE ObjectType);
-
-PVOID FASTCALL
[truncated at 1000 lines; 28242 more skipped]