/[emacs]/emacs/src/dispextern.h
ViewVC logotype

Diff of /emacs/src/dispextern.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.111.4.3 by eliz, Thu May 16 16:11:41 2002 UTC revision 1.111.4.4 by lektu, Mon Nov 11 07:33:09 2002 UTC
# Line 25  Boston, MA 02111-1307, USA.  */ Line 25  Boston, MA 02111-1307, USA.  */
25  #define DISPEXTERN_H_INCLUDED  #define DISPEXTERN_H_INCLUDED
26    
27  #ifdef HAVE_X_WINDOWS  #ifdef HAVE_X_WINDOWS
28    
29  #include <X11/Xlib.h>  #include <X11/Xlib.h>
30  #ifdef USE_X_TOOLKIT  #ifdef USE_X_TOOLKIT
31  #include <X11/Intrinsic.h>  #include <X11/Intrinsic.h>
32  #endif /* USE_X_TOOLKIT */  #endif /* USE_X_TOOLKIT */
33    
34    #else /* !HAVE_X_WINDOWS */
35    
36    /* X-related stuff used by non-X gui code. */
37    
38    typedef struct {
39      unsigned long pixel;
40      unsigned short red, green, blue;
41      char flags;
42      char pad;
43    } XColor;
44    
45  #endif /* HAVE_X_WINDOWS */  #endif /* HAVE_X_WINDOWS */
46    
47  #ifdef MSDOS  #ifdef MSDOS
# Line 99  extern int trace_redisplay_p; Line 112  extern int trace_redisplay_p;
112    
113  #endif /* GLYPH_DEBUG == 0 */  #endif /* GLYPH_DEBUG == 0 */
114    
115        
116    
117  /***********************************************************************  /***********************************************************************
118                              Text positions                              Text positions
# Line 108  extern int trace_redisplay_p; Line 121  extern int trace_redisplay_p;
121  /* Starting with Emacs 20.3, characters from strings and buffers have  /* Starting with Emacs 20.3, characters from strings and buffers have
122     both a character and a byte position associated with them.  The     both a character and a byte position associated with them.  The
123     following structure holds such a pair of positions.  */     following structure holds such a pair of positions.  */
124        
125  struct text_pos  struct text_pos
126  {  {
127    /* Character position.  */    /* Character position.  */
# Line 164  struct text_pos Line 177  struct text_pos
177    
178  #define SET_MARKER_FROM_TEXT_POS(MARKER, POS) \  #define SET_MARKER_FROM_TEXT_POS(MARKER, POS) \
179       set_marker_both ((MARKER), Qnil, CHARPOS ((POS)), BYTEPOS ((POS)))       set_marker_both ((MARKER), Qnil, CHARPOS ((POS)), BYTEPOS ((POS)))
180        
181  /* Value is non-zero if character and byte positions of POS1 and POS2  /* Value is non-zero if character and byte positions of POS1 and POS2
182     are equal.  */     are equal.  */
183    
# Line 211  struct display_pos Line 224  struct display_pos
224  enum glyph_type  enum glyph_type
225  {  {
226    /* Glyph describes a character.  */    /* Glyph describes a character.  */
227    CHAR_GLYPH,      CHAR_GLYPH,
228    
229    /* Glyph describes a composition sequence.  */    /* Glyph describes a composition sequence.  */
230    COMPOSITE_GLYPH,    COMPOSITE_GLYPH,
# Line 242  struct glyph Line 255  struct glyph
255    int charpos;    int charpos;
256    
257    /* Lisp object source of this glyph.  Currently either a buffer or    /* Lisp object source of this glyph.  Currently either a buffer or
258       a string, if the glyph was produced from characters which came from       a string, if the glyph was produced from characters which came from
259       a buffer or a string; or 0 if the glyph was inserted by redisplay       a buffer or a string; or 0 if the glyph was inserted by redisplay
260       for its own purposes such as padding.  */       for its own purposes such as padding.  */
261    Lisp_Object object;    Lisp_Object object;
# Line 321  struct glyph Line 334  struct glyph
334        unsigned ascent  : 16;        unsigned ascent  : 16;
335      }      }
336      stretch;      stretch;
337        
338      /* Used to compare all bit-fields above in one step.  */      /* Used to compare all bit-fields above in one step.  */
339      unsigned val;      unsigned val;
340    } u;    } u;
# Line 334  struct glyph Line 347  struct glyph
347       (GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH)       (GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH)
348    
349  /* Are glyphs *X and *Y displayed equal?  */  /* Are glyphs *X and *Y displayed equal?  */
350        
351  #define GLYPH_EQUAL_P(X, Y)                                     \  #define GLYPH_EQUAL_P(X, Y)                                     \
352       ((X)->type == (Y)->type                                    \       ((X)->type == (Y)->type                                    \
353        && (X)->u.val == (Y)->u.val                               \        && (X)->u.val == (Y)->u.val                               \
# Line 354  struct glyph Line 367  struct glyph
367    
368  /* Fill a character glyph GLYPH.  CODE, FACE_ID, PADDING_P correspond  /* Fill a character glyph GLYPH.  CODE, FACE_ID, PADDING_P correspond
369     to the bits defined for the typedef `GLYPH' in lisp.h.  */     to the bits defined for the typedef `GLYPH' in lisp.h.  */
370        
371  #define SET_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \  #define SET_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \
372       do                                                 \       do                                                 \
373         {                                                \         {                                                \
# Line 366  struct glyph Line 379  struct glyph
379    
380  /* Fill a character type glyph GLYPH from a glyph typedef FROM as  /* Fill a character type glyph GLYPH from a glyph typedef FROM as
381     defined in lisp.h.  */     defined in lisp.h.  */
382        
383  #define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM)                  \  #define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM)                  \
384       SET_CHAR_GLYPH ((GLYPH),                                   \       SET_CHAR_GLYPH ((GLYPH),                                   \
385                       FAST_GLYPH_CHAR ((FROM)),                  \                       FAST_GLYPH_CHAR ((FROM)),                  \
# Line 376  struct glyph Line 389  struct glyph
389  /* Construct a glyph code from a character glyph GLYPH.  If the  /* Construct a glyph code from a character glyph GLYPH.  If the
390     character is multibyte, return -1 as we can't use glyph table for a     character is multibyte, return -1 as we can't use glyph table for a
391     multibyte character. */     multibyte character. */
392        
393  #define GLYPH_FROM_CHAR_GLYPH(GLYPH)                            \  #define GLYPH_FROM_CHAR_GLYPH(GLYPH)                            \
394    ((GLYPH).u.ch < 256                                           \    ((GLYPH).u.ch < 256                                           \
395     ? ((GLYPH).u.ch | ((GLYPH).face_id << CHARACTERBITS))        \     ? ((GLYPH).u.ch | ((GLYPH).face_id << CHARACTERBITS))        \
396     : -1)     : -1)
397    
398  /* Is GLYPH a padding glyph?  */  /* Is GLYPH a padding glyph?  */
399        
400  #define CHAR_GLYPH_PADDING_P(GLYPH) (GLYPH).padding_p  #define CHAR_GLYPH_PADDING_P(GLYPH) (GLYPH).padding_p
401    
402    
# Line 544  enum glyph_row_area Line 557  enum glyph_row_area
557    
558     Each row is partitioned into three areas.  The start and end of     Each row is partitioned into three areas.  The start and end of
559     each area is recorded in a pointer as shown below.     each area is recorded in a pointer as shown below.
560      
561     +--------------------+-------------+---------------------+     +--------------------+-------------+---------------------+
562     |  left margin area  |  text area  |  right margin area  |     |  left margin area  |  text area  |  right margin area  |
563     +--------------------+-------------+---------------------+     +--------------------+-------------+---------------------+
# Line 552  enum glyph_row_area Line 565  enum glyph_row_area
565     glyphs[LEFT_MARGIN_AREA]           glyphs[RIGHT_MARGIN_AREA]     glyphs[LEFT_MARGIN_AREA]           glyphs[RIGHT_MARGIN_AREA]
566                          |                                   |                          |                                   |
567                          glyphs[TEXT_AREA]                   |                          glyphs[TEXT_AREA]                   |
568                                                glyphs[LAST_AREA]                                                  glyphs[LAST_AREA]
569    
570     Rows in frame matrices reference glyph memory allocated in a frame     Rows in frame matrices reference glyph memory allocated in a frame
571     glyph pool (see the description of struct glyph_pool).  Rows in     glyph pool (see the description of struct glyph_pool).  Rows in
572     window matrices on frames having frame matrices reference slices of     window matrices on frames having frame matrices reference slices of
573     the glyphs of corresponding rows in the frame matrix.     the glyphs of corresponding rows in the frame matrix.
574      
575     Rows in window matrices on frames having no frame matrices point to     Rows in window matrices on frames having no frame matrices point to
576     glyphs allocated from the heap via xmalloc;     glyphs allocated from the heap via xmalloc;
577     glyphs[LEFT_MARGIN_AREA] is the start address of the allocated     glyphs[LEFT_MARGIN_AREA] is the start address of the allocated
# Line 646  struct glyph_row Line 659  struct glyph_row
659    
660    /* 1 means the overlay arrow is on this line.  */    /* 1 means the overlay arrow is on this line.  */
661    unsigned overlay_arrow_p : 1;    unsigned overlay_arrow_p : 1;
662      
663    /* 1 means that this row displays a continued line, i.e. it has a    /* 1 means that this row displays a continued line, i.e. it has a
664       continuation mark at the right side.  */       continuation mark at the right side.  */
665    unsigned continued_p : 1;    unsigned continued_p : 1;
# Line 686  struct glyph_row Line 699  struct glyph_row
699       of more than one glyph.  Some glyphs have been put in this row,       of more than one glyph.  Some glyphs have been put in this row,
700       the rest are put in rows below this one.  */       the rest are put in rows below this one.  */
701    unsigned ends_in_middle_of_char_p : 1;    unsigned ends_in_middle_of_char_p : 1;
702      
703    /* 1 means this line starts in the middle of a character consisting    /* 1 means this line starts in the middle of a character consisting
704       of more than one glyph.  Some glyphs have been put in the       of more than one glyph.  Some glyphs have been put in the
705       previoius row, the rest are put in this row.  */       previoius row, the rest are put in this row.  */
# Line 717  struct glyph_row *matrix_row P_ ((struct Line 730  struct glyph_row *matrix_row P_ ((struct
730  #define MATRIX_ROW(MATRIX, ROW)   ((MATRIX)->rows + (ROW))  #define MATRIX_ROW(MATRIX, ROW)   ((MATRIX)->rows + (ROW))
731  #endif  #endif
732    
733  /* Return a pointer to the row reserved for the mode line in MATRIX.    /* Return a pointer to the row reserved for the mode line in MATRIX.
734     Row MATRIX->nrows - 1 is always reserved for the mode line.  */     Row MATRIX->nrows - 1 is always reserved for the mode line.  */
735    
736  #define MATRIX_MODE_LINE_ROW(MATRIX) \  #define MATRIX_MODE_LINE_ROW(MATRIX) \
# Line 742  struct glyph_row *matrix_row P_ ((struct Line 755  struct glyph_row *matrix_row P_ ((struct
755       (MATRIX_ROW ((MATRIX), (ROW))->glyphs[TEXT_AREA])       (MATRIX_ROW ((MATRIX), (ROW))->glyphs[TEXT_AREA])
756    
757  /* Return the number of used glyphs in the text area of a row.  */  /* Return the number of used glyphs in the text area of a row.  */
758        
759  #define MATRIX_ROW_USED(MATRIX, ROW) \  #define MATRIX_ROW_USED(MATRIX, ROW) \
760       (MATRIX_ROW ((MATRIX), (ROW))->used[TEXT_AREA])       (MATRIX_ROW ((MATRIX), (ROW))->used[TEXT_AREA])
761    
762  /* Return the character/ byte position at which the display of ROW  /* Return the character/ byte position at which the display of ROW
763     starts.  */     starts.  */
764        
765  #define MATRIX_ROW_START_CHARPOS(ROW) ((ROW)->start.pos.charpos)  #define MATRIX_ROW_START_CHARPOS(ROW) ((ROW)->start.pos.charpos)
766  #define MATRIX_ROW_START_BYTEPOS(ROW) ((ROW)->start.pos.bytepos)  #define MATRIX_ROW_START_BYTEPOS(ROW) ((ROW)->start.pos.bytepos)
767    
768  /* Return character/ byte position at which ROW ends.  */  /* Return character/ byte position at which ROW ends.  */
769        
770  #define MATRIX_ROW_END_CHARPOS(ROW) ((ROW)->end.pos.charpos)  #define MATRIX_ROW_END_CHARPOS(ROW) ((ROW)->end.pos.charpos)
771  #define MATRIX_ROW_END_BYTEPOS(ROW) ((ROW)->end.pos.bytepos)  #define MATRIX_ROW_END_BYTEPOS(ROW) ((ROW)->end.pos.bytepos)
772    
773  /* Return the vertical position of ROW in MATRIX.  */  /* Return the vertical position of ROW in MATRIX.  */
774        
775  #define MATRIX_ROW_VPOS(ROW, MATRIX) ((ROW) - (MATRIX)->rows)  #define MATRIX_ROW_VPOS(ROW, MATRIX) ((ROW) - (MATRIX)->rows)
776    
777  /* Return the last glyph row + 1 in MATRIX on window W reserved for  /* Return the last glyph row + 1 in MATRIX on window W reserved for
778     text.  If W has a mode line, the last row in the matrix is reserved     text.  If W has a mode line, the last row in the matrix is reserved
779     for it.  */     for it.  */
780        
781  #define MATRIX_BOTTOM_TEXT_ROW(MATRIX, W)               \  #define MATRIX_BOTTOM_TEXT_ROW(MATRIX, W)               \
782       ((MATRIX)->rows                                    \       ((MATRIX)->rows                                    \
783        + (MATRIX)->nrows                                 \        + (MATRIX)->nrows                                 \
# Line 772  struct glyph_row *matrix_row P_ ((struct Line 785  struct glyph_row *matrix_row P_ ((struct
785    
786  /* Non-zero if the face of the last glyph in ROW's text area has  /* Non-zero if the face of the last glyph in ROW's text area has
787     to be drawn to the end of the text area.  */     to be drawn to the end of the text area.  */
788        
789  #define MATRIX_ROW_EXTENDS_FACE_P(ROW) ((ROW)->fill_line_p)  #define MATRIX_ROW_EXTENDS_FACE_P(ROW) ((ROW)->fill_line_p)
790    
791  /* Set and query the enabled_p flag of glyph row ROW in MATRIX.  */  /* Set and query the enabled_p flag of glyph row ROW in MATRIX.  */
792        
793  #define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \  #define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \
794       (MATRIX_ROW ((MATRIX), (ROW))->enabled_p = (VALUE) != 0)       (MATRIX_ROW ((MATRIX), (ROW))->enabled_p = (VALUE) != 0)
795        
796  #define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \  #define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \
797       (MATRIX_ROW ((MATRIX), (ROW))->enabled_p)       (MATRIX_ROW ((MATRIX), (ROW))->enabled_p)
798    
799  /* Non-zero if ROW displays text.  Value is non-zero if the row is  /* Non-zero if ROW displays text.  Value is non-zero if the row is
800     blank but displays a line end.  */     blank but displays a line end.  */
801        
802  #define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p)  #define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p)
803    
804  /* Non-zero if ROW is not completely visible in window W.  */  /* Non-zero if ROW is not completely visible in window W.  */
805        
806  #define MATRIX_ROW_PARTIALLY_VISIBLE_P(ROW)     \  #define MATRIX_ROW_PARTIALLY_VISIBLE_P(ROW)     \
807       ((ROW)->height != (ROW)->visible_height)       ((ROW)->height != (ROW)->visible_height)
808    
809  /* Non-zero if ROW is partially visible at the top of window W.  */  /* Non-zero if ROW is partially visible at the top of window W.  */
810        
811  #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW)           \  #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW)           \
812       (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW))                    \       (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW))                    \
813        && (ROW)->y < WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))        && (ROW)->y < WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
814    
815  /* Non-zero if ROW is partially visible at the bottom of window W.  */  /* Non-zero if ROW is partially visible at the bottom of window W.  */
816        
817  #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW)                      \  #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW)                      \
818       (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW))                                  \       (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW))                                  \
819        && (ROW)->y + (ROW)->height > WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE ((W)))        && (ROW)->y + (ROW)->height > WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE ((W)))
820    
821  /* Return the bottom Y + 1 of ROW.   */  /* Return the bottom Y + 1 of ROW.   */
822        
823  #define MATRIX_ROW_BOTTOM_Y(ROW) ((ROW)->y + (ROW)->height)  #define MATRIX_ROW_BOTTOM_Y(ROW) ((ROW)->y + (ROW)->height)
824    
825  /* Is ROW the last visible one in the display described by the  /* Is ROW the last visible one in the display described by the
826     iterator structure pointed to by IT?.  */     iterator structure pointed to by IT?.  */
827        
828  #define MATRIX_ROW_LAST_VISIBLE_P(ROW, IT) \  #define MATRIX_ROW_LAST_VISIBLE_P(ROW, IT) \
829       (MATRIX_ROW_BOTTOM_Y ((ROW)) >= (IT)->last_visible_y)       (MATRIX_ROW_BOTTOM_Y ((ROW)) >= (IT)->last_visible_y)
830    
# Line 835  struct glyph_row *matrix_row P_ ((struct Line 848  struct glyph_row *matrix_row P_ ((struct
848       ((ROW)->end.overlay_string_index >= 0)       ((ROW)->end.overlay_string_index >= 0)
849    
850  /* Non-zero if ROW starts in the middle of a character.  See above.  */  /* Non-zero if ROW starts in the middle of a character.  See above.  */
851        
852  #define MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P(ROW)      \  #define MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P(ROW)      \
853       ((ROW)->start.dpvec_index >= 0                     \       ((ROW)->start.dpvec_index >= 0                     \
854        || (ROW)->starts_in_middle_of_char_p              \        || (ROW)->starts_in_middle_of_char_p              \
# Line 981  extern struct glyph_row scratch_glyph_ro Line 994  extern struct glyph_row scratch_glyph_ro
994         * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))         * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))
995    
996  /* Height of the display region of W, including a mode line, if any.  */  /* Height of the display region of W, including a mode line, if any.  */
997        
998  #define WINDOW_DISPLAY_PIXEL_HEIGHT(W)                                  \  #define WINDOW_DISPLAY_PIXEL_HEIGHT(W)                                  \
999       (XFASTINT ((W)->height)                                            \       (XFASTINT ((W)->height)                                            \
1000        * CANON_Y_UNIT (XFRAME (WINDOW_FRAME ((W)))))        * CANON_Y_UNIT (XFRAME (WINDOW_FRAME ((W)))))
1001    
1002  /* Height in pixels of the mode line.  May be zero if W doesn't have a  /* Height in pixels of the mode line.  May be zero if W doesn't have a
1003     mode line.  */     mode line.  */
1004        
1005  #define WINDOW_DISPLAY_MODE_LINE_HEIGHT(W)      \  #define WINDOW_DISPLAY_MODE_LINE_HEIGHT(W)      \
1006       (WINDOW_WANTS_MODELINE_P ((W))             \       (WINDOW_WANTS_MODELINE_P ((W))             \
1007        ? CURRENT_MODE_LINE_HEIGHT (W)            \        ? CURRENT_MODE_LINE_HEIGHT (W)            \
# Line 996  extern struct glyph_row scratch_glyph_ro Line 1009  extern struct glyph_row scratch_glyph_ro
1009    
1010  /* Height in pixels of the top line.  Zero if W doesn't have a top  /* Height in pixels of the top line.  Zero if W doesn't have a top
1011     line.  */     line.  */
1012        
1013  #define WINDOW_DISPLAY_HEADER_LINE_HEIGHT(W)    \  #define WINDOW_DISPLAY_HEADER_LINE_HEIGHT(W)    \
1014       (WINDOW_WANTS_HEADER_LINE_P ((W))          \       (WINDOW_WANTS_HEADER_LINE_P ((W))          \
1015        ? CURRENT_HEADER_LINE_HEIGHT (W)          \        ? CURRENT_HEADER_LINE_HEIGHT (W)          \
1016        : 0)        : 0)
1017    
1018  /* Pixel height of window W without mode line.  */  /* Pixel height of window W without mode line.  */
1019        
1020  #define WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE(W)   \  #define WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE(W)   \
1021       (WINDOW_DISPLAY_PIXEL_HEIGHT ((W))         \       (WINDOW_DISPLAY_PIXEL_HEIGHT ((W))         \
1022        - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)))        - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)))
1023    
1024  /* Pixel height of window W without mode and top line.  */  /* Pixel height of window W without mode and top line.  */
1025        
1026  #define WINDOW_DISPLAY_TEXT_HEIGHT(W)           \  #define WINDOW_DISPLAY_TEXT_HEIGHT(W)           \
1027       (WINDOW_DISPLAY_PIXEL_HEIGHT ((W))         \       (WINDOW_DISPLAY_PIXEL_HEIGHT ((W))         \
1028        - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W))   \        - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W))   \
1029        - WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))        - WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
1030    
1031  /* Left edge of W in pixels relative to its frame.  */  /* Left edge of W in pixels relative to its frame.  */
1032        
1033  #define WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X(W)                             \  #define WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X(W)                             \
1034       (FRAME_INTERNAL_BORDER_WIDTH_SAFE (XFRAME (WINDOW_FRAME ((W))))    \       (FRAME_INTERNAL_BORDER_WIDTH_SAFE (XFRAME (WINDOW_FRAME ((W))))    \
1035        + (WINDOW_LEFT_MARGIN ((W))                                       \        + (WINDOW_LEFT_MARGIN ((W))                                       \
# Line 1024  extern struct glyph_row scratch_glyph_ro Line 1037  extern struct glyph_row scratch_glyph_ro
1037        + FRAME_LEFT_FLAGS_AREA_WIDTH (XFRAME (WINDOW_FRAME ((W)))))        + FRAME_LEFT_FLAGS_AREA_WIDTH (XFRAME (WINDOW_FRAME ((W)))))
1038    
1039  /* Right edge of window W in pixels, relative to its frame.  */  /* Right edge of window W in pixels, relative to its frame.  */
1040        
1041  #define WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X(W)            \  #define WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X(W)            \
1042       (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W))            \       (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W))            \
1043        + WINDOW_DISPLAY_PIXEL_WIDTH ((W)))        + WINDOW_DISPLAY_PIXEL_WIDTH ((W)))
1044    
1045  /* Top edge of W in pixels relative to its frame.  */  /* Top edge of W in pixels relative to its frame.  */
1046        
1047  #define WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y(W)                              \  #define WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y(W)                              \
1048       (FRAME_INTERNAL_BORDER_WIDTH_SAFE (XFRAME (WINDOW_FRAME ((W))))    \       (FRAME_INTERNAL_BORDER_WIDTH_SAFE (XFRAME (WINDOW_FRAME ((W))))    \
1049        + (XFASTINT ((W)->top)                                            \        + (XFASTINT ((W)->top)                                            \
1050           * CANON_Y_UNIT (XFRAME (WINDOW_FRAME ((W))))))           * CANON_Y_UNIT (XFRAME (WINDOW_FRAME ((W))))))
1051    
1052  /* Bottom edge of window W relative to its frame.  */  /* Bottom edge of window W relative to its frame.  */
1053        
1054  #define WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y(W)           \  #define WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y(W)           \
1055       (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W))             \       (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W))             \
1056        + WINDOW_DISPLAY_PIXEL_HEIGHT ((W)))        + WINDOW_DISPLAY_PIXEL_HEIGHT ((W)))
1057        
1058  /* Convert window W relative pixel X to frame pixel coordinates.  */  /* Convert window W relative pixel X to frame pixel coordinates.  */
1059        
1060  #define WINDOW_TO_FRAME_PIXEL_X(W, X) \  #define WINDOW_TO_FRAME_PIXEL_X(W, X) \
1061       ((X) + WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W)))       ((X) + WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W)))
1062    
1063  /* Convert window W relative pixel Y to frame pixel coordinates.  */  /* Convert window W relative pixel Y to frame pixel coordinates.  */
1064        
1065  #define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \  #define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \
1066       ((Y) + WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W)))       ((Y) + WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W)))
1067    
1068  /* Convert frame relative pixel X to window relative pixel X.  */  /* Convert frame relative pixel X to window relative pixel X.  */
1069        
1070  #define FRAME_TO_WINDOW_PIXEL_X(W, X) \  #define FRAME_TO_WINDOW_PIXEL_X(W, X) \
1071       ((X) - WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W)))       ((X) - WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X ((W)))
1072    
1073  /* Convert frame relative pixel X to window relative pixel Y.  */  /* Convert frame relative pixel X to window relative pixel Y.  */
1074        
1075  #define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \  #define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \
1076       ((Y) - WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W)))       ((Y) - WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y ((W)))
1077    
1078  /* Width of left margin area in pixels.  */  /* Width of left margin area in pixels.  */
1079        
1080  #define WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH(W)         \  #define WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH(W)         \
1081       (NILP ((W)->left_margin_width)                     \       (NILP ((W)->left_margin_width)                     \
1082        ? 0                                               \        ? 0                                               \
1083        : (XINT ((W)->left_margin_width)                  \        : (XINT ((W)->left_margin_width)                  \
1084           * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))           * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))
1085                
1086  /* Width of right marginal area in pixels.  */  /* Width of right marginal area in pixels.  */
1087        
1088  #define WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH(W)        \  #define WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH(W)        \
1089       (NILP ((W)->right_margin_width)                    \       (NILP ((W)->right_margin_width)                    \
1090        ? 0                                               \        ? 0                                               \
# Line 1079  extern struct glyph_row scratch_glyph_ro Line 1092  extern struct glyph_row scratch_glyph_ro
1092           * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))           * CANON_X_UNIT (XFRAME (WINDOW_FRAME ((W))))))
1093    
1094  /* Width of text area in pixels.  */  /* Width of text area in pixels.  */
1095        
1096  #define WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH(W)         \  #define WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH(W)         \
1097       (WINDOW_DISPLAY_PIXEL_WIDTH ((W))                  \       (WINDOW_DISPLAY_PIXEL_WIDTH ((W))                  \
1098        - WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH ((W))      \        - WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH ((W))      \
# Line 1112  extern struct glyph_row scratch_glyph_ro Line 1125  extern struct glyph_row scratch_glyph_ro
1125        : (((AREA) == LEFT_MARGIN_AREA)                   \        : (((AREA) == LEFT_MARGIN_AREA)                   \
1126           ? WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH ((W))   \           ? WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH ((W))   \
1127           : WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH ((W))))           : WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH ((W))))
1128        
1129  /* Value is non-zero if window W has a mode line.  */  /* Value is non-zero if window W has a mode line.  */
1130    
1131  #define WINDOW_WANTS_MODELINE_P(W)                                      \  #define WINDOW_WANTS_MODELINE_P(W)                                      \
# Line 1131  extern struct glyph_row scratch_glyph_ro Line 1144  extern struct glyph_row scratch_glyph_ro
1144        && BUFFERP ((W)->buffer)                                          \        && BUFFERP ((W)->buffer)                                          \
1145        && !NILP (XBUFFER ((W)->buffer)->header_line_format))        && !NILP (XBUFFER ((W)->buffer)->header_line_format))
1146    
1147        
1148  /***********************************************************************  /***********************************************************************
1149                                  Faces                                  Faces
1150   ***********************************************************************/   ***********************************************************************/
1151        
1152  /* Indices of face attributes in Lisp face vectors.  Slot zero is the  /* Indices of face attributes in Lisp face vectors.  Slot zero is the
1153     symbol `face'.  */     symbol `face'.  */
1154    
# Line 1193  struct face Line 1206  struct face
1206    int id;    int id;
1207    
1208  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
1209      
1210    /* If non-zero, a GC we can use without modification to draw    /* If non-zero, a GC we can use without modification to draw
1211       characters in this face.  */       characters in this face.  */
1212    GC gc;    GC gc;
1213      
1214    /* Font used for this face, or null if the font could not be loaded    /* Font used for this face, or null if the font could not be loaded
1215       for some reason.  This points to a `font' slot of a struct       for some reason.  This points to a `font' slot of a struct
1216       font_info, and we should not call XFreeFont on it because the       font_info, and we should not call XFreeFont on it because the
# Line 1218  struct face Line 1231  struct face
1231    /* Pixel value of foreground color for X frames.  Color index    /* Pixel value of foreground color for X frames.  Color index
1232       for tty frames.  */       for tty frames.  */
1233    unsigned long foreground;    unsigned long foreground;
1234      
1235    /* Pixel value or color index of background color.  */    /* Pixel value or color index of background color.  */
1236    unsigned long background;    unsigned long background;
1237    
# Line 1246  struct face Line 1259  struct face
1259       Otherwise, a specific font is loaded from the set of fonts       Otherwise, a specific font is loaded from the set of fonts
1260       specified by the fontset given by the family attribute of the face.  */       specified by the fontset given by the family attribute of the face.  */
1261    int fontset;    int fontset;
1262      
1263    /* Pixmap width and height.  */    /* Pixmap width and height.  */
1264    unsigned int pixmap_w, pixmap_h;    unsigned int pixmap_w, pixmap_h;
1265      
1266    /* Non-zero means characters in this face have a box that thickness    /* Non-zero means characters in this face have a box that thickness
1267       around them.  If it is negative, the absolute value indicates the       around them.  If it is negative, the absolute value indicates the
1268       thickness, and the horizontal lines of box (top and bottom) are       thickness, and the horizontal lines of box (top and bottom) are
# Line 1298  struct face Line 1311  struct face
1311    /* 1 means that either no color is specified for underlining or that    /* 1 means that either no color is specified for underlining or that
1312       specified color couldn't be loaded.  Use the foreground color       specified color couldn't be loaded.  Use the foreground color
1313       when drawing in that case. */       when drawing in that case. */
1314    unsigned underline_defaulted_p : 1;    unsigned underline_defaulted_p : 1;
1315    
1316    /* 1 means that either no color is specified for the corresponding    /* 1 means that either no color is specified for the corresponding
1317       attribute or that the specified color couldn't be loaded.       attribute or that the specified color couldn't be loaded.
# Line 1374  struct face_cache Line 1387  struct face_cache
1387  {  {
1388    /* Hash table of cached realized faces.  */    /* Hash table of cached realized faces.  */
1389    struct face **buckets;    struct face **buckets;
1390      
1391    /* Back-pointer to the frame this cache belongs to.  */    /* Back-pointer to the frame this cache belongs to.  */
1392    struct frame *f;    struct frame *f;
1393    
# Line 1419  struct face_cache Line 1432  struct face_cache
1432  /* Return the id of the realized face on frame F that is like the face  /* Return the id of the realized face on frame F that is like the face
1433     with id ID but is suitable for displaying character CHAR.     with id ID but is suitable for displaying character CHAR.
1434     This macro is only meaningful for multibyte character CHAR.  */     This macro is only meaningful for multibyte character CHAR.  */
1435      
1436  #define FACE_FOR_CHAR(F, FACE, CHAR)    \  #define FACE_FOR_CHAR(F, FACE, CHAR)    \
1437    (SINGLE_BYTE_CHAR_P (CHAR)            \    (SINGLE_BYTE_CHAR_P (CHAR)            \
1438     ? (FACE)->ascii_face->id             \     ? (FACE)->ascii_face->id             \
# Line 1649  struct it Line 1662  struct it
1662    
1663    /* Stack pointer.  */    /* Stack pointer.  */
1664    int sp;    int sp;
1665      
1666    /* Setting of buffer-local variable selective-display-ellipsis.  */    /* Setting of buffer-local variable selective-display-ellipsis.  */
1667    unsigned selective_display_ellipsis_p : 1;    unsigned selective_display_ellipsis_p : 1;
1668    
# Line 1674  struct it Line 1687  struct it
1687    /* Non-null means that the current character is the first in a run    /* Non-null means that the current character is the first in a run
1688       of characters with box face.  */       of characters with box face.  */
1689    unsigned start_of_box_run_p : 1;    unsigned start_of_box_run_p : 1;
1690      
1691    /* Non-zero means that the current character is the last in a run    /* Non-zero means that the current character is the last in a run
1692       of characters with box face.  */       of characters with box face.  */
1693    unsigned end_of_box_run_p : 1;    unsigned end_of_box_run_p : 1;
# Line 1768  struct it Line 1781  struct it
1781    /* Number of glyphs needed for the last character requested via    /* Number of glyphs needed for the last character requested via
1782       produce_glyphs.  This is 1 except for tabs.  */       produce_glyphs.  This is 1 except for tabs.  */
1783    int nglyphs;    int nglyphs;
1784      
1785    /* Width of the display element in pixels.  Result of    /* Width of the display element in pixels.  Result of
1786       produce_glyphs.  */       produce_glyphs.  */
1787    int pixel_width;    int pixel_width;
# Line 1878  struct redisplay_interface Line 1891  struct redisplay_interface
1891    /* Produce glyphs/get display metrics for the display element IT is    /* Produce glyphs/get display metrics for the display element IT is
1892       loaded with.  */       loaded with.  */
1893    void (*produce_glyphs) P_ ((struct it *it));    void (*produce_glyphs) P_ ((struct it *it));
1894      
1895    /* Write or insert LEN glyphs from STRING at the nominal output    /* Write or insert LEN glyphs from STRING at the nominal output
1896       position.  */       position.  */
1897    void (*write_glyphs) P_ ((struct glyph *string, int len));    void (*write_glyphs) P_ ((struct glyph *string, int len));
# Line 1887  struct redisplay_interface Line 1900  struct redisplay_interface
1900    /* Clear from nominal output position to X.  X < 0 means clear    /* Clear from nominal output position to X.  X < 0 means clear
1901       to right end of display.  */       to right end of display.  */
1902    void (*clear_end_of_line) P_ ((int x));    void (*clear_end_of_line) P_ ((int x));
1903      
1904    /* Function to call to scroll the display as described by RUN on    /* Function to call to scroll the display as described by RUN on
1905       window W.  */       window W.  */
1906    void (*scroll_run_hook) P_ ((struct window *w, struct run *run));    void (*scroll_run_hook) P_ ((struct window *w, struct run *run));
# Line 1908  struct redisplay_interface Line 1921  struct redisplay_interface
1921       have to update the mouse hightlight.  */       have to update the mouse hightlight.  */
1922    void (*update_window_end_hook) P_ ((struct window *w, int cursor_on_p,    void (*update_window_end_hook) P_ ((struct window *w, int cursor_on_p,
1923                                        int mouse_face_overwritten_p));                                        int mouse_face_overwritten_p));
1924      
1925    /* Move cursor to row/column position VPOS/HPOS, pixel coordinates    /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
1926       Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y       Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
1927       are window-relative pixel positions.  */       are window-relative pixel positions.  */

Legend:
Removed from v.1.111.4.3  
changed lines
  Added in v.1.111.4.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26