aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h45
1 files changed, 34 insertions, 11 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index cc248a4472e..59785b2d03d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -482,6 +482,11 @@ struct glyph
482 continuation glyphs, or the overlay-arrow glyphs on TTYs. */ 482 continuation glyphs, or the overlay-arrow glyphs on TTYs. */
483 Lisp_Object object; 483 Lisp_Object object;
484 484
485 /* Frame on which the glyph was produced. The face_id of this glyph
486 refers to the face_cache of this frame. This is used on tty frames
487 only. */
488 struct frame *frame;
489
485 /* Width in pixels. */ 490 /* Width in pixels. */
486 short pixel_width; 491 short pixel_width;
487 492
@@ -626,10 +631,12 @@ struct glyph
626 631
627#define FONT_TYPE_UNKNOWN 0 632#define FONT_TYPE_UNKNOWN 0
628 633
629/* Is GLYPH a space? */ 634/* Is GLYPH a space in default face on frame FRAME? */
630 635
631#define CHAR_GLYPH_SPACE_P(GLYPH) \ 636# define CHAR_GLYPH_SPACE_P(FRAME, GLYPH) \
632 ((GLYPH).u.ch == SPACEGLYPH && (GLYPH).face_id == DEFAULT_FACE_ID) 637 ((GLYPH).u.ch == SPACEGLYPH \
638 && (GLYPH).face_id == DEFAULT_FACE_ID \
639 && (GLYPH).frame == (FRAME))
633 640
634/* Are glyph slices of glyphs *X and *Y equal? It assumes that both 641/* Are glyph slices of glyphs *X and *Y equal? It assumes that both
635 glyphs have the same type. 642 glyphs have the same type.
@@ -654,6 +661,7 @@ struct glyph
654 && (X)->u.val == (Y)->u.val \ 661 && (X)->u.val == (Y)->u.val \
655 && GLYPH_SLICE_EQUAL_P (X, Y) \ 662 && GLYPH_SLICE_EQUAL_P (X, Y) \
656 && (X)->face_id == (Y)->face_id \ 663 && (X)->face_id == (Y)->face_id \
664 && (X)->frame == (Y)->frame \
657 && (X)->padding_p == (Y)->padding_p \ 665 && (X)->padding_p == (Y)->padding_p \
658 && (X)->left_box_line_p == (Y)->left_box_line_p \ 666 && (X)->left_box_line_p == (Y)->left_box_line_p \
659 && (X)->right_box_line_p == (Y)->right_box_line_p \ 667 && (X)->right_box_line_p == (Y)->right_box_line_p \
@@ -665,16 +673,18 @@ struct glyph
665#define GLYPH_CHAR_AND_FACE_EQUAL_P(X, Y) \ 673#define GLYPH_CHAR_AND_FACE_EQUAL_P(X, Y) \
666 ((X)->u.ch == (Y)->u.ch \ 674 ((X)->u.ch == (Y)->u.ch \
667 && (X)->face_id == (Y)->face_id \ 675 && (X)->face_id == (Y)->face_id \
676 && (X)->frame == (Y)->frame \
668 && (X)->padding_p == (Y)->padding_p) 677 && (X)->padding_p == (Y)->padding_p)
669 678
670/* Fill a character glyph GLYPH. CODE, FACE_ID, PADDING_P correspond 679/* Fill a character glyph GLYPH. CODE, FACE_ID, PADDING_P correspond
671 to the bits defined for the typedef `GLYPH' in lisp.h. */ 680 to the bits defined for the typedef `GLYPH' in lisp.h. */
672 681
673#define SET_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \ 682#define SET_CHAR_GLYPH(FRAME, GLYPH, CODE, FACE_ID, PADDING_P) \
674 do \ 683 do \
675 { \ 684 { \
676 (GLYPH).u.ch = (CODE); \ 685 (GLYPH).u.ch = (CODE); \
677 (GLYPH).face_id = (FACE_ID); \ 686 (GLYPH).face_id = (FACE_ID); \
687 (GLYPH).frame = (FRAME); \
678 (GLYPH).padding_p = (PADDING_P); \ 688 (GLYPH).padding_p = (PADDING_P); \
679 } \ 689 } \
680 while (false) 690 while (false)
@@ -682,11 +692,9 @@ struct glyph
682/* Fill a character type glyph GLYPH from a glyph typedef FROM as 692/* Fill a character type glyph GLYPH from a glyph typedef FROM as
683 defined in lisp.h. */ 693 defined in lisp.h. */
684 694
685#define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM) \ 695#define SET_CHAR_GLYPH_FROM_GLYPH(FRAME, GLYPH, FROM) \
686 SET_CHAR_GLYPH (GLYPH, \ 696 SET_CHAR_GLYPH (FRAME, GLYPH, GLYPH_CHAR (FROM), \
687 GLYPH_CHAR (FROM), \ 697 GLYPH_FACE (FROM), false)
688 GLYPH_FACE (FROM), \
689 false)
690 698
691/* Construct a glyph code from a character glyph GLYPH. If the 699/* Construct a glyph code from a character glyph GLYPH. If the
692 character is multibyte, return -1 as we can't use glyph table for a 700 character is multibyte, return -1 as we can't use glyph table for a
@@ -3805,7 +3813,7 @@ extern void adjust_frame_glyphs (struct frame *);
3805void free_glyphs (struct frame *); 3813void free_glyphs (struct frame *);
3806void free_window_matrices (struct window *); 3814void free_window_matrices (struct window *);
3807void check_glyph_memory (void); 3815void check_glyph_memory (void);
3808void mirrored_line_dance (struct glyph_matrix *, int, int, int *, char *); 3816void mirrored_line_dance (struct frame *f, int, int, int *, char *);
3809void clear_glyph_matrix (struct glyph_matrix *); 3817void clear_glyph_matrix (struct glyph_matrix *);
3810void clear_current_matrices (struct frame *f); 3818void clear_current_matrices (struct frame *f);
3811void clear_desired_matrices (struct frame *); 3819void clear_desired_matrices (struct frame *);
@@ -3829,7 +3837,7 @@ extern bool frame_size_change_delayed (struct frame *);
3829void init_display (void); 3837void init_display (void);
3830void syms_of_display (void); 3838void syms_of_display (void);
3831extern void spec_glyph_lookup_face (struct window *, GLYPH *); 3839extern void spec_glyph_lookup_face (struct window *, GLYPH *);
3832extern void fill_up_frame_row_with_spaces (struct glyph_row *, int); 3840extern void fill_up_frame_row_with_spaces (struct frame *, struct glyph_row *, int);
3833 3841
3834/* Defined in terminal.c. */ 3842/* Defined in terminal.c. */
3835 3843
@@ -3911,6 +3919,21 @@ extern void gui_redo_mouse_highlight (Display_Info *);
3911 3919
3912#endif /* HAVE_WINDOW_SYSTEM */ 3920#endif /* HAVE_WINDOW_SYSTEM */
3913 3921
3922struct frame *root_frame (struct frame *f);
3923Lisp_Object frames_in_reverse_z_order (struct frame *f, bool visible);
3924bool is_tty_frame (struct frame *f);
3925bool is_tty_child_frame (struct frame *f);
3926bool is_tty_root_frame (struct frame *f);
3927Lisp_Object frames_with_root (struct frame *root, bool visible);
3928bool combine_updates (Lisp_Object root_frames, bool force_p, bool inhibit_id_p);
3929bool combine_updates_for_frame (struct frame *f, bool force_p, bool inhibit_id_p);
3930void tty_raise_lower_frame (struct frame *f, bool raise);
3931
3932#ifdef GLYPH_DEBUG
3933bool is_tty_desired_glyph (struct frame *f, struct glyph *g);
3934bool is_tty_current_glyph (struct frame *f, struct glyph *g);
3935#endif
3936
3914INLINE_HEADER_END 3937INLINE_HEADER_END
3915 3938
3916#endif /* not DISPEXTERN_H_INCLUDED */ 3939#endif /* not DISPEXTERN_H_INCLUDED */