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

Diff of /emacs/src/window.c

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

revision 1.410 by rms, Sat Mar 30 23:49:39 2002 UTC revision 1.411 by gerd, Fri Apr 12 09:36:21 2002 UTC
# Line 1  Line 1 
1  /* Window creation, deletion and examination for GNU Emacs.  /* Window creation, deletion and examination for GNU Emacs.
2     Does not include redisplay.     Does not include redisplay.
3     Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000, 2001     Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000, 2001, 2002
4     Free Software Foundation, Inc.     Free Software Foundation, Inc.
5    
6  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 58  enum window_part Line 58  enum window_part
58    ON_VERTICAL_BORDER,    ON_VERTICAL_BORDER,
59    ON_HEADER_LINE,    ON_HEADER_LINE,
60    ON_LEFT_FRINGE,    ON_LEFT_FRINGE,
61    ON_RIGHT_FRINGE    ON_RIGHT_FRINGE,
62      ON_LEFT_MARGIN,
63      ON_RIGHT_MARGIN
64  };  };
65    
66    
67  Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;  Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
68  Lisp_Object Qwindow_size_fixed;  Lisp_Object Qwindow_size_fixed;
69    extern Lisp_Object Qleft_margin, Qright_margin;
70  extern Lisp_Object Qheight, Qwidth;  extern Lisp_Object Qheight, Qwidth;
71    
72  static int displayed_window_lines P_ ((struct window *));  static int displayed_window_lines P_ ((struct window *));
# Line 509  and BOTTOM is one more than the bottommo Line 512  and BOTTOM is one more than the bottommo
512        return 3.        return 3.
513     if it is on the window's top line, return 4;     if it is on the window's top line, return 4;
514     if it is in left or right fringe of the window,     if it is in left or right fringe of the window,
515     return 5 or 6, and convert *X and *Y to window-relative corrdinates.     return 5 or 6, and convert *X and *Y to window-relative coordinates;
516       if it is in the marginal area to the left/right of the window,
517       return 7 or 8, and convert *X and *Y to window-relative coordinates.
518    
519     X and Y are frame relative pixel coordinates.  */     X and Y are frame relative pixel coordinates.  */
520    
# Line 623  coordinates_in_window (w, x, y) Line 628  coordinates_in_window (w, x, y)
628          }          }
629        else        else
630          {          {
631            *x -= left_x;            if (*x <= window_box_right (w, LEFT_MARGIN_AREA))
632            *y -= top_y;              part = ON_LEFT_MARGIN;
633            part = ON_TEXT;            else if (*x >= window_box_left (w, RIGHT_MARGIN_AREA))
634                part = ON_RIGHT_MARGIN;
635              else
636                {
637                  part = ON_TEXT;
638                  *x -= left_x;
639                  *y -= top_y;
640                }
641          }          }
642      }      }
643    else    else
# Line 653  coordinates_in_window (w, x, y) Line 665  coordinates_in_window (w, x, y)
665          }          }
666        else        else
667          {          {
668            /* Convert X and Y to window-relative pixel coordinates.  */            if (*x <= window_box_right (w, LEFT_MARGIN_AREA))
669            *x -= left_x;              part = ON_LEFT_MARGIN;
670            *y -= top_y;            else if (*x >= window_box_left (w, RIGHT_MARGIN_AREA))
671            part = ON_TEXT;              part = ON_RIGHT_MARGIN;
672              else
673                {
674                  part = ON_TEXT;
675                  /* Convert X and Y to window-relative pixel coordinates.  */
676                  *x -= left_x;
677                  *y -= top_y;
678                }
679          }          }
680      }      }
681    
# Line 678  If they are in the top mode line of WIND Line 697  If they are in the top mode line of WIND
697  If they are in the left fringe of WINDOW, `left-fringe' is returned.  If they are in the left fringe of WINDOW, `left-fringe' is returned.
698  If they are in the right fringe of WINDOW, `right-fringe' is returned.  If they are in the right fringe of WINDOW, `right-fringe' is returned.
699  If they are on the border between WINDOW and its right sibling,  If they are on the border between WINDOW and its right sibling,
700    `vertical-line' is returned.  */)    `vertical-line' is returned.
701    If they are in the windows's left or right marginal areas, `left-margin'\n\
702      or `right-margin' is returned.  */)
703       (coordinates, window)       (coordinates, window)
704       register Lisp_Object coordinates, window;       register Lisp_Object coordinates, window;
705  {  {
# Line 724  If they are on the border between WINDOW Line 745  If they are on the border between WINDOW
745      case ON_RIGHT_FRINGE:      case ON_RIGHT_FRINGE:
746        return Qright_fringe;        return Qright_fringe;
747    
748        case ON_LEFT_MARGIN:
749          return Qleft_margin;
750          
751        case ON_RIGHT_MARGIN:
752          return Qright_margin;
753    
754      default:      default:
755        abort ();        abort ();
756      }      }

Legend:
Removed from v.1.410  
changed lines
  Added in v.1.411

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