Added: trunk/reactos/include/ndk/mmfuncs.h
Modified: trunk/reactos/include/ndk/ntndk.h
Modified: trunk/reactos/include/ndk/obfuncs.h
Modified: trunk/reactos/include/ndk/obtypes.h
Modified: trunk/reactos/include/ndk/psfuncs.h
Modified: trunk/reactos/include/win32k/kapi.h
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
Deleted: trunk/reactos/ntoskrnl/include/internal/nt.h
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/ps/win32.c
Modified: trunk/reactos/subsys/win32k/include/accelerator.h
Modified: trunk/reactos/subsys/win32k/include/caret.h
Modified: trunk/reactos/subsys/win32k/include/class.h
Modified: trunk/reactos/subsys/win32k/include/clipboard.h
Modified: trunk/reactos/subsys/win32k/include/desktop.h
Modified: trunk/reactos/subsys/win32k/include/guicheck.h
Modified: trunk/reactos/subsys/win32k/include/hook.h
Modified: trunk/reactos/subsys/win32k/include/hotkey.h
Modified: trunk/reactos/subsys/win32k/include/menu.h
Modified: trunk/reactos/subsys/win32k/include/monitor.h
Modified: trunk/reactos/subsys/win32k/include/mouse.h
Modified: trunk/reactos/subsys/win32k/include/msgqueue.h
Modified: trunk/reactos/subsys/win32k/include/object.h
Modified: trunk/reactos/subsys/win32k/include/painting.h
Modified: trunk/reactos/subsys/win32k/include/useratom.h
Modified: trunk/reactos/subsys/win32k/include/vis.h
Added: trunk/reactos/subsys/win32k/include/win32k.h
Modified: trunk/reactos/subsys/win32k/include/window.h
Modified: trunk/reactos/subsys/win32k/include/winsta.h
Modified: trunk/reactos/subsys/win32k/main/dllmain.c
Deleted: trunk/reactos/subsys/win32k/main/svctabm.c
Modified: trunk/reactos/subsys/win32k/misc/driver.c
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c
Modified: trunk/reactos/subsys/win32k/ntuser/csr.c
Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c
Modified: trunk/reactos/subsys/win32k/ntuser/menu.c
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsys/win32k/w32k.h
Modified: trunk/reactos/subsys/win32k/win32k.xml
Modified: trunk/reactos/tools/nci/nci.mak
Modified: trunk/reactos/tools/nci/ncitool.c
--- trunk/reactos/include/ndk/mmfuncs.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/ndk/mmfuncs.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -0,0 +1,23 @@
+/*
+ * PROJECT: ReactOS Native Headers
+ * FILE: include/ndk/halfuncs.h
+ * PURPOSE: Prototypes for exported HAL Functions not defined in DDK/IFS
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ * UPDATE HISTORY:
+ * Created 06/10/04
+ */
+#ifndef _MMFUNCS_H
+#define _MMFUNCS_H
+
+/* DEPENDENCIES **************************************************************/
+
+
+/* PROTOTYPES ****************************************************************/
+NTSTATUS
+STDCALL
+MmUnmapViewOfSection(
+ struct _EPROCESS* Process,
+ PVOID BaseAddress
+);
+
+#endif
--- trunk/reactos/include/ndk/ntndk.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/ndk/ntndk.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -26,6 +26,7 @@
#include "ldrfuncs.h" /* Loader Functions */
#include "lpctypes.h" /* Local Procedure Call Types */
#include "mmtypes.h" /* Memory Manager Types */
+ #include "mmfuncs.h" /* Memory Manager Functions */
#include "obtypes.h" /* Object Manager Types */
#include "obfuncs.h" /* Object Manager Functions */
#include "potypes.h" /* Power Manager Types */
--- trunk/reactos/include/ndk/obfuncs.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/ndk/obfuncs.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -93,4 +93,14 @@
OUT PVOID *Object
);
+NTSTATUS
+STDCALL
+ObFindHandleForObject(
+ IN PEPROCESS Process,
+ IN PVOID Object,
+ IN POBJECT_TYPE ObjectType,
+ IN POBJECT_HANDLE_INFORMATION HandleInformation,
+ OUT PHANDLE Handle
+);
+
#endif
--- trunk/reactos/include/ndk/obtypes.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/ndk/obtypes.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -115,6 +115,17 @@
/* TYPES *********************************************************************/
+/* FIXME: Does this match NT's? */
+typedef struct _W32_OBJECT_CALLBACK
+{
+ OB_OPEN_METHOD WinStaCreate;
+ OB_PARSE_METHOD WinStaParse;
+ OB_DELETE_METHOD WinStaDelete;
+ OB_FIND_METHOD WinStaFind;
+ OB_CREATE_METHOD DesktopCreate;
+ OB_DELETE_METHOD DesktopDelete;
+} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
+
typedef struct _OBJECT_BASIC_INFORMATION
{
ULONG Attributes;
--- trunk/reactos/include/ndk/psfuncs.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/ndk/psfuncs.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -10,6 +10,7 @@
#define _PSFUNCS_H
/* DEPENDENCIES **************************************************************/
+#include "pstypes.h"
/* PROTOTYPES ****************************************************************/
@@ -31,4 +32,19 @@
VOID
);
+VOID
+STDCALL
+PsEstablishWin32Callouts(
+ PW32_PROCESS_CALLBACK W32ProcessCallback,
+ PW32_THREAD_CALLBACK W32ThreadCallback,
+ PW32_OBJECT_CALLBACK W32ObjectCallback,
+ PVOID Param4,
+ ULONG W32ThreadSize,
+ ULONG W32ProcessSize
+);
+
+HANDLE
+STDCALL
+PsGetProcessId(struct _EPROCESS *Process);
+
#endif
--- trunk/reactos/include/win32k/kapi.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/include/win32k/kapi.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -6,6 +6,8 @@
#endif
#include <win32k/brush.h>
+#include <win32k/callback.h>
+#include <win32k/caret.h>
#include <win32k/cliprgn.h>
#include <win32k/color.h>
#include <win32k/cursoricon.h>
--- trunk/reactos/ntoskrnl/include/internal/ex.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/include/internal/ex.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,70 +1,6 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
#define __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H
-typedef enum
-{
- wmCenter = 0,
- wmTile,
- wmStretch
-} WALLPAPER_MODE;
-
-typedef struct _WINSTATION_OBJECT
-{
- PVOID SharedHeap; /* points to kmode memory! */
-
- CSHORT Type;
- CSHORT Size;
- KSPIN_LOCK Lock;
- UNICODE_STRING Name;
- LIST_ENTRY DesktopListHead;
- PRTL_ATOM_TABLE AtomTable;
- PVOID HandleTable;
- HANDLE SystemMenuTemplate;
- PVOID SystemCursor;
- UINT CaretBlinkRate;
- HANDLE ShellWindow;
- HANDLE ShellListView;
-
- /* Wallpaper */
- HANDLE hbmWallpaper;
- ULONG cxWallpaper, cyWallpaper;
- WALLPAPER_MODE WallpaperMode;
-
- ULONG Flags;
- struct _DESKTOP_OBJECT* ActiveDesktop;
- /* FIXME: Clipboard */
- LIST_ENTRY HotKeyListHead;
- FAST_MUTEX HotKeyListLock;
-} WINSTATION_OBJECT, *PWINSTATION_OBJECT;
-
-typedef struct _DESKTOP_OBJECT
-{
- PVOID DesktopHeap; /* points to kmode memory! */
-
- CSHORT Type;
- CSHORT Size;
- LIST_ENTRY ListEntry;
- KSPIN_LOCK Lock;
- UNICODE_STRING Name;
- /* Pointer to the associated window station. */
- struct _WINSTATION_OBJECT *WindowStation;
- /* Pointer to the active queue. */
- PVOID ActiveMessageQueue;
- /* Rectangle of the work area */
-#ifdef __WIN32K__
- RECT WorkArea;
-#else
- LONG WorkArea[4];
-#endif
- /* Handle of the desktop window. */
- HANDLE DesktopWindow;
- HANDLE PrevActiveWindow;
- /* Thread blocking input */
- PVOID BlockInputThread;
-
- LIST_ENTRY ShellHookWindows;
-} DESKTOP_OBJECT, *PDESKTOP_OBJECT;
-
/* GLOBAL VARIABLES *********************************************************/
extern TIME_ZONE_INFORMATION ExpTimeZoneInfo;
--- trunk/reactos/ntoskrnl/include/internal/mm.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -845,11 +845,8 @@
NTSTATUS MmInitSectionImplementation(VOID);
-NTSTATUS STDCALL
-MmUnmapViewOfSection(struct _EPROCESS* Process, PVOID BaseAddress);
-
-/* FIXME: it should be in ddk/mmfuncs.h */
-NTSTATUS STDCALL
+NTSTATUS
+STDCALL
MmCreateSection (OUT PSECTION_OBJECT * SectionObject,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
--- trunk/reactos/ntoskrnl/include/internal/nt.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/include/internal/nt.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,7 +0,0 @@
-VOID NtInitializeEventImplementation(VOID);
-VOID NtInitializeEventPairImplementation(VOID);
-VOID NtInitializeSemaphoreImplementation(VOID);
-VOID NtInitializeMutantImplementation(VOID);
-VOID NtInitializeTimerImplementation(VOID);
-NTSTATUS NiInitPort(VOID);
-VOID NtInitializeProfileImplementation(VOID);
--- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -18,15 +18,6 @@
#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04)
-typedef struct _W32_OBJECT_CALLBACK {
- OB_OPEN_METHOD WinStaCreate;
- OB_PARSE_METHOD WinStaParse;
- OB_DELETE_METHOD WinStaDelete;
- OB_FIND_METHOD WinStaFind;
- OB_CREATE_METHOD DesktopCreate;
- OB_DELETE_METHOD DesktopDelete;
-} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
-
#define PROCESS_STATE_TERMINATED (1)
#define PROCESS_STATE_ACTIVE (2)
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,6 +1,14 @@
-#ifndef __INCLUDE_NTOSKRNL_H
-#define __INCLUDE_NTOSKRNL_H
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Kernel
+ * FILE: ntoskrnl/include/ntoskrnl.h
+ * PURPOSE: Main Kernel Header
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ */
+/* INCLUDES ******************************************************************/
+
+/* We are the Kernel */
#define NTKERNELAPI
/* include the ntoskrnl config.h file */
@@ -37,5 +45,3 @@
/* Internal Headers */
#include "internal/ntoskrnl.h"
-
-#endif /* INCLUDE_NTOSKRNL_H */
--- trunk/reactos/ntoskrnl/ps/win32.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/ntoskrnl/ps/win32.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -45,16 +45,18 @@
/* FUNCTIONS ***************************************************************/
-PW32THREAD STDCALL
+struct _W32THREAD*
+STDCALL
PsGetWin32Thread(VOID)
{
return(PsGetCurrentThread()->Tcb.Win32Thread);
}
-PW32PROCESS STDCALL
+struct _W32PROCESS*
+STDCALL
PsGetWin32Process(VOID)
{
- return (PW32PROCESS)PsGetCurrentProcess()->Win32Process;
+ return (struct _W32PROCESS*)PsGetCurrentProcess()->Win32Process;
}
NTSTATUS STDCALL
--- trunk/reactos/subsys/win32k/include/accelerator.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/accelerator.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_ACCELERATOR_H
#define _WIN32K_ACCELERATOR_H
-#include <windows.h>
-#include <ddk/ntddk.h>
#include <include/winsta.h>
#include <include/window.h>
--- trunk/reactos/subsys/win32k/include/caret.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/caret.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,9 +1,6 @@
#ifndef _WIN32K_CARET_H
#define _WIN32K_CARET_H
-#include <windows.h>
-#include <internal/ps.h>
-
#define IDCARETTIMER (0xffff)
BOOL FASTCALL
--- trunk/reactos/subsys/win32k/include/class.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/class.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,11 +1,6 @@
#ifndef _WIN32K_CLASS_H
#define _WIN32K_CLASS_H
-#include <windows.h>
-#include <ddk/ntddk.h>
-#include <ddk/ntapi.h>
-#include <napi/win32.h>
-
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
--- trunk/reactos/subsys/win32k/include/clipboard.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/clipboard.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_CLIPBOARD_H
#define _WIN32K_CLIPBOARD_H
-#include <windows.h>
-
UINT FASTCALL
IntEnumClipboardFormats(UINT format);
--- trunk/reactos/subsys/win32k/include/desktop.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/desktop.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,13 +1,33 @@
#ifndef _WIN32K_DESKTOP_H
#define _WIN32K_DESKTOP_H
-#include <windows.h>
-#include <ddk/ntddk.h>
-#include <internal/ex.h>
-#include <internal/ps.h>
#include "msgqueue.h"
#include "window.h"
+typedef struct _DESKTOP_OBJECT
+{
+ PVOID DesktopHeap; /* points to kmode memory! */
+
+ CSHORT Type;
+ CSHORT Size;
+ LIST_ENTRY ListEntry;
+ KSPIN_LOCK Lock;
+ UNICODE_STRING Name;
+ /* Pointer to the associated window station. */
+ struct _WINSTATION_OBJECT *WindowStation;
+ /* Pointer to the active queue. */
+ PVOID ActiveMessageQueue;
+ /* Rectangle of the work area */
+ RECT WorkArea;
+ /* Handle of the desktop window. */
+ HANDLE DesktopWindow;
+ HANDLE PrevActiveWindow;
+ /* Thread blocking input */
+ PVOID BlockInputThread;
+
+ LIST_ENTRY ShellHookWindows;
+} DESKTOP_OBJECT, *PDESKTOP_OBJECT;
+
extern PDESKTOP_OBJECT InputDesktop;
extern HDESK InputDesktopHandle;
extern PWNDCLASS_OBJECT DesktopWindowClass;
--- trunk/reactos/subsys/win32k/include/guicheck.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/guicheck.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,9 +1,6 @@
#ifndef _WIN32K_GUICHECK_H
#define _WIN32K_GUICHECK_H
-#include <windows.h>
-#include <ddk/ntddk.h>
-
BOOL FASTCALL IntGraphicsCheck(BOOL Create);
BOOL FASTCALL IntCreatePrimarySurface();
VOID FASTCALL IntDestroyPrimarySurface();
--- trunk/reactos/subsys/win32k/include/hook.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/hook.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,9 +1,6 @@
#ifndef _WIN32K_HOOK_H
#define _WIN32K_HOOK_H
-#include <windows.h>
-#include <internal/ps.h>
-
#define HOOK_THREAD_REFERENCED (0x1)
typedef struct tagHOOK
--- trunk/reactos/subsys/win32k/include/hotkey.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/hotkey.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_HOTKEY_H
#define _WIN32K_HOTKEY_H
-#include <windows.h>
-#include <ddk/ntddk.h>
#include <include/winsta.h>
#include <include/window.h>
--- trunk/reactos/subsys/win32k/include/menu.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/menu.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_MENU_H
#define _WIN32K_MENU_H
-#include <ddk/ntddk.h>
-#include <napi/win32.h>
#include <win32k/menu.h>
#define IS_ATOM(x) \
--- trunk/reactos/subsys/win32k/include/monitor.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/monitor.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_MONITOR_H
#define _WIN32K_MONITOR_H
-#include <windows.h>
-
struct GDIDEVICE;
/* monitor object */
--- trunk/reactos/subsys/win32k/include/mouse.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/mouse.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -3,7 +3,6 @@
#include "../eng/misc.h"
#include <include/winsta.h>
-//#include <ddk/ntddmou.h>
INT INTERNAL_CALL MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2);
INT INTERNAL_CALL MouseSafetyOnDrawEnd(SURFOBJ *SurfObj);
--- trunk/reactos/subsys/win32k/include/msgqueue.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/msgqueue.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_MSGQUEUE_H
#define _WIN32K_MSGQUEUE_H
-#include <internal/ex.h>
-#include <windows.h>
#include "caret.h"
#include "hook.h"
--- trunk/reactos/subsys/win32k/include/object.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/object.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,7 +1,6 @@
#ifndef _WIN32K_OBJECT_H
#define _WIN32K_OBJECT_H
-#include <windows.h>
#include <win32k/gdiobj.h>
#include <win32k/bitmaps.h>
#include <win32k/pen.h>
--- trunk/reactos/subsys/win32k/include/painting.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/painting.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,8 +1,6 @@
#ifndef _WIN32K_PAINTING_H
#define _WIN32K_PAINTING_H
-#include <windows.h>
-#include <ddk/ntddk.h>
#include <include/class.h>
#include <include/msgqueue.h>
#include <include/window.h>
--- trunk/reactos/subsys/win32k/include/useratom.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/useratom.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,9 +1,6 @@
#ifndef _WIN32K_USERATOM_H
#define _WIN32K_USERATOM_H
-#include <windows.h>
-#include <ddk/ntapi.h>
-
RTL_ATOM FASTCALL
IntAddAtom(LPWSTR AtomName);
ULONG FASTCALL
--- trunk/reactos/subsys/win32k/include/vis.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/vis.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -11,7 +11,6 @@
#ifndef _WIN32K_VIS_H
#define _WIN32K_VIS_H
-#include <internal/ex.h>
#include <include/window.h>
HRGN FASTCALL
--- trunk/reactos/subsys/win32k/include/win32k.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/win32k.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -0,0 +1,60 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Graphics Subsystem
+ * FILE: subsys/win32k/include/win32k.h
+ * PURPOSE: Internal Win32K Header
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+/* INCLUDES ******************************************************************/
+
+/* Internal Win32k Headers */
+#include <include/ssec.h>
+#include <include/accelerator.h>
+#include <include/callback.h>
+#include <include/caret.h>
+#include <include/class.h>
+#include <include/cleanup.h>
+#include <include/clipboard.h>
+#include <include/color.h>
+#include <include/csr.h>
+#include <include/cursoricon.h>
+#include <include/dce.h>
+#include <include/desktop.h>
+#include <include/dib.h>
+#include <include/eng.h>
+#include <include/error.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/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/palette.h>
+#include <include/path.h>
+#include <include/prop.h>
+#include <include/rect.h>
+#include <include/scroll.h>
+#include <include/surface.h>
+#include <include/tags.h>
+#include <include/text.h>
+#include <include/timer.h>
+#include <include/timer.h>
+#include <include/useratom.h>
+#include <include/vis.h>
+#include <include/window.h>
+#include <include/winpos.h>
+#include <include/winsta.h>
+#include <eng/objects.h>
+#include <eng/misc.h>
+#include <dib/dib.h>
+
+/* EOF */
--- trunk/reactos/subsys/win32k/include/window.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/window.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -5,8 +5,6 @@
struct _WINDOW_OBJECT;
typedef struct _WINDOW_OBJECT *PWINDOW_OBJECT;
-#include <windows.h>
-#include <ddk/ntddk.h>
#include <include/object.h>
#include <include/class.h>
#include <include/msgqueue.h>
--- trunk/reactos/subsys/win32k/include/winsta.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/include/winsta.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,10 +1,6 @@
#ifndef _WIN32K_WINSTA_H
#define _WIN32K_WINSTA_H
-#include <windows.h>
-#include <ddk/ntddk.h>
-#include <internal/ex.h>
-#include <internal/ps.h>
#include "msgqueue.h"
#define WINSTA_ROOT_NAME L"\\Windows\\WindowStations"
@@ -14,6 +10,42 @@
#define WSS_LOCKED (1)
#define WSS_NOINTERACTIVE (2)
+typedef enum
+{
+ wmCenter = 0,
+ wmTile,
+ wmStretch
+} WALLPAPER_MODE;
+
+typedef struct _WINSTATION_OBJECT
+{
+ PVOID SharedHeap; /* points to kmode memory! */
+
+ CSHORT Type;
+ CSHORT Size;
+ KSPIN_LOCK Lock;
+ UNICODE_STRING Name;
+ LIST_ENTRY DesktopListHead;
+ PRTL_ATOM_TABLE AtomTable;
+ PVOID HandleTable;
+ HANDLE SystemMenuTemplate;
+ PVOID SystemCursor;
+ UINT CaretBlinkRate;
+ HANDLE ShellWindow;
+ HANDLE ShellListView;
+
+ /* Wallpaper */
+ HANDLE hbmWallpaper;
+ ULONG cxWallpaper, cyWallpaper;
+ WALLPAPER_MODE WallpaperMode;
+
+ ULONG Flags;
+ struct _DESKTOP_OBJECT* ActiveDesktop;
+ /* FIXME: Clipboard */
+ LIST_ENTRY HotKeyListHead;
+ FAST_MUTEX HotKeyListLock;
+} WINSTATION_OBJECT, *PWINSTATION_OBJECT;
+
extern WINSTATION_OBJECT *InputWindowStation;
extern PW32PROCESS LogonProcess;
--- trunk/reactos/subsys/win32k/main/dllmain.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/main/dllmain.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -20,7 +20,9 @@
*
* Entry Point for win32k.sys
*/
+#include <win32k/ntddraw.h> /* FIXME: FIX THIS! */
#include <w32k.h>
+#include <include/napi.h>
#define NDEBUG
#include <win32k/debug1.h>
--- trunk/reactos/subsys/win32k/main/svctabm.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/main/svctabm.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,56 +0,0 @@
-/*
- * ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/*
- * ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id$
- *
- * Entry Point for win32k.sys
- */
-
-#undef WIN32_LEAN_AND_MEAN
-#define WIN32_NO_STATUS
-#include <windows.h>
-#define NTOS_MODE_KERNEL
-#include <ntos.h>
-#include <win32k/ntddraw.h>
-#include <ddk/winddi.h>
-#include <win32k/win32k.h>
-
-/*
- * NOTE: the table is actually in the file ./svctab.c,
- * generated by iface/addsys/mktab.c + w32ksvc.db
- */
-#include "svctab.c"
-
--- trunk/reactos/subsys/win32k/misc/driver.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/misc/driver.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -74,7 +74,7 @@
{
static WCHAR DefaultPath[] = L"\\SystemRoot\\System32\\";
static WCHAR DefaultExtension[] = L".DLL";
- SYSTEM_LOAD_IMAGE GdiDriverInfo;
+ SYSTEM_GDI_DRIVER_INFORMATION GdiDriverInfo;
GRAPHICS_DRIVER *Driver = DriverList;
NTSTATUS Status;
WCHAR *FullName;
@@ -140,8 +140,8 @@
}
/* If not, then load it */
- RtlInitUnicodeString (&GdiDriverInfo.ModuleName, (LPWSTR)FullName);
- Status = ZwSetSystemInformation (SystemLoadImage, &GdiDriverInfo, sizeof(SYSTEM_LOAD_IMAGE));
+ RtlInitUnicodeString (&GdiDriverInfo.DriverName, (LPWSTR)FullName);
+ Status = ZwSetSystemInformation (SystemLoadGdiDriverInformation, &GdiDriverInfo, sizeof(SYSTEM_GDI_DRIVER_INFORMATION));
ExFreePool(FullName);
if (!NT_SUCCESS(Status)) return NULL;
--- trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -8,10 +8,11 @@
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
-
+/* FIXME: FOR THE LOVE OF GOD SOMEONE PLEASE FIX THIS FUCKFEST */
#include <ddk/ntddk.h>
#include <win32k/ntddraw.h>
#include <ddk/winddi.h>
+#include <w32k.h>
#include <win32k/win32k.h>
#include <include/intddraw.h>
#include <win32k/gdiobj.h>
--- trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -8,9 +8,11 @@
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
+/* FIXME: FOR THE LOVE OF GOD SOMEONE PLEASE FIX THIS FUCKFEST */
#include <ddk/ntddk.h>
#include <win32k/ntddraw.h>
#include <ddk/winddi.h>
+#include <w32k.h>
#include <win32k/win32k.h>
#define NDEBUG
--- trunk/reactos/subsys/win32k/ntuser/csr.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/ntuser/csr.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -58,7 +58,7 @@
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
- KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
+ KeAttachProcess(&CsrProcess->Pcb);
}
Status = ZwRequestWaitReplyPort(WindowsApiPort,
&Request->Header,
@@ -132,7 +132,7 @@
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
- KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
+ KeAttachProcess(&CsrProcess->Pcb);
}
Status = ZwClose(Handle);
--- trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -30,19 +30,6 @@
/* INCLUDES ******************************************************************/
#include <w32k.h>
-#if 0
-/* not yet defined in w32api... */
-NTSTATUS STDCALL
-ObFindHandleForObject(IN PEPROCESS Process,
- IN PVOID Object,
- IN POBJECT_TYPE ObjectType,
- IN POBJECT_HANDLE_INFORMATION HandleInformation,
- OUT PHANDLE Handle);
-#else
-#define ObFindHandleForObject(Process, Object, ObjectType, HandleInformation, Handle) \
- (STATUS_UNSUCCESSFUL)
-#endif
-
/* GLOBALS *******************************************************************/
/* Currently active desktop */
@@ -1359,7 +1346,7 @@
may be a bit safer (e.g. when the desktop is being destroyed */
/* switch into the context of the thread we're trying to get the desktop from,
so we can use the handle */
- KeAttachProcess(EPROCESS_TO_KPROCESS(Thread->ThreadsProcess));
+ KeAttachProcess(&Thread->ThreadsProcess->Pcb);
Status = ObReferenceObjectByHandle(hThreadDesktop,
GENERIC_ALL,
ExDesktopObjectType,
--- trunk/reactos/subsys/win32k/ntuser/menu.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/ntuser/menu.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1250,7 +1250,7 @@
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
- KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
+ KeAttachProcess(&Process->Pcb);
}
IntLockProcessMenus(Win32Process);
--- trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-06-25 20:05:56 UTC (rev 16271)
@@ -22,27 +22,10 @@
* $Id$
*/
#include <w32k.h>
-#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
-#include <pseh.h>
-
-#ifdef __USE_W32API
-/* F*(&#$ header mess!!!! */
-HANDLE
-STDCALL PsGetProcessId(
- PEPROCESS Process
- );
-/* ditto */
-ULONG STDCALL
-KeRosGetStackFrames ( PULONG Frames, ULONG FrameCount );
-#endif /* __USE_W32API */
-
-
-
-
#define GDI_ENTRY_TO_INDEX(ht, e) \
(((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY))
#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \
@@ -656,7 +639,7 @@
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
- KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
+ KeAttachProcess(&Process->Pcb);
}
W32Process = (PW32PROCESS)Process->Win32Process;
ASSERT(W32Process);
--- trunk/reactos/subsys/win32k/w32k.h 2005-06-25 18:18:01 UTC (rev 16270)
+++ trunk/reactos/subsys/win32k/w32k.h 2005-06-25 20:05:56 UTC (rev 16271)
@@ -1,92 +1,56 @@
/*
- * Precompiled headers for win32k.sys
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Graphics Subsystem
+ * FILE: subsys/win32k/w32k.h
+ * PURPOSE: Main Win32K Header
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
+/* INCLUDES ******************************************************************/
+
+/* We are Win32K */
#define __WIN32K__
-#define NTOS_MODE_KERNEL
-#include <malloc.h>
-#include <pseh.h>
-
+/* ReactOS Config */
#include <roscfg.h>
-#include <roskrnl.h>
-#include <ddk/winddi.h>
+/* DDK/NDK/SDK Headers */
#include <ddk/ntddk.h>
+#include <ddk/ntifs.h>
+#include <ddk/winddi.h>
#include <ddk/ntddmou.h>
+#include <windows.h> /* FIXME ? */
+#include <windowsx.h> /* FIXME ? */
+#include <ndk/ntndk.h>
+#include <napi/win32.h> /* FIXME */
-#include <win32k/win32k.h>
-#include <win32k/callback.h>
-#include <win32k/caret.h>
-#include <csrss/csrss.h>
+/* FIXME: ReactOS will be R-Rated if I really write what I'm about to */
+NTSTATUS
+STDCALL
+MmCopyFromCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
+NTSTATUS
+STDCALL
+MmCopyToCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
-#include <internal/ntoskrnl.h>
-#include <internal/mm.h>
-#include <internal/ke.h>
-#include <internal/ob.h>
-#include <internal/safe.h>
-#include <internal/ps.h>
+/* SEH Support with PSEH */
+#include <pseh.h>
-#include <napi/win32.h>
-#include <ntos.h>
-#include <math.h>
-#include <float.h>
-#include <windows.h>
-#include <windowsx.h>
+/* CSRSS Header */
+#include <csrss/csrss.h>
+/* FIXME: ROSRTL */
#include <rosrtl/string.h>
-#include <include/ssec.h>
-#include <include/accelerator.h>
-#include <include/callback.h>
-#include <include/caret.h>
-#include <include/class.h>
-#include <include/cleanup.h>
-#include <include/clipboard.h>
[truncated at 1000 lines; 94 more skipped]