]> git.eshelyaron.com Git - emacs.git/commitdiff
[HAVE_CARBON && HAVE_AVAILABILITYMACROS_H]:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 2 May 2008 09:40:19 +0000 (09:40 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 2 May 2008 09:40:19 +0000 (09:40 +0000)
Include AvailabilityMacros.h.
(USE_MAC_IMAGE_IO, LIBS_IMAGE) [HAVE_CARBON]: New defines.
(LIBS_CARBON) [HAVE_CARBON]: Use LIBS_IMAGE.

src/ChangeLog
src/s/darwin.h

index 94a8862ed10d13297ba2d0f2069b9751ed120379..0849e9ee4b750f93355d76a7463a0058c655e1e7 100644 (file)
@@ -1,3 +1,43 @@
+2008-05-02  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * config.in: Regenerate.
+
+       * image.c (PIX_MASK_DRAW, PIX_MASK_RETAIN) [USE_MAC_IMAGE_IO]:
+       New definitions for Image I/O support.
+       (XGetImage, XPutPixel, XGetPixel, XDestroyImage)
+       (mac_create_cg_image_from_image, x_create_x_image_and_pixmap)
+       [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
+       (mac_data_provider_release_data, image_load_image_io)
+       [USE_MAC_IMAGE_IO]: New functions.
+       (CGImageCreateWithPNGDataProviderProcType) [MAC_OSX]: Remove typedef.
+       (MyCGImageCreateWithPNGDataProvider) [MAC_OSX]: Remove variable.
+       (init_image_func_pointer) [MAC_OSX]: Remove function.
+       (image_load_quartz2d) [MAC_OSX]: Check availability of
+       CGImageCreateWithPNGDataProvider at compile time.
+       Use lowercase `false' for boolean constant.
+       (png_load, jpeg_load, tiff_load, gif_load) [USE_MAC_IMAGE_IO]:
+       Use image_load_image_io.
+       (png_load) [!USE_MAC_IMAGE_IO && MAC_OSX]:
+       Don't check MyCGImageCreateWithPNGDataProvider.
+       (init_image) [MAC_OSX && TARGET_API_MAC_CARBON]:
+       Don't call init_image_func_pointer.
+
+       * macgui.h (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
+
+       * macterm.c (mac_cg_color_space_rgb) [USE_CG_DRAWING]:
+       Make variable non-static.
+       (XDrawLine, XCreatePixmap, XCreatePixmapFromBitmapData, XFreePixmap)
+       [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
+
+       * macterm.h (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.
+
+       * s/darwin.h [HAVE_CARBON && HAVE_AVAILABILITYMACROS_H]:
+       Include AvailabilityMacros.h.
+       (USE_MAC_IMAGE_IO, LIBS_IMAGE) [HAVE_CARBON]: New defines.
+       (LIBS_CARBON) [HAVE_CARBON]: Use LIBS_IMAGE.
+
 2008-04-25  Chip Coldwell <coldwell@redhat.com>
 
        * m/sparc.h: Additional redefinitions for GNU/Linux.
index ba784805ea7b1c6861252818d2cc37d53de470c3..2017bd2e6cf7dde8f18fc7a96175a05816a08893 100644 (file)
@@ -262,9 +262,31 @@ Boston, MA 02110-1301, USA.  */
 /* Indicate that we are compiling for Mac OS X.  */
 #define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
 
+#ifdef HAVE_CARBON
+
+#ifdef HAVE_AVAILABILITYMACROS_H
+#include <AvailabilityMacros.h>
+#endif
+
+/* Whether to use the Image I/O framework for reading images.  */
+#ifndef USE_MAC_IMAGE_IO
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1040 || MAC_OS_X_VERSION_MIN_REQUIRED < 1020)
+#define USE_MAC_IMAGE_IO 1
+#endif
+#endif
+
+/* If the Image I/O framework is not used, fall back on QuickTime.  */
+#if USE_MAC_IMAGE_IO
+#define LIBS_IMAGE
+#else
+#define LIBS_IMAGE -framework QuickTime
+#endif
+
+#endif /* HAVE_CARBON */
+
 /* Link in the Carbon lib. */
 #ifdef HAVE_CARBON
-#define LIBS_CARBON -framework Carbon -framework QuickTime
+#define LIBS_CARBON -framework Carbon LIBS_IMAGE
 #else
 #define LIBS_CARBON
 #endif