Mercurial > hg > xemacs-beta
comparison src/console.h @ 545:9a775fb11bb7
[xemacs-hg @ 2001-05-18 04:39:39 by kkm]
My 3 patches of 05/01-05/03
author | kkm |
---|---|
date | Fri, 18 May 2001 04:39:44 +0000 |
parents | 7039e6323819 |
children | 190b164ddcac |
comparison
equal
deleted
inserted
replaced
544:ffd4d00ff0b6 | 545:9a775fb11bb7 |
---|---|
61 }; | 61 }; |
62 | 62 |
63 extern const struct struct_description cted_description; | 63 extern const struct struct_description cted_description; |
64 extern const struct struct_description console_methods_description; | 64 extern const struct struct_description console_methods_description; |
65 | 65 |
66 | |
67 /* | |
68 * Constants returned by device_implementation_flags_method | |
69 */ | |
70 | |
71 /* Set when device uses pixel-based geometry */ | |
72 #define XDEVIMPF_PIXEL_GEOMETRY 0x00000001L | |
73 | |
74 /* Indicates that the device is a printer */ | |
75 #define XDEVIMPF_IS_A_PRINTER 0x00000002L | |
76 | |
77 /* Do not automatically redisplay this device */ | |
78 #define XDEVIMPF_NO_AUTO_REDISPLAY 0x00000004L | |
79 | |
80 /* Do not delete the device when last frame's gone */ | |
81 #define XDEVIMPF_FRAMELESS_OK 0x00000008L | |
82 | |
83 /* Do not preempt resiaply of frame or device once it starts */ | |
84 #define XDEVIMPF_DONT_PREEMPT_REDISPLAY 0x00000010L | |
85 | |
66 struct console_methods | 86 struct console_methods |
67 { | 87 { |
68 const char *name; /* Used by print_console, print_device, print_frame */ | 88 const char *name; /* Used by print_console, print_device, print_frame */ |
69 Lisp_Object symbol; | 89 Lisp_Object symbol; |
70 Lisp_Object predicate_symbol; | 90 Lisp_Object predicate_symbol; |
91 unsigned int flags; /* Read-only implementation flags, set once upon | |
92 console type creation. INITIALIZE_CONSOLE_TYPE sets | |
93 this member to 0. */ | |
71 | 94 |
72 /* console methods */ | 95 /* console methods */ |
73 void (*init_console_method) (struct console *, Lisp_Object props); | 96 void (*init_console_method) (struct console *, Lisp_Object props); |
74 void (*mark_console_method) (struct console *); | 97 void (*mark_console_method) (struct console *); |
75 int (*initially_selected_for_input_method) (struct console *); | 98 int (*initially_selected_for_input_method) (struct console *); |
91 void (*delete_device_method) (struct device *); | 114 void (*delete_device_method) (struct device *); |
92 void (*mark_device_method) (struct device *); | 115 void (*mark_device_method) (struct device *); |
93 void (*asynch_device_change_method) (void); | 116 void (*asynch_device_change_method) (void); |
94 Lisp_Object (*device_system_metrics_method) (struct device *, | 117 Lisp_Object (*device_system_metrics_method) (struct device *, |
95 enum device_metrics); | 118 enum device_metrics); |
96 unsigned int (*device_implementation_flags_method) (void); | |
97 Lisp_Object (*own_selection_method)(Lisp_Object selection_name, | 119 Lisp_Object (*own_selection_method)(Lisp_Object selection_name, |
98 Lisp_Object selection_value, | 120 Lisp_Object selection_value, |
99 Lisp_Object how_to_add, | 121 Lisp_Object how_to_add, |
100 Lisp_Object selection_type, | 122 Lisp_Object selection_type, |
101 int owned_p); | 123 int owned_p); |
301 Lisp_Object type, | 323 Lisp_Object type, |
302 Lisp_Object keys); | 324 Lisp_Object keys); |
303 #endif | 325 #endif |
304 }; | 326 }; |
305 | 327 |
306 /* | 328 #define CONMETH_TYPE(meths) ((meths)->symbol) |
307 * Constants returned by device_implementation_flags_method | 329 #define CONMETH_IMPL_FLAG(meths, f) ((meths)->flags & (f)) |
308 */ | |
309 | |
310 /* Set when device uses pixel-based geometry */ | |
311 #define XDEVIMPF_PIXEL_GEOMETRY 0x00000001L | |
312 | |
313 /* Indicates that the device is a printer */ | |
314 #define XDEVIMPF_IS_A_PRINTER 0x00000002L | |
315 | |
316 /* Do not automatically redisplay this device */ | |
317 #define XDEVIMPF_NO_AUTO_REDISPLAY 0x00000004L | |
318 | |
319 /* Do not delete the device when last frame's gone */ | |
320 #define XDEVIMPF_FRAMELESS_OK 0x00000008L | |
321 | |
322 | 330 |
323 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name) | 331 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name) |
324 #define CONSOLE_TYPE(c) ((c)->conmeths->symbol) | 332 #define CONSOLE_TYPE(c) ((c)->conmeths->symbol) |
325 #define CONMETH_TYPE(meths) ((meths)->symbol) | 333 #define CONSOLE_IMPL_FLAG(c, f) CONMETH_IMPL_FLAG ((c)->conmeths, (f)) |
326 | 334 |
327 /******** Accessing / calling a console method *********/ | 335 /******** Accessing / calling a console method *********/ |
328 | 336 |
329 #define HAS_CONTYPE_METH_P(meth, m) ((meth)->m##_method) | 337 #define HAS_CONTYPE_METH_P(meth, m) ((meth)->m##_method) |
330 #define CONTYPE_METH(meth, m, args) (((meth)->m##_method) args) | 338 #define CONTYPE_METH(meth, m, args) (((meth)->m##_method) args) |
404 | 412 |
405 /* Declare that console-type TYPE inherits method M | 413 /* Declare that console-type TYPE inherits method M |
406 implementation from console-type FROMTYPE */ | 414 implementation from console-type FROMTYPE */ |
407 #define CONSOLE_INHERITS_METHOD(type, fromtype, m) \ | 415 #define CONSOLE_INHERITS_METHOD(type, fromtype, m) \ |
408 (type##_console_methods->m##_method = fromtype##_##m) | 416 (type##_console_methods->m##_method = fromtype##_##m) |
417 | |
418 /* Define console type implementation flags */ | |
419 #define CONSOLE_IMPLEMENTATION_FLAGS(type, flg) \ | |
420 (type##_console_methods->flags = flg) | |
409 | 421 |
410 struct console | 422 struct console |
411 { | 423 { |
412 struct lcrecord_header header; | 424 struct lcrecord_header header; |
413 | 425 |