Author: tkreuzer
Date: Wed Mar 25 22:32:35 2015
New Revision: 66890
URL:
http://svn.reactos.org/svn/reactos?rev=66890&view=rev
Log:
[WIN32K]
- Add InterlockedIn/DecrementUL
- Define NULL to nullptr for C++ code
- Reorder includes a bit. First GDI then USER. Don't include most USER headers for C++
for now.
Modified:
trunk/reactos/win32ss/pch.h
trunk/reactos/win32ss/user/ntuser/win32.h
trunk/reactos/win32ss/win32k.h
trunk/reactos/win32ss/win32kp.h
Modified: trunk/reactos/win32ss/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/pch.h?rev=66890&am…
==============================================================================
--- trunk/reactos/win32ss/pch.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/pch.h [iso-8859-1] Wed Mar 25 22:32:35 2015
@@ -67,13 +67,16 @@
#include <pseh/pseh2.h>
/* Public Win32K headers */
-#include <include/callback.h>
+#include <include/ntgdityp.h>
+#include <ntgdi.h>
+#include <include/ntgdihdl.h>
+#include <include/ntgdibad.h>
+
+#ifndef __cplusplus
#include <include/ntusrtyp.h>
#include <include/ntuser.h>
-#include <include/ntgdityp.h>
-#include <include/ntgdibad.h>
-#include <include/ntgdihdl.h>
-#include <ntgdi.h>
+#include <include/callback.h>
+#endif // __cplusplus
/* Undocumented user definitions */
#include <undocuser.h>
@@ -82,6 +85,9 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#define InterlockedIncrementUL(Value) InterlockedIncrement((PLONG)Value)
+#define InterlockedDecrementUL(Value) InterlockedDecrement((PLONG)Value)
+
/* Internal Win32K header */
#include "win32kp.h"
Modified: trunk/reactos/win32ss/user/ntuser/win32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/win32.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] Wed Mar 25 22:32:35 2015
@@ -49,7 +49,7 @@
extern BOOL ClientPfnInit;
extern HINSTANCE hModClient;
extern HANDLE hModuleWin; // This Win32k Instance.
-extern PCLS SystemClassList;
+extern struct _CLS *SystemClassList;
extern BOOL RegisteredSysClasses;
typedef struct tagMENUSTATE MENUSTATE, *PMENUSTATE;
@@ -77,17 +77,22 @@
PVOID pUMPDObj;
} W32THREAD, *PW32THREAD;
+#ifdef __cplusplus
+typedef struct _THREADINFO : _W32THREAD
+{
+#else
typedef struct _THREADINFO
{
W32THREAD;
+#endif
PTL ptl;
PPROCESSINFO ppi;
struct _USER_MESSAGE_QUEUE* MessageQueue;
struct tagKL* KeyboardLayout;
- PCLIENTTHREADINFO pcti;
+ struct _CLIENTTHREADINFO * pcti;
struct _DESKTOP* rpdesk;
- PDESKTOPINFO pDeskInfo;
- PCLIENTINFO pClientInfo;
+ struct _DESKTOPINFO * pDeskInfo;
+ struct _CLIENTINFO * pClientInfo;
FLONG TIF_flags;
PUNICODE_STRING pstrAppName;
/* Messages that are currently dispatched to other threads */
@@ -112,7 +117,7 @@
struct _USER_MESSAGE_QUEUE* pqAttach;
PTHREADINFO ptiSibling;
ULONG fsHooks;
- PHOOK sphkCurrent;
+ struct tagHOOK * sphkCurrent;
LPARAM lParamHkCurrent;
WPARAM wParamHkCurrent;
struct tagSBTRACK* pSBTrack;
@@ -130,6 +135,7 @@
WCHAR wchInjected;
UINT cWindows;
UINT cVisWindows;
+#ifndef __cplusplus /// FIXME!
LIST_ENTRY aphkStart[NB_HOOKS];
CLIENTTHREADINFO cti; // Used only when no Desktop or pcti NULL.
@@ -151,7 +157,7 @@
#if DBG
USHORT acExclusiveLockCount[GDIObjTypeTotal + 1];
#endif
-
+#endif // __cplusplus
} THREADINFO;
#include <poppack.h>
@@ -234,14 +240,19 @@
#define CLIBS 32
+#ifdef __cplusplus
+typedef struct _PROCESSINFO : _W32PROCESS
+{
+#else
typedef struct _PROCESSINFO
{
W32PROCESS;
+#endif
PTHREADINFO ptiList;
PTHREADINFO ptiMainThread;
struct _DESKTOP* rpdeskStartup;
- PCLS pclsPrivateList;
- PCLS pclsPublicList;
+ struct _CLS *pclsPrivateList;
+ struct _CLS *pclsPublicList;
PPROCESSINFO ppiNext;
INT cThreads;
HDESK hdeskStartup;
@@ -276,8 +287,10 @@
#if DBG
BYTE DbgChannelLevel[DbgChCount];
+#ifndef __cplusplus
DWORD DbgHandleCount[TYPE_CTYPES];
-#endif
+#endif // __cplusplus
+#endif // DBG
} PROCESSINFO;
#if DBG
Modified: trunk/reactos/win32ss/win32k.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/win32k.h?rev=66890…
==============================================================================
--- trunk/reactos/win32ss/win32k.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/win32k.h [iso-8859-1] Wed Mar 25 22:32:35 2015
@@ -3,3 +3,8 @@
/* Headers that shouldn't be precompiled due to GCC bugs */
/* Probe and capture */
#include <reactos/probe.h>
+
+#ifdef __cplusplus
+#undef NULL
+#define NULL nullptr
+#endif
Modified: trunk/reactos/win32ss/win32kp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/win32kp.h?rev=6689…
==============================================================================
--- trunk/reactos/win32ss/win32kp.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/win32kp.h [iso-8859-1] Wed Mar 25 22:32:35 2015
@@ -27,18 +27,10 @@
#define DBG_ENABLE_EVENT_LOGGING 0
#define DBG_ENABLE_SERVICE_HOOKS 0
-/* CSRSS Interface */
-#include "user/ntuser/csr.h"
-
-/* Misc headers */
-#include "user/ntuser/win32kdebug.h"
-#include "user/ntuser/mmcopy.h"
-#include "user/ntuser/tags.h"
+/* Internal NtGdi Headers */
+typedef struct _DC *PDC;
#include "gdi/ntgdi/rect.h"
#include "gdi/ntgdi/misc.h"
-
-/* Internal NtGdi Headers */
-typedef struct _DC *PDC;
#include "gdi/ntgdi/gdiobj.h"
#include "gdi/ntgdi/palette.h"
#include "gdi/eng/surface.h"
@@ -74,7 +66,10 @@
#include "reactx/ntddraw/intddraw.h"
/* Internal NtUser Headers */
+#include "user/ntuser/win32kdebug.h"
#include "user/ntuser/win32.h"
+#include "user/ntuser/tags.h"
+#ifndef __cplusplus
#include "user/ntuser/usrheap.h"
#include "user/ntuser/object.h"
#include "user/ntuser/ntuser.h"
@@ -106,5 +101,11 @@
#include "user/ntuser/scroll.h"
#include "user/ntuser/winpos.h"
#include "user/ntuser/callback.h"
+#include "user/ntuser/mmcopy.h"
+
+/* CSRSS Interface */
+#include "user/ntuser/csr.h"
+
+#endif // __cplusplus
#include "gdi/ntgdi/gdidebug.h"