Mercurial > hg > xemacs-beta
comparison src/redisplay.h @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | 1ccc32a20af4 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
270 | 270 |
271 Redisplay commentary: Everything in redisplay is tied very tightly | 271 Redisplay commentary: Everything in redisplay is tied very tightly |
272 to the things that are being displayed, and the context, | 272 to the things that are being displayed, and the context, |
273 e.g. buffers and windows. According to Chuck this is so that we can | 273 e.g. buffers and windows. According to Chuck this is so that we can |
274 get speed, which seems fine to me, however this usage is extended | 274 get speed, which seems fine to me, however this usage is extended |
275 too far down the redispay routines IMO. At some level there should | 275 too far down the redisplay routines IMO. At some level there should |
276 be functions that know how to display strings with extents and | 276 be functions that know how to display strings with extents and |
277 faces, regardless of buffer etc. After all the window system does | 277 faces, regardless of buffer etc. After all the window system does |
278 not care. <andy@xemacs.org> */ | 278 not care. <andy@xemacs.org> */ |
279 | 279 |
280 typedef struct display_line display_line; | 280 typedef struct display_line display_line; |
306 | 306 |
307 layout_bounds bounds; /* line boundary positions */ | 307 layout_bounds bounds; /* line boundary positions */ |
308 | 308 |
309 char modeline; /* t if this line is a modeline */ | 309 char modeline; /* t if this line is a modeline */ |
310 | 310 |
311 char line_continuation; /* t if this line continues to | |
312 next display line. */ | |
313 | |
311 /* Dynamic array of display blocks */ | 314 /* Dynamic array of display blocks */ |
312 display_block_dynarr *display_blocks; | 315 display_block_dynarr *display_blocks; |
313 | 316 |
314 /* Dynamic arrays of left and right glyph blocks */ | 317 /* Dynamic arrays of left and right glyph blocks */ |
315 glyph_block_dynarr *left_glyphs; | 318 glyph_block_dynarr *left_glyphs; |
413 appropriate flag. | 416 appropriate flag. |
414 | 417 |
415 If any of these flags are set, redisplay will look more carefully | 418 If any of these flags are set, redisplay will look more carefully |
416 to see if anything has really changed. */ | 419 to see if anything has really changed. */ |
417 | 420 |
418 /* non-nil if the contents of a buffer have changed since the last time | 421 /* Nonzero if the contents of a buffer have changed since the last time |
419 redisplay completed */ | 422 redisplay completed. */ |
420 extern int buffers_changed; | 423 extern int buffers_changed; |
421 extern int buffers_changed_set; | 424 extern int buffers_changed_set; |
422 | 425 |
423 /* Nonzero if head_clip or tail_clip of a buffer has changed | 426 /* Nonzero if head_clip or tail_clip of a buffer has changed |
424 since last redisplay that finished */ | 427 since last redisplay that finished. */ |
425 extern int clip_changed; | 428 extern int clip_changed; |
426 extern int clip_changed_set; | 429 extern int clip_changed_set; |
427 | 430 |
428 /* non-nil if any extent has changed since the last time redisplay completed */ | 431 /* Nonzero if any extent has changed since the last time redisplay completed. */ |
429 extern int extents_changed; | 432 extern int extents_changed; |
430 extern int extents_changed_set; | 433 extern int extents_changed_set; |
431 | 434 |
432 /* non-nil if any face has changed since the last time redisplay completed */ | 435 /* Nonzero if any face has changed since the last time redisplay completed. */ |
433 extern int faces_changed; | 436 extern int faces_changed; |
434 | 437 |
435 /* Nonzero means one or more frames have been marked as garbaged */ | 438 /* Nonzero means one or more frames have been marked as garbaged. */ |
436 extern int frame_changed; | 439 extern int frame_changed; |
437 | 440 |
438 /* True if any of the builtin display glyphs (continuation, | 441 /* True if any of the builtin display glyphs (continuation, |
439 hscroll, control-arrow, etc) is in need of updating | 442 hscroll, control-arrow, etc) is in need of updating |
440 somewhere. */ | 443 somewhere. */ |
457 | 460 |
458 /* True if a menubar is in need of updating somewhere. */ | 461 /* True if a menubar is in need of updating somewhere. */ |
459 extern int menubar_changed; | 462 extern int menubar_changed; |
460 extern int menubar_changed_set; | 463 extern int menubar_changed_set; |
461 | 464 |
462 /* true iff we should redraw the modelines on the next redisplay */ | 465 /* True iff we should redraw the modelines on the next redisplay. */ |
463 extern int modeline_changed; | 466 extern int modeline_changed; |
464 extern int modeline_changed_set; | 467 extern int modeline_changed_set; |
465 | 468 |
466 /* non-nil if point has changed in some buffer since the last time | 469 /* Nonzero if point has changed in some buffer since the last time |
467 redisplay completed */ | 470 redisplay completed. */ |
468 extern int point_changed; | 471 extern int point_changed; |
469 extern int point_changed_set; | 472 extern int point_changed_set; |
470 | 473 |
471 /* non-nil if some frame has changed its size */ | 474 /* Nonzero if some frame has changed its size. */ |
472 extern int size_changed; | 475 extern int size_changed; |
473 | 476 |
474 /* non-nil if some device has signaled that it wants to change size */ | 477 /* Nonzero if some device has signaled that it wants to change size. */ |
475 extern int asynch_device_change_pending; | 478 extern int asynch_device_change_pending; |
476 | 479 |
477 /* non-nil if any toolbar has changed */ | 480 /* Nonzero if any toolbar has changed. */ |
478 extern int toolbar_changed; | 481 extern int toolbar_changed; |
479 extern int toolbar_changed_set; | 482 extern int toolbar_changed_set; |
480 | 483 |
481 /* non-nil if any gutter has changed */ | 484 /* Nonzero if any gutter has changed. */ |
482 extern int gutter_changed; | 485 extern int gutter_changed; |
483 extern int gutter_changed_set; | 486 extern int gutter_changed_set; |
484 | 487 |
485 /* non-nil if any window has changed since the last time redisplay completed */ | 488 /* Nonzero if any window has changed since the last time redisplay completed */ |
486 extern int windows_changed; | 489 extern int windows_changed; |
487 | 490 |
488 /* non-nil if any frame's window structure has changed since the last | 491 /* Nonzero if any frame's window structure has changed since the last |
489 time redisplay completed */ | 492 time redisplay completed. */ |
490 extern int windows_structure_changed; | 493 extern int windows_structure_changed; |
491 | 494 |
492 /* These macros can be relatively expensive. Since they are often | 495 /* These macros can be relatively expensive. Since they are often |
493 called numerous times between each call to redisplay, we keep track | 496 called numerous times between each call to redisplay, we keep track |
494 if each has already been called and don't bother doing most of the | 497 if each has already been called and don't bother doing most of the |
548 | 551 |
549 #define GLOBAL_RESET_CHANGED_FLAGS do { \ | 552 #define GLOBAL_RESET_CHANGED_FLAGS do { \ |
550 buffers_changed = 0; \ | 553 buffers_changed = 0; \ |
551 clip_changed = 0; \ | 554 clip_changed = 0; \ |
552 extents_changed = 0; \ | 555 extents_changed = 0; \ |
553 faces_changed = 0; \ | |
554 frame_changed = 0; \ | 556 frame_changed = 0; \ |
555 icon_changed = 0; \ | 557 icon_changed = 0; \ |
556 menubar_changed = 0; \ | 558 menubar_changed = 0; \ |
557 modeline_changed = 0; \ | 559 modeline_changed = 0; \ |
558 point_changed = 0; \ | 560 point_changed = 0; \ |
559 toolbar_changed = 0; \ | 561 toolbar_changed = 0; \ |
560 gutter_changed = 0; \ | 562 gutter_changed = 0; \ |
561 glyphs_changed = 0; \ | 563 glyphs_changed = 0; \ |
562 subwindows_changed = 0; \ | 564 subwindows_changed = 0; \ |
563 subwindows_state_changed = 0; \ | 565 subwindows_state_changed = 0; \ |
564 windows_changed = 0; \ | 566 windows_changed = 0; \ |
565 windows_structure_changed = 0; \ | 567 windows_structure_changed = 0; \ |
566 } while (0) | 568 } while (0) |
567 | 569 |
568 #define CLASS_REDISPLAY_FLAGS_CHANGEDP(p) \ | 570 #define CLASS_REDISPLAY_FLAGS_CHANGEDP(p) \ |
576 (p)->modeline_changed || \ | 578 (p)->modeline_changed || \ |
577 (p)->point_changed || \ | 579 (p)->point_changed || \ |
578 (p)->toolbar_changed || \ | 580 (p)->toolbar_changed || \ |
579 (p)->gutter_changed || \ | 581 (p)->gutter_changed || \ |
580 (p)->glyphs_changed || \ | 582 (p)->glyphs_changed || \ |
581 (p)->size_changed || \ | 583 (p)->size_changed || \ |
582 (p)->subwindows_changed || \ | 584 (p)->subwindows_changed || \ |
583 (p)->subwindows_state_changed || \ | 585 (p)->subwindows_state_changed || \ |
584 (p)->windows_changed || \ | 586 (p)->windows_changed || \ |
585 (p)->windows_structure_changed ) | 587 (p)->windows_structure_changed ) |
586 | 588 |
638 /* Nonzero means no need to redraw the entire frame on resuming | 640 /* Nonzero means no need to redraw the entire frame on resuming |
639 a suspended Emacs. This is useful on terminals with multiple pages, | 641 a suspended Emacs. This is useful on terminals with multiple pages, |
640 where one page is used for Emacs and another for all else. */ | 642 where one page is used for Emacs and another for all else. */ |
641 extern int no_redraw_on_reenter; | 643 extern int no_redraw_on_reenter; |
642 | 644 |
643 /* Nonzero means flash the frame instead of ringing the bell. */ | 645 /* Non-nil means flash the frame instead of ringing the bell. */ |
644 extern int visible_bell; | 646 extern Lisp_Object Vvisible_bell; |
645 | 647 |
646 /* Thickness of shadow border around 3D modelines. */ | 648 /* Thickness of shadow border around 3D modelines. */ |
647 extern Lisp_Object Vmodeline_shadow_thickness; | 649 extern Lisp_Object Vmodeline_shadow_thickness; |
648 | 650 |
649 /* Scroll if point lands on the bottom line and that line is partially | 651 /* Scroll if point lands on the bottom line and that line is partially |
659 /* If non-zero, a window-system was specified on the command line. | 661 /* If non-zero, a window-system was specified on the command line. |
660 Defined in emacs.c. */ | 662 Defined in emacs.c. */ |
661 extern int display_arg; | 663 extern int display_arg; |
662 | 664 |
663 /* Type of display specified. Defined in emacs.c. */ | 665 /* Type of display specified. Defined in emacs.c. */ |
664 extern CONST char *display_use; | 666 extern const char *display_use; |
665 | 667 |
666 /* Nonzero means reading single-character input with prompt | 668 /* Nonzero means reading single-character input with prompt |
667 so put cursor on minibuffer after the prompt. */ | 669 so put cursor on minibuffer after the prompt. */ |
668 | 670 |
669 extern int cursor_in_echo_area; | 671 extern int cursor_in_echo_area; |
670 | 672 |
671 extern Lisp_Object Qbar_cursor, Qcursor_in_echo_area, Vwindow_system; | 673 extern Lisp_Object Qbar_cursor, Qcursor_in_echo_area, Vwindow_system; |
674 | |
675 extern Lisp_Object Qtop_bottom; | |
672 | 676 |
673 | 677 |
674 /*************************************************************************/ | 678 /*************************************************************************/ |
675 /* redisplay exported functions */ | 679 /* redisplay exported functions */ |
676 /*************************************************************************/ | 680 /*************************************************************************/ |
682 int redisplay_frame_text_width_string (struct frame *f, | 686 int redisplay_frame_text_width_string (struct frame *f, |
683 Lisp_Object face, | 687 Lisp_Object face, |
684 Bufbyte *nonreloc, | 688 Bufbyte *nonreloc, |
685 Lisp_Object reloc, | 689 Lisp_Object reloc, |
686 Bytecount offset, Bytecount len); | 690 Bytecount offset, Bytecount len); |
691 int redisplay_frame (struct frame *f, int preemption_check); | |
687 void redisplay (void); | 692 void redisplay (void); |
688 struct display_block *get_display_block_from_line (struct display_line *dl, | 693 struct display_block *get_display_block_from_line (struct display_line *dl, |
689 enum display_type type); | 694 enum display_type type); |
690 layout_bounds calculate_display_line_boundaries (struct window *w, | 695 layout_bounds calculate_display_line_boundaries (struct window *w, |
691 int modeline); | 696 int modeline); |
694 int line_at_center (struct window *w, int type, Bufpos start, Bufpos point); | 699 int line_at_center (struct window *w, int type, Bufpos start, Bufpos point); |
695 int window_half_pixpos (struct window *w); | 700 int window_half_pixpos (struct window *w); |
696 void redisplay_echo_area (void); | 701 void redisplay_echo_area (void); |
697 void free_display_structs (struct window_mirror *mir); | 702 void free_display_structs (struct window_mirror *mir); |
698 void free_display_lines (display_line_dynarr *dla); | 703 void free_display_lines (display_line_dynarr *dla); |
704 void mark_redisplay_structs (display_line_dynarr *dla); | |
699 void generate_displayable_area (struct window *w, Lisp_Object disp_string, | 705 void generate_displayable_area (struct window *w, Lisp_Object disp_string, |
700 int xpos, int ypos, int width, int height, | 706 int xpos, int ypos, int width, int height, |
701 display_line_dynarr* dl, | 707 display_line_dynarr* dl, |
702 Bufpos start_pos, face_index default_face); | 708 Bufpos start_pos, face_index default_face); |
703 /* `generate_title_string' in frame.c needs this */ | 709 /* `generate_title_string' in frame.c needs this */ |
743 | 749 |
744 /* defined in redisplay-output.c */ | 750 /* defined in redisplay-output.c */ |
745 int get_next_display_block (layout_bounds bounds, | 751 int get_next_display_block (layout_bounds bounds, |
746 display_block_dynarr *dba, int start_pos, | 752 display_block_dynarr *dba, int start_pos, |
747 int *next_start); | 753 int *next_start); |
748 void redisplay_output_layout (struct window *w, | 754 void redisplay_output_layout (Lisp_Object domain, |
749 Lisp_Object image_instance, | 755 Lisp_Object image_instance, |
750 struct display_box* db, struct display_glyph_area* dga, | 756 struct display_box* db, struct display_glyph_area* dga, |
751 face_index findex, int cursor_start, int cursor_width, | 757 face_index findex, int cursor_start, int cursor_width, |
752 int cursor_height); | 758 int cursor_height); |
753 void redisplay_output_subwindow (struct window *w, | 759 void redisplay_output_subwindow (struct window *w, |
781 int no_output_end); | 787 int no_output_end); |
782 void redisplay_redraw_cursor (struct frame *f, int run_begin_end_meths); | 788 void redisplay_redraw_cursor (struct frame *f, int run_begin_end_meths); |
783 void output_display_line (struct window *w, display_line_dynarr *cdla, | 789 void output_display_line (struct window *w, display_line_dynarr *cdla, |
784 display_line_dynarr *ddla, int line, | 790 display_line_dynarr *ddla, int line, |
785 int force_start, int force_end); | 791 int force_start, int force_end); |
792 void sync_display_line_structs (struct window *w, int line, int do_blocks, | |
793 display_line_dynarr *cdla, | |
794 display_line_dynarr *ddla); | |
786 | 795 |
787 #endif /* INCLUDED_redisplay_h_ */ | 796 #endif /* INCLUDED_redisplay_h_ */ |