- 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.

svn path=/trunk/; revision=66890
This commit is contained in:
Timo Kreuzer 2015-03-25 22:32:35 +00:00
parent 8123f0d8b5
commit 20d7540340
4 changed files with 49 additions and 24 deletions

View file

@ -67,13 +67,16 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#include <pseh/pseh2.h> #include <pseh/pseh2.h>
/* Public Win32K headers */ /* 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/ntusrtyp.h>
#include <include/ntuser.h> #include <include/ntuser.h>
#include <include/ntgdityp.h> #include <include/callback.h>
#include <include/ntgdibad.h> #endif // __cplusplus
#include <include/ntgdihdl.h>
#include <ntgdi.h>
/* Undocumented user definitions */ /* Undocumented user definitions */
#include <undocuser.h> #include <undocuser.h>
@ -82,6 +85,9 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#define InterlockedIncrementUL(Value) InterlockedIncrement((PLONG)Value)
#define InterlockedDecrementUL(Value) InterlockedDecrement((PLONG)Value)
/* Internal Win32K header */ /* Internal Win32K header */
#include "win32kp.h" #include "win32kp.h"

View file

@ -49,7 +49,7 @@ typedef enum _QS_ROS_TYPES
extern BOOL ClientPfnInit; extern BOOL ClientPfnInit;
extern HINSTANCE hModClient; extern HINSTANCE hModClient;
extern HANDLE hModuleWin; // This Win32k Instance. extern HANDLE hModuleWin; // This Win32k Instance.
extern PCLS SystemClassList; extern struct _CLS *SystemClassList;
extern BOOL RegisteredSysClasses; extern BOOL RegisteredSysClasses;
typedef struct tagMENUSTATE MENUSTATE, *PMENUSTATE; typedef struct tagMENUSTATE MENUSTATE, *PMENUSTATE;
@ -77,17 +77,22 @@ typedef struct _W32THREAD
PVOID pUMPDObj; PVOID pUMPDObj;
} W32THREAD, *PW32THREAD; } W32THREAD, *PW32THREAD;
#ifdef __cplusplus
typedef struct _THREADINFO : _W32THREAD
{
#else
typedef struct _THREADINFO typedef struct _THREADINFO
{ {
W32THREAD; W32THREAD;
#endif
PTL ptl; PTL ptl;
PPROCESSINFO ppi; PPROCESSINFO ppi;
struct _USER_MESSAGE_QUEUE* MessageQueue; struct _USER_MESSAGE_QUEUE* MessageQueue;
struct tagKL* KeyboardLayout; struct tagKL* KeyboardLayout;
PCLIENTTHREADINFO pcti; struct _CLIENTTHREADINFO * pcti;
struct _DESKTOP* rpdesk; struct _DESKTOP* rpdesk;
PDESKTOPINFO pDeskInfo; struct _DESKTOPINFO * pDeskInfo;
PCLIENTINFO pClientInfo; struct _CLIENTINFO * pClientInfo;
FLONG TIF_flags; FLONG TIF_flags;
PUNICODE_STRING pstrAppName; PUNICODE_STRING pstrAppName;
/* Messages that are currently dispatched to other threads */ /* Messages that are currently dispatched to other threads */
@ -112,7 +117,7 @@ typedef struct _THREADINFO
struct _USER_MESSAGE_QUEUE* pqAttach; struct _USER_MESSAGE_QUEUE* pqAttach;
PTHREADINFO ptiSibling; PTHREADINFO ptiSibling;
ULONG fsHooks; ULONG fsHooks;
PHOOK sphkCurrent; struct tagHOOK * sphkCurrent;
LPARAM lParamHkCurrent; LPARAM lParamHkCurrent;
WPARAM wParamHkCurrent; WPARAM wParamHkCurrent;
struct tagSBTRACK* pSBTrack; struct tagSBTRACK* pSBTrack;
@ -130,6 +135,7 @@ typedef struct _THREADINFO
WCHAR wchInjected; WCHAR wchInjected;
UINT cWindows; UINT cWindows;
UINT cVisWindows; UINT cVisWindows;
#ifndef __cplusplus /// FIXME!
LIST_ENTRY aphkStart[NB_HOOKS]; LIST_ENTRY aphkStart[NB_HOOKS];
CLIENTTHREADINFO cti; // Used only when no Desktop or pcti NULL. CLIENTTHREADINFO cti; // Used only when no Desktop or pcti NULL.
@ -151,7 +157,7 @@ typedef struct _THREADINFO
#if DBG #if DBG
USHORT acExclusiveLockCount[GDIObjTypeTotal + 1]; USHORT acExclusiveLockCount[GDIObjTypeTotal + 1];
#endif #endif
#endif // __cplusplus
} THREADINFO; } THREADINFO;
#include <poppack.h> #include <poppack.h>
@ -234,14 +240,19 @@ typedef struct _W32PROCESS
#define CLIBS 32 #define CLIBS 32
#ifdef __cplusplus
typedef struct _PROCESSINFO : _W32PROCESS
{
#else
typedef struct _PROCESSINFO typedef struct _PROCESSINFO
{ {
W32PROCESS; W32PROCESS;
#endif
PTHREADINFO ptiList; PTHREADINFO ptiList;
PTHREADINFO ptiMainThread; PTHREADINFO ptiMainThread;
struct _DESKTOP* rpdeskStartup; struct _DESKTOP* rpdeskStartup;
PCLS pclsPrivateList; struct _CLS *pclsPrivateList;
PCLS pclsPublicList; struct _CLS *pclsPublicList;
PPROCESSINFO ppiNext; PPROCESSINFO ppiNext;
INT cThreads; INT cThreads;
HDESK hdeskStartup; HDESK hdeskStartup;
@ -276,8 +287,10 @@ typedef struct _PROCESSINFO
#if DBG #if DBG
BYTE DbgChannelLevel[DbgChCount]; BYTE DbgChannelLevel[DbgChCount];
#ifndef __cplusplus
DWORD DbgHandleCount[TYPE_CTYPES]; DWORD DbgHandleCount[TYPE_CTYPES];
#endif #endif // __cplusplus
#endif // DBG
} PROCESSINFO; } PROCESSINFO;
#if DBG #if DBG

View file

@ -3,3 +3,8 @@
/* Headers that shouldn't be precompiled due to GCC bugs */ /* Headers that shouldn't be precompiled due to GCC bugs */
/* Probe and capture */ /* Probe and capture */
#include <reactos/probe.h> #include <reactos/probe.h>
#ifdef __cplusplus
#undef NULL
#define NULL nullptr
#endif

View file

@ -27,18 +27,10 @@
#define DBG_ENABLE_EVENT_LOGGING 0 #define DBG_ENABLE_EVENT_LOGGING 0
#define DBG_ENABLE_SERVICE_HOOKS 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"
#include "gdi/ntgdi/rect.h"
#include "gdi/ntgdi/misc.h"
/* Internal NtGdi Headers */ /* Internal NtGdi Headers */
typedef struct _DC *PDC; typedef struct _DC *PDC;
#include "gdi/ntgdi/rect.h"
#include "gdi/ntgdi/misc.h"
#include "gdi/ntgdi/gdiobj.h" #include "gdi/ntgdi/gdiobj.h"
#include "gdi/ntgdi/palette.h" #include "gdi/ntgdi/palette.h"
#include "gdi/eng/surface.h" #include "gdi/eng/surface.h"
@ -74,7 +66,10 @@ typedef struct _DC *PDC;
#include "reactx/ntddraw/intddraw.h" #include "reactx/ntddraw/intddraw.h"
/* Internal NtUser Headers */ /* Internal NtUser Headers */
#include "user/ntuser/win32kdebug.h"
#include "user/ntuser/win32.h" #include "user/ntuser/win32.h"
#include "user/ntuser/tags.h"
#ifndef __cplusplus
#include "user/ntuser/usrheap.h" #include "user/ntuser/usrheap.h"
#include "user/ntuser/object.h" #include "user/ntuser/object.h"
#include "user/ntuser/ntuser.h" #include "user/ntuser/ntuser.h"
@ -106,5 +101,11 @@ typedef struct _DC *PDC;
#include "user/ntuser/scroll.h" #include "user/ntuser/scroll.h"
#include "user/ntuser/winpos.h" #include "user/ntuser/winpos.h"
#include "user/ntuser/callback.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" #include "gdi/ntgdi/gdidebug.h"