comparison src/objects.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents c5d627a313b1
children 697ef44129c6
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */ 20 Boston, MA 02111-1307, USA. */
21 21
22 /* Synched up with: Not in FSF. */ 22 /* Synched up with: Not in FSF. */
23 23
24 #ifndef _XEMACS_OBJECTS_H_ 24 #ifndef INCLUDED_objects_h_
25 #define _XEMACS_OBJECTS_H_ 25 #define INCLUDED_objects_h_
26 26
27 #include "specifier.h" 27 #include "specifier.h"
28 28
29 void finalose (void *ptr); 29 void finalose (void *ptr);
30 30
36 { 36 {
37 Lisp_Object face; /* face this is attached to, or nil */ 37 Lisp_Object face; /* face this is attached to, or nil */
38 Lisp_Object face_property; /* property of that face */ 38 Lisp_Object face_property; /* property of that face */
39 }; 39 };
40 40
41 #define COLOR_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, color)) 41 #define COLOR_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, color)
42 #define COLOR_SPECIFIER_FACE(g) (COLOR_SPECIFIER_DATA (g)->face) 42 #define COLOR_SPECIFIER_FACE(g) (COLOR_SPECIFIER_DATA (g)->face)
43 #define COLOR_SPECIFIER_FACE_PROPERTY(g) \ 43 #define COLOR_SPECIFIER_FACE_PROPERTY(g) \
44 (COLOR_SPECIFIER_DATA (g)->face_property) 44 (COLOR_SPECIFIER_DATA (g)->face_property)
45 45
46 DECLARE_SPECIFIER_TYPE (color); 46 DECLARE_SPECIFIER_TYPE (color);
61 { 61 {
62 Lisp_Object face; /* face this is attached to, or nil */ 62 Lisp_Object face; /* face this is attached to, or nil */
63 Lisp_Object face_property; /* property of that face */ 63 Lisp_Object face_property; /* property of that face */
64 }; 64 };
65 65
66 #define FONT_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, font)) 66 #define FONT_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, font)
67 #define FONT_SPECIFIER_FACE(g) (FONT_SPECIFIER_DATA (g)->face) 67 #define FONT_SPECIFIER_FACE(g) (FONT_SPECIFIER_DATA (g)->face)
68 #define FONT_SPECIFIER_FACE_PROPERTY(g) \ 68 #define FONT_SPECIFIER_FACE_PROPERTY(g) \
69 (FONT_SPECIFIER_DATA (g)->face_property) 69 (FONT_SPECIFIER_DATA (g)->face_property)
70 70
71 DECLARE_SPECIFIER_TYPE (font); 71 DECLARE_SPECIFIER_TYPE (font);
86 { 86 {
87 Lisp_Object face; /* face this is attached to, or nil */ 87 Lisp_Object face; /* face this is attached to, or nil */
88 Lisp_Object face_property; /* property of that face */ 88 Lisp_Object face_property; /* property of that face */
89 }; 89 };
90 90
91 #define FACE_BOOLEAN_SPECIFIER_DATA(g) (SPECIFIER_TYPE_DATA (g, face_boolean)) 91 #define FACE_BOOLEAN_SPECIFIER_DATA(g) SPECIFIER_TYPE_DATA (g, face_boolean)
92 #define FACE_BOOLEAN_SPECIFIER_FACE(g) (FACE_BOOLEAN_SPECIFIER_DATA (g)->face) 92 #define FACE_BOOLEAN_SPECIFIER_FACE(g) (FACE_BOOLEAN_SPECIFIER_DATA (g)->face)
93 #define FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY(g) \ 93 #define FACE_BOOLEAN_SPECIFIER_FACE_PROPERTY(g) \
94 (FACE_BOOLEAN_SPECIFIER_DATA (g)->face_property) 94 (FACE_BOOLEAN_SPECIFIER_DATA (g)->face_property)
95 95
96 DECLARE_SPECIFIER_TYPE (face_boolean); 96 DECLARE_SPECIFIER_TYPE (face_boolean);
109 109
110 /**************************************************************************** 110 /****************************************************************************
111 * Color Instance Object * 111 * Color Instance Object *
112 ****************************************************************************/ 112 ****************************************************************************/
113 113
114 DECLARE_LRECORD (color_instance, struct Lisp_Color_Instance);
115 #define XCOLOR_INSTANCE(x) \
116 XRECORD (x, color_instance, struct Lisp_Color_Instance)
117 #define XSETCOLOR_INSTANCE(x, p) XSETRECORD (x, p, color_instance)
118 #define COLOR_INSTANCEP(x) RECORDP (x, color_instance)
119 #define GC_COLOR_INSTANCEP(x) GC_RECORDP (x, color_instance)
120 #define CHECK_COLOR_INSTANCE(x) CHECK_RECORD (x, color_instance)
121 #define CONCHECK_COLOR_INSTANCE(x) CONCHECK_RECORD (x, color_instance)
122
123 EXFUN (Fmake_color_instance, 3); 114 EXFUN (Fmake_color_instance, 3);
124 115
125 extern Lisp_Object Vthe_null_color_instance; 116 extern Lisp_Object Vthe_null_color_instance;
126 117
127 struct Lisp_Color_Instance 118 struct Lisp_Color_Instance
132 123
133 /* console-type-specific data */ 124 /* console-type-specific data */
134 void *data; 125 void *data;
135 }; 126 };
136 127
128 DECLARE_LRECORD (color_instance, Lisp_Color_Instance);
129 #define XCOLOR_INSTANCE(x) XRECORD (x, color_instance, Lisp_Color_Instance)
130 #define XSETCOLOR_INSTANCE(x, p) XSETRECORD (x, p, color_instance)
131 #define COLOR_INSTANCEP(x) RECORDP (x, color_instance)
132 #define CHECK_COLOR_INSTANCE(x) CHECK_RECORD (x, color_instance)
133 #define CONCHECK_COLOR_INSTANCE(x) CONCHECK_RECORD (x, color_instance)
134
137 #define COLOR_INSTANCE_NAME(c) ((c)->name) 135 #define COLOR_INSTANCE_NAME(c) ((c)->name)
138 #define COLOR_INSTANCE_DEVICE(c) ((c)->device) 136 #define COLOR_INSTANCE_DEVICE(c) ((c)->device)
139 137
140 /**************************************************************************** 138 /****************************************************************************
141 * Font Instance Object * 139 * Font Instance Object *
142 ****************************************************************************/ 140 ****************************************************************************/
143 141
144 DECLARE_LRECORD (font_instance, struct Lisp_Font_Instance); 142 DECLARE_LRECORD (font_instance, Lisp_Font_Instance);
145 #define XFONT_INSTANCE(x) XRECORD (x, font_instance, struct Lisp_Font_Instance) 143 #define XFONT_INSTANCE(x) XRECORD (x, font_instance, Lisp_Font_Instance)
146 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance) 144 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance)
147 #define FONT_INSTANCEP(x) RECORDP (x, font_instance) 145 #define FONT_INSTANCEP(x) RECORDP (x, font_instance)
148 #define GC_FONT_INSTANCEP(x) GC_RECORDP (x, font_instance)
149 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance) 146 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance)
150 #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance) 147 #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance)
151 148
152 #ifdef MULE 149 #ifdef MULE
153 int font_spec_matches_charset (struct device *d, Lisp_Object charset, 150 int font_spec_matches_charset (struct device *d, Lisp_Object charset,
154 CONST Bufbyte *nonreloc, 151 const Bufbyte *nonreloc,
155 Lisp_Object reloc, Bytecount offset, 152 Lisp_Object reloc, Bytecount offset,
156 Bytecount length); 153 Bytecount length);
157 #endif 154 #endif
158 155
159 EXFUN (Fmake_font_instance, 3); 156 EXFUN (Fmake_font_instance, 3);
184 #define FONT_INSTANCE_ASCENT(f) ((f)->ascent) 181 #define FONT_INSTANCE_ASCENT(f) ((f)->ascent)
185 #define FONT_INSTANCE_DESCENT(f) ((f)->descent) 182 #define FONT_INSTANCE_DESCENT(f) ((f)->descent)
186 #define FONT_INSTANCE_WIDTH(f) ((f)->width) 183 #define FONT_INSTANCE_WIDTH(f) ((f)->width)
187 #define FONT_INSTANCE_HEIGHT(f) ((f)->height) 184 #define FONT_INSTANCE_HEIGHT(f) ((f)->height)
188 185
189 #endif /* _XEMACS_OBJECTS_H_ */ 186 #endif /* INCLUDED_objects_h_ */