From 12e465be82aca843dd8785e37ae328ef618ce74e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 25 Mar 2015 22:32:06 +0000 Subject: [PATCH] [WIN32SS/INCLUDE] - Add ntwin32.h, move declaration of PTHREADINFO, PPROCESSINFO and W32CLIENTINFO there - Avoid language extensions that are not C++ compatible - Avoid dependenence to PTHREADINFO/PPROCESSINFO in ntuser.h and use incomplete types instead - Move duplicate definition of PATRECT from ntusrtyp.h to user32.h private header svn path=/trunk/; revision=66888 --- reactos/win32ss/include/ntgdityp.h | 37 ++++++-------------- reactos/win32ss/include/ntuser.h | 22 ++++++------ reactos/win32ss/include/ntusrtyp.h | 10 ++---- reactos/win32ss/user/user32/include/user32.h | 7 ++++ 4 files changed, 31 insertions(+), 45 deletions(-) diff --git a/reactos/win32ss/include/ntgdityp.h b/reactos/win32ss/include/ntgdityp.h index 6491211c6dc..4d80d58f54e 100644 --- a/reactos/win32ss/include/ntgdityp.h +++ b/reactos/win32ss/include/ntgdityp.h @@ -11,6 +11,8 @@ #ifndef _NTGDITYP_ #define _NTGDITYP_ +#include "ntwin32.h" + /* ENUMERATIONS **************************************************************/ typedef enum _ARCTYPE @@ -436,9 +438,7 @@ typedef struct _CFONT DWORD dwCFCount; } CFONT, *PCFONT; -// -// GDI Batch structures. -// +/* GDI Batch structures. */ typedef struct _GDIBATCHHDR { SHORT Size; @@ -464,24 +464,13 @@ typedef struct _GDIBSPATBLT ULONG ulBrushClr; } GDIBSPATBLT, *PGDIBSPATBLT; -#ifndef _NTUSRTYP_ +/* FIXME: this should go to some "public" GDI32 header */ typedef struct _PATRECT { RECT r; HBRUSH hBrush; } PATRECT, * PPATRECT; -#endif -#ifndef __WIN32K_NTUSER_H -typedef struct _W32CLIENTINFO -{ - ULONG CI_flags; - ULONG cSpins; - ULONG ulWindowsVersion; - ULONG ulAppCompatFlags; - ULONG ulAppCompatFlags2; - ULONG W32ClientInfo[57]; -} W32CLIENTINFO, *PW32CLIENTINFO; -#endif + typedef struct _GDIBSPPATBLT { GDIBATCHHDR gbHdr; @@ -539,26 +528,20 @@ typedef struct _GDIBSEXTSELCLPRGN { GDIBATCHHDR gbHdr; int fnMode; - RECTL; + RECTL rcl; } GDIBSEXTSELCLPRGN, *PGDIBSEXTSELCLPRGN; -// -// Use with GdiBCSelObj, GdiBCDelObj and GdiBCDelRgn. + +/* Use with GdiBCSelObj, GdiBCDelObj and GdiBCDelRgn. */ typedef struct _GDIBSOBJECT { GDIBATCHHDR gbHdr; HGDIOBJ hgdiobj; } GDIBSOBJECT, *PGDIBSOBJECT; -// -// Declarations missing in ddk/winddi.h -// +/* Declaration missing in ddk/winddi.h */ typedef VOID (APIENTRY *PFN_DrvMovePanning)(LONG, LONG, FLONG); -//typedef BOOL (APIENTRY *PFN_DrvOffset)(SURFOBJ*, LONG, LONG, FLONG); - -// -// Most of these are defined in ddk/winddi.h -// +/* Most of these are defined in ddk/winddi.h */ typedef struct _DRIVER_FUNCTIONS { PFN_DrvEnablePDEV EnablePDEV; diff --git a/reactos/win32ss/include/ntuser.h b/reactos/win32ss/include/ntuser.h index ef6d5ae4cf1..11994f3ff4a 100644 --- a/reactos/win32ss/include/ntuser.h +++ b/reactos/win32ss/include/ntuser.h @@ -1,8 +1,8 @@ #ifndef __WIN32K_NTUSER_H #define __WIN32K_NTUSER_H -typedef struct _PROCESSINFO *PPROCESSINFO; -typedef struct _THREADINFO *PTHREADINFO; +struct _PROCESSINFO; +struct _THREADINFO; struct _DESKTOP; struct _WND; struct tagPOPUPMENU; @@ -21,8 +21,8 @@ typedef struct _USER_HANDLE_ENTRY union { PVOID pi; - PTHREADINFO pti; /* pointer to Win32ThreadInfo */ - PPROCESSINFO ppi; /* pointer to W32ProcessInfo */ + struct _THREADINFO *pti; /* pointer to Win32ThreadInfo */ + struct _PROCESSINFO *ppi; /* pointer to W32ProcessInfo */ }; unsigned char type; /* object type (0 if free) */ unsigned char flags; @@ -141,7 +141,7 @@ typedef struct _DESKTOPINFO HWND hShellWindow; struct _WND *spwndShell; - PPROCESSINFO ppiShellProcess; + struct _PROCESSINFO *ppiShellProcess; union { @@ -178,7 +178,7 @@ typedef struct _HEAD typedef struct _THROBJHEAD { HEAD; - PTHREADINFO pti; + struct _THREADINFO *pti; } THROBJHEAD, *PTHROBJHEAD; typedef struct _THRDESKHEAD @@ -200,7 +200,7 @@ typedef struct _PROCMARKHEAD { HEAD; ULONG hTaskWow; - PPROCESSINFO ppi; + struct _PROCESSINFO *ppi; } PROCMARKHEAD, *PPROCMARKHEAD; #define UserHMGetHandle(obj) ((obj)->head.h) @@ -218,7 +218,7 @@ typedef struct tagHOOK ULONG_PTR offPfn; ULONG flags; /* Some internal flags */ INT ihmod; - PTHREADINFO ptiHooked; + struct _THREADINFO *ptiHooked; struct _DESKTOP *rpdesk; /* ReactOS */ LIST_ENTRY Chain; /* Hook chain entry */ @@ -309,7 +309,7 @@ typedef struct _CLIENTINFO LPDWORD lpdwRegisteredClasses; ULONG Win32ClientInfo3[26]; /* It's just a pointer reference not to be used w the structure in user space. */ - PPROCESSINFO ppi; + struct _PROCESSINFO *ppi; } CLIENTINFO, *PCLIENTINFO; /* Make sure it fits into the TEB */ @@ -1032,8 +1032,8 @@ typedef struct _BROADCASTPARM LUID luid; } BROADCASTPARM, *PBROADCASTPARM; -PTHREADINFO GetW32ThreadInfo(VOID); -PPROCESSINFO GetW32ProcessInfo(VOID); +struct _THREADINFO *GetW32ThreadInfo(VOID); +struct _PROCESSINFO *GetW32ProcessInfo(VOID); typedef struct _WNDMSG { diff --git a/reactos/win32ss/include/ntusrtyp.h b/reactos/win32ss/include/ntusrtyp.h index d686fe0755e..038a6895b73 100644 --- a/reactos/win32ss/include/ntusrtyp.h +++ b/reactos/win32ss/include/ntusrtyp.h @@ -11,16 +11,12 @@ #ifndef _NTUSRTYP_ #define _NTUSRTYP_ +#include + /* ENUMERATIONS **************************************************************/ /* TYPES *********************************************************************/ -typedef struct _PATRECT -{ - RECT r; - HBRUSH hBrush; -} PATRECT, * PPATRECT; - /* Bitfields for UserpreferencesMask SPI_ values (with defaults) */ /* See also http://technet.microsoft.com/nl-nl/library/cc957204(en-us).aspx */ typedef struct { @@ -88,7 +84,7 @@ typedef struct typedef struct { union - { + { ICONRESDIR icon; CURSORRESDIR cursor; } ResInfo; diff --git a/reactos/win32ss/user/user32/include/user32.h b/reactos/win32ss/user/user32/include/user32.h index 6a4dc33c595..5ac48329ff7 100644 --- a/reactos/win32ss/user/user32/include/user32.h +++ b/reactos/win32ss/user/user32/include/user32.h @@ -61,4 +61,11 @@ /* User macros */ #include "user_x.h" +/* FIXME: this should be in a "public" GDI32 header */ +typedef struct _PATRECT +{ + RECT r; + HBRUSH hBrush; +} PATRECT, * PPATRECT; + #endif /* _USER32_PCH_ */