emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xterm.c


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c
Date: Fri, 16 Nov 2001 08:12:08 -0500

Index: emacs/src/xterm.c
diff -u emacs/src/xterm.c:1.683 emacs/src/xterm.c:1.684
--- emacs/src/xterm.c:1.683     Thu Nov 15 11:13:47 2001
+++ emacs/src/xterm.c   Fri Nov 16 08:12:08 2001
@@ -155,11 +155,11 @@
 #define BETWEEN(X, LOWER, UPPER)  ((X) >= (LOWER) && (X) < (UPPER))
 
 
-/* Bitmaps for truncated lines.  */
+/* Fringe bitmaps.  */
 
-enum bitmap_type
+enum fringe_bitmap_type
 {
-  NO_BITMAP,
+  NO_FRINGE_BITMAP,
   LEFT_TRUNCATION_BITMAP,
   RIGHT_TRUNCATION_BITMAP,
   OVERLAY_ARROW_BITMAP,
@@ -463,13 +463,13 @@
 static void x_update_window_cursor P_ ((struct window *, int));
 static void x_erase_phys_cursor P_ ((struct window *));
 void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int));
-static void x_draw_bitmap P_ ((struct window *, struct glyph_row *, 
-                              enum bitmap_type));
+static void x_draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, 
+                                     enum fringe_bitmap_type));
 
 static void x_clip_to_row P_ ((struct window *, struct glyph_row *,
                               GC, int));
 static int x_phys_cursor_in_rect_p P_ ((struct window *, XRectangle *));
-static void x_draw_row_bitmaps P_ ((struct window *, struct glyph_row *));
+static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row 
*));
 static void notice_overwritten_cursor P_ ((struct window *, int, int));
 static void x_flush P_ ((struct frame *f));
 static void x_update_begin P_ ((struct frame *));
@@ -659,7 +659,7 @@
       int x0, x1, y0, y1;
 
       window_box_edges (w, -1, &x0, &y0, &x1, &y1);
-      x1 += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f);
+      x1 += FRAME_X_RIGHT_FRINGE_WIDTH (f);
       y1 -= 1;
       
       XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 
@@ -758,7 +758,7 @@
 
 
 /* Draw truncation mark bitmaps, continuation mark bitmaps, overlay
-   arrow bitmaps, or clear the areas where they would be displayed
+   arrow bitmaps, or clear the fringes if no bitmaps are required
    before DESIRED_ROW is made current.  The window being updated is
    found in updated_window.  This function It is called from
    update_window_line only if it is known that there are differences
@@ -777,7 +777,7 @@
   if (!desired_row->mode_line_p && !w->pseudo_window_p)
     {
       BLOCK_INPUT;
-      x_draw_row_bitmaps (w, desired_row);
+      x_draw_row_fringe_bitmaps (w, desired_row);
       UNBLOCK_INPUT;
     }
       
@@ -813,16 +813,16 @@
 }
 
 
-/* Draw the bitmap WHICH in one of the areas to the left or right of
+/* Draw the bitmap WHICH in one of the left or right fringes of
    window W.  ROW is the glyph row for which to display the bitmap; it
    determines the vertical position at which the bitmap has to be
    drawn.  */
 
 static void
-x_draw_bitmap (w, row, which)
+x_draw_fringe_bitmap (w, row, which)
      struct window *w;
      struct glyph_row *row;
-     enum bitmap_type which;
+     enum fringe_bitmap_type which;
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   Display *display = FRAME_X_DISPLAY (f);
@@ -845,7 +845,7 @@
       bits = left_bits;
       x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
           - wd
-          - (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
+          - (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
       break;
       
     case OVERLAY_ARROW_BITMAP:
@@ -854,7 +854,7 @@
       bits = ov_bits;
       x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
           - wd
-          - (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
+          - (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
       break;
       
     case RIGHT_TRUNCATION_BITMAP:
@@ -862,7 +862,7 @@
       h = right_height;
       bits = right_bits;
       x = window_box_right (w, -1);
-      x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
+      x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
       break;
 
     case CONTINUED_LINE_BITMAP:
@@ -870,7 +870,7 @@
       h = right_height;
       bits = continued_bits;
       x = window_box_right (w, -1);
-      x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
+      x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
       break;
       
     case CONTINUATION_LINE_BITMAP:
@@ -879,7 +879,7 @@
       bits = continuation_bits;
       x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
           - wd
-          - (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
+          - (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
       break;
 
     case ZV_LINE_BITMAP:
@@ -888,7 +888,7 @@
       bits = zv_bits;
       x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
           - wd
-          - (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
+          - (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
       break;
 
     default:
@@ -902,7 +902,7 @@
 
   /* Draw the bitmap.  I believe these small pixmaps can be cached
      by the server.  */
-  face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
+  face = FACE_FROM_ID (f, FRINGE_FACE_ID);
   pixmap = XCreatePixmapFromBitmapData (display, window, bits, wd, h,
                                        face->foreground,
                                        face->background, depth);
@@ -912,16 +912,16 @@
 }
 
 
-/* Draw flags bitmaps for glyph row ROW on window W.  Call this
+/* Draw fringe bitmaps for glyph row ROW on window W.  Call this
    function with input blocked.  */
 
 static void
-x_draw_row_bitmaps (w, row)
+x_draw_row_fringe_bitmaps (w, row)
      struct window *w;
      struct glyph_row *row;
 {
   struct frame *f = XFRAME (w->frame);
-  enum bitmap_type bitmap;
+  enum fringe_bitmap_type bitmap;
   struct face *face;
   int header_line_height = -1;
 
@@ -932,10 +932,10 @@
   if (row->visible_height <= 0)
     return;
 
-  face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
+  face = FACE_FROM_ID (f, FRINGE_FACE_ID);
   PREPARE_FACE_FOR_DISPLAY (f, face);
 
-  /* Decide which bitmap to draw at the left side.  */
+  /* Decide which bitmap to draw in the left fringe.  */
   if (row->overlay_arrow_p)
     bitmap = OVERLAY_ARROW_BITMAP;
   else if (row->truncated_on_left_p)
@@ -945,13 +945,13 @@
   else if (row->indicate_empty_line_p)
     bitmap = ZV_LINE_BITMAP;
   else
-    bitmap = NO_BITMAP;
+    bitmap = NO_FRINGE_BITMAP;
 
-  /* Clear flags area if no bitmap to draw or if bitmap doesn't fill
-     the flags area.  */
-  if (bitmap == NO_BITMAP
-      || FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
-      || row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
+  /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill
+     the fringe.  */
+  if (bitmap == NO_FRINGE_BITMAP
+      || FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_LEFT_FRINGE_WIDTH (f)
+      || row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
     {
       /* If W has a vertical border to its left, don't draw over it.  */
       int border = ((XFASTINT (w->left) > 0
@@ -962,7 +962,7 @@
       if (header_line_height < 0)
        header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
       
-      /* In case the same realized face is used for bitmap areas and
+      /* In case the same realized face is used for fringes and
         for something displayed in the text (e.g. face `region' on
         mono-displays, the fill style may have been changed to
         FillSolid in x_draw_glyph_string_background.  */
@@ -974,40 +974,40 @@
       XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                      face->gc,
                      (left
-                      - FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
+                      - FRAME_X_LEFT_FRINGE_WIDTH (f)
                       + border),
                      WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
                                                       row->y)),
-                     FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
+                     FRAME_X_LEFT_FRINGE_WIDTH (f) - border,
                      row->visible_height);
       if (!face->stipple)
        XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
     }
 
   /* Draw the left bitmap.  */
-  if (bitmap != NO_BITMAP)
-    x_draw_bitmap (w, row, bitmap);
+  if (bitmap != NO_FRINGE_BITMAP)
+    x_draw_fringe_bitmap (w, row, bitmap);
 
-  /* Decide which bitmap to draw at the right side.  */
+  /* Decide which bitmap to draw in the right fringe.  */
   if (row->truncated_on_right_p)
     bitmap = RIGHT_TRUNCATION_BITMAP;
   else if (row->continued_p)
     bitmap = CONTINUED_LINE_BITMAP;
   else
-    bitmap = NO_BITMAP;
+    bitmap = NO_FRINGE_BITMAP;
 
-  /* Clear flags area if no bitmap to draw of if bitmap doesn't fill
-     the flags area.  */
-  if (bitmap == NO_BITMAP
-      || FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f)
-      || row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
+  /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill
+     the fringe.  */
+  if (bitmap == NO_FRINGE_BITMAP
+      || FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FRINGE_WIDTH (f)
+      || row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
     {
       int right = window_box_right (w, -1);
 
       if (header_line_height < 0)
        header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
 
-      /* In case the same realized face is used for bitmap areas and
+      /* In case the same realized face is used for fringes and
         for something displayed in the text (e.g. face `region' on
         mono-displays, the fill style may have been changed to
         FillSolid in x_draw_glyph_string_background.  */
@@ -1020,15 +1020,15 @@
                      right,
                      WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
                                                       row->y)),
-                     FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
+                     FRAME_X_RIGHT_FRINGE_WIDTH (f),
                      row->visible_height);
       if (!face->stipple)
        XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
     }
 
   /* Draw the right bitmap.  */
-  if (bitmap != NO_BITMAP)
-    x_draw_bitmap (w, row, bitmap);
+  if (bitmap != NO_FRINGE_BITMAP)
+    x_draw_fringe_bitmap (w, row, bitmap);
 }
 
 
@@ -3978,7 +3978,7 @@
   if (s->row->full_width_p
       && !s->w->pseudo_window_p)
     {
-      last_x += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (s->f);
+      last_x += FRAME_X_RIGHT_FRINGE_WIDTH (s->f);
       if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (s->f))
        last_x += FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f);
     }
@@ -5064,9 +5064,9 @@
   if (row->full_width_p)
     {
       /* X is relative to the left edge of W, without scroll bars
-        or flag areas.  */
+        or fringes.  */
       struct frame *f = XFRAME (w->frame);
-      /* int width = FRAME_FLAGS_AREA_WIDTH (f);  */
+      /* int width = FRAME_FRINGE_WIDTH (f);  */
       int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f);
 
       x += window_left_x;
@@ -5732,11 +5732,11 @@
   int x, y, width, height, from_y, to_y, bottom_y;
 
   /* Get frame-relative bounding box of the text display area of W,
-     without mode lines.  Include in this box the flags areas to the
-     left and right of W.  */
+     without mode lines.  Include in this box the left and right
+     fringe of W.  */
   window_box (w, -1, &x, &y, &width, &height);
-  width += FRAME_X_FLAGS_AREA_WIDTH (f);
-  x -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f);
+  width += FRAME_X_FRINGE_WIDTH (f);
+  x -= FRAME_X_LEFT_FRINGE_WIDTH (f);
 
   from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
   to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
@@ -5980,7 +5980,7 @@
        expose_area (w, row, r, TEXT_AREA);
       if (row->used[RIGHT_MARGIN_AREA])
        expose_area (w, row, r, RIGHT_MARGIN_AREA);
-      x_draw_row_bitmaps (w, row);
+      x_draw_row_fringe_bitmaps (w, row);
     }
 
   return row->mouse_face_p;
@@ -6736,7 +6736,7 @@
 /* Take proper action when mouse has moved to the mode or header line of
    window W, x-position X.  MODE_LINE_P non-zero means mouse is on the
    mode line.  X is relative to the start of the text display area of
-   W, so the width of bitmap areas and scroll bars must be subtracted
+   W, so the width of fringes and scroll bars must be subtracted
    to get a position relative to the start of the mode line.  */
 
 static void
@@ -6764,7 +6764,7 @@
       glyph = row->glyphs[TEXT_AREA];
       end = glyph + row->used[TEXT_AREA];
       x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)
-             + FRAME_X_LEFT_FLAGS_AREA_WIDTH (f));
+             + FRAME_X_LEFT_FRINGE_WIDTH (f));
       
       while (glyph < end
             && x >= x0 + glyph->pixel_width)
@@ -11146,8 +11146,8 @@
      the rectangle to the left and increase its width.  */
   if (whole_line_p)
     {
-      clip_rect.x -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f);
-      clip_rect.width += FRAME_X_FLAGS_AREA_WIDTH (f);
+      clip_rect.x -= FRAME_X_LEFT_FRINGE_WIDTH (f);
+      clip_rect.width += FRAME_X_FRINGE_WIDTH (f);
     }
 
   XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, &clip_rect, 1, Unsorted);
@@ -12564,8 +12564,8 @@
        : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
        : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
-  f->output_data.x->flags_areas_extra
-    = FRAME_FLAGS_AREA_WIDTH (f);
+  f->output_data.x->fringes_extra
+    = FRAME_FRINGE_WIDTH (f);
   pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols);
   pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]