+
+// WIN32 graphics types for OS/2 GPI
+
+// RGB under OS2 is more like a PALETTEENTRY struct under Windows so we need a real RGB def
+#define OS2RGB(r,g,b) ((DWORD ((BYTE) (r) | ((WORD) (g) << 8)) | (((DWORD)(BYTE)(b)) << 16)))
+
+typedef unsigned long COLORREF;
+#define GetBValue(rgb) ((BYTE)((rgb) >> 16))
+#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
+#define GetRValue(rgb) ((BYTE)(rgb))
+#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
+#define PALETTERGB(r,g,b) (0x02000000 | OS2RGB(r,g,b))
+// OS2's RGB/RGB2 is backwards from this
+typedef struct tagPALETTEENTRY
+{
+ char bRed;
+ char bGreen;
+ char bBlue;
+ char bFlags;
+} PALETTEENTRY;
+typedef struct tagLOGPALETTE
+{
+ WORD palVersion;
+ WORD palNumentries;
+ WORD PALETTEENTRY[1];
+} LOGPALETTE;
+#endif //__WXPM__