Mercurial > hg > xemacs-beta
comparison src/glyphs.c @ 1411:9d77c73d4103
[xemacs-hg @ 2003-04-14 04:11:55 by youngs]
2003-04-14 Steve Youngs <youngs@xemacs.org>
* glyphs.c:
* glyphs.c (nothing_instantiate):
* glyphs.c (Fmake_glyph_internal):
* glyphs.c (Fglyphp):
* glyphs.c (glyph_image_instance):
* glyphs.c (glyph_image_instance_maybe):
* glyphs.c (glyph_width):
Work around a problem compiling with --use-union-type using
Intel's ICC compiler.
From Martin Buchholz <martin@xemacs.org>
See
<http://list-archive.xemacs.org/xemacs-patches/200301/msg00132.html>
author | youngs |
---|---|
date | Mon, 14 Apr 2003 04:11:57 +0000 |
parents | e22b0213b713 |
children | 51ce4f55d8c3 |
comparison
equal
deleted
inserted
replaced
1410:44de306310b8 | 1411:9d77c73d4103 |
---|---|
2325 int dest_mask, Lisp_Object domain) | 2325 int dest_mask, Lisp_Object domain) |
2326 { | 2326 { |
2327 Lisp_Object string = find_keyword_in_vector (instantiator, Q_data); | 2327 Lisp_Object string = find_keyword_in_vector (instantiator, Q_data); |
2328 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2328 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2329 | 2329 |
2330 assert (!NILP (string)); | |
2331 | |
2330 /* Should never get here with a domain other than a window. */ | 2332 /* Should never get here with a domain other than a window. */ |
2331 assert (!NILP (string) && WINDOWP (DOMAIN_WINDOW (domain))); | 2333 #ifndef NDEBUG |
2334 /* Work Around for an Intel Compiler 7.0 internal error */ | |
2335 /* assert (WINDOWP (DOMAIN_WINDOW (domain))); internal error: 0_5086 */ | |
2336 { | |
2337 Lisp_Object w = DOMAIN_WINDOW (domain); | |
2338 assert (WINDOWP (w)); | |
2339 } | |
2340 #endif | |
2341 | |
2332 if (dest_mask & IMAGE_TEXT_MASK) | 2342 if (dest_mask & IMAGE_TEXT_MASK) |
2333 { | 2343 { |
2334 IMAGE_INSTANCE_TYPE (ii) = IMAGE_TEXT; | 2344 IMAGE_INSTANCE_TYPE (ii) = IMAGE_TEXT; |
2335 IMAGE_INSTANCE_TEXT_STRING (ii) = string; | 2345 IMAGE_INSTANCE_TEXT_STRING (ii) = string; |
2336 } | 2346 } |
3955 ERROR_ME_DEBUG_WARN, 1); | 3965 ERROR_ME_DEBUG_WARN, 1); |
3956 | 3966 |
3957 return instance; | 3967 return instance; |
3958 } | 3968 } |
3959 | 3969 |
3970 inline static int | |
3971 image_instance_needs_layout (Lisp_Object instance) | |
3972 { | |
3973 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (instance); | |
3974 | |
3975 if (IMAGE_INSTANCE_DIRTYP (ii) && IMAGE_INSTANCE_LAYOUT_CHANGED (ii)) | |
3976 { | |
3977 return 1; | |
3978 } | |
3979 else | |
3980 { | |
3981 Lisp_Object iif = IMAGE_INSTANCE_FRAME (ii); | |
3982 return FRAMEP (iif) && XFRAME (iif)->size_changed; | |
3983 } | |
3984 } | |
3985 | |
3960 /***************************************************************************** | 3986 /***************************************************************************** |
3961 glyph_width | 3987 glyph_width |
3962 | 3988 |
3963 Return the width of the given GLYPH on the given WINDOW. | 3989 Return the width of the given GLYPH on the given WINDOW. |
3964 Calculations are done based on recursively querying the geometry of | 3990 Calculations are done based on recursively querying the geometry of |
3970 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, | 3996 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, |
3971 domain); | 3997 domain); |
3972 if (!IMAGE_INSTANCEP (instance)) | 3998 if (!IMAGE_INSTANCEP (instance)) |
3973 return 0; | 3999 return 0; |
3974 | 4000 |
3975 if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance)) | 4001 if (image_instance_needs_layout (instance)) |
3976 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, | 4002 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, |
3977 IMAGE_UNSPECIFIED_GEOMETRY, | 4003 IMAGE_UNSPECIFIED_GEOMETRY, |
3978 IMAGE_UNCHANGED_GEOMETRY, | 4004 IMAGE_UNCHANGED_GEOMETRY, |
3979 IMAGE_UNCHANGED_GEOMETRY, domain); | 4005 IMAGE_UNCHANGED_GEOMETRY, domain); |
3980 | 4006 |
4000 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, | 4026 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, |
4001 domain); | 4027 domain); |
4002 if (!IMAGE_INSTANCEP (instance)) | 4028 if (!IMAGE_INSTANCEP (instance)) |
4003 return 0; | 4029 return 0; |
4004 | 4030 |
4005 if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance)) | 4031 if (image_instance_needs_layout (instance)) |
4006 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, | 4032 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, |
4007 IMAGE_UNSPECIFIED_GEOMETRY, | 4033 IMAGE_UNSPECIFIED_GEOMETRY, |
4008 IMAGE_UNCHANGED_GEOMETRY, | 4034 IMAGE_UNCHANGED_GEOMETRY, |
4009 IMAGE_UNCHANGED_GEOMETRY, domain); | 4035 IMAGE_UNCHANGED_GEOMETRY, domain); |
4010 | 4036 |
4020 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, | 4046 Lisp_Object instance = glyph_image_instance_maybe (glyph_or_image, |
4021 domain); | 4047 domain); |
4022 if (!IMAGE_INSTANCEP (instance)) | 4048 if (!IMAGE_INSTANCEP (instance)) |
4023 return 0; | 4049 return 0; |
4024 | 4050 |
4025 if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance)) | 4051 if (image_instance_needs_layout (instance)) |
4026 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, | 4052 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, |
4027 IMAGE_UNSPECIFIED_GEOMETRY, | 4053 IMAGE_UNSPECIFIED_GEOMETRY, |
4028 IMAGE_UNCHANGED_GEOMETRY, | 4054 IMAGE_UNCHANGED_GEOMETRY, |
4029 IMAGE_UNCHANGED_GEOMETRY, domain); | 4055 IMAGE_UNCHANGED_GEOMETRY, domain); |
4030 | 4056 |
4042 domain); | 4068 domain); |
4043 | 4069 |
4044 if (!IMAGE_INSTANCEP (instance)) | 4070 if (!IMAGE_INSTANCEP (instance)) |
4045 return 0; | 4071 return 0; |
4046 | 4072 |
4047 if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance)) | 4073 if (image_instance_needs_layout (instance)) |
4048 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, | 4074 image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY, |
4049 IMAGE_UNSPECIFIED_GEOMETRY, | 4075 IMAGE_UNSPECIFIED_GEOMETRY, |
4050 IMAGE_UNCHANGED_GEOMETRY, | 4076 IMAGE_UNCHANGED_GEOMETRY, |
4051 IMAGE_UNCHANGED_GEOMETRY, domain); | 4077 IMAGE_UNCHANGED_GEOMETRY, domain); |
4052 | 4078 |