Author: gadamopoulos
Date: Thu Aug 25 08:51:26 2011
New Revision: 53436
URL:
http://svn.reactos.org/svn/reactos?rev=53436&view=rev
Log:
[user32/win32k]
- cleanup internal headers
- remove unused functions and definitions
- move shared definitions to ntuser.h
Added:
trunk/reactos/dll/win32/user32/include/user_x.h (with props)
Removed:
trunk/reactos/dll/win32/user32/include/accel.h
trunk/reactos/dll/win32/user32/include/cursor.h
trunk/reactos/dll/win32/user32/include/draw.h
trunk/reactos/dll/win32/user32/include/menu.h
trunk/reactos/dll/win32/user32/include/message.h
trunk/reactos/dll/win32/user32/include/scroll.h
trunk/reactos/dll/win32/user32/include/window.h
trunk/reactos/dll/win32/user32/include/winpos.h
trunk/reactos/dll/win32/user32/include/winsta.h
Modified:
trunk/reactos/dll/win32/user32/controls/listbox.c
trunk/reactos/dll/win32/user32/controls/scrollbar.c
trunk/reactos/dll/win32/user32/include/controls.h
trunk/reactos/dll/win32/user32/include/ntwrapper.h
trunk/reactos/dll/win32/user32/include/user32.h
trunk/reactos/dll/win32/user32/include/user32p.h
trunk/reactos/dll/win32/user32/misc/desktop.c
trunk/reactos/dll/win32/user32/misc/dllmain.c
trunk/reactos/dll/win32/user32/misc/misc.c
trunk/reactos/dll/win32/user32/misc/stubs.c
trunk/reactos/dll/win32/user32/misc/timer.c
trunk/reactos/dll/win32/user32/misc/usrapihk.c
trunk/reactos/dll/win32/user32/windows/accel.c
trunk/reactos/dll/win32/user32/windows/caret.c
trunk/reactos/dll/win32/user32/windows/clipboard.c
trunk/reactos/dll/win32/user32/windows/cursoricon.c
trunk/reactos/dll/win32/user32/windows/dc.c
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/dll/win32/user32/windows/dialog.c
trunk/reactos/dll/win32/user32/windows/draw.c
trunk/reactos/dll/win32/user32/windows/hook.c
trunk/reactos/dll/win32/user32/windows/input.c
trunk/reactos/dll/win32/user32/windows/menu.c
trunk/reactos/dll/win32/user32/windows/message.c
trunk/reactos/dll/win32/user32/windows/messagebox.c
trunk/reactos/dll/win32/user32/windows/nonclient.c
trunk/reactos/dll/win32/user32/windows/paint.c
trunk/reactos/dll/win32/user32/windows/window.c
trunk/reactos/dll/win32/user32/windows/winpos.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/bitmaps.h
trunk/reactos/subsystems/win32/win32k/include/cleanup.h
trunk/reactos/subsystems/win32/win32k/include/cliprgn.h
trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
trunk/reactos/subsystems/win32/win32k/include/object.h
trunk/reactos/subsystems/win32/win32k/include/pen.h
trunk/reactos/subsystems/win32/win32k/include/region.h
trunk/reactos/subsystems/win32/win32k/include/win32kp.h
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
trunk/reactos/subsystems/win32/win32k/pch.h
Modified: trunk/reactos/dll/win32/user32/controls/listbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -786,7 +786,7 @@
TRACE("index %d (0x%04x) %s\n", index, index,
debugstr_w(descr->items[index].str));
- __TRY /* hide a Delphi bug that passes a read-only buffer */
+ _SEH2_TRY /* hide a Delphi bug that passes a read-only buffer */
{
if(unicode)
{
@@ -799,13 +799,13 @@
(LPSTR)buffer, 0x7FFFFFFF, NULL, NULL) - 1;
}
}
- __EXCEPT_PAGE_FAULT
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
WARN( "got an invalid buffer (Delphi bug?)\n" );
SetLastError( ERROR_INVALID_PARAMETER );
- return LB_ERR;
- }
- __ENDTRY
+ len = LB_ERR;
+ }
+ _SEH2_END
} else {
if (buffer)
*((LPDWORD)buffer)=*(LPDWORD)(&descr->items[index].data);
Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -1482,7 +1482,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -1534,7 +1534,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -1615,7 +1615,7 @@
BOOL Hook;
INT Ret = 0;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
Removed: trunk/reactos/dll/win32/user32/include/accel.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/a…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/accel.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/accel.h (removed)
@@ -1,26 +1,0 @@
-/* $Id$
-*/
-
-#pragma once
-
-/* ACCELERATOR TABLES CACHE */
-/* Cache entry */
-typedef struct _USER_ACCEL_CACHE_ENTRY
-{
- struct _USER_ACCEL_CACHE_ENTRY * Next;
- ULONG_PTR Usage; /* how many times the table has been loaded */
- HACCEL Object; /* handle to the NtUser accelerator table object */
- HGLOBAL Data; /* base address of the resource data */
-}
-U32_ACCEL_CACHE_ENTRY;
-
-/* Lock guarding the cache */
-extern CRITICAL_SECTION U32AccelCacheLock;
-
-/* Cache */
-extern U32_ACCEL_CACHE_ENTRY * U32AccelCache;
-
-extern U32_ACCEL_CACHE_ENTRY ** WINAPI U32AccelCacheFind(HANDLE, HGLOBAL);
-extern void WINAPI U32AccelCacheAdd(HACCEL, HGLOBAL);
-
-/* EOF */
Modified: trunk/reactos/dll/win32/user32/include/controls.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/controls.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/controls.h [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -34,11 +34,7 @@
#define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11)
#endif
-/* winuser.h */
-
-
/* combo box */
-
#define ID_CB_LISTBOX 1000
#define ID_CB_EDIT 1001
@@ -111,6 +107,10 @@
LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
);
LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
);
LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
lParam, BOOL unicode);
+LRESULT WINAPI PopupMenuWndProcA(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI PopupMenuWndProcW(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam,LPARAM lParam );
+LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam,LPARAM lParam );
LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL unicode);
Removed: trunk/reactos/dll/win32/user32/include/cursor.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/cursor.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/cursor.h (removed)
@@ -1,15 +1,0 @@
-HCURSOR
-CursorIconToCursor(HICON hIcon,
- BOOL SemiTransparent);
-
-HICON CreateCursorIconFromData(PVOID ImageData,
- ICONIMAGE* IconImage,
- int cxDesired,
- int cyDesired,
- int xHotspot,
- int yHotspot,
- BOOL fIcon);
-
-
-BOOL get_icon_size(HICON hIcon, SIZE *size);
-
Removed: trunk/reactos/dll/win32/user32/include/draw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/draw.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/draw.h (removed)
@@ -1,1 +1,0 @@
-void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
Removed: trunk/reactos/dll/win32/user32/include/menu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/menu.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/menu.h (removed)
@@ -1,22 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: include/window.h
- * PURPOSE: Window management definitions
- */
-
-#pragma once
-
-UINT
-MenuDrawMenuBar(HDC hDC, LPRECT Rect, HWND hWnd, BOOL Draw);
-BOOL
-MenuInit(VOID);
-VOID
-MenuCleanup(VOID);
-VOID
-MenuTrackMouseMenuBar(HWND hWnd, ULONG Ht, POINT Pt);
-VOID
-MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar);
-
-LRESULT WINAPI PopupMenuWndProcA(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
-LRESULT WINAPI PopupMenuWndProcW(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
Removed: trunk/reactos/dll/win32/user32/include/message.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/message.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/message.h (removed)
@@ -1,19 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: include/message.h
- * PURPOSE: Message management definitions
- */
-
-#pragma once
-
-BOOL FASTCALL MessageInit(VOID);
-VOID FASTCALL MessageCleanup(VOID);
-
-static __inline BOOL
-IsCallProcHandle(IN WNDPROC lpWndProc)
-{
- /* FIXME - check for 64 bit architectures... */
- return ((ULONG_PTR)lpWndProc & 0xFFFF0000) == 0xFFFF0000;
-}
Modified: trunk/reactos/dll/win32/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -235,9 +235,27 @@
}
EXTINLINE BOOL WINAPI
+GetClipCursor(LPRECT lpRect)
+{
+ return NtUserGetClipCursor(lpRect);
+}
+
+EXTINLINE BOOL WINAPI
GetCursorInfo(PCURSORINFO pci)
{
return NtUserGetCursorInfo(pci);
+}
+
+EXTINLINE BOOL WINAPI
+ClipCursor(CONST RECT *lpRect)
+{
+ return NtUserClipCursor((RECT *)lpRect);
+}
+
+EXTINLINE HCURSOR WINAPI
+SetCursor(HCURSOR hCursor)
+{
+ return NtUserSetCursor(hCursor);
}
EXTINLINE HDC WINAPI
@@ -484,3 +502,300 @@
{
return NtUserValidateRect(hWnd, lpRect);
}
+
+EXTINLINE BOOL WINAPI ShowCaret( HWND hWnd )
+{
+ return NtUserShowCaret(hWnd);
+}
+
+EXTINLINE BOOL WINAPI HideCaret( HWND hWnd )
+{
+ return NtUserHideCaret(hWnd);
+}
+
+
+
+
+/*
+ Inline functions that make calling NtUserCall*** functions readable
+ These functions are prepended with NtUserx because they are not
+ real syscalls and they are inlined
+*/
+
+EXTINLINE BOOL NtUserxDestroyCaret(VOID)
+{
+ return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_DESTROY_CARET);
+}
+
+EXTINLINE VOID NtUserxMsqClearWakeMask()
+{
+ NtUserCallNoParam(NOPARAM_ROUTINE_MSQCLEARWAKEMASK);
+}
+
+EXTINLINE HMENU NtUserxCreateMenu()
+{
+ return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENU);
+}
+
+EXTINLINE HMENU NtUserxCreatePopupMenu()
+{
+ return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENUPOPUP);
+}
+
+EXTINLINE DWORD NtUserxGetMessagePos(VOID)
+{
+ return (DWORD)NtUserCallNoParam(NOPARAM_ROUTINE_GETMSESSAGEPOS);
+}
+
+EXTINLINE BOOL NtUserxReleaseCapture(VOID)
+{
+ return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_RELEASECAPTURE);
+}
+
+EXTINLINE BOOL NtUserxInitMessagePump()
+{
+ return NtUserCallNoParam(NOPARAM_ROUTINE_INIT_MESSAGE_PUMP);
+}
+
+EXTINLINE BOOL NtUserxUnInitMessagePump()
+{
+ return NtUserCallNoParam(NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP);
+}
+
+EXTINLINE HANDLE NtUserxMsqSetWakeMask(DWORD_PTR dwWaitMask)
+{
+ return (HANDLE)NtUserCallOneParam(dwWaitMask, ONEPARAM_ROUTINE_GETINPUTEVENT);
+}
+
+EXTINLINE BOOL NtUserxSetCaretBlinkTime(UINT uMSeconds)
+{
+ return (BOOL)NtUserCallOneParam(uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME);
+}
+
+EXTINLINE HWND NtUserxWindowFromDC(HDC hDC)
+{
+ return (HWND)NtUserCallOneParam((DWORD_PTR)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC);
+}
+
+EXTINLINE BOOL NtUserxSwapMouseButton(BOOL fSwap)
+{
+ return (BOOL)NtUserCallOneParam((DWORD_PTR)fSwap, ONEPARAM_ROUTINE_SWAPMOUSEBUTTON);
+}
+
+EXTINLINE LPARAM NtUserxSetMessageExtraInfo(LPARAM lParam)
+{
+ return (LPARAM)NtUserCallOneParam((DWORD_PTR)lParam,
ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO);
+}
+
+EXTINLINE INT NtUserxShowCursor(BOOL bShow)
+{
+ return (INT)NtUserCallOneParam((DWORD_PTR)bShow, ONEPARAM_ROUTINE_SHOWCURSOR);
+}
+
+EXTINLINE UINT NtUserxEnumClipboardFormats(UINT format)
+{
+ return (UINT)NtUserCallOneParam((DWORD_PTR)format,
ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS);
+}
+
+EXTINLINE HICON NtUserxCreateEmptyCurObject(DWORD_PTR Param)
+{
+ return (HICON)NtUserCallOneParam(Param, ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT);
+}
+
+EXTINLINE BOOL NtUserxMessageBeep(UINT uType)
+{
+ return (BOOL)NtUserCallOneParam(uType, ONEPARAM_ROUTINE_MESSAGEBEEP);
+}
+
+EXTINLINE HKL NtUserxGetKeyboardLayout(DWORD idThread)
+{
+ return (HKL)NtUserCallOneParam((DWORD_PTR) idThread,
ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
+}
+
+EXTINLINE INT NtUserxGetKeyboardType(INT nTypeFlag)
+{
+ return (INT)NtUserCallOneParam((DWORD_PTR) nTypeFlag,
ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
+}
+
+EXTINLINE INT NtUserxReleaseDC(HDC hDC)
+{
+ return (INT)NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_RELEASEDC);
+}
+
+EXTINLINE UINT NtUserxRealizePalette ( HDC hDC )
+{
+ return (UINT)NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
+}
+
+EXTINLINE VOID NtUserxCreateSystemThreads(DWORD param)
+{
+ NtUserCallOneParam(param, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
+}
+
+EXTINLINE HDWP NtUserxBeginDeferWindowPos(INT nNumWindows)
+{
+ return (HDWP)NtUserCallOneParam((DWORD_PTR)nNumWindows,
ONEPARAM_ROUTINE_BEGINDEFERWNDPOS);
+}
+
+EXTINLINE BOOL NtUserxReplyMessage(LRESULT lResult)
+{
+ return NtUserCallOneParam(lResult, ONEPARAM_ROUTINE_REPLYMESSAGE);
+}
+
+EXTINLINE VOID NtUserxPostQuitMessage(int nExitCode)
+{
+ NtUserCallOneParam(nExitCode, ONEPARAM_ROUTINE_POSTQUITMESSAGE);
+}
+
+EXTINLINE DWORD NtUserxGetQueueStatus(UINT flags)
+{
+ return (DWORD)NtUserCallOneParam(flags, ONEPARAM_ROUTINE_GETQUEUESTATUS);
+}
+
+EXTINLINE BOOL NtUserxValidateRgn(HWND hWnd, HRGN hRgn)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn,
TWOPARAM_ROUTINE_VALIDATERGN);
+}
+
+EXTINLINE BOOL NtUserxSetCursorPos(INT x, INT y)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD)x, (DWORD)y, TWOPARAM_ROUTINE_SETCURSORPOS);
+}
+
+EXTINLINE BOOL NtUserxEnableWindow(HWND hWnd, BOOL bEnable)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)bEnable,
TWOPARAM_ROUTINE_ENABLEWINDOW);
+}
+
+EXTINLINE BOOL NtUserxUpdateUiState(HWND hWnd, DWORD Param)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)Param,
TWOPARAM_ROUTINE_ROS_UPDATEUISTATE);
+}
+
+EXTINLINE BOOL NtUserxShowOwnedPopups(HWND hWnd, BOOL fShow)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, fShow,
TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
+}
+
+EXTINLINE BOOL NtUserxUnhookWindowsHook ( int nCode, HOOKPROC pfnFilterProc )
+{
+ return (BOOL)NtUserCallTwoParam(nCode, (DWORD_PTR)pfnFilterProc,
TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK);
+}
+
+EXTINLINE BOOL NtUserxSetWindowContextHelpId(HWND hWnd, DWORD_PTR dwContextHelpId)
+{
+ return (BOOL)NtUserCallHwndParam(hWnd, dwContextHelpId,
HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID);
+}
+
+EXTINLINE BOOL NtUserxKillSystemTimer(HWND hWnd, UINT_PTR IDEvent)
+{
+ return (BOOL)NtUserCallHwndParam(hWnd, IDEvent, HWNDPARAM_ROUTINE_KILLSYSTEMTIMER);
+}
+
+EXTINLINE VOID NtUserxSetDialogPointer(HWND hWnd, PVOID dlgInfo)
+{
+ NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
+}
+
+EXTINLINE VOID NtUserxNotifyWinEvent(HWND hWnd, PVOID ne)
+{
+ NtUserCallHwndParam(hWnd, (DWORD_PTR)ne, HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT);
+}
+
+EXTINLINE DWORD NtUserxGetWindowContextHelpId(HWND hwnd)
+{
+ return NtUserCallHwnd(hwnd, HWND_ROUTINE_GETWNDCONTEXTHLPID);
+}
+
+EXTINLINE BOOL NtUserxDeregisterShellHookWindow(HWND hWnd)
+{
+ return NtUserCallHwnd(hWnd, HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW);
+}
+
+EXTINLINE BOOL NtUserxRegisterShellHookWindow(HWND hWnd)
+{
+ return NtUserCallHwnd(hWnd, HWND_ROUTINE_REGISTERSHELLHOOKWINDOW);
+}
+
+EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd)
+{
+ return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
+}
+
+EXTINLINE HWND NtUserxSetProgmanWindow(HWND hWnd)
+{
+ return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
+}
+
+EXTINLINE UINT NtUserxArrangeIconicWindows(HWND hWnd)
+{
+ return (UINT)NtUserCallHwndLock( hWnd, HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS);
+}
+
+EXTINLINE BOOL NtUserxUpdateWindow(HWND hWnd)
+{
+ return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
+}
+
+EXTINLINE BOOL NtUserxDrawMenuBar(HWND hWnd)
+{
+ return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR);
+}
+
+EXTINLINE BOOL NtUserxMDIRedrawFrame(HWND hWnd)
+{
+ return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_REDRAWFRAME);
+}
+
+EXTINLINE BOOL NtUserxSetForegroundWindow(HWND hWnd)
+{
+ return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW);
+}
+
+
+/* Reactos specific definitions */
+
+EXTINLINE LPARAM NtUserxGetMessageExtraInfo(VOID)
+{
+ return (LPARAM)NtUserCallNoParam(NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO);
+}
+
+EXTINLINE BOOL NtUserxSwitchCaretShowing(THRDCARETINFO* CaretInfo)
+{
+ return (BOOL)NtUserCallOneParam((DWORD_PTR)CaretInfo,
ONEPARAM_ROUTINE_SWITCHCARETSHOWING);
+}
+
+EXTINLINE VOID NtUserxEnableProcessWindowGhosting(BOOL bEnable)
+{
+ NtUserCallOneParam((DWORD_PTR)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING);
+}
+
+EXTINLINE PVOID NtUserxGetDesktopMapping(PVOID ptr)
+{
+ return (PVOID)NtUserCallOneParam((DWORD_PTR)ptr,
ONEPARAM_ROUTINE_GETDESKTOPMAPPING);
+}
+
+EXTINLINE BOOL NtUserxGetCursorPos(POINT* lpPoint)
+{
+ return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint,
ONEPARAM_ROUTINE_GETCURSORPOSITION);
+}
+
+EXTINLINE BOOL NtUserxSetMenuBarHeight(HMENU menu, INT height)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)menu, (DWORD_PTR)height,
TWOPARAM_ROUTINE_SETMENUBARHEIGHT);
+}
+
+EXTINLINE BOOL NtUserxSetGUIThreadHandle(DWORD_PTR field, HWND hwnd)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)field, (DWORD_PTR)hwnd,
TWOPARAM_ROUTINE_SETGUITHRDHANDLE);
+}
+
+EXTINLINE BOOL NtUserxSetCaretPos(INT x, INT y)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)x, (DWORD_PTR)y,
TWOPARAM_ROUTINE_SETCARETPOS);
+}
+
+EXTINLINE BOOL NtUserxRegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
+{
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)dwProcessId, (DWORD_PTR)bRegister,
TWOPARAM_ROUTINE_REGISTERLOGONPROCESS);
+}
Removed: trunk/reactos/dll/win32/user32/include/scroll.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/s…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/scroll.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/scroll.h (removed)
@@ -1,13 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: include/user32.h
- * PURPOSE: Global user32 definitions
- */
-
-#pragma once
-
-LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam,LPARAM lParam );
-LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam,LPARAM lParam );
-VOID FASTCALL ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt);
Modified: trunk/reactos/dll/win32/user32/include/user32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -19,7 +19,6 @@
#define NTOS_MODE_USER
#define WIN32_NO_STATUS
#include <windows.h>
-#include <winuser.h>
#include <windowsx.h>
#include <winnls32.h>
#include <ndk/cmfuncs.h>
@@ -42,112 +41,11 @@
/* WINE Headers */
#include <wine/unicode.h>
+/* SEH Support with PSEH */
+#include <pseh/pseh2.h>
+
/* Internal User32 Headers */
#include "user32p.h"
-/* SEH Support with PSEH */
-#include <pseh/pseh2.h>
-
-#define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
-#define ISITHOOKED(HookId) (GetWin32ClientInfo()->fsHooks & HOOKID_TO_FLAG(HookId)
||\
- (GetWin32ClientInfo()->pDeskInfo &&
GetWin32ClientInfo()->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId)))
-
-/* Temporarily in here for now. */
-
-extern RTL_CRITICAL_SECTION gcsUserApiHook;
-extern USERAPIHOOK guah;
-BOOL FASTCALL BeginIfHookedUserApiHook(VOID);
-BOOL FASTCALL EndUserApiHook(VOID);
-BOOL FASTCALL IsInsideUserApiHook(VOID);
-VOID FASTCALL ResetUserApiHook(PUSERAPIHOOK);
-BOOL FASTCALL IsMsgOverride(UINT,PUAHOWP);
-
-#define LOADUSERAPIHOOK \
- if (!gfServerProcess && \
- !IsInsideUserApiHook() && \
- (gpsi->dwSRVIFlags & SRVINFO_APIHOOK) && \
- !RtlIsThreadWithinLoaderCallout()) \
- { \
- NtUserCallNoParam(NOPARAM_ROUTINE_LOADUSERAPIHOOK); \
- } \
-
-/* FIXME: Use ntgdi.h then cleanup... */
-LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
-BOOL FASTCALL IsMetaFile(HDC);
-
-extern PPROCESSINFO g_ppi;
-extern ULONG_PTR g_ulSharedDelta;
-extern PSERVERINFO gpsi;
-extern BOOL gfServerProcess;
-
-static __inline PVOID
-SharedPtrToUser(PVOID Ptr)
-{
- ASSERT(Ptr != NULL);
- ASSERT(g_ulSharedDelta != 0);
- return (PVOID)((ULONG_PTR)Ptr - g_ulSharedDelta);
-}
-
-static __inline PVOID
-DesktopPtrToUser(PVOID Ptr)
-{
- PCLIENTINFO pci;
- PDESKTOPINFO pdi;
- GetW32ThreadInfo();
- pci = GetWin32ClientInfo();
- pdi = pci->pDeskInfo;
-
- ASSERT(Ptr != NULL);
- ASSERT(pdi != NULL);
- if ((ULONG_PTR)Ptr >= (ULONG_PTR)pdi->pvDesktopBase &&
- (ULONG_PTR)Ptr < (ULONG_PTR)pdi->pvDesktopLimit)
- {
- return (PVOID)((ULONG_PTR)Ptr - pci->ulClientDelta);
- }
- else
- {
- /* NOTE: This is slow as it requires a call to win32k. This should only be
- neccessary if a thread wants to access an object on a different
- desktop */
- return (PVOID)NtUserGetDesktopMapping(Ptr);
- }
-}
-
-static __inline PVOID
-SharedPtrToKernel(PVOID Ptr)
-{
- ASSERT(Ptr != NULL);
- ASSERT(g_ulSharedDelta != 0);
- return (PVOID)((ULONG_PTR)Ptr + g_ulSharedDelta);
-}
-
-static __inline BOOL
-IsThreadHooked(PCLIENTINFO pci)
-{
- return (pci->fsHooks|pci->pDeskInfo->fsHooks) != 0;
-}
-
-static __inline PDESKTOPINFO
-GetThreadDesktopInfo(VOID)
-{
- PTHREADINFO ti;
- PDESKTOPINFO di = NULL;
-
- ti = GetW32ThreadInfo();
- if (ti != NULL)
- di = GetWin32ClientInfo()->pDeskInfo;
-
- return di;
-}
-
-PCALLPROCDATA FASTCALL ValidateCallProc(HANDLE hCallProc);
-PWND FASTCALL ValidateHwnd(HWND hwnd);
-PWND FASTCALL ValidateHwndOrDesk(HWND hwnd);
-PWND FASTCALL GetThreadDesktopWnd(VOID);
-PVOID FASTCALL ValidateHandleNoErr(HANDLE handle, UINT uType);
-PWND FASTCALL ValidateHwndNoErr(HWND hwnd);
-VOID FASTCALL GetConnected(VOID);
-BOOL FASTCALL DefSetText(HWND hWnd, PCWSTR String, BOOL Ansi);
-BOOL FASTCALL TestWindowProcess(PWND);
-VOID UserGetWindowBorders(DWORD, DWORD, SIZE *, BOOL);
-VOID FASTCALL IntNotifyWinEvent(DWORD, HWND, LONG, LONG, DWORD);
+/* User macros */
+#include "user_x.h"
Modified: trunk/reactos/dll/win32/user32/include/user32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -11,231 +11,90 @@
#pragma once
/* Private User32 Headers */
-#include "accel.h"
-#include "cursor.h"
#include "controls.h"
-#include "draw.h"
#include "dde_private.h"
-#include "menu.h"
-#include "message.h"
#include "regcontrol.h"
#include "resource.h"
-#include "scroll.h"
-#include "window.h"
-#include "winpos.h"
-#include "winsta.h"
#include "ntwrapper.h"
+
+/* global variables */
+extern HINSTANCE User32Instance;
+#define user32_module User32Instance
+extern PPROCESSINFO g_ppi;
+extern ULONG_PTR g_ulSharedDelta;
+extern PSERVERINFO gpsi;
+extern BOOL gfServerProcess;
+extern PUSER_HANDLE_TABLE gHandleTable;
+extern PUSER_HANDLE_ENTRY gHandleEntries;
+extern CRITICAL_SECTION U32AccelCacheLock;
+extern HINSTANCE hImmInstance;
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
-/* One/Two Param Functions */
-#define NtUserMsqSetWakeMask(dwWaitMask) \
- (HANDLE)NtUserCallOneParam(dwWaitMask, ONEPARAM_ROUTINE_GETINPUTEVENT)
+/* FIXME: move to a correct header */
+/* undocumented gdi32 definitions */
+BOOL WINAPI GdiDllInitialize(HANDLE, DWORD, LPVOID);
+LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
-#define NtUserMsqClearWakeMask() \
- NtUserCallNoParam(NOPARAM_ROUTINE_MSQCLEARWAKEMASK)
-
-#define NtUserValidateRgn(hWnd, hRgn) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn,
TWOPARAM_ROUTINE_VALIDATERGN)
-
-#define NtUserSetWindowContextHelpId(hWnd, dwContextHelpId) \
- (BOOL)NtUserCallHwndParam(hWnd, dwContextHelpId, HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID)
-
-#define NtUserSetCaretPos(X, Y) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)X, (DWORD_PTR)Y, TWOPARAM_ROUTINE_SETCARETPOS)
-
-#define NtUserSetGUIThreadHandle(field, hwnd) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)field, (DWORD_PTR)hwnd,
TWOPARAM_ROUTINE_SETGUITHRDHANDLE)
-
-#define NtUserSetMenuBarHeight(menu, height) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)menu, (DWORD_PTR)height,
TWOPARAM_ROUTINE_SETMENUBARHEIGHT)
-
-#define NtUserRegisterLogonProcess(hproc, x) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)hproc, (DWORD_PTR)x,
TWOPARAM_ROUTINE_REGISTERLOGONPROC)
-
-#define NtUserGetSysColorBrushes(HBrushes, count) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)(HBrushes), (DWORD_PTR)(count),
TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
-
-#define NtUserGetSysColors(ColorRefs, count) \
- (BOOL)NtUserCallTwoParam((DWORD_PTR)(ColorRefs), (DWORD_PTR)(count),
TWOPARAM_ROUTINE_GETSYSCOLORS)
-
-#define NtUserSetCaretBlinkTime(uMSeconds) \
- (BOOL)NtUserCallOneParam((DWORD_PTR)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
-
-/*
-#define NtUserEnumClipboardFormats(format) \
- (UINT)NtUserCallOneParam(format, ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS)
-*/
-
-#define NtUserWindowFromDC(hDC) \
- (HWND)NtUserCallOneParam((DWORD_PTR)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC)
-
-#define NtUserSwitchCaretShowing(CaretInfo) \
- (BOOL)NtUserCallOneParam((DWORD_PTR)CaretInfo, ONEPARAM_ROUTINE_SWITCHCARETSHOWING)
-
-#define NtUserSwapMouseButton(fSwap) \
- (BOOL)NtUserCallOneParam((DWORD_PTR)fSwap, ONEPARAM_ROUTINE_SWAPMOUSEBUTTON)
-
-#define NtUserSetMessageExtraInfo(lParam) \
- (LPARAM)NtUserCallOneParam((DWORD_PTR)lParam, ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO)
-
-#define NtUserGetWindowContextHelpId(hwnd) \
- NtUserCallOneParam((DWORD_PTR)hwnd, ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID)
-
-#define NtUserGetCursorPos(lpPoint) \
- (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION)
-
-#define NtUserEnableProcessWindowGhosting(bEnable) \
- NtUserCallOneParam((DWORD_PTR)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
-
-#define NtUserShowCursor(bShow) \
- NtUserCallOneParam((DWORD_PTR)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
-
-#define NtUserGetDesktopMapping(Ptr) \
- (PVOID)NtUserCallOneParam((DWORD_PTR)Ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING)
-
-#define NtUserSetCursorPos(x, y) \
- (BOOL)NtUserCallTwoParam((DWORD)x, (DWORD)y, TWOPARAM_ROUTINE_SETCURSORPOS)
-
-#define ShowCaret(hwnd) \
- NtUserShowCaret(hwnd)
-
-#define HideCaret(hwnd) \
- NtUserHideCaret(hwnd)
-
-/* Internal Thread Data */
-extern HINSTANCE User32Instance;
-#define user32_module User32Instance
-extern HINSTANCE hImmInstance;
-
-/* Critical Section*/
-extern RTL_CRITICAL_SECTION User32Crit;
-
-/* FIXME: Belongs to some header. */
-BOOL WINAPI GdiDllInitialize(HANDLE, DWORD, LPVOID);
-void InitStockObjects(void);
-VOID DeleteFrameBrushes(VOID);
-
-/* message spy definitions */
+/* definitions for spy.c */
#define SPY_DISPATCHMESSAGE 0x0101
#define SPY_SENDMESSAGE 0x0103
#define SPY_DEFWNDPROC 0x0105
-
#define SPY_RESULT_OK 0x0001
#define SPY_RESULT_INVALIDHWND 0x0003
#define SPY_RESULT_DEFWND 0x0005
-
-
extern const char *SPY_GetMsgName(UINT msg, HWND hWnd);
extern const char *SPY_GetVKeyName(WPARAM wParam);
extern void SPY_EnterMessage(INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM
lParam);
-extern void SPY_ExitMessage(INT iFlag, HWND hwnd, UINT msg,
- LRESULT lReturn, WPARAM wParam, LPARAM lParam);
+extern void SPY_ExitMessage(INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM
wParam, LPARAM lParam);
extern int SPY_Init(void);
+/* definitions for usrapihk.c */
+extern RTL_CRITICAL_SECTION gcsUserApiHook;
+extern USERAPIHOOK guah;
+BOOL FASTCALL BeginIfHookedUserApiHook(VOID);
+BOOL FASTCALL EndUserApiHook(VOID);
+BOOL FASTCALL IsInsideUserApiHook(VOID);
+VOID FASTCALL ResetUserApiHook(PUSERAPIHOOK);
+BOOL FASTCALL IsMsgOverride(UINT,PUAHOWP);
-/* Validate window handle types */
-#define VALIDATE_TYPE_FREE 0
-#define VALIDATE_TYPE_WIN 1
-#define VALIDATE_TYPE_MENU 2
-#define VALIDATE_TYPE_CURSOR 3
-#define VALIDATE_TYPE_MWPOS 4
-#define VALIDATE_TYPE_HOOK 5
-#define VALIDATE_TYPE_CALLPROC 7
-#define VALIDATE_TYPE_ACCEL 8
-#define VALIDATE_TYPE_MONITOR 12
-#define VALIDATE_TYPE_EVENT 15
-#define VALIDATE_TYPE_TIMER 16
+/* definitions for message.c */
+BOOL FASTCALL MessageInit(VOID);
+VOID FASTCALL MessageCleanup(VOID);
-#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 */
-#define NB_USER_HANDLES ((LAST_USER_HANDLE - FIRST_USER_HANDLE + 1) >> 1)
-#define USER_HANDLE_TO_INDEX(hwnd) ((LOWORD(hwnd) - FIRST_USER_HANDLE) >> 1)
-
-#define USER_HEADER_TO_BODY(ObjectHeader) \
- ((PVOID)(((PUSER_OBJECT_HEADER)ObjectHeader) + 1))
-
-#define USER_BODY_TO_HEADER(ObjectBody) \
- ((PUSER_OBJECT_HEADER)(((PUSER_OBJECT_HEADER)ObjectBody) - 1))
-
-#define HANDLEENTRY_INDESTROY 1
-
-typedef struct _USER_HANDLE_ENTRY
-{
- void *ptr; /* pointer to object */
- union
- {
- PVOID pi;
- PTHREADINFO pti; // pointer to Win32ThreadInfo
- PPROCESSINFO ppi; // pointer to W32ProcessInfo
- };
- unsigned char type; /* object type (0 if free) */
- unsigned char flags;
- 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;
-
-extern PUSER_HANDLE_TABLE gHandleTable;
-extern PUSER_HANDLE_ENTRY gHandleEntries;
-
-PUSER_HANDLE_ENTRY FASTCALL GetUser32Handle(HANDLE);
+/* definitions for misc.c */
+PCALLPROCDATA FASTCALL ValidateCallProc(HANDLE hCallProc);
+PWND FASTCALL ValidateHwnd(HWND hwnd);
+PWND FASTCALL ValidateHwndOrDesk(HWND hwnd);
+PWND FASTCALL GetThreadDesktopWnd(VOID);
+PVOID FASTCALL ValidateHandleNoErr(HANDLE handle, UINT uType);
+PWND FASTCALL ValidateHwndNoErr(HWND hwnd);
+BOOL FASTCALL TestWindowProcess(PWND);
PVOID FASTCALL ValidateHandle(HANDLE, UINT);
-#define WIN_GetFullHandle(h) ((HWND)(h))
+/* definitions for menu.c */
+BOOL MenuInit(VOID);
+VOID MenuCleanup(VOID);
+UINT MenuDrawMenuBar(HDC hDC, LPRECT Rect, HWND hWnd, BOOL Draw);
+VOID MenuTrackMouseMenuBar(HWND hWnd, ULONG Ht, POINT Pt);
+VOID MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar);
-#ifndef __ms_va_list
-# if defined(__x86_64__) && defined (__GNUC__)
-# define __ms_va_list __builtin_ms_va_list
-# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
-# define __ms_va_end(list) __builtin_ms_va_end(list)
-# else
-# define __ms_va_list va_list
-# define __ms_va_start(list,arg) va_start(list,arg)
-# define __ms_va_end(list) va_end(list)
-# endif
-#endif
-
-#ifdef _MSC_VER
-#ifndef inline
-#define inline __inline
-#endif
-#endif
-
-/* Hack away wine hack */
-#define __TRY if(1)
-#define __EXCEPT_PAGE_FAULT else
-#define __ENDTRY
-
-#define STATIC_UISTATE_GWL_OFFSET (sizeof(HFONT)+sizeof(HICON))// see UISTATE_GWL_OFFSET
in static.c
-
-/* Retrieve the UI state for the control */
-static __inline BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode)
-{
- LONG flags, prevflags;
-
- if (unicode)
- flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0);
- else
- flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0);
-
- prevflags = GetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET);
-
- if (prevflags != flags)
- {
- SetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET, flags);
- return TRUE;
- }
-
- return FALSE;
-}
-
+/* misc definitions */
+BOOL FASTCALL DefSetText(HWND hWnd, PCWSTR String, BOOL Ansi);
+VOID FASTCALL ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt);
+HCURSOR CursorIconToCursor(HICON hIcon, BOOL SemiTransparent);
+BOOL get_icon_size(HICON hIcon, SIZE *size);
+VOID FASTCALL IntNotifyWinEvent(DWORD, HWND, LONG, LONG, DWORD);
+UINT WINAPI WinPosGetMinMaxInfo(HWND hWnd, POINT* MaxSize, POINT* MaxPos, POINT*
MinTrack, POINT* MaxTrack);
+VOID UserGetWindowBorders(DWORD, DWORD, SIZE *, BOOL);
+void UserGetInsideRectNC(PWND Wnd, RECT *rect);
+VOID FASTCALL GetConnected(VOID);
+extern BOOL FASTCALL EnumNamesA(HWINSTA WindowStation, NAMEENUMPROCA EnumFunc, LPARAM
Context, BOOL Desktops);
+extern BOOL FASTCALL EnumNamesW(HWINSTA WindowStation, NAMEENUMPROCW EnumFunc, LPARAM
Context, BOOL Desktops);
+void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
+BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
+HWND* WIN_ListChildren (HWND hWndparent);
+VOID DeleteFrameBrushes(VOID);
/* EOF */
Added: trunk/reactos/dll/win32/user32/include/user_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user_x.h (added)
+++ trunk/reactos/dll/win32/user32/include/user_x.h [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -1,0 +1,112 @@
+
+static __inline PVOID
+SharedPtrToUser(PVOID Ptr)
+{
+ ASSERT(Ptr != NULL);
+ ASSERT(g_ulSharedDelta != 0);
+ return (PVOID)((ULONG_PTR)Ptr - g_ulSharedDelta);
+}
+
+static __inline PVOID
+DesktopPtrToUser(PVOID Ptr)
+{
+ PCLIENTINFO pci;
+ PDESKTOPINFO pdi;
+ GetW32ThreadInfo();
+ pci = GetWin32ClientInfo();
+ pdi = pci->pDeskInfo;
+
+ ASSERT(Ptr != NULL);
+ ASSERT(pdi != NULL);
+ if ((ULONG_PTR)Ptr >= (ULONG_PTR)pdi->pvDesktopBase &&
+ (ULONG_PTR)Ptr < (ULONG_PTR)pdi->pvDesktopLimit)
+ {
+ return (PVOID)((ULONG_PTR)Ptr - pci->ulClientDelta);
+ }
+ else
+ {
+ /* NOTE: This is slow as it requires a call to win32k. This should only be
+ neccessary if a thread wants to access an object on a different
+ desktop */
+ return (PVOID)NtUserxGetDesktopMapping(Ptr);
+ }
+}
+
+static __inline BOOL
+IsThreadHooked(PCLIENTINFO pci)
+{
+ return (pci->fsHooks|pci->pDeskInfo->fsHooks) != 0;
+}
+
+static __inline PDESKTOPINFO
+GetThreadDesktopInfo(VOID)
+{
+ PTHREADINFO ti;
+ PDESKTOPINFO di = NULL;
+
+ ti = GetW32ThreadInfo();
+ if (ti != NULL)
+ di = GetWin32ClientInfo()->pDeskInfo;
+
+ return di;
+}
+
+static __inline BOOL
+IsCallProcHandle(IN WNDPROC lpWndProc)
+{
+ /* FIXME - check for 64 bit architectures... */
+ return ((ULONG_PTR)lpWndProc & 0xFFFF0000) == 0xFFFF0000;
+}
+
+#define STATIC_UISTATE_GWL_OFFSET (sizeof(HFONT)+sizeof(HICON))// see UISTATE_GWL_OFFSET
in static.c
+
+/* Retrieve the UI state for the control */
+static __inline BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode)
+{
+ LONG flags, prevflags;
+
+ if (unicode)
+ flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0);
+ else
+ flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0);
+
+ prevflags = GetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET);
+
+ if (prevflags != flags)
+ {
+ SetWindowLongW(hwnd, STATIC_UISTATE_GWL_OFFSET, flags);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static __inline void LoadUserApiHook()
+{
+ if (!gfServerProcess &&
+ !IsInsideUserApiHook() &&
+ (gpsi->dwSRVIFlags & SRVINFO_APIHOOK) &&
+ !RtlIsThreadWithinLoaderCallout())
+ {
+ NtUserCallNoParam(NOPARAM_ROUTINE_LOADUSERAPIHOOK);
+ }
+}
+
+#define UserHasDlgFrameStyle(Style, ExStyle) \
+ (((ExStyle) & WS_EX_DLGMODALFRAME) || \
+ (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
+
+#define UserHasThickFrameStyle(Style, ExStyle) \
+ (((Style) & WS_THICKFRAME) &&
\
+ (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
+
+#define UserHasThinFrameStyle(Style, ExStyle) \
+ (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
+
+/* macro for source compatibility with wine */
+#define WIN_GetFullHandle(h) ((HWND)(h))
+
+#define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
+#define ISITHOOKED(HookId) (GetWin32ClientInfo()->fsHooks & HOOKID_TO_FLAG(HookId)
||\
+ (GetWin32ClientInfo()->pDeskInfo &&
GetWin32ClientInfo()->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId)))
+
Propchange: trunk/reactos/dll/win32/user32/include/user_x.h
------------------------------------------------------------------------------
svn:eol-style = native
Removed: trunk/reactos/dll/win32/user32/include/window.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/window.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/window.h (removed)
@@ -1,67 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: include/window.h
- * PURPOSE: Window management definitions
- */
-#include <windows.h>
-
-extern COLORREF SysColors[];
-extern HPEN SysPens[];
-extern HBRUSH SysBrushes[];
-
-#define NUM_SYSCOLORS 31
-
-
-#define UserHasAnyFrameStyle(Style, ExStyle) \
- (((Style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
- ((ExStyle) & WS_EX_DLGMODALFRAME) || \
- (!((Style) & (WS_CHILD | WS_POPUP))))
-
-#define UserHasDlgFrameStyle(Style, ExStyle) \
- (((ExStyle) & WS_EX_DLGMODALFRAME) || \
- (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
-
-#define UserHasThickFrameStyle(Style, ExStyle) \
- (((Style) & WS_THICKFRAME) &&
\
- (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
-
-#define UserHasThinFrameStyle(Style, ExStyle) \
- (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
-
-#define UserHasBigFrameStyle(Style, ExStyle) \
- (((Style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
- ((ExStyle) & WS_EX_DLGMODALFRAME))
-
-
-BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
-void
-UserGetFrameSize(ULONG Style, ULONG ExStyle, SIZE *Size);
-void
-UserGetInsideRectNC(PWND Wnd, RECT *rect);
-
-DWORD
-SCROLL_HitTest( HWND hwnd, INT nBar, POINT pt, BOOL bDragging );
-
-LRESULT FASTCALL IntCallWindowProcW(BOOL IsAnsiProc, WNDPROC WndProc, PWND pWnd,
- HWND hWnd, UINT Msg, WPARAM wParam,
- LPARAM lParam);
-
-HWND WINAPI
-User32CreateWindowEx(DWORD dwExStyle,
- LPCSTR lpClassName,
- LPCSTR lpWindowName,
- DWORD dwStyle,
- int x,
- int y,
- int nWidth,
- int nHeight,
- HWND hWndParent,
- HMENU hMenu,
- HINSTANCE hInstance,
- LPVOID lpParam,
- BOOL Unicode);
-
-HWND* WIN_ListChildren (HWND hWndparent);
-WNDPROC FASTCALL IntGetWndProc(PWND, BOOL);
-DWORD WINAPI GetRealWindowOwner(HWND);
Removed: trunk/reactos/dll/win32/user32/include/winpos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/winpos.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/winpos.h (removed)
@@ -1,5 +1,0 @@
-BOOL
-WinPosShowIconTitle(HWND hWnd, BOOL bShow);
-UINT WINAPI
-WinPosGetMinMaxInfo(HWND hWnd, POINT* MaxSize, POINT* MaxPos,
- POINT* MinTrack, POINT* MaxTrack);
Removed: trunk/reactos/dll/win32/user32/include/winsta.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/winsta.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/winsta.h (removed)
@@ -1,12 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: include/winsta.h
- * PURPOSE: Window stations
- */
-
-#pragma once
-
-extern BOOL FASTCALL EnumNamesA(HWINSTA WindowStation, NAMEENUMPROCA EnumFunc, LPARAM
Context, BOOL Desktops);
-extern BOOL FASTCALL EnumNamesW(HWINSTA WindowStation, NAMEENUMPROCW EnumFunc, LPARAM
Context, BOOL Desktops);
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/desk…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -113,7 +113,7 @@
return RealGetSystemMetrics(nIndex);
}
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -336,7 +336,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -368,7 +368,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -243,7 +243,6 @@
{
InitializeCriticalSection(&U32AccelCacheLock);
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
- InitStockObjects();
LoadAppInitDlls();
return TRUE;
Modified: trunk/reactos/dll/win32/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -42,9 +42,7 @@
WINAPI
RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
{
- return NtUserCallTwoParam(dwProcessId,
- (DWORD_PTR)bRegister,
- TWOPARAM_ROUTINE_REGISTERLOGONPROC);
+ return NtUserxRegisterLogonProcess(dwProcessId,bRegister);
}
/*
@@ -259,22 +257,6 @@
(DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess );
}
-BOOL
-FASTCALL
-IsMetaFile(HDC hDc)
-{
- DWORD Type = GetObjectType((HGDIOBJ) hDc);
- switch(Type)
- {
- case OBJ_METADC:
- case OBJ_METAFILE:
- case OBJ_ENHMETADC:
- case OBJ_ENHMETAFILE:
- return TRUE;
- }
- return FALSE;
-}
-
PUSER_HANDLE_ENTRY
FASTCALL
GetUser32Handle(HANDLE handle)
@@ -301,24 +283,24 @@
/*
* Decide whether an object is located on the desktop or shared heap
*/
-static const BOOL g_ObjectHeapTypeShared[VALIDATE_TYPE_EVENT + 1] =
-{
- FALSE, /* VALIDATE_TYPE_FREE (not used) */
- FALSE, /* VALIDATE_TYPE_WIN */
- TRUE, /* VALIDATE_TYPE_MENU FALSE */
- TRUE, /* VALIDATE_TYPE_CURSOR */
- TRUE, /* VALIDATE_TYPE_MWPOS */
- FALSE, /* VALIDATE_TYPE_HOOK */
+static const BOOL g_ObjectHeapTypeShared[otEvent + 1] =
+{
+ FALSE, /* otFree (not used) */
+ FALSE, /* otWindow */
+ TRUE, /* otMenu FALSE */
+ TRUE, /* otCursorIcon */
+ TRUE, /* otSMWP */
+ FALSE, /* otHook */
FALSE, /* (not used) */
- FALSE, /* VALIDATE_TYPE_CALLPROC */
- TRUE, /* VALIDATE_TYPE_ACCEL */
+ FALSE, /* otCallProc */
+ TRUE, /* otAccel */
FALSE, /* (not used) */
FALSE, /* (not used) */
FALSE, /* (not used) */
- TRUE, /* VALIDATE_TYPE_MONITOR */
+ TRUE, /* otMonitor */
FALSE, /* (not used) */
FALSE, /* (not used) */
- TRUE /* VALIDATE_TYPE_EVENT */
+ TRUE /* otEvent */
};
//
@@ -331,7 +313,7 @@
PVOID ret;
PUSER_HANDLE_ENTRY pEntry;
- ASSERT(uType <= VALIDATE_TYPE_EVENT);
+ ASSERT(uType <= otEvent);
pEntry = GetUser32Handle(handle);
@@ -346,22 +328,22 @@
{
switch ( uType )
{ // Test (with wine too) confirms these results!
- case VALIDATE_TYPE_WIN:
+ case otWindow:
SetLastError(ERROR_INVALID_WINDOW_HANDLE);
break;
- case VALIDATE_TYPE_MENU:
+ case otMenu:
SetLastError(ERROR_INVALID_MENU_HANDLE);
break;
- case VALIDATE_TYPE_CURSOR:
+ case otCursorIcon:
SetLastError(ERROR_INVALID_CURSOR_HANDLE);
break;
- case VALIDATE_TYPE_MWPOS:
+ case otSMWP:
SetLastError(ERROR_INVALID_DWP_HANDLE);
break;
- case VALIDATE_TYPE_HOOK:
+ case otHook:
SetLastError(ERROR_INVALID_HOOK_HANDLE);
break;
- case VALIDATE_TYPE_ACCEL:
+ case otAccel:
SetLastError(ERROR_INVALID_ACCEL_HANDLE);
break;
default:
@@ -389,7 +371,7 @@
PVOID ret;
PUSER_HANDLE_ENTRY pEntry;
- ASSERT(uType <= VALIDATE_TYPE_EVENT);
+ ASSERT(uType <= otEvent);
pEntry = GetUser32Handle(handle);
@@ -417,7 +399,7 @@
{
PUSER_HANDLE_ENTRY pEntry;
- PCALLPROCDATA CallProc = ValidateHandle(hCallProc, VALIDATE_TYPE_CALLPROC);
+ PCALLPROCDATA CallProc = ValidateHandle(hCallProc, otCallProc);
pEntry = GetUser32Handle(hCallProc);
@@ -443,7 +425,7 @@
if (hwnd == ClientInfo->CallbackWnd.hWnd)
return ClientInfo->CallbackWnd.pWnd;
- Wnd = ValidateHandle((HANDLE)hwnd, VALIDATE_TYPE_WIN);
+ Wnd = ValidateHandle((HANDLE)hwnd, otWindow);
if (Wnd != NULL)
{
return Wnd;
@@ -467,7 +449,7 @@
if (hwnd == ClientInfo->CallbackWnd.hWnd)
return ClientInfo->CallbackWnd.pWnd;
- Wnd = ValidateHandleNoErr((HANDLE)hwnd, VALIDATE_TYPE_WIN);
+ Wnd = ValidateHandleNoErr((HANDLE)hwnd, otWindow);
if (Wnd != NULL)
{
return Wnd;
Modified: trunk/reactos/dll/win32/user32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/stub…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -129,7 +129,7 @@
WINAPI
UserRealizePalette ( HDC hDC )
{
- return NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
+ return NtUserxRealizePalette(hDC);
}
@@ -553,7 +553,7 @@
WINAPI
CreateSystemThreads(DWORD dwUnknown)
{
- NtUserCallOneParam(dwUnknown, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
+ NtUserxCreateSystemThreads(dwUnknown);
}
BOOL
Modified: trunk/reactos/dll/win32/user32/misc/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/time…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/timer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/timer.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -39,9 +39,7 @@
*/
BOOL
WINAPI
-KillSystemTimer(
- HWND hWnd,
- UINT_PTR IDEvent)
+KillSystemTimer( HWND hWnd, UINT_PTR IDEvent)
{
- return NtUserCallHwndParam(hWnd, IDEvent, HWNDPARAM_ROUTINE_KILLSYSTEMTIMER);
+ return NtUserxKillSystemTimer(hWnd, IDEvent);
}
Modified: trunk/reactos/dll/win32/user32/misc/usrapihk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/usra…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/usrapihk.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/usrapihk.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -27,6 +27,7 @@
INT WINAPI RealSetScrollInfo(HWND,int,LPCSCROLLINFO,BOOL);
BOOL WINAPI RealSystemParametersInfoA(UINT,UINT,PVOID,UINT);
BOOL WINAPI RealSystemParametersInfoW(UINT,UINT,PVOID,UINT);
+DWORD WINAPI GetRealWindowOwner(HWND);
/* GLOBALS *******************************************************************/
@@ -309,7 +310,7 @@
WINAPI
RealMDIRedrawFrame(HWND hWnd, DWORD flags)
{
- return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_REDRAWFRAME);
+ return NtUserxMDIRedrawFrame(hWnd);
}
BOOL
@@ -318,7 +319,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
Modified: trunk/reactos/dll/win32/user32/windows/accel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/a…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/accel.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/accel.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -42,6 +42,16 @@
WORD cmd;
WORD pad1;
} PE_ACCEL, *LPPE_ACCEL;
+
+/* Cache entry */
+typedef struct _USER_ACCEL_CACHE_ENTRY
+{
+ struct _USER_ACCEL_CACHE_ENTRY * Next;
+ ULONG_PTR Usage; /* how many times the table has been loaded */
+ HACCEL Object; /* handle to the NtUser accelerator table object */
+ HGLOBAL Data; /* base address of the resource data */
+}
+U32_ACCEL_CACHE_ENTRY;
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/dll/win32/user32/windows/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/caret.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/caret.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -88,7 +88,7 @@
WINAPI
DestroyCaret(VOID)
{
- return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_DESTROY_CARET);
+ return NtUserxDestroyCaret();
}
@@ -99,7 +99,7 @@
WINAPI
SetCaretBlinkTime(UINT uMSeconds)
{
- return NtUserSetCaretBlinkTime(uMSeconds);
+ return NtUserxSetCaretBlinkTime(uMSeconds);
}
@@ -108,10 +108,9 @@
*/
BOOL
WINAPI
-SetCaretPos(int X,
- int Y)
+SetCaretPos(int X, int Y)
{
- return NtUserSetCaretPos(X, Y);
+ return NtUserxSetCaretPos(X, Y);
}
/* EOF */
Modified: trunk/reactos/dll/win32/user32/windows/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -30,8 +30,7 @@
WINAPI
OpenClipboard(HWND hWndNewOwner)
{
- BOOL ret = NtUserOpenClipboard(hWndNewOwner, 0);
- return ret;
+ return NtUserOpenClipboard(hWndNewOwner, 0);
}
/*
@@ -41,8 +40,7 @@
WINAPI
EnumClipboardFormats(UINT format)
{
- UINT ret = NtUserCallOneParam(format, ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS);
- return ret;
+ return NtUserxEnumClipboardFormats(format);
}
/*
Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -76,8 +76,7 @@
HICON
CreateCursorIconHandle( PICONINFO IconInfo )
{
- HICON hIcon = (HICON)NtUserCallOneParam(0,
- ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT);
+ HICON hIcon = NtUserxCreateEmptyCurObject(0);
if(!hIcon)
return NULL;
@@ -1239,24 +1238,11 @@
}
/***********************************************************************
- * SetCursor (USER32.@)
- *
- * Set the cursor shape.
- *
- * RETURNS
- * A handle to the previous cursor shape.
- */
-HCURSOR WINAPI /*DECLSPEC_HOTPATCH*/ SetCursor( HCURSOR hCursor /* [in] Handle of cursor
to show */ )
-{
- return NtUserSetCursor(hCursor);
-}
-
-/***********************************************************************
* ShowCursor (USER32.@)
*/
INT WINAPI /*DECLSPEC_HOTPATCH*/ ShowCursor( BOOL bShow )
{
- return NtUserShowCursor(bShow);
+ return NtUserxShowCursor(bShow);
}
/***********************************************************************
@@ -1270,24 +1256,6 @@
return ci.hCursor;
else
return (HCURSOR)0;
-}
-
-
-/***********************************************************************
- * ClipCursor (USER32.@)
- */
-BOOL WINAPI /*DECLSPEC_HOTPATCH*/ ClipCursor( const RECT *rect )
-{
- return NtUserClipCursor((RECT *)rect);
-}
-
-
-/***********************************************************************
- * GetClipCursor (USER32.@)
- */
-BOOL WINAPI /*DECLSPEC_HOTPATCH*/ GetClipCursor( RECT *rect )
-{
- return NtUserGetClipCursor(rect);
}
@@ -1800,16 +1768,18 @@
if (IS_INTRESOURCE(name))
return LoadImageW(hinst, (LPCWSTR)name, type, desiredx, desiredy, loadflags);
- __TRY {
+ _SEH2_TRY
+ {
DWORD len = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
u_name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, name, -1, u_name, len );
}
- __EXCEPT_PAGE_FAULT {
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
SetLastError( ERROR_INVALID_PARAMETER );
- return 0;
- }
- __ENDTRY
+ _SEH2_YIELD(return 0);
+ }
+ _SEH2_END
res = LoadImageW(hinst, u_name, type, desiredx, desiredy, loadflags);
HeapFree(GetProcessHeap(), 0, u_name);
return res;
@@ -2133,10 +2103,9 @@
*/
BOOL
WINAPI
-SetCursorPos(int X,
- int Y)
-{
- return NtUserSetCursorPos(X,Y);
+SetCursorPos(int X, int Y)
+{
+ return NtUserxSetCursorPos(X,Y);
}
/*
@@ -2154,7 +2123,7 @@
return FALSE;
}
- res = NtUserGetCursorPos(lpPoint);
+ res = NtUserxGetCursorPos(lpPoint);
return res;
}
Modified: trunk/reactos/dll/win32/user32/windows/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/dc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/dc.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -53,8 +53,8 @@
if (!hDC) return FALSE; // Null hDC return zero.
GdiReleaseDC ( hDC ); // Release locals.
- // Win 3.1 throw back, hWnd is ignored and not used.
- return NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_RELEASEDC);
+
+ return NtUserxReleaseDC(hDC);
}
@@ -65,5 +65,5 @@
WINAPI
WindowFromDC(HDC hDC)
{
- return NtUserWindowFromDC(hDC);
+ return NtUserxWindowFromDC(hDC);
}
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -31,19 +31,6 @@
static short iMenuSysKey = 0;
/* FUNCTIONS *****************************************************************/
-
-void
-InitStockObjects(void)
-{
- /* FIXME - Instead of copying the stuff to usermode we should map the tables to
- userland. The current implementation has one big flaw: the system color
- table doesn't get updated when another process changes them. That's
why
- we should rather map the table into usermode. But it only affects the
- SysColors table - the pens, brushes and stock objects are not affected
- as their handles never change. But it'd be faster to map them, too. */
-
- // Done! gpsi!
-}
/*
* @implemented
@@ -522,7 +509,7 @@
}
SendMessageA( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
- (void)NtUserSetGUIThreadHandle(MSQ_STATE_MOVESIZE, hwnd);
+ NtUserxSetGUIThreadHandle(MSQ_STATE_MOVESIZE, hwnd);
if (GetCapture() != hwnd) SetCapture( hwnd );
if (Style & WS_CHILD)
@@ -681,7 +668,7 @@
if (lResult) moved = FALSE;
}
- (void)NtUserSetGUIThreadHandle(MSQ_STATE_MOVESIZE, NULL);
+ NtUserxSetGUIThreadHandle(MSQ_STATE_MOVESIZE, NULL);
SendMessageA( hwnd, WM_EXITSIZEMOVE, 0, 0 );
SendMessageA( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
@@ -1595,7 +1582,7 @@
{
case 0xffff: /* Caret timer */
/* switch showing byte in win32k and get information about the caret */
- if(NtUserSwitchCaretShowing(&CaretInfo) && (CaretInfo.hWnd ==
hWnd))
+ if(NtUserxSwitchCaretShowing(&CaretInfo) && (CaretInfo.hWnd ==
hWnd))
{
DrawCaret(hWnd, &CaretInfo);
}
@@ -1808,7 +1795,7 @@
/* Pack the information and call win32k */
if (Change)
{
- if (!NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)Flags |
((DWORD_PTR)Action << 3), TWOPARAM_ROUTINE_ROS_UPDATEUISTATE))
+ if (!NtUserxUpdateUiState(hWnd, Flags | ((DWORD)Action << 3)))
break;
}
@@ -2209,7 +2196,7 @@
BOOL Hook, msgOverride = FALSE;
LRESULT Result = 0;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
if (Hook)
@@ -2242,7 +2229,7 @@
BOOL Hook, msgOverride = FALSE;
LRESULT Result = 0;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
if (Hook)
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -154,7 +154,7 @@
SETDLGINFO( hWnd, dlgInfo );
- NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo,
HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
+ NtUserxSetDialogPointer( hWnd, dlgInfo );
}
else
{
@@ -1157,7 +1157,7 @@
if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
HeapFree( GetProcessHeap(), 0, dlgInfo );
NtUserSetThreadState(0,DF_DIALOGACTIVE);
- NtUserCallHwndParam( hwnd, 0, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
+ NtUserxSetDialogPointer( hwnd, 0 );
}
/* Window clean-up */
return DefWindowProcA( hwnd, msg, wParam, lParam );
Modified: trunk/reactos/dll/win32/user32/windows/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -1452,7 +1452,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
Modified: trunk/reactos/dll/win32/user32/windows/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/h…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -128,7 +128,7 @@
ne.idChild = idChild;
ne.flags = flags;
if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(event))
- NtUserCallHwndParam(hwnd, (DWORD)&ne, HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT);
+ NtUserxNotifyWinEvent(hwnd, &ne);
}
/* FUNCTIONS *****************************************************************/
@@ -300,7 +300,7 @@
WINAPI
DeregisterShellHookWindow(HWND hWnd)
{
- return NtUserCallHwnd(hWnd, HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW);
+ return NtUserxDeregisterShellHookWindow(hWnd);
}
/*
@@ -310,7 +310,7 @@
WINAPI
RegisterShellHookWindow(HWND hWnd)
{
- return NtUserCallHwnd(hWnd, HWND_ROUTINE_REGISTERSHELLHOOKWINDOW);
+ return NtUserxRegisterShellHookWindow(hWnd);
}
/*
@@ -320,7 +320,7 @@
WINAPI
UnhookWindowsHook ( int nCode, HOOKPROC pfnFilterProc )
{
- return NtUserCallTwoParam(nCode, (DWORD_PTR)pfnFilterProc,
TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK);
+ return NtUserxUnhookWindowsHook(nCode, pfnFilterProc);
}
/*
Modified: trunk/reactos/dll/win32/user32/windows/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/input.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -104,10 +104,9 @@
* @implemented
*/
BOOL WINAPI
-EnableWindow(HWND hWnd,
- BOOL bEnable)
-{
- return NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)bEnable,
TWOPARAM_ROUTINE_ENABLEWINDOW);
+EnableWindow(HWND hWnd, BOOL bEnable)
+{
+ return NtUserxEnableWindow(hWnd, bEnable);
}
/*
@@ -128,7 +127,7 @@
HKL WINAPI
GetKeyboardLayout(DWORD idThread)
{
- return (HKL)NtUserCallOneParam((DWORD_PTR) idThread,
ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
+ return NtUserxGetKeyboardLayout(idThread);
}
@@ -220,7 +219,7 @@
int WINAPI
GetKeyboardType(int nTypeFlag)
{
-return (int)NtUserCallOneParam((DWORD_PTR) nTypeFlag,
ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
+ return NtUserxGetKeyboardType( nTypeFlag );
}
/*
@@ -355,7 +354,7 @@
SwapMouseButton(
BOOL fSwap)
{
- return NtUserSwapMouseButton(fSwap);
+ return NtUserxSwapMouseButton(fSwap);
}
Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -2915,7 +2915,7 @@
if (NewWnd != Mt->OwnerWnd)
{
Mt->OwnerWnd = NewWnd;
- (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd); // 1
+ NtUserxSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd); // 1
SetCapture(Mt->OwnerWnd); // 2
}
@@ -3206,13 +3206,13 @@
/* owner may not be visible when tracking a popup, so use the menu itself */
capture_win = (wFlags & TPM_POPUPMENU) ? MenuInfo.Wnd : mt.OwnerWnd;
- (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, capture_win); // 1
+ NtUserxSetGUIThreadHandle(MSQ_STATE_MENUOWNER, capture_win); // 1
SetCapture(capture_win); // 2
while (! fEndMenu)
{
BOOL ErrorExit = FALSE;
- PVOID menu = ValidateHandle(mt.CurrentMenu, VALIDATE_TYPE_MENU);
+ PVOID menu = ValidateHandle(mt.CurrentMenu, otMenu);
if (!menu) /* sometimes happens if I do a window manager close */
break;
@@ -3464,7 +3464,7 @@
else mt.TrackFlags &= ~TF_SKIPREMOVE;
}
- (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, NULL);
+ NtUserxSetGUIThreadHandle(MSQ_STATE_MENUOWNER, NULL);
SetCapture(NULL); /* release the capture */
/* If dropdown is still painted and the close box is clicked on
@@ -4072,7 +4072,7 @@
CreateMenu(VOID)
{
MenuLoadBitmaps();
- return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENU);
+ return NtUserxCreateMenu();
}
@@ -4083,7 +4083,7 @@
CreatePopupMenu(VOID)
{
MenuLoadBitmaps();
- return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENUPOPUP);
+ return NtUserxCreatePopupMenu();
}
@@ -4093,7 +4093,7 @@
BOOL WINAPI
DrawMenuBar(HWND hWnd)
{
-// return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR);
+// return NtUserxDrawMenuBar(hWnd);
ROSMENUINFO MenuInfo;
HMENU hMenu;
hMenu = GetMenu(hWnd);
@@ -4720,7 +4720,7 @@
IsMenu(
HMENU Menu)
{
- if (ValidateHandle(Menu, VALIDATE_TYPE_MENU)) return TRUE;
+ if (ValidateHandle(Menu, otMenu)) return TRUE;
return FALSE;
}
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -1035,7 +1035,7 @@
WINAPI
GetMessageExtraInfo(VOID)
{
- return (LPARAM)NtUserCallNoParam(NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO);
+ return NtUserxGetMessageExtraInfo();
}
@@ -1046,7 +1046,7 @@
WINAPI
GetMessagePos(VOID)
{
- return NtUserCallNoParam(NOPARAM_ROUTINE_GETMSESSAGEPOS);
+ return NtUserxGetMessagePos();
}
@@ -1100,10 +1100,9 @@
*/
BOOL
WINAPI
-ReplyMessage(
- LRESULT lResult)
-{
- return NtUserCallOneParam(lResult, ONEPARAM_ROUTINE_REPLYMESSAGE);
+ReplyMessage(LRESULT lResult)
+{
+ return NtUserxReplyMessage(lResult);
}
@@ -1115,7 +1114,7 @@
SetMessageExtraInfo(
LPARAM lParam)
{
- return NtUserSetMessageExtraInfo(lParam);
+ return NtUserxSetMessageExtraInfo(lParam);
}
LRESULT FASTCALL
@@ -1933,7 +1932,7 @@
PostQuitMessage(
int nExitCode)
{
- NtUserCallOneParam(nExitCode, ONEPARAM_ROUTINE_POSTQUITMESSAGE);
+ NtUserxPostQuitMessage(nExitCode);
}
@@ -2495,7 +2494,7 @@
BOOL WINAPI
ReleaseCapture(VOID)
{
- return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_RELEASECAPTURE);
+ return NtUserxReleaseCapture();
}
@@ -2512,7 +2511,7 @@
SetLastError( ERROR_INVALID_FLAGS );
return 0;
}
- return NtUserCallOneParam(flags, ONEPARAM_ROUTINE_GETQUEUESTATUS);
+ return NtUserxGetQueueStatus(flags);
}
@@ -2677,7 +2676,7 @@
return FALSE;
}
}
- if(NtUserCallNoParam(NOPARAM_ROUTINE_INIT_MESSAGE_PUMP)) {
+ if(NtUserxInitMessagePump()) {
LeaveCriticalSection(&gcsMPH);
return FALSE;
}
@@ -2692,7 +2691,7 @@
{
EnterCriticalSection(&gcsMPH);
if(gcLoadMPH > 0) {
- if(NtUserCallNoParam(NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP)) {
+ if(NtUserxUnInitMessagePump()) {
gcLoadMPH--;
if(!gcLoadMPH) {
InterlockedExchange((PLONG)&gfMessagePumpHook, 0);
@@ -2767,7 +2766,7 @@
}
}
- MessageQueueHandle = NtUserMsqSetWakeMask(MAKELONG(dwWakeMask, dwFlags));
+ MessageQueueHandle = NtUserxMsqSetWakeMask(MAKELONG(dwWakeMask, dwFlags));
if (MessageQueueHandle == NULL)
{
SetLastError(0); /* ? */
@@ -2777,7 +2776,7 @@
RealHandles = HeapAlloc(GetProcessHeap(), 0, (nCount + 1) * sizeof(HANDLE));
if (RealHandles == NULL)
{
- NtUserMsqClearWakeMask();
+ NtUserxMsqClearWakeMask();
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return WAIT_FAILED;
}
@@ -2790,7 +2789,7 @@
dwMilliseconds, dwFlags & MWMO_ALERTABLE);
HeapFree(GetProcessHeap(), 0, RealHandles);
- NtUserMsqClearWakeMask();
+ NtUserxMsqClearWakeMask();
//FIXME("Result 0X%x\n",Result);
return Result;
}
Modified: trunk/reactos/dll/win32/user32/windows/messagebox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -890,7 +890,7 @@
WINAPI
MessageBeep(UINT uType)
{
- return (BOOL)NtUserCallOneParam(uType, ONEPARAM_ROUTINE_MESSAGEBEEP);
+ return NtUserxMessageBeep(uType);
}
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -450,7 +450,7 @@
if (menu && !(Style & WS_CHILD))
{
TempRect = CurrentRect;
- TempRect.bottom = TempRect.top + (UINT)NtUserSetMenuBarHeight(menu, 0);
+ TempRect.bottom = TempRect.top + (UINT)NtUserxSetMenuBarHeight(menu, 0);
CurrentRect.top += MenuDrawMenuBar(hDC, &TempRect, hWnd, FALSE);
}
@@ -1104,7 +1104,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -1148,7 +1148,7 @@
{
BOOL Hook, Ret = FALSE;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
Modified: trunk/reactos/dll/win32/user32/windows/paint.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/p…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -200,7 +200,7 @@
BOOL Hook;
int Ret = 0;
- LOADUSERAPIHOOK
+ LoadUserApiHook();
Hook = BeginIfHookedUserApiHook();
@@ -244,7 +244,7 @@
pWnd->state & WNDS_INTERNALPAINT ||
pWnd->spwndChild )
{
- return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
+ return NtUserxUpdateWindow(hWnd);
}
return TRUE;
}
@@ -258,7 +258,7 @@
HWND hWnd,
HRGN hRgn)
{
- return NtUserCallHwndParamLock(hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
+ return NtUserxValidateRgn(hWnd, hRgn);
}
/*
Modified: trunk/reactos/dll/win32/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -65,7 +65,7 @@
HDWP WINAPI
BeginDeferWindowPos(int nNumWindows)
{
- return (HDWP)NtUserCallOneParam((DWORD_PTR)nNumWindows,
ONEPARAM_ROUTINE_BEGINDEFERWNDPOS);
+ return NtUserxBeginDeferWindowPos(nNumWindows);
}
@@ -1668,7 +1668,7 @@
BOOL WINAPI
SetForegroundWindow(HWND hWnd)
{
- return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW);
+ return NtUserxSetForegroundWindow(hWnd);
}
@@ -1750,10 +1750,9 @@
* @implemented
*/
BOOL WINAPI
-ShowOwnedPopups(HWND hWnd,
- BOOL fShow)
-{
- return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, fShow,
TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
+ShowOwnedPopups(HWND hWnd, BOOL fShow)
+{
+ return NtUserxShowOwnedPopups(hWnd, fShow);
}
@@ -1816,7 +1815,7 @@
SetWindowContextHelpId(HWND hwnd,
DWORD dwContextHelpId)
{
- return NtUserSetWindowContextHelpId(hwnd, dwContextHelpId);
+ return NtUserxSetWindowContextHelpId(hwnd, dwContextHelpId);
}
/*
@@ -1825,7 +1824,7 @@
DWORD WINAPI
GetWindowContextHelpId(HWND hwnd)
{
- return NtUserCallHwnd(hwnd, HWND_ROUTINE_GETWNDCONTEXTHLPID);
+ return NtUserxGetWindowContextHelpId(hwnd);
}
/*
@@ -1879,7 +1878,7 @@
HWND WINAPI
SetTaskmanWindow(HWND hWnd)
{
- return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
+ return NtUserxSetTaskmanWindow(hWnd);
}
/*
@@ -1888,7 +1887,7 @@
HWND WINAPI
SetProgmanWindow(HWND hWnd)
{
- return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
+ return NtUserxSetProgmanWindow(hWnd);
}
/*
@@ -1992,7 +1991,7 @@
VOID WINAPI
DisableProcessWindowsGhosting(VOID)
{
- NtUserEnableProcessWindowGhosting(FALSE);
+ NtUserxEnableProcessWindowGhosting(FALSE);
}
/* EOF */
Modified: trunk/reactos/dll/win32/user32/windows/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/winpos.c [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -108,7 +108,7 @@
UINT WINAPI
ArrangeIconicWindows(HWND hWnd)
{
- return NtUserCallHwndLock( hWnd, HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS);
+ return NtUserxArrangeIconicWindows( hWnd );
}
/*
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -5,6 +5,60 @@
typedef struct _THREADINFO *PTHREADINFO;
struct _DESKTOP;
struct _WND;
+
+
+#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 */
+
+#define HANDLEENTRY_INDESTROY 1
+
+typedef struct _USER_HANDLE_ENTRY
+{
+ void *ptr; /* pointer to object */
+ union
+ {
+ PVOID pi;
+ PTHREADINFO pti; // pointer to Win32ThreadInfo
+ PPROCESSINFO ppi; // pointer to W32ProcessInfo
+ };
+ unsigned char type; /* object type (0 if free) */
+ unsigned char flags;
+ 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 _USER_OBJECT_TYPE
+{
+ otFree = 0,
+ otWindow,
+ otMenu,
+ otCursorIcon,
+ otSMWP,
+ otHook,
+ otClipBoardData,
+ otCallProc,
+ otAccel,
+ otDDEaccess,
+ otDDEconv,
+ otDDExact,
+ otMonitor,
+ otKBDlayout,
+ otKBDfile,
+ otEvent,
+ otTimer,
+ otInputContext,
+ otHidData,
+ otDeviceInfo,
+ otTouchInput,
+ otGestureInfo
+} USER_OBJECT_TYPE;
typedef enum _USERTHREADINFOCLASS
{
@@ -699,6 +753,8 @@
#define SRVINFO_APIHOOK 0x0010
#define SRVINFO_METRICS 0x0020
+#define NUM_SYSCOLORS 31
+
typedef struct tagOEMBITMAPINFO
{
INT x;
@@ -727,9 +783,9 @@
typedef struct _PERUSERSERVERINFO
{
INT aiSysMet[SM_CMETRICS];
- ULONG argbSystemUnmatched[COLOR_LAST+1];
- COLORREF argbSystem[COLOR_LAST+1];
- HBRUSH ahbrSystem[COLOR_LAST+1];
+ ULONG argbSystemUnmatched[NUM_SYSCOLORS];
+ COLORREF argbSystem[NUM_SYSCOLORS];
+ HBRUSH ahbrSystem[NUM_SYSCOLORS];
HBRUSH hbrGray;
POINT ptCursor;
POINT ptCursorReal;
@@ -3119,7 +3175,6 @@
*/
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
-#define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
@@ -3134,7 +3189,6 @@
#define MSQ_STATE_MOVESIZE 0x5
#define MSQ_STATE_CARET 0x6
#define TWOPARAM_ROUTINE_SETCARETPOS 0xfffd0060
-#define TWOPARAM_ROUTINE_REGISTERLOGONPROC 0xfffd0062
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE 0x1004
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT 0x1005
Modified: trunk/reactos/subsystems/win32/win32k/include/bitmaps.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,12 +1,4 @@
#pragma once
-
-#include "surface.h"
-
-typedef struct tagBITMAPV5INFO
-{
- BITMAPV5HEADER bmiHeader;
- RGBQUAD bmiColors[256];
-} BITMAPV5INFO, *PBITMAPV5INFO;
INT APIENTRY BITMAP_GetObject(SURFACE * bmp, INT count, LPVOID buffer);
HBITMAP FASTCALL IntCreateBitmap(IN SIZEL Size, IN LONG Width, IN ULONG Format, IN ULONG
Flags, IN PVOID Bits);
Modified: trunk/reactos/subsystems/win32/win32k/include/cleanup.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/cleanup.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/cleanup.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,6 +1,4 @@
#pragma once
-
-NTSTATUS FASTCALL InitCleanupImpl(VOID);
NTSTATUS FASTCALL
IntSafeCopyUnicodeString(PUNICODE_STRING Dest,
@@ -9,9 +7,3 @@
NTSTATUS FASTCALL
IntSafeCopyUnicodeStringTerminateNULL(PUNICODE_STRING Dest,
PUNICODE_STRING Source);
-
-NTSTATUS FASTCALL
-IntUnicodeStringToNULLTerminated(PWSTR *Dest, PUNICODE_STRING Src);
-
-void FASTCALL
-IntFreeNULLTerminatedFromUnicodeString(PWSTR NullTerminated, PUNICODE_STRING
UnicodeString);
Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,7 +1,4 @@
#pragma once
-
-#include <include/dc.h>
-#include <include/region.h>
INT FASTCALL IntGdiGetClipBox(PDC, RECTL* rc);
INT FASTCALL IntGdiExtSelectClipRgn (PDC, PROSRGNDATA, int);
Modified: trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,7 +1,5 @@
#pragma once
-#include <reactos/win32k/ntgdityp.h>
-#include <reactos/win32k/ntgdihdl.h>
#include "dc.h"
#include "math.h"
#include "xformobj.h"
Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -6,7 +6,6 @@
#pragma once
/* Public GDI Object/Handle definitions */
-#include <win32k/ntgdihdl.h>
#include "win32.h"
/* The first 10 entries are never used in windows, they are empty */
Modified: trunk/reactos/subsystems/win32/win32k/include/object.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/object.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/object.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,65 +1,4 @@
#pragma once
-
-#include "gdiobj.h"
-#include "bitmaps.h"
-#include "pen.h"
-
-#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 */
-
-#define HANDLEENTRY_INDESTROY 1
-
-typedef struct _USER_HANDLE_ENTRY
-{
- void *ptr; /* pointer to object */
- union
- {
- PVOID pi;
- PTHREADINFO pti; // pointer to Win32ThreadInfo
- PPROCESSINFO ppi; // pointer to W32ProcessInfo
- };
- unsigned char type; /* object type (0 if free) */
- unsigned char flags;
- 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 _USER_OBJECT_TYPE
-{
- otFree = 0,
- otWindow,
- otMenu,
- otCursorIcon,
- otSMWP,
- otHook,
- otClipBoardData,
- otCallProc,
- otAccel,
- otDDEaccess,
- otDDEconv,
- otDDExact,
- otMonitor,
- otKBDlayout,
- otKBDfile,
- otEvent,
- otTimer,
- otInputContext,
- otHidData,
- otDeviceInfo,
- otTouchInput,
- otGestureInfo
-} USER_OBJECT_TYPE;
typedef struct _USER_REFERENCE_ENTRY
{
Modified: trunk/reactos/subsystems/win32/win32k/include/pen.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/pen.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/pen.h [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -1,7 +1,4 @@
#pragma once
-
-#include "gdiobj.h"
-#include "brush.h"
/* Internal interface */
Modified: trunk/reactos/subsystems/win32/win32k/include/region.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -1,6 +1,4 @@
#pragma once
-
-#include "gdiobj.h"
/* Type definitions ***********************************************************/
Modified: trunk/reactos/subsystems/win32/win32k/include/win32kp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/win32kp.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/win32kp.h [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -23,74 +23,79 @@
#define DBG_ENABLE_EVENT_LOGGING 0
#define DBG_ENABLE_SERVICE_HOOKS 0
-/* Internal Win32k Headers */
+/* misc headers */
+#include <include/mmcopy.h>
+#include <include/tags.h>
#include <include/win32kdebug.h>
-#include <include/accelerator.h>
-#include <include/clipboard.h>
-#include <include/cliprgn.h>
-#include <include/bitmaps.h>
+#include <include/cleanup.h>
+
+/* Internal NtGdi Headers */
+#include <include/gdiobj.h>
+#include <include/surface.h>
#include <include/brush.h>
-#include <include/callback.h>
-#include <include/caret.h>
-#include <include/class.h>
-#include <include/cleanup.h>
#include <include/color.h>
-#include <include/coord.h>
-#include <include/csr.h>
#include <include/dc.h>
-#include <include/dce.h>
#include <include/dib.h>
#include <include/driver.h>
#include <include/driverobj.h>
#include <include/floatobj.h>
-#include <include/gdiobj.h>
#include <include/palette.h>
#include <include/pdevobj.h>
#include <include/rect.h>
+#include <include/xformobj.h>
+#include <include/xlateobj.h>
+#include <include/cliprgn.h>
+#include <include/region.h>
+#include <include/eng.h>
+#include <include/inteng.h>
+#include <include/intgdi.h>
+#include <include/intddraw.h>
+#include <include/paint.h>
+#include <include/path.h>
+#include <include/bitmaps.h>
+#include <include/text.h>
+#include <include/misc.h>
+#include <include/engobjects.h>
+#include <include/engevent.h>
+#include <include/ldevobj.h>
+#include <include/device.h>
+#include <include/pen.h>
+#include <include/cliprgn.h>
+#include <include/coord.h>
+#include <include/gdifloat.h>
+#include <dib/dib.h>
+#include <include/gdidebug.h>
+
+/* Internal NtUser Headers */
+#include <include/ntuser.h>
+#include <include/accelerator.h>
+#include <include/clipboard.h>
+#include <include/caret.h>
+#include <include/class.h>
+#include <include/dce.h>
#include <include/sysparams.h>
#include <include/win32.h>
#include <include/window.h>
#include <include/winsta.h>
-#include <include/xformobj.h>
-#include <include/xlateobj.h>
-
-#include <include/region.h>
-#include <include/ntuser.h>
#include <include/cursoricon.h>
#include <include/desktop.h>
-#include <include/eng.h>
#include <include/focus.h>
#include <include/guicheck.h>
#include <include/hook.h>
#include <include/hotkey.h>
#include <include/input.h>
-#include <include/inteng.h>
-#include <include/intgdi.h>
-#include <include/intddraw.h>
#include <include/menu.h>
#include <include/monitor.h>
#include <include/mouse.h>
#include <include/msgqueue.h>
#include <include/object.h>
-#include <include/paint.h>
#include <include/painting.h>
-#include <include/path.h>
#include <include/prop.h>
-#include <include/scroll.h>
-#include <include/surface.h>
-#include <include/tags.h>
-#include <include/text.h>
#include <include/timer.h>
#include <include/useratom.h>
#include <include/vis.h>
#include <include/userfuncs.h>
#include <include/winpos.h>
-#include <include/mmcopy.h>
-#include <include/misc.h>
-#include <include/gdifloat.h>
-#include <include/engobjects.h>
-#include <include/engevent.h>
-#include <include/ldevobj.h>
-#include <include/device.h>
-#include <dib/dib.h>
-#include <include/gdidebug.h>
+#include <include/scroll.h>
+#include <include/csr.h>
+#include <include/callback.h>
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Thu Aug 25 08:51:26
2011
@@ -459,37 +459,6 @@
/* string is empty */
return STATUS_SUCCESS;
-}
-
-NTSTATUS FASTCALL
-IntUnicodeStringToNULLTerminated(PWSTR *Dest, PUNICODE_STRING Src)
-{
- if (Src->Length + sizeof(WCHAR) <= Src->MaximumLength
- && L'\0' == Src->Buffer[Src->Length / sizeof(WCHAR)])
- {
- /* The unicode_string is already nul terminated. Just reuse it. */
- *Dest = Src->Buffer;
- return STATUS_SUCCESS;
- }
-
- *Dest = ExAllocatePoolWithTag(PagedPool, Src->Length + sizeof(WCHAR), TAG_STRING);
- if (NULL == *Dest)
- {
- return STATUS_NO_MEMORY;
- }
- RtlCopyMemory(*Dest, Src->Buffer, Src->Length);
- (*Dest)[Src->Length / 2] = L'\0';
-
- return STATUS_SUCCESS;
-}
-
-void FASTCALL
-IntFreeNULLTerminatedFromUnicodeString(PWSTR NullTerminated, PUNICODE_STRING
UnicodeString)
-{
- if (NullTerminated != UnicodeString->Buffer)
- {
- ExFreePool(NullTerminated);
- }
}
PPROCESSINFO
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -467,7 +467,7 @@
case TWOPARAM_ROUTINE_SETCARETPOS:
RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2));
- case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
+ case TWOPARAM_ROUTINE_REGISTERLOGONPROCESS:
RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
case TWOPARAM_ROUTINE_SETCURSORPOS:
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Thu Aug 25
08:51:26 2011
@@ -62,7 +62,6 @@
RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
RGB(236, 233, 216) /* COLOR_MENUBAR */
};
-#define NUM_SYSCOLORS (sizeof(SysColors) / sizeof(SysColors[0]))
// System Bitmap DC
HDC hSystemBM;
Modified: trunk/reactos/subsystems/win32/win32k/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/pc…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/pch.h [iso-8859-1] Thu Aug 25 08:51:26 2011
@@ -70,6 +70,7 @@
#include <win32k/ntuser.h>
#include <win32k/ntgdityp.h>
#include <win32k/ntgdibad.h>
+#include <win32k/ntgdihdl.h>
#include <ntgdi.h>
/* Undocumented user definitions */