/[emacs]/emacs/src/fringe.c
ViewVC logotype

Diff of /emacs/src/fringe.c

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

revision 1.10.2.3 by miles, Thu Sep 30 01:20:35 2004 UTC revision 1.10.2.4 by miles, Thu Oct 14 08:49:53 2004 UTC
# Line 722  draw_row_fringe_bitmaps (w, row) Line 722  draw_row_fringe_bitmaps (w, row)
722  }  }
723    
724  /* Draw the fringes of window W.  Only fringes for rows marked for  /* Draw the fringes of window W.  Only fringes for rows marked for
725     update in redraw_fringe_bitmaps_p are drawn.  */     update in redraw_fringe_bitmaps_p are drawn.
726    
727  void     Return >0 if left or right fringe was redrawn in any way.
728  draw_window_fringes (w)  
729       If NO_FRINGE is non-zero, also return >0 if either fringe has zero width.
730    
731       A return value >0 indicates that the vertical line between windows
732       needs update (as it may be drawn in the fringe).
733    */
734    
735    int
736    draw_window_fringes (w, no_fringe)
737       struct window *w;       struct window *w;
738         int no_fringe;
739  {  {
740    struct glyph_row *row;    struct glyph_row *row;
741    int yb = window_text_bottom_y (w);    int yb = window_text_bottom_y (w);
742    int nrows = w->current_matrix->nrows;    int nrows = w->current_matrix->nrows;
743    int y = 0, rn;    int y = 0, rn;
744      int updated = 0;
745    
746    if (w->pseudo_window_p)    if (w->pseudo_window_p)
747      return;      return 0;
748    
749      /* Must draw line if no fringe */
750      if (no_fringe
751          && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0
752              || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0))
753        updated++;
754    
755    for (y = 0, rn = 0, row = w->current_matrix->rows;    for (y = 0, rn = 0, row = w->current_matrix->rows;
756         y < yb && rn < nrows;         y < yb && rn < nrows;
# Line 744  draw_window_fringes (w) Line 760  draw_window_fringes (w)
760          continue;          continue;
761        draw_row_fringe_bitmaps (w, row);        draw_row_fringe_bitmaps (w, row);
762        row->redraw_fringe_bitmaps_p = 0;        row->redraw_fringe_bitmaps_p = 0;
763          updated++;
764      }      }
765    
766      return updated;
767  }  }
768    
769    
# Line 950  update_window_fringes (w, force_p) Line 969  update_window_fringes (w, force_p)
969     Typically, we add an equal amount (+/- 1 pixel) to each fringe,     Typically, we add an equal amount (+/- 1 pixel) to each fringe,
970     but a negative width value is taken literally (after negating it).     but a negative width value is taken literally (after negating it).
971    
972     We never make the fringes narrower than specified.  It is planned     We never make the fringes narrower than specified.
    to make fringe bitmaps customizable and expandable, and at that  
    time, the user will typically specify the minimum number of pixels  
    needed for his bitmaps, so we shouldn't select anything less than  
    what is specified.  
973  */  */
974    
975  void  void
# Line 1343  DEFUN ("fringe-bitmaps-at-pos", Ffringe_ Line 1358  DEFUN ("fringe-bitmaps-at-pos", Ffringe_
1358         0, 2, 0,         0, 2, 0,
1359         doc: /* Return fringe bitmaps of row containing position POS in window WINDOW.         doc: /* Return fringe bitmaps of row containing position POS in window WINDOW.
1360  If WINDOW is nil, use selected window.  If POS is nil, use value of point  If WINDOW is nil, use selected window.  If POS is nil, use value of point
1361  in that window.  Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT  in that window.  Return value is a list (LEFT RIGHT OV), where LEFT
1362  are the fringe bitmap numbers for the bitmaps in the left and right fringe,  is the symbol for the bitmap in the left fringe (or nil if no bitmap),
1363  resp.  If left or right fringe is empty, the corresponding element is nil.  RIGHT is similar for the right fringe, and OV is non-nil if there is an
1364    overlay arrow in the left fringe.
1365  Return nil if POS is not visible in WINDOW.  */)  Return nil if POS is not visible in WINDOW.  */)
1366    (pos, window)    (pos, window)
1367       Lisp_Object pos, window;       Lisp_Object pos, window;
# Line 1373  Return nil if POS is not visible in WIND Line 1389  Return nil if POS is not visible in WIND
1389    row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);    row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
1390    row = row_containing_pos (w, textpos, row, NULL, 0);    row = row_containing_pos (w, textpos, row, NULL, 0);
1391    if (row)    if (row)
1392      return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap),      return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap),
1393                    get_fringe_bitmap_name (row->right_fringe_bitmap));                    get_fringe_bitmap_name (row->right_fringe_bitmap),
1394                      (row->overlay_arrow_p ? Qt : Qnil));
1395    else    else
1396      return Qnil;      return Qnil;
1397  }  }

Legend:
Removed from v.1.10.2.3  
changed lines
  Added in v.1.10.2.4

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