Mercurial > hg > xemacs-beta
comparison src/console.h @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | cca96a509cfe |
children | 41ff10fd062f |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
302 #define MAYBE_LISP_CONMETH(c, m, args) \ | 302 #define MAYBE_LISP_CONMETH(c, m, args) \ |
303 MAYBE_LISP_CONTYPE_METH ((c)->conmeths, m, args) | 303 MAYBE_LISP_CONTYPE_METH ((c)->conmeths, m, args) |
304 | 304 |
305 /******** Defining new console types ********/ | 305 /******** Defining new console types ********/ |
306 | 306 |
307 typedef struct console_type_entry console_type_entry; | |
307 struct console_type_entry | 308 struct console_type_entry |
308 { | 309 { |
309 Lisp_Object symbol; | 310 Lisp_Object symbol; |
310 struct console_methods *meths; | 311 struct console_methods *meths; |
311 }; | 312 }; |
312 | 313 |
313 #define DECLARE_CONSOLE_TYPE(type) \ | 314 #define DECLARE_CONSOLE_TYPE(type) \ |
314 extern struct console_methods * type##_console_methods | 315 extern struct console_methods * type##_console_methods |
315 | 316 |
316 #define DEFINE_CONSOLE_TYPE(type) \ | 317 #define DEFINE_CONSOLE_TYPE(type) \ |
317 struct console_methods * type##_console_methods | 318 struct console_methods * type##_console_methods |
318 | 319 |
319 #define INITIALIZE_CONSOLE_TYPE(type, obj_name, pred_sym) \ | 320 #define INITIALIZE_CONSOLE_TYPE(type, obj_name, pred_sym) do { \ |
320 do { \ | 321 type##_console_methods = xnew_and_zero (struct console_methods); \ |
321 type##_console_methods = \ | 322 type##_console_methods->name = obj_name; \ |
322 malloc_type_and_zero (struct console_methods); \ | 323 type##_console_methods->symbol = Q##type; \ |
323 type##_console_methods->name = obj_name; \ | 324 defsymbol (&type##_console_methods->predicate_symbol, pred_sym); \ |
324 type##_console_methods->symbol = Q##type; \ | 325 add_entry_to_console_type_list (Q##type, type##_console_methods); \ |
325 defsymbol (&type##_console_methods->predicate_symbol, \ | 326 type##_console_methods->image_conversion_list = Qnil; \ |
326 pred_sym); \ | 327 staticpro (&type##_console_methods->image_conversion_list); \ |
327 add_entry_to_console_type_list (Q##type, \ | 328 } while (0) |
328 type##_console_methods); \ | |
329 type##_console_methods->image_conversion_list = Qnil; \ | |
330 staticpro (&type##_console_methods->image_conversion_list); \ | |
331 } while (0) | |
332 | 329 |
333 /* Declare that console-type TYPE has method M; used in | 330 /* Declare that console-type TYPE has method M; used in |
334 initialization routines */ | 331 initialization routines */ |
335 #define CONSOLE_HAS_METHOD(type, m) \ | 332 #define CONSOLE_HAS_METHOD(type, m) \ |
336 (type##_console_methods->m##_method = type##_##m) | 333 (type##_console_methods->m##_method = type##_##m) |