changeset 80548:7936a770db7a

(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.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Fri, 02 May 2008 09:39:31 +0000
parents 06b5be2596c3
children 53a1e0dd23cc
files src/macterm.h
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macterm.h	Fri May 02 09:39:23 2008 +0000
+++ b/src/macterm.h	Fri May 02 09:39:31 2008 +0000
@@ -25,8 +25,10 @@
 #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 @@
 #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 *));