Mercurial > hg > xemacs-beta
comparison src/glyphs.h @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 308d34e9f07d |
children |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
2 Copyright (C) 1994 Board of Trustees, University of Illinois. | 2 Copyright (C) 1994 Board of Trustees, University of Illinois. |
3 Copyright (C) 1995, 1996, 2002 Ben Wing | 3 Copyright (C) 1995, 1996, 2002 Ben Wing |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software: you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
9 Free Software Foundation; either version 2, or (at your option) any | 9 Free Software Foundation, either version 3 of the License, or (at your |
10 later version. | 10 option) any later version. |
11 | 11 |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 12 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
15 for more details. | 15 for more details. |
16 | 16 |
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with XEmacs; see the file COPYING. If not, write to | 18 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | 19 |
22 /* Synched up with: Not in FSF. */ | 20 /* Synched up with: Not in FSF. */ |
23 | 21 |
24 #ifndef INCLUDED_glyphs_h_ | 22 #ifndef INCLUDED_glyphs_h_ |
25 #define INCLUDED_glyphs_h_ | 23 #define INCLUDED_glyphs_h_ |
430 | 428 |
431 /************************************************************************/ | 429 /************************************************************************/ |
432 /* Image Instance Object */ | 430 /* Image Instance Object */ |
433 /************************************************************************/ | 431 /************************************************************************/ |
434 | 432 |
435 DECLARE_LRECORD (image_instance, Lisp_Image_Instance); | 433 DECLARE_LISP_OBJECT (image_instance, Lisp_Image_Instance); |
436 #define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance) | 434 #define XIMAGE_INSTANCE(x) XRECORD (x, image_instance, Lisp_Image_Instance) |
437 #define wrap_image_instance(p) wrap_record (p, image_instance) | 435 #define wrap_image_instance(p) wrap_record (p, image_instance) |
438 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) | 436 #define IMAGE_INSTANCEP(x) RECORDP (x, image_instance) |
439 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) | 437 #define CHECK_IMAGE_INSTANCE(x) CHECK_RECORD (x, image_instance) |
440 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) | 438 #define CONCHECK_IMAGE_INSTANCE(x) CONCHECK_RECORD (x, image_instance) |
594 unsigned int action_occurred : 1; | 592 unsigned int action_occurred : 1; |
595 }; | 593 }; |
596 | 594 |
597 struct Lisp_Image_Instance | 595 struct Lisp_Image_Instance |
598 { | 596 { |
599 struct LCRECORD_HEADER header; | 597 NORMAL_LISP_OBJECT_HEADER header; |
600 Lisp_Object domain; /* The domain in which we were cached. */ | 598 Lisp_Object domain; /* The domain in which we were cached. */ |
601 Lisp_Object device; /* The device of the domain. Recorded | 599 Lisp_Object device; /* The device of the domain. Recorded |
602 since the domain may get deleted | 600 since the domain may get deleted |
603 before us. */ | 601 before us. */ |
604 Lisp_Object name; | 602 Lisp_Object name; |
946 GLYPH_ICON | 944 GLYPH_ICON |
947 }; | 945 }; |
948 | 946 |
949 struct Lisp_Glyph | 947 struct Lisp_Glyph |
950 { | 948 { |
951 struct LCRECORD_HEADER header; | 949 NORMAL_LISP_OBJECT_HEADER header; |
952 | 950 |
953 enum glyph_type type; | 951 enum glyph_type type; |
954 | 952 |
955 /* specifiers: */ | 953 /* specifiers: */ |
956 Lisp_Object image; /* the actual image */ | 954 Lisp_Object image; /* the actual image */ |
966 unsigned int dirty : 1; /* So that we can selectively | 964 unsigned int dirty : 1; /* So that we can selectively |
967 redisplay changed glyphs. */ | 965 redisplay changed glyphs. */ |
968 }; | 966 }; |
969 typedef struct Lisp_Glyph Lisp_Glyph; | 967 typedef struct Lisp_Glyph Lisp_Glyph; |
970 | 968 |
971 DECLARE_LRECORD (glyph, Lisp_Glyph); | 969 DECLARE_LISP_OBJECT (glyph, Lisp_Glyph); |
972 #define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph) | 970 #define XGLYPH(x) XRECORD (x, glyph, Lisp_Glyph) |
973 #define wrap_glyph(p) wrap_record (p, glyph) | 971 #define wrap_glyph(p) wrap_record (p, glyph) |
974 #define GLYPHP(x) RECORDP (x, glyph) | 972 #define GLYPHP(x) RECORDP (x, glyph) |
975 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) | 973 #define CHECK_GLYPH(x) CHECK_RECORD (x, glyph) |
976 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) | 974 #define CONCHECK_GLYPH(x) CONCHECK_RECORD (x, glyph) |
1008 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g)) | 1006 #define XGLYPH_DIRTYP(g) GLYPH_DIRTYP (XGLYPH (g)) |
1009 | 1007 |
1010 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1); | 1008 #define MARK_GLYPH_CHANGED(g) (GLYPH_DIRTYP (g) = 1); |
1011 | 1009 |
1012 extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; | 1010 extern Lisp_Object Qxpm, Qxface, Qetched_in, Qetched_out, Qbevel_in, Qbevel_out; |
1013 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable; | 1011 extern Lisp_Object Q_file, Q_color_symbols, Qconst_glyph_variable; |
1014 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; | 1012 extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar; |
1015 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge; | 1013 extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge; |
1016 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; | 1014 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; |
1017 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_group; | 1015 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_group; |
1018 extern Lisp_Object Q_pixel_width, Q_pixel_height; | 1016 extern Lisp_Object Q_pixel_width, Q_pixel_height; |
1068 | 1066 |
1069 typedef struct glyph_cachel glyph_cachel; | 1067 typedef struct glyph_cachel glyph_cachel; |
1070 struct glyph_cachel | 1068 struct glyph_cachel |
1071 { | 1069 { |
1072 #ifdef NEW_GC | 1070 #ifdef NEW_GC |
1073 struct lrecord_header header; | 1071 NORMAL_LISP_OBJECT_HEADER header; |
1074 #endif /* NEW_GC */ | 1072 #endif /* NEW_GC */ |
1075 Lisp_Object glyph; | 1073 Lisp_Object glyph; |
1076 | 1074 |
1077 unsigned int dirty :1; /* I'm copying faces here. I'm not | 1075 unsigned int dirty :1; /* I'm copying faces here. I'm not |
1078 sure why we need two dirty | 1076 sure why we need two dirty |
1088 }; | 1086 }; |
1089 | 1087 |
1090 #ifdef NEW_GC | 1088 #ifdef NEW_GC |
1091 typedef struct glyph_cachel Lisp_Glyph_Cachel; | 1089 typedef struct glyph_cachel Lisp_Glyph_Cachel; |
1092 | 1090 |
1093 DECLARE_LRECORD (glyph_cachel, Lisp_Glyph_Cachel); | 1091 DECLARE_LISP_OBJECT (glyph_cachel, Lisp_Glyph_Cachel); |
1094 | 1092 |
1095 #define XGLYPH_CACHEL(x) \ | 1093 #define XGLYPH_CACHEL(x) \ |
1096 XRECORD (x, glyph_cachel, Lisp_Glyph_Cachel) | 1094 XRECORD (x, glyph_cachel, Lisp_Glyph_Cachel) |
1097 #define wrap_glyph_cachel(p) wrap_record (p, glyph_cachel) | 1095 #define wrap_glyph_cachel(p) wrap_record (p, glyph_cachel) |
1098 #define GLYPH_CACHEL_P(x) RECORDP (x, glyph_cachel) | 1096 #define GLYPH_CACHEL_P(x) RECORDP (x, glyph_cachel) |
1163 void reset_glyph_cachels (struct window *w); | 1161 void reset_glyph_cachels (struct window *w); |
1164 glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph); | 1162 glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph); |
1165 | 1163 |
1166 #ifdef MEMORY_USAGE_STATS | 1164 #ifdef MEMORY_USAGE_STATS |
1167 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, | 1165 int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels, |
1168 struct overhead_stats *ovstats); | 1166 struct usage_stats *ustats); |
1169 #endif /* MEMORY_USAGE_STATS */ | 1167 #endif /* MEMORY_USAGE_STATS */ |
1170 | 1168 |
1171 /************************************************************************/ | 1169 /************************************************************************/ |
1172 /* Display Tables */ | 1170 /* Display Tables */ |
1173 /************************************************************************/ | 1171 /************************************************************************/ |
1196 Lisp_Object value, void* finalize); | 1194 Lisp_Object value, void* finalize); |
1197 | 1195 |
1198 struct expose_ignore | 1196 struct expose_ignore |
1199 { | 1197 { |
1200 #ifdef NEW_GC | 1198 #ifdef NEW_GC |
1201 struct lrecord_header header; | 1199 NORMAL_LISP_OBJECT_HEADER header; |
1202 #endif /* NEW_GC */ | 1200 #endif /* NEW_GC */ |
1203 int x, y; | 1201 int x, y; |
1204 int width, height; | 1202 int width, height; |
1205 struct expose_ignore *next; | 1203 struct expose_ignore *next; |
1206 }; | 1204 }; |
1207 | 1205 |
1208 #ifdef NEW_GC | 1206 #ifdef NEW_GC |
1209 DECLARE_LRECORD (expose_ignore, struct expose_ignore); | 1207 DECLARE_LISP_OBJECT (expose_ignore, struct expose_ignore); |
1210 #define XEXPOSE_IGNORE(x) XRECORD (x, expose_ignore, struct expose_ignore) | 1208 #define XEXPOSE_IGNORE(x) XRECORD (x, expose_ignore, struct expose_ignore) |
1211 #define wrap_expose_ignore(p) wrap_record (p, expose_ignore) | 1209 #define wrap_expose_ignore(p) wrap_record (p, expose_ignore) |
1212 #define EXPOSE_IGNOREP(x) RECORDP (x, expose_ignore) | 1210 #define EXPOSE_IGNOREP(x) RECORDP (x, expose_ignore) |
1213 #define CHECK_EXPOSE_IGNORE(x) CHECK_RECORD (x, expose_ignore) | 1211 #define CHECK_EXPOSE_IGNORE(x) CHECK_RECORD (x, expose_ignore) |
1214 #define CONCHECK_EXPOSE_IGNORE(x) CONCHECK_RECORD (x, expose_ignore) | 1212 #define CONCHECK_EXPOSE_IGNORE(x) CONCHECK_RECORD (x, expose_ignore) |