comparison src/console.h @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
20 20
21 /* Synched up with: Not in FSF. */ 21 /* Synched up with: Not in FSF. */
22 22
23 /* Written by Ben Wing. */ 23 /* Written by Ben Wing. */
24 24
25 #ifndef _XEMACS_CONSOLE_H_ 25 #ifndef INCLUDED_console_h_
26 #define _XEMACS_CONSOLE_H_ 26 #define INCLUDED_console_h_
27 27
28 /* Devices and consoles are similar entities. The idea is that 28 /* Devices and consoles are similar entities. The idea is that
29 a console represents a physical keyboard/mouse/other-input-source 29 a console represents a physical keyboard/mouse/other-input-source
30 while a device represents a display where frames appear on. 30 while a device represents a display where frames appear on.
31 In the X world, a console is a "Display" while a device is a 31 In the X world, a console is a "Display" while a device is a
53 DM_color_menu_button, DM_color_menu_disabled, DM_color_toolbar, 53 DM_color_menu_button, DM_color_menu_disabled, DM_color_toolbar,
54 DM_color_scrollbar, DM_color_desktop, DM_color_workspace, DM_font_default, 54 DM_color_scrollbar, DM_color_desktop, DM_color_workspace, DM_font_default,
55 DM_font_menubar, DM_font_dialog, DM_size_cursor, DM_size_scrollbar, 55 DM_font_menubar, DM_font_dialog, DM_size_cursor, DM_size_scrollbar,
56 DM_size_menu, DM_size_toolbar, DM_size_toolbar_button, 56 DM_size_menu, DM_size_toolbar, DM_size_toolbar_button,
57 DM_size_toolbar_border, DM_size_icon, DM_size_icon_small, DM_size_device, 57 DM_size_toolbar_border, DM_size_icon, DM_size_icon_small, DM_size_device,
58 DM_size_workspace, DM_size_device_mm, DM_device_dpi, DM_num_bit_planes, 58 DM_size_workspace, DM_offset_workspace, DM_size_device_mm, DM_device_dpi,
59 DM_num_color_cells, DM_mouse_buttons, DM_swap_buttons, DM_show_sounds, 59 DM_num_bit_planes, DM_num_color_cells, DM_mouse_buttons, DM_swap_buttons,
60 DM_slow_device, DM_security 60 DM_show_sounds, DM_slow_device, DM_security
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
168 Emchar_dynarr *buf, int xpos, int xoffset, 168 Emchar_dynarr *buf, int xpos, int xoffset,
169 int start_pixpos, int width, face_index findex, 169 int start_pixpos, int width, face_index findex,
170 int cursor, int cursor_start, int cursor_width, 170 int cursor, int cursor_start, int cursor_width,
171 int cursor_height); 171 int cursor_height);
172 /* color methods */ 172 /* color methods */
173 int (*initialize_color_instance_method) (struct Lisp_Color_Instance *, 173 int (*initialize_color_instance_method) (Lisp_Color_Instance *,
174 Lisp_Object name, 174 Lisp_Object name,
175 Lisp_Object device, 175 Lisp_Object device,
176 Error_behavior errb); 176 Error_behavior errb);
177 void (*mark_color_instance_method) (struct Lisp_Color_Instance *); 177 void (*mark_color_instance_method) (Lisp_Color_Instance *);
178 void (*print_color_instance_method) (struct Lisp_Color_Instance *, 178 void (*print_color_instance_method) (Lisp_Color_Instance *,
179 Lisp_Object printcharfun, 179 Lisp_Object printcharfun,
180 int escapeflag); 180 int escapeflag);
181 void (*finalize_color_instance_method) (struct Lisp_Color_Instance *); 181 void (*finalize_color_instance_method) (Lisp_Color_Instance *);
182 int (*color_instance_equal_method) (struct Lisp_Color_Instance *, 182 int (*color_instance_equal_method) (Lisp_Color_Instance *,
183 struct Lisp_Color_Instance *, 183 Lisp_Color_Instance *,
184 int depth); 184 int depth);
185 unsigned long (*color_instance_hash_method) (struct Lisp_Color_Instance *, 185 unsigned long (*color_instance_hash_method) (Lisp_Color_Instance *,
186 int depth); 186 int depth);
187 Lisp_Object (*color_instance_rgb_components_method) 187 Lisp_Object (*color_instance_rgb_components_method) (Lisp_Color_Instance *);
188 (struct Lisp_Color_Instance *);
189 int (*valid_color_name_p_method) (struct device *, Lisp_Object color); 188 int (*valid_color_name_p_method) (struct device *, Lisp_Object color);
190 189
191 /* font methods */ 190 /* font methods */
192 int (*initialize_font_instance_method) (struct Lisp_Font_Instance *, 191 int (*initialize_font_instance_method) (Lisp_Font_Instance *,
193 Lisp_Object name, 192 Lisp_Object name,
194 Lisp_Object device, 193 Lisp_Object device,
195 Error_behavior errb); 194 Error_behavior errb);
196 void (*mark_font_instance_method) (struct Lisp_Font_Instance *); 195 void (*mark_font_instance_method) (Lisp_Font_Instance *);
197 void (*print_font_instance_method) (struct Lisp_Font_Instance *, 196 void (*print_font_instance_method) (Lisp_Font_Instance *,
198 Lisp_Object printcharfun, 197 Lisp_Object printcharfun,
199 int escapeflag); 198 int escapeflag);
200 void (*finalize_font_instance_method) (struct Lisp_Font_Instance *); 199 void (*finalize_font_instance_method) (Lisp_Font_Instance *);
201 Lisp_Object (*font_instance_truename_method) (struct Lisp_Font_Instance *, 200 Lisp_Object (*font_instance_truename_method) (Lisp_Font_Instance *,
202 Error_behavior errb); 201 Error_behavior errb);
203 Lisp_Object (*font_instance_properties_method) (struct Lisp_Font_Instance *); 202 Lisp_Object (*font_instance_properties_method) (Lisp_Font_Instance *);
204 Lisp_Object (*list_fonts_method) (Lisp_Object pattern, 203 Lisp_Object (*list_fonts_method) (Lisp_Object pattern,
205 Lisp_Object device); 204 Lisp_Object device);
206 Lisp_Object (*find_charset_font_method) (Lisp_Object device, 205 Lisp_Object (*find_charset_font_method) (Lisp_Object device,
207 Lisp_Object font, 206 Lisp_Object font,
208 Lisp_Object charset); 207 Lisp_Object charset);
212 Lisp_Object reloc, 211 Lisp_Object reloc,
213 Bytecount offset, 212 Bytecount offset,
214 Bytecount length); 213 Bytecount length);
215 214
216 /* image methods */ 215 /* image methods */
217 void (*mark_image_instance_method) (struct Lisp_Image_Instance *); 216 void (*mark_image_instance_method) (Lisp_Image_Instance *);
218 void (*print_image_instance_method) (struct Lisp_Image_Instance *, 217 void (*print_image_instance_method) (Lisp_Image_Instance *,
219 Lisp_Object printcharfun, 218 Lisp_Object printcharfun,
220 int escapeflag); 219 int escapeflag);
221 void (*finalize_image_instance_method) (struct Lisp_Image_Instance *); 220 void (*finalize_image_instance_method) (Lisp_Image_Instance *);
222 void (*unmap_subwindow_method) (struct Lisp_Image_Instance *); 221 void (*unmap_subwindow_method) (Lisp_Image_Instance *);
223 void (*map_subwindow_method) (struct Lisp_Image_Instance *, int x, int y, 222 void (*map_subwindow_method) (Lisp_Image_Instance *, int x, int y,
224 struct display_glyph_area* dga); 223 struct display_glyph_area* dga);
225 void (*resize_subwindow_method) (struct Lisp_Image_Instance *, int w, int h); 224 void (*resize_subwindow_method) (Lisp_Image_Instance *, int w, int h);
226 void (*update_subwindow_method) (struct Lisp_Image_Instance *); 225 void (*update_subwindow_method) (Lisp_Image_Instance *);
227 int (*image_instance_equal_method) (struct Lisp_Image_Instance *, 226 int (*image_instance_equal_method) (Lisp_Image_Instance *,
228 struct Lisp_Image_Instance *, 227 Lisp_Image_Instance *,
229 int depth); 228 int depth);
230 unsigned long (*image_instance_hash_method) (struct Lisp_Image_Instance *, 229 unsigned long (*image_instance_hash_method) (Lisp_Image_Instance *,
231 int depth); 230 int depth);
232 void (*init_image_instance_from_eimage_method) (struct Lisp_Image_Instance *ii, 231 void (*init_image_instance_from_eimage_method) (Lisp_Image_Instance *ii,
233 int width, int height, 232 int width, int height,
234 int slices, 233 int slices,
235 unsigned char *eimage, 234 unsigned char *eimage,
236 int dest_mask, 235 int dest_mask,
237 Lisp_Object instantiator, 236 Lisp_Object instantiator,
287 }; 286 };
288 287
289 /* 288 /*
290 * Constants returned by device_implementation_flags_method 289 * Constants returned by device_implementation_flags_method
291 */ 290 */
291
292 /* Set when device uses pixel-based geometry */ 292 /* Set when device uses pixel-based geometry */
293 #define XDEVIMPF_PIXEL_GEOMETRY 0x00000001L 293 #define XDEVIMPF_PIXEL_GEOMETRY 0x00000001L
294
295 /* Indicates that the device is a printer */
296 #define XDEVIMPF_IS_A_PRINTER 0x00000002L
297
298 /* Do not automatically redisplay this device */
299 #define XDEVIMPF_NO_AUTO_REDISPLAY 0x00000004L
300
301 /* Do not delete the device when last frame's gone */
302 #define XDEVIMPF_FRAMELESS_OK 0x00000008L
294 303
295 304
296 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name) 305 #define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name)
297 #define CONSOLE_TYPE(c) ((c)->conmeths->symbol) 306 #define CONSOLE_TYPE(c) ((c)->conmeths->symbol)
298 #define CONMETH_TYPE(meths) ((meths)->symbol) 307 #define CONMETH_TYPE(meths) ((meths)->symbol)
372 381
373 /* Declare that console-type TYPE has method M; used in 382 /* Declare that console-type TYPE has method M; used in
374 initialization routines */ 383 initialization routines */
375 #define CONSOLE_HAS_METHOD(type, m) \ 384 #define CONSOLE_HAS_METHOD(type, m) \
376 (type##_console_methods->m##_method = type##_##m) 385 (type##_console_methods->m##_method = type##_##m)
386
387 /* Declare that console-type TYPE inherits method M
388 implementation from console-type FROMTYPE */
389 #define CONSOLE_INHERITS_METHOD(type, fromtype, m) \
390 (type##_console_methods->m##_method = fromtype##_##m)
377 391
378 struct console 392 struct console
379 { 393 {
380 struct lcrecord_header header; 394 struct lcrecord_header header;
381 395
574 int from_kill_emacs, int from_io_error); 588 int from_kill_emacs, int from_io_error);
575 void io_error_delete_console (Lisp_Object console); 589 void io_error_delete_console (Lisp_Object console);
576 void set_console_last_nonminibuf_frame (struct console *con, 590 void set_console_last_nonminibuf_frame (struct console *con,
577 Lisp_Object frame); 591 Lisp_Object frame);
578 592
579 #endif /* _XEMACS_CONSOLE_H_ */ 593 #endif /* INCLUDED_console_h_ */