comparison src/termhooks.h @ 83342:9216636c02fc

Rename `struct display' to `struct device'. Update function, parameter and variable names accordingly. * src/termhooks.h (struct device): Rename to `struct device'. Rename member `next_display' to `next_device'. Rename member `delete_display_hook' to `delete_device_hook'. (FRAME_DISPLAY): Rename to FRAME_DEVICE. (DISPLAY_ACTIVE_P): Rename to DEVICE_ACTIVE_P. (DISPLAY_TERMINAL_CODING): Rename to DEVICE_TERMINAL_CODING. (DISPLAY_KEYBOARD_CODING): Rename to DEVICE_KEYBOARD_CODING. * src/frame.h (stuct frame): Rename `display' member to `device'. * src/xterm.h (x_display_info): Rename member `frame_display' to `device'. * src/termchar.h (struct tty_display_info): Rename `display' member to `device'. * src/keyboard.c (push_display_kboard): Rename to push_device_kboard. * lisp/frame.el (make-frame): Rename frame parameter `display-id' to `device'. * src/frame.c (Fmake_terminal_frame): Ditto. * src/xfns.c (Fx_create_frame): Ditto. * src/term.c (display_list): Rename to device_list. * src/term.c (initial_display): Rename to initial_device. * src/term.c (next_display_id): Rename to next_device_id. * src/term.c (get_display): Rename to get_device. * src/term.c (get_tty_display): Rename to get_tty_device. * src/term.c (get_named_tty_display): Rename to get_named_tty. * src/term.c (init_initial_display): Rename to init_initial_device. * src/term.c (delete_initial_display): Rename to delete_initial_device. * src/term.c (create_display): Rename to create_device. * src/term.c (delete_display): Rename to delete_device. * src/xfns.c (check_x_display_info): Document that the function allows display ids as well. * src/xterm.c (x_delete_frame_display): Rename to x_delete_device. * src/xterm.c (x_create_frame_display): Rename to x_create_device. * src/coding.c: Update. * src/dispextern.h: Update. * src/data.c: Update. * src/dispnew.c: Update. * src/frame.c: Update. * src/frame.h: Update. * src/keyboard.c: Update. * src/keyboard.h: Update. * src/lisp.h: Update. * src/sysdep.c: Update. * src/term.c: Update. * src/xdisp.c: Update. * src/xselect.c: Update. * src/xterm.c: Update. * src/prefix-args.c: Include stdlib.h for exit. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-382
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 11 Jul 2005 00:05:55 +0000
parents 6c13700d1c13
children 532e0a9335a9
comparison
equal deleted inserted replaced
83341:76e51706154e 83342:9216636c02fc
275 }; 275 };
276 276
277 #endif /* CONSP */ 277 #endif /* CONSP */
278 278
279 279
280 /* Display-local parameters. */ 280 /* Device-local parameters. */
281 struct display 281 struct device
282 { 282 {
283 /* Chain of all displays. */ 283 /* Chain of all display devices. */
284 struct display *next_display; 284 struct device *next_device;
285 285
286 /* Unique id for this display. */ 286 /* Unique id for this display device. */
287 int id; 287 int id;
288 288
289 /* The number of frames that are on this display. */ 289 /* The number of frames that are on this device. */
290 int reference_count; 290 int reference_count;
291 291
292 /* The type of the display. */ 292 /* The type of the display device. */
293 enum output_method type; 293 enum output_method type;
294 294
295 /* The name of the display device. Do not use this to identify the display. */ 295 /* The name of the display device. Do not use this to identify the device. */
296 char *name; 296 char *name;
297 297
298 #ifdef MULTI_KBOARD 298 #ifdef MULTI_KBOARD
299 /* The device's keyboard object. */ 299 /* The device's keyboard object. */
300 struct kboard *kboard; 300 struct kboard *kboard;
301 #endif 301 #endif
302 302
303 /* Display-type dependent data shared amongst all frames on this display. */ 303 /* Device-type dependent data shared amongst all frames on this display. */
304 union display_info 304 union display_info
305 { 305 {
306 struct tty_display_info *tty; /* termchar.h */ 306 struct tty_display_info *tty; /* termchar.h */
307 struct x_display_info *x; /* xterm.h */ 307 struct x_display_info *x; /* xterm.h */
308 } display_info; 308 } display_info;
365 void (*write_glyphs_hook) P_ ((struct frame *f, struct glyph *s, int n)); 365 void (*write_glyphs_hook) P_ ((struct frame *f, struct glyph *s, int n));
366 void (*delete_glyphs_hook) P_ ((struct frame *, int)); 366 void (*delete_glyphs_hook) P_ ((struct frame *, int));
367 367
368 void (*ring_bell_hook) P_ ((struct frame *f)); 368 void (*ring_bell_hook) P_ ((struct frame *f));
369 369
370 void (*reset_terminal_modes_hook) P_ ((struct display *)); 370 void (*reset_terminal_modes_hook) P_ ((struct device *));
371 void (*set_terminal_modes_hook) P_ ((struct display *)); 371 void (*set_terminal_modes_hook) P_ ((struct device *));
372 372
373 void (*update_begin_hook) P_ ((struct frame *)); 373 void (*update_begin_hook) P_ ((struct frame *));
374 void (*update_end_hook) P_ ((struct frame *)); 374 void (*update_end_hook) P_ ((struct frame *));
375 void (*set_terminal_window_hook) P_ ((struct frame *, int)); 375 void (*set_terminal_window_hook) P_ ((struct frame *, int));
376 376
496 void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME)); 496 void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME));
497 497
498 498
499 /* Called to read input events. 499 /* Called to read input events.
500 500
501 DISPLAY indicates which display to read from. Input events 501 DEVICE indicates which display device to read from. Input events
502 should be read into BUF, the size of which is given in SIZE. 502 should be read into BUF, the size of which is given in SIZE.
503 EXPECTED is non-zero if the caller suspects that new input is 503 EXPECTED is non-zero if the caller suspects that new input is
504 available. 504 available.
505 505
506 A positive return value indicates that that many input events 506 A positive return value indicates that that many input events
507 where read into BUF. 507 where read into BUF.
508 Zero means no events were immediately available. 508 Zero means no events were immediately available.
509 A value of -1 means a transient read error, while -2 indicates 509 A value of -1 means a transient read error, while -2 indicates
510 that the display was closed (hangup), and it should be deleted. 510 that the device was closed (hangup), and it should be deleted.
511 511
512 XXX Please note that a non-zero value of EXPECTED only means that 512 XXX Please note that a non-zero value of EXPECTED only means that
513 there is available input on at least one of the currently opened 513 there is available input on at least one of the currently opened
514 display devices -- but not necessarily on this device. 514 display devices -- but not necessarily on this device.
515 Therefore, in most cases EXPECTED should be simply ignored. 515 Therefore, in most cases EXPECTED should be simply ignored.
516 516
517 XXX This documentation needs to be updated. */ 517 XXX This documentation needs to be updated. */
518 int (*read_socket_hook) P_ ((struct display *display, 518 int (*read_socket_hook) P_ ((struct device *device,
519 int expected, 519 int expected,
520 struct input_event *hold_quit)); 520 struct input_event *hold_quit));
521 521
522 /* Called when a frame's display becomes entirely up to date. */ 522 /* Called when a frame's display becomes entirely up to date. */
523 void (*frame_up_to_date_hook) P_ ((struct frame *)); 523 void (*frame_up_to_date_hook) P_ ((struct frame *));
524 524
525 525
526 /* Called to delete the device-specific portions of a frame that is 526 /* Called to delete the device-specific portions of a frame that is
527 on this display. */ 527 on this display device. */
528 void (*delete_frame_hook) P_ ((struct frame *)); 528 void (*delete_frame_hook) P_ ((struct frame *));
529 529
530 /* Called after the last frame on this display is deleted, or when 530 /* Called after the last frame on this device is deleted, or when
531 the display device was closed (hangup). 531 the display device was closed (hangup).
532 532
533 If this is NULL, then the generic delete_display is called 533 If this is NULL, then the generic delete_device is called
534 instead. Otherwise the hook must call delete_display itself. 534 instead. Otherwise the hook must call delete_device itself.
535 535
536 The hook must check for and close any live frames that are still 536 The hook must check for and close any live frames that are still
537 on the display. Fdelete_frame ensures that there are no live 537 on the device. Fdelete_frame ensures that there are no live
538 frames on the display when it calls this hook, so infinite 538 frames on the device when it calls this hook, so infinite
539 recursion is prevented. */ 539 recursion is prevented. */
540 void (*delete_display_hook) P_ ((struct display *)); 540 void (*delete_device_hook) P_ ((struct device *));
541 }; 541 };
542 542
543 543
544 /* Chain of all displays currently in use. */ 544 /* Chain of all display devices currently in use. */
545 extern struct display *display_list; 545 extern struct device *device_list;
546 546
547 #define FRAME_MUST_WRITE_SPACES(f) ((f)->display->must_write_spaces) 547 #define FRAME_MUST_WRITE_SPACES(f) ((f)->device->must_write_spaces)
548 #define FRAME_FAST_CLEAR_END_OF_LINE(f) ((f)->display->fast_clear_end_of_line) 548 #define FRAME_FAST_CLEAR_END_OF_LINE(f) ((f)->device->fast_clear_end_of_line)
549 #define FRAME_LINE_INS_DEL_OK(f) ((f)->display->line_ins_del_ok) 549 #define FRAME_LINE_INS_DEL_OK(f) ((f)->device->line_ins_del_ok)
550 #define FRAME_CHAR_INS_DEL_OK(f) ((f)->display->char_ins_del_ok) 550 #define FRAME_CHAR_INS_DEL_OK(f) ((f)->device->char_ins_del_ok)
551 #define FRAME_SCROLL_REGION_OK(f) ((f)->display->scroll_region_ok) 551 #define FRAME_SCROLL_REGION_OK(f) ((f)->device->scroll_region_ok)
552 #define FRAME_SCROLL_REGION_COST(f) ((f)->display->scroll_region_cost) 552 #define FRAME_SCROLL_REGION_COST(f) ((f)->device->scroll_region_cost)
553 #define FRAME_MEMORY_BELOW_FRAME(f) ((f)->display->memory_below_frame) 553 #define FRAME_MEMORY_BELOW_FRAME(f) ((f)->device->memory_below_frame)
554 554
555 #define FRAME_TERMINAL_CODING(f) ((f)->display->terminal_coding) 555 #define FRAME_TERMINAL_CODING(f) ((f)->device->terminal_coding)
556 #define FRAME_KEYBOARD_CODING(f) ((f)->display->keyboard_coding) 556 #define FRAME_KEYBOARD_CODING(f) ((f)->device->keyboard_coding)
557 557
558 #define DISPLAY_TERMINAL_CODING(d) ((d)->terminal_coding) 558 #define DEVICE_TERMINAL_CODING(d) ((d)->terminal_coding)
559 #define DISPLAY_KEYBOARD_CODING(d) ((d)->keyboard_coding) 559 #define DEVICE_KEYBOARD_CODING(d) ((d)->keyboard_coding)
560 560
561 #define FRAME_RIF(f) ((f)->display->rif) 561 #define FRAME_RIF(f) ((f)->device->rif)
562 562
563 #define FRAME_DISPLAY(f) ((f)->display) 563 #define FRAME_DEVICE(f) ((f)->device)
564 564
565 /* FRAME_WINDOW_P tests whether the frame is a window, and is 565 /* FRAME_WINDOW_P tests whether the frame is a window, and is
566 defined to be the predicate for the window system being used. */ 566 defined to be the predicate for the window system being used. */
567 567
568 #ifdef HAVE_X_WINDOWS 568 #ifdef HAVE_X_WINDOWS
576 #endif 576 #endif
577 #ifndef FRAME_WINDOW_P 577 #ifndef FRAME_WINDOW_P
578 #define FRAME_WINDOW_P(f) (0) 578 #define FRAME_WINDOW_P(f) (0)
579 #endif 579 #endif
580 580
581 /* Return true if the display is not suspended. */ 581 /* Return true if the display device is not suspended. */
582 #define DISPLAY_ACTIVE_P(d) ((d)->type != output_termcap || (d)->display_info.tty->input) 582 #define DEVICE_ACTIVE_P(d) ((d)->type != output_termcap || (d)->display_info.tty->input)
583 583
584 extern struct display *create_display P_ ((void)); 584 extern struct device *create_device P_ ((void));
585 extern void delete_display P_ ((struct display *)); 585 extern void delete_device P_ ((struct device *));
586 586
587 /* The initial display device, created by initial_term_init. */ 587 /* The initial display device, created by initial_term_init. */
588 extern struct display *initial_display; 588 extern struct device *initial_device;
589 589
590 /* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d 590 /* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d
591 (do not change this comment) */ 591 (do not change this comment) */