diff options
| author | Juanma Barranquero | 2004-06-14 21:11:21 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2004-06-14 21:11:21 +0000 |
| commit | da4b7798eef8e8d06df1230da023d048d7473669 (patch) | |
| tree | b23f5ae9cc47dd60b6cc2584520c3dda25374262 | |
| parent | fe34703418bc6b49b420ed30f48ad8abeaf4bc76 (diff) | |
| download | emacs-da4b7798eef8e8d06df1230da023d048d7473669.tar.gz emacs-da4b7798eef8e8d06df1230da023d048d7473669.zip | |
(Images): Document new delayed library loading, variable
`image-library-alist' and (existing but undocumented) function
`image-type-available-p'.
| -rw-r--r-- | lispref/display.texi | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/lispref/display.texi b/lispref/display.texi index 70f57632533..1f8868981b7 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -2875,8 +2875,13 @@ property of text that is displayed (@pxref{Display Property}). Like the | |||
| 2875 | @code{display} property, this feature is available starting in Emacs 21. | 2875 | @code{display} property, this feature is available starting in Emacs 21. |
| 2876 | 2876 | ||
| 2877 | Emacs can display a number of different image formats; some of them | 2877 | Emacs can display a number of different image formats; some of them |
| 2878 | are supported only if particular support libraries are installed on your | 2878 | are supported only if particular support libraries are installed on |
| 2879 | machine. The supported image formats include XBM, XPM (needing the | 2879 | your machine. In some environments, Emacs allows loading image |
| 2880 | libraries on demand; if so, the variable @code{image-library-alist} | ||
| 2881 | can be used to modify the set of known names for these dynamic | ||
| 2882 | libraries (though it is not posible to add new image formats). | ||
| 2883 | |||
| 2884 | The supported image formats include XBM, XPM (needing the | ||
| 2880 | libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing | 2885 | libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing |
| 2881 | @code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the | 2886 | @code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the |
| 2882 | @code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), | 2887 | @code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), |
| @@ -2887,10 +2892,48 @@ type symbols are @code{xbm}, @code{xpm}, @code{gif}, @code{postscript}, | |||
| 2887 | @code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}. | 2892 | @code{pbm}, @code{jpeg}, @code{tiff}, and @code{png}. |
| 2888 | 2893 | ||
| 2889 | @defvar image-types | 2894 | @defvar image-types |
| 2895 | @vindex image-types | ||
| 2890 | This variable contains a list of those image type symbols that are | 2896 | This variable contains a list of those image type symbols that are |
| 2891 | supported in the current configuration. | 2897 | potentially supported in the current configuration. |
| 2898 | @emph{Potentially} here means that Emacs knows about the image types, | ||
| 2899 | not necessarily that they can be loaded (they could depend on | ||
| 2900 | unavailable dynamic libraries, for example). | ||
| 2901 | |||
| 2902 | To know which image types are really available, use | ||
| 2903 | @code{image-type-available-p}. | ||
| 2892 | @end defvar | 2904 | @end defvar |
| 2893 | 2905 | ||
| 2906 | @defvar image-library-alist | ||
| 2907 | @vindex image-library-alist | ||
| 2908 | This in an alist of image types vs external libraries needed to | ||
| 2909 | display them. | ||
| 2910 | |||
| 2911 | Each element is a list @code{(@var{IMAGE-TYPE} @var{LIBRARY}...)}, | ||
| 2912 | where the car is a supported image format from @code{image-types}, and | ||
| 2913 | the rest are strings giving alternate filenames for the corresponding | ||
| 2914 | external libraries to load. | ||
| 2915 | |||
| 2916 | They are tried in the order they appear on the list; if none of them | ||
| 2917 | can be loaded, the running session of Emacs won't support the image | ||
| 2918 | type. No entries are needed for @code{pbm} and @code{xbm} images; | ||
| 2919 | they're always supported. | ||
| 2920 | |||
| 2921 | This variable is ignored if the image libraries are statically linked | ||
| 2922 | into Emacs. | ||
| 2923 | @end defvar | ||
| 2924 | |||
| 2925 | @defun image-type-available-p type | ||
| 2926 | @findex image-type-available-p | ||
| 2927 | |||
| 2928 | This function returns non-nil if image type TYPE is available, i.e., | ||
| 2929 | if images of this type can be loaded and displayed in Emacs. TYPE | ||
| 2930 | should be one of the types contained in @code{image-types}. | ||
| 2931 | |||
| 2932 | For image types whose support libraries are statically linked, this | ||
| 2933 | function always returns @code{t}; for other image types, it returns | ||
| 2934 | @code{t} if the dynamic library could be loaded, @code{nil} otherwise. | ||
| 2935 | @end defun | ||
| 2936 | |||
| 2894 | @menu | 2937 | @menu |
| 2895 | * Image Descriptors:: How to specify an image for use in @code{:display}. | 2938 | * Image Descriptors:: How to specify an image for use in @code{:display}. |
| 2896 | * XBM Images:: Special features for XBM format. | 2939 | * XBM Images:: Special features for XBM format. |