wingdi.h and ntapi.h patch
"Silver Blade" <lists-JCKMKWeByS2j5a8ZAWZ3aFpr/1R2p/[email protected]> Thu, 7 Aug 2003 12:07:18 +0100
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <008501c35cd4$12c5a230$0400a8c0@mercury> |
I've been helping out the ReactOS team with the conversion over to using W32API instead of their own header files. In the process, I've found a few things which appear to be missing or incorrect in W32API. I've changed the DEVMODE structures in wingdi.h, to match the structure presented on MSDN. I've also added LPC_CONNECTION_REFUSED to ntapi.h, which I couldn't find documented anywhere, but it seemed to make sense being included. For some reason I lost the original changes I made, so there may be a few minor problems (mostly syntax-related) with the DEVMODE structures. I had to add a few semicolons to the end of structs and unions, but I think I've got it right again now. But still, someone might want to check that. -Andrew Greenwood
w32api_patch_1.patch
(application/octet-stream, 4.8 KB)
Index: winsup/w32api/include/wingdi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/wingdi.h,v
retrieving revision 1.27
diff -u -r1.27 wingdi.h
--- winsup/w32api/include/wingdi.h 5 Jun 2003 00:49:27 -0000 1.27
+++ winsup/w32api/include/wingdi.h 7 Aug 2003 10:53:20 -0000
@@ -1295,73 +1295,107 @@
SHORT caColorfulness;
SHORT caRedGreenTint;
} COLORADJUSTMENT,*LPCOLORADJUSTMENT;
-typedef struct _devicemodeA {
- BYTE dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- BYTE dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
+typedef struct _devicemodeA {
+ BYTE dmDeviceName[CCHDEVICENAME];
+ WORD dmSpecVersion;
+ WORD dmDriverVersion;
+ WORD dmSize;
+ WORD dmDriverExtra;
+ DWORD dmFields;
+ union {
+ struct {
+ short dmOrientation;
+ short dmPaperSize;
+ short dmPaperLength;
+ short dmPaperWidth;
+ short dmScale;
+ short dmCopies;
+ short dmDefaultSource;
+ short dmPrintQuality;
+ };
+ POINTL dmPosition;
+ DWORD dmDisplayOrientation;
+ DWORD dmDisplayFixedOutput;
+ };
+
+ short dmColor;
+ short dmDuplex;
+ short dmYResolution;
+ short dmTTOption;
+ short dmCollate;
+ BYTE dmFormName[CCHFORMNAME];
+ WORD dmLogPixels;
+ DWORD dmBitsPerPel;
+ DWORD dmPelsWidth;
+ DWORD dmPelsHeight;
+ union {
+ DWORD dmDisplayFlags;
+ DWORD dmNup;
+ };
+ DWORD dmDisplayFrequency;
+#if(WINVER >= 0x0400)
+ DWORD dmICMMethod;
+ DWORD dmICMIntent;
+ DWORD dmMediaType;
+ DWORD dmDitherType;
+ DWORD dmReserved1;
+ DWORD dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+ DWORD dmPanningWidth;
+ DWORD dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-typedef struct _devicemodeW {
- WCHAR dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- WCHAR dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
+typedef struct _devicemodeW {
+ WCHAR dmDeviceName[CCHDEVICENAME];
+ WORD dmSpecVersion;
+ WORD dmDriverVersion;
+ WORD dmSize;
+ WORD dmDriverExtra;
+ DWORD dmFields;
+ union {
+ struct {
+ short dmOrientation;
+ short dmPaperSize;
+ short dmPaperLength;
+ short dmPaperWidth;
+ short dmScale;
+ short dmCopies;
+ short dmDefaultSource;
+ short dmPrintQuality;
+ };
+ POINTL dmPosition;
+ DWORD dmDisplayOrientation;
+ DWORD dmDisplayFixedOutput;
+ };
+
+ short dmColor;
+ short dmDuplex;
+ short dmYResolution;
+ short dmTTOption;
+ short dmCollate;
+ WCHAR dmFormName[CCHFORMNAME];
+ WORD dmLogPixels;
+ DWORD dmBitsPerPel;
+ DWORD dmPelsWidth;
+ DWORD dmPelsHeight;
+ union {
+ DWORD dmDisplayFlags;
+ DWORD dmNup;
+ };
+ DWORD dmDisplayFrequency;
+#if(WINVER >= 0x0400)
+ DWORD dmICMMethod;
+ DWORD dmICMIntent;
+ DWORD dmMediaType;
+ DWORD dmDitherType;
+ DWORD dmReserved1;
+ DWORD dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+ DWORD dmPanningWidth;
+ DWORD dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
typedef struct tagDIBSECTION {
BITMAP dsBm;
Index: winsup/w32api/include/ddk/ntapi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/ddk/ntapi.h,v
retrieving revision 1.6
diff -u -r1.6 ntapi.h
--- winsup/w32api/include/ddk/ntapi.h 22 Jul 2003 22:21:27 -0000 1.6
+++ winsup/w32api/include/ddk/ntapi.h 7 Aug 2003 10:53:20 -0000
@@ -1952,6 +1952,7 @@
LPC_DEBUG_EVENT,
LPC_ERROR_EVENT,
LPC_CONNECTION_REQUEST,
+ LPC_CONNECTION_REFUSED,
LPC_MAXIMUM
} LPC_TYPE;