X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0240e8b1aa935d43689b0b8ec36de3c06c1a4758..d6c9c1b71e069396bbe3850862de9aa10e6812e0:/src/mac/xpm/rgbtab.h diff --git a/src/mac/xpm/rgbtab.h b/src/mac/xpm/rgbtab.h index 717dfe4947..71ea23e2de 100644 --- a/src/mac/xpm/rgbtab.h +++ b/src/mac/xpm/rgbtab.h @@ -40,7 +40,7 @@ typedef struct { char *name; - unsigned long rgb; /* it's unsigned long */ + RGBColor rgb; /* it's unsigned long */ } rgbRecord; /* @@ -50,10 +50,10 @@ typedef struct { #ifdef FOR_MSW #define myRGB(r,g,b) RGB(r,g,b) /* MSW has this macro */ #else -#define myRGB(r,g,b)((r<<16)+(g<<8)+(b)) -#define GetRValue(c) ((((c&0x00FF0000)>>16)<<8)+((c&0x00FF0000)>>16)) -#define GetGValue(c) ((((c&0x0000FF00)>>8)<<8)+((c&0x0000FF00)>>8)) -#define GetBValue(c) (((c&0x000000FF)<<8)+(c&0x000000FF)) +#define myRGB(r,g,b) { ((r) << 8) + (r) , ((g) << 8) + (g), ((b) << 8) + (b) } +#define GetRValue(c) ((c).red) +#define GetGValue(c) ((c).green) +#define GetBValue(c) ((c).blue) #endif static rgbRecord theRGBRecords[] =