/* Functions for image support on window system.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object specified_file, *file;
FSSpec *fss;
{
-#if MAC_OSX
- FSRef fsr;
-#endif
OSErr err;
+ AEDesc desc;
*file = x_find_image_file (specified_file);
if (!STRINGP (*file))
return fnfErr; /* file or directory not found;
incomplete pathname */
/* Try to open the image file. */
-#if MAC_OSX
- err = FSPathMakeRef (SDATA (*file), &fsr, NULL);
+ err = AECoercePtr (TYPE_FILE_NAME, SDATA (*file),
+ SBYTES (*file), typeFSS, &desc);
if (err == noErr)
- err = FSGetCatalogInfo (&fsr, kFSCatInfoNone, NULL, NULL, fss, NULL);
+ {
+#if TARGET_API_MAC_CARBON
+ err = AEGetDescData (&desc, fss, sizeof (FSSpec));
#else
- err = posix_pathname_to_fsspec (SDATA (*file), fss);
+ *fss = *(FSSpec *)(*(desc.dataHandle));
#endif
+ AEDisposeDesc (&desc);
+ }
return err;
}
specified_file = image_spec_value (img->spec, QCfile, NULL);
specified_data = image_spec_value (img->spec, QCdata, NULL);
+ /* Animated gifs use QuickTime Movie Toolbox. So initialize it here. */
+ EnterMovies ();
+
if (NILP (specified_data))
{
/* Read from a file */
void
init_image ()
{
-#ifdef MAC_OS
- /* Animated gifs use QuickTime Movie Toolbox. So initialize it here. */
- if (!inhibit_window_system)
- EnterMovies ();
-#ifdef MAC_OSX
+#if defined (MAC_OSX) && TARGET_API_MAC_CARBON
init_image_func_pointer ();
#endif
-#endif
}
/* arch-tag: 123c2a5e-14a8-4c53-ab95-af47d7db49b9