I am currently trying to clean up our win32k headers.
The situation so far: - ntgdi.h in psdk which should be compatible to ms version of ntgdi.h from the sdk - ntgdytyp.h containing a bunch of gdi related types in include/reactos/win32k - ntgdihdl.h containing handle related types and macros in include/reactos/win32k - ntgdibad.h containing private and ms incompatible functions and structures in include/reactos/win32k - ntuser.h containing ntuser functions and types in include/reactos/win32k - ntusertyp.h containing ntuser related types in include/reactos/win32k - W32CLIENTINFO is defined in both ntusertyp.h and ntgdityp.h (less complete). - there is the PATRECT structure in ntuser.h, and if ntuser.h is not included, also in ntgdityp.h, this should be named POLYPATBLT as defined in ntgdi.h, but there is only an incomplete type without the structure definition. (IMO ms should have put this structure into wingdi.h together with PolyPatBlt, but they don't seem to want anyone use that gdi32 exported function.)
I wonder why ms put ntgdi.h into the sdk at all, as it's completely useless to user mode application writers, but well, ncie to have the prototypes ;-)
So how do we clean up this mess?
Suggestions: - when ms puts ntgdi.h into the sdk, we could also put ntuser.h there. - if we want to stay 100% compatible with sdk headers, we can add a define, like #ifdef USE_NON_SDK // put non sdk compatible but still windows compatible definitions here #endif - use a version definition, like I did with the simplecall definitions in ntuser.h to make it compatible to different windows versions - keep ntgdibad.h and create ntuserbad.h for incompatible definitions - ntgdihdl.h is used by win32k and gdi32, both also import ntgdityp.h. So I'd suggest merging that stuff into ntgdityp.h - maybe merge types into ntgdi.h and ntuser.h? Some definitions are already in there. - create win32ktypes.h and put ntuser/ntgdi shared stuff there, like W32CLIENTINFO - maybe add POLYPATBLT and PolyPatBlt() (others?) to wingdi.h inside USE_NON_SDK ifdef plus a POLYPATBLT_DEFINED
I don't think it's a problem to make our sdk headers more complete than ms ones. This might help if we don't want a header mess or extra definitions inside the .c files.
Comments appreciated.
Thanks, Timo