comparison src/objects.h @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children 11054d720c21
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
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 INCLUDED_objects_h_ 24 #ifndef _XEMACS_OBJECTS_H_
25 #define INCLUDED_objects_h_ 25 #define _XEMACS_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
114 EXFUN (Fmake_color_instance, 3); 123 EXFUN (Fmake_color_instance, 3);
115 124
116 extern Lisp_Object Vthe_null_color_instance; 125 extern Lisp_Object Vthe_null_color_instance;
117 126
118 struct Lisp_Color_Instance 127 struct Lisp_Color_Instance
123 132
124 /* console-type-specific data */ 133 /* console-type-specific data */
125 void *data; 134 void *data;
126 }; 135 };
127 136
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
135 #define COLOR_INSTANCE_NAME(c) ((c)->name) 137 #define COLOR_INSTANCE_NAME(c) ((c)->name)
136 #define COLOR_INSTANCE_DEVICE(c) ((c)->device) 138 #define COLOR_INSTANCE_DEVICE(c) ((c)->device)
137 139
138 /**************************************************************************** 140 /****************************************************************************
139 * Font Instance Object * 141 * Font Instance Object *
140 ****************************************************************************/ 142 ****************************************************************************/
141 143
142 DECLARE_LRECORD (font_instance, Lisp_Font_Instance); 144 DECLARE_LRECORD (font_instance, struct Lisp_Font_Instance);
143 #define XFONT_INSTANCE(x) XRECORD (x, font_instance, Lisp_Font_Instance) 145 #define XFONT_INSTANCE(x) XRECORD (x, font_instance, struct Lisp_Font_Instance)
144 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance) 146 #define XSETFONT_INSTANCE(x, p) XSETRECORD (x, p, font_instance)
145 #define FONT_INSTANCEP(x) RECORDP (x, font_instance) 147 #define FONT_INSTANCEP(x) RECORDP (x, font_instance)
148 #define GC_FONT_INSTANCEP(x) GC_RECORDP (x, font_instance)
146 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance) 149 #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance)
147 #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance) 150 #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance)
148 151
149 #ifdef MULE 152 #ifdef MULE
150 int font_spec_matches_charset (struct device *d, Lisp_Object charset, 153 int font_spec_matches_charset (struct device *d, Lisp_Object charset,
151 const Bufbyte *nonreloc, 154 CONST Bufbyte *nonreloc,
152 Lisp_Object reloc, Bytecount offset, 155 Lisp_Object reloc, Bytecount offset,
153 Bytecount length); 156 Bytecount length);
154 #endif 157 #endif
155 158
156 EXFUN (Fmake_font_instance, 3); 159 EXFUN (Fmake_font_instance, 3);
181 #define FONT_INSTANCE_ASCENT(f) ((f)->ascent) 184 #define FONT_INSTANCE_ASCENT(f) ((f)->ascent)
182 #define FONT_INSTANCE_DESCENT(f) ((f)->descent) 185 #define FONT_INSTANCE_DESCENT(f) ((f)->descent)
183 #define FONT_INSTANCE_WIDTH(f) ((f)->width) 186 #define FONT_INSTANCE_WIDTH(f) ((f)->width)
184 #define FONT_INSTANCE_HEIGHT(f) ((f)->height) 187 #define FONT_INSTANCE_HEIGHT(f) ((f)->height)
185 188
186 #endif /* INCLUDED_objects_h_ */ 189 #endif /* _XEMACS_OBJECTS_H_ */