Mercurial > emacs
comparison src/image.c @ 109351:c8a969d13eda
merge trunk
| author | Kenichi Handa <handa@etlken> |
|---|---|
| date | Fri, 09 Jul 2010 15:55:27 +0900 |
| parents | 8cfee7d2955f |
| children | 60516122d066 |
comparison
equal
deleted
inserted
replaced
| 109350:c11d07f3d731 | 109351:c8a969d13eda |
|---|---|
| 924 doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT). | 924 doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT). |
| 925 PIXELS non-nil means return the size in pixels, otherwise return the | 925 PIXELS non-nil means return the size in pixels, otherwise return the |
| 926 size in canonical character units. | 926 size in canonical character units. |
| 927 FRAME is the frame on which the image will be displayed. FRAME nil | 927 FRAME is the frame on which the image will be displayed. FRAME nil |
| 928 or omitted means use the selected frame. */) | 928 or omitted means use the selected frame. */) |
| 929 (spec, pixels, frame) | 929 (Lisp_Object spec, Lisp_Object pixels, Lisp_Object frame) |
| 930 Lisp_Object spec, pixels, frame; | |
| 931 { | 930 { |
| 932 Lisp_Object size; | 931 Lisp_Object size; |
| 933 | 932 |
| 934 size = Qnil; | 933 size = Qnil; |
| 935 if (valid_image_p (spec)) | 934 if (valid_image_p (spec)) |
| 955 | 954 |
| 956 DEFUN ("image-mask-p", Fimage_mask_p, Simage_mask_p, 1, 2, 0, | 955 DEFUN ("image-mask-p", Fimage_mask_p, Simage_mask_p, 1, 2, 0, |
| 957 doc: /* Return t if image SPEC has a mask bitmap. | 956 doc: /* Return t if image SPEC has a mask bitmap. |
| 958 FRAME is the frame on which the image will be displayed. FRAME nil | 957 FRAME is the frame on which the image will be displayed. FRAME nil |
| 959 or omitted means use the selected frame. */) | 958 or omitted means use the selected frame. */) |
| 960 (spec, frame) | 959 (Lisp_Object spec, Lisp_Object frame) |
| 961 Lisp_Object spec, frame; | |
| 962 { | 960 { |
| 963 Lisp_Object mask; | 961 Lisp_Object mask; |
| 964 | 962 |
| 965 mask = Qnil; | 963 mask = Qnil; |
| 966 if (valid_image_p (spec)) | 964 if (valid_image_p (spec)) |
| 979 | 977 |
| 980 DEFUN ("image-metadata", Fimage_metadata, Simage_metadata, 1, 2, 0, | 978 DEFUN ("image-metadata", Fimage_metadata, Simage_metadata, 1, 2, 0, |
| 981 doc: /* Return metadata for image SPEC. | 979 doc: /* Return metadata for image SPEC. |
| 982 FRAME is the frame on which the image will be displayed. FRAME nil | 980 FRAME is the frame on which the image will be displayed. FRAME nil |
| 983 or omitted means use the selected frame. */) | 981 or omitted means use the selected frame. */) |
| 984 (spec, frame) | 982 (Lisp_Object spec, Lisp_Object frame) |
| 985 Lisp_Object spec, frame; | |
| 986 { | 983 { |
| 987 Lisp_Object ext; | 984 Lisp_Object ext; |
| 988 | 985 |
| 989 ext = Qnil; | 986 ext = Qnil; |
| 990 if (valid_image_p (spec)) | 987 if (valid_image_p (spec)) |
| 1608 doc: /* Clear the image cache. | 1605 doc: /* Clear the image cache. |
| 1609 FILTER nil or a frame means clear all images in the selected frame. | 1606 FILTER nil or a frame means clear all images in the selected frame. |
| 1610 FILTER t means clear the image caches of all frames. | 1607 FILTER t means clear the image caches of all frames. |
| 1611 Anything else, means only clear those images which refer to FILTER, | 1608 Anything else, means only clear those images which refer to FILTER, |
| 1612 which is then usually a filename. */) | 1609 which is then usually a filename. */) |
| 1613 (filter) | 1610 (Lisp_Object filter) |
| 1614 Lisp_Object filter; | |
| 1615 { | 1611 { |
| 1616 if (!(EQ (filter, Qnil) || FRAMEP (filter))) | 1612 if (!(EQ (filter, Qnil) || FRAMEP (filter))) |
| 1617 clear_image_caches (filter); | 1613 clear_image_caches (filter); |
| 1618 else | 1614 else |
| 1619 clear_image_cache (check_x_frame (filter), Qt); | 1615 clear_image_cache (check_x_frame (filter), Qt); |
| 1629 an image file, the next redisplay of this image will read from the | 1625 an image file, the next redisplay of this image will read from the |
| 1630 current contents of that file. | 1626 current contents of that file. |
| 1631 | 1627 |
| 1632 FRAME nil or omitted means use the selected frame. | 1628 FRAME nil or omitted means use the selected frame. |
| 1633 FRAME t means refresh the image on all frames. */) | 1629 FRAME t means refresh the image on all frames. */) |
| 1634 (spec, frame) | 1630 (Lisp_Object spec, Lisp_Object frame) |
| 1635 Lisp_Object spec, frame; | |
| 1636 { | 1631 { |
| 1637 if (!valid_image_p (spec)) | 1632 if (!valid_image_p (spec)) |
| 1638 error ("Invalid image specification"); | 1633 error ("Invalid image specification"); |
| 1639 | 1634 |
| 1640 if (EQ (frame, Qt)) | 1635 if (EQ (frame, Qt)) |
| 8047 | 8042 |
| 8048 #if GLYPH_DEBUG | 8043 #if GLYPH_DEBUG |
| 8049 | 8044 |
| 8050 DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, | 8045 DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, |
| 8051 doc: /* Value is non-nil if SPEC is a valid image specification. */) | 8046 doc: /* Value is non-nil if SPEC is a valid image specification. */) |
| 8052 (spec) | 8047 (Lisp_Object spec) |
| 8053 Lisp_Object spec; | |
| 8054 { | 8048 { |
| 8055 return valid_image_p (spec) ? Qt : Qnil; | 8049 return valid_image_p (spec) ? Qt : Qnil; |
| 8056 } | 8050 } |
| 8057 | 8051 |
| 8058 | 8052 |
| 8059 DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") | 8053 DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") |
| 8060 (spec) | 8054 (Lisp_Object spec) |
| 8061 Lisp_Object spec; | |
| 8062 { | 8055 { |
| 8063 int id = -1; | 8056 int id = -1; |
| 8064 | 8057 |
| 8065 if (valid_image_p (spec)) | 8058 if (valid_image_p (spec)) |
| 8066 id = lookup_image (SELECTED_FRAME (), spec); | 8059 id = lookup_image (SELECTED_FRAME (), spec); |
| 8091 Return non-nil if TYPE is a supported image type. | 8084 Return non-nil if TYPE is a supported image type. |
| 8092 | 8085 |
| 8093 Image types pbm and xbm are prebuilt; other types are loaded here. | 8086 Image types pbm and xbm are prebuilt; other types are loaded here. |
| 8094 Libraries to load are specified in alist LIBRARIES (usually, the value | 8087 Libraries to load are specified in alist LIBRARIES (usually, the value |
| 8095 of `image-library-alist', which see). */) | 8088 of `image-library-alist', which see). */) |
| 8096 (type, libraries) | 8089 (Lisp_Object type, Lisp_Object libraries) |
| 8097 Lisp_Object type, libraries; | |
| 8098 { | 8090 { |
| 8099 Lisp_Object tested; | 8091 Lisp_Object tested; |
| 8100 | 8092 |
| 8101 /* Don't try to reload the library. */ | 8093 /* Don't try to reload the library. */ |
| 8102 tested = Fassq (type, Vimage_type_cache); | 8094 tested = Fassq (type, Vimage_type_cache); |
