616 |
|
|
617 |
Lisp_Object Vimage_types; |
Lisp_Object Vimage_types; |
618 |
|
|
619 |
|
/* An alist of image types and libraries that implement the type. */ |
620 |
|
|
621 |
|
Lisp_Object Vimage_library_alist; |
622 |
|
|
623 |
/* Cache for delayed-loading image types. */ |
/* Cache for delayed-loading image types. */ |
624 |
|
|
625 |
static Lisp_Object Vimage_type_cache; |
static Lisp_Object Vimage_type_cache; |
700 |
struct image_type *type; |
struct image_type *type; |
701 |
|
|
702 |
/* We must initialize the image-type if it hasn't been already. */ |
/* We must initialize the image-type if it hasn't been already. */ |
703 |
if (NILP (Finit_image_library (symbol, Qnil))) |
if (NILP (Finit_image_library (symbol, Vimage_library_alist))) |
704 |
return 0; /* unimplemented */ |
return 0; /* unimplemented */ |
705 |
|
|
706 |
for (type = image_types; type; type = type->next) |
for (type = image_types; type; type = type->next) |
7989 |
void |
void |
7990 |
syms_of_image () |
syms_of_image () |
7991 |
{ |
{ |
7992 |
|
extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ |
7993 |
|
|
7994 |
/* Must be defined now becase we're going to update it below, while |
/* Must be defined now becase we're going to update it below, while |
7995 |
defining the supported image types. */ |
defining the supported image types. */ |
7996 |
DEFVAR_LISP ("image-types", &Vimage_types, |
DEFVAR_LISP ("image-types", &Vimage_types, |
7999 |
To check whether it is really supported, use `image-type-available-p'. */); |
To check whether it is really supported, use `image-type-available-p'. */); |
8000 |
Vimage_types = Qnil; |
Vimage_types = Qnil; |
8001 |
|
|
8002 |
|
DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, |
8003 |
|
doc: /* Alist of image types vs external libraries needed to display them. |
8004 |
|
|
8005 |
|
Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol |
8006 |
|
representing a supported image type, and the rest are strings giving |
8007 |
|
alternate filenames for the corresponding external libraries. |
8008 |
|
|
8009 |
|
Emacs tries to load the libraries in the order they appear on the |
8010 |
|
list; if none is loaded, the running session of Emacs won't |
8011 |
|
support the image type. Types 'pbm and 'xbm don't need to be |
8012 |
|
listed; they're always supported. */); |
8013 |
|
Vimage_library_alist = Qnil; |
8014 |
|
Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); |
8015 |
|
|
8016 |
Vimage_type_cache = Qnil; |
Vimage_type_cache = Qnil; |
8017 |
staticpro (&Vimage_type_cache); |
staticpro (&Vimage_type_cache); |
8018 |
|
|