From: YAMAMOTO Mitsuharu Date: Fri, 2 May 2008 09:39:31 +0000 (+0000) Subject: (ARGB_TO_ULONG, ALPHA_FROM_ULONG): New macros. X-Git-Tag: emacs-pretest-22.2.90~150 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=afc09abd4d60bef38f328749d640a8eae1108a98;p=emacs.git (ARGB_TO_ULONG, ALPHA_FROM_ULONG): New macros. (RED_FROM_ULONG): Mask off higher bits. (mac_cg_color_space_rgb) [USE_MAC_IMAGE_IO]: New extern. --- diff --git a/src/macterm.h b/src/macterm.h index 56d6081c829..f263db81167 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -25,8 +25,10 @@ Boston, MA 02110-1301, USA. */ #include "frame.h" #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b)) +#define ARGB_TO_ULONG(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) -#define RED_FROM_ULONG(color) ((color) >> 16) +#define ALPHA_FROM_ULONG(color) ((color) >> 24) +#define RED_FROM_ULONG(color) (((color) >> 16) & 0xff) #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff) #define BLUE_FROM_ULONG(color) ((color) & 0xff) @@ -657,6 +659,10 @@ extern int mac_quit_char_key_p P_ ((UInt32, UInt32)); #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 +#if USE_MAC_IMAGE_IO +extern CGColorSpaceRef mac_cg_color_space_rgb; +#endif + /* Defined in macselect.c */ extern void x_clear_frame_selections P_ ((struct frame *));