/[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.445.2.4 by miles, Sun Jul 11 22:08:06 2004 UTC revision 1.445.2.5 by miles, Fri Jul 23 04:30:43 2004 UTC
# Line 260  make_window () Line 260  make_window ()
260    bzero (&p->last_cursor, sizeof (p->last_cursor));    bzero (&p->last_cursor, sizeof (p->last_cursor));
261    bzero (&p->phys_cursor, sizeof (p->phys_cursor));    bzero (&p->phys_cursor, sizeof (p->phys_cursor));
262    p->desired_matrix = p->current_matrix = 0;    p->desired_matrix = p->current_matrix = 0;
263      p->nrows_scale_factor = p->ncols_scale_factor = 1;
264    p->phys_cursor_type = -1;    p->phys_cursor_type = -1;
265    p->phys_cursor_width = -1;    p->phys_cursor_width = -1;
266    p->must_be_updated_p = 0;    p->must_be_updated_p = 0;
# Line 318  WINDOW defaults to the selected window. Line 319  WINDOW defaults to the selected window.
319    
320  DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p,  DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p,
321         Spos_visible_in_window_p, 0, 3, 0,         Spos_visible_in_window_p, 0, 3, 0,
322         doc: /* Return t if position POS is currently on the frame in WINDOW.         doc: /* Return non-nil if position POS is currently on the frame in WINDOW.
323  Return nil if that position is scrolled vertically out of view.  Return nil if that position is scrolled vertically out of view.
324  If a character is only partially visible, nil is returned, unless the  If a character is only partially visible, nil is returned, unless the
325  optional argument PARTIALLY is non-nil.  optional argument PARTIALLY is non-nil.
326    If POS is only out of view because of horizontal scrolling, return non-nil.
327  POS defaults to point in WINDOW; WINDOW defaults to the selected window.  POS defaults to point in WINDOW; WINDOW defaults to the selected window.
328    
329  If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,  If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,
330  return value is a list (X Y PARTIAL) where X and Y are the pixel relative  return value is a list (X Y FULLY) where X and Y are the pixel coordinates
331  coordinate  */)  relative to the top left corner of the window, and FULLY is t if the
332    character after POS is fully visible and nil otherwise.  */)
333       (pos, window, partially)       (pos, window, partially)
334       Lisp_Object pos, window, partially;       Lisp_Object pos, window, partially;
335  {  {
# Line 430  DEFUN ("window-hscroll", Fwindow_hscroll Line 433  DEFUN ("window-hscroll", Fwindow_hscroll
433    
434  DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,  DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
435         doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL.         doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL.
436  NCOL should be zero or positive.  Return NCOL.  NCOL should be zero or positive.
437    
438  Note that if `automatic-hscrolling' is non-nil, you cannot scroll the  Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
439  window so that the location of point becomes invisible.  */)  window so that the location of point becomes invisible.  */)
# Line 544  display margins, fringes, header line, a Line 547  display margins, fringes, header line, a
547  }  }
548    
549  DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0,  DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0,
550         doc: /* Return a list of the edge coordinates of WINDOW.         doc: /* Return a list of the edge pixel coordinates of WINDOW.
551  \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame.  \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame.
552  RIGHT is one more than the rightmost x position used by text in WINDOW,  RIGHT is one more than the rightmost x position used by text in WINDOW,
553  and BOTTOM is one more than the bottommost y position used by text in WINDOW.  and BOTTOM is one more than the bottommost y position used by text in WINDOW.
# Line 670  coordinates_in_window (w, x, y) Line 673  coordinates_in_window (w, x, y)
673    
674    /* Outside any interesting column?  */    /* Outside any interesting column?  */
675    if (*x < left_x || *x > right_x)    if (*x < left_x || *x > right_x)
676      return ON_NOTHING;      return ON_VERTICAL_BORDER;
677    
678    lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);    lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
679    rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);    rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
# Line 986  DEFUN ("window-end", Fwindow_end, Swindo Line 989  DEFUN ("window-end", Fwindow_end, Swindo
989  This is updated by redisplay, when it runs to completion.  This is updated by redisplay, when it runs to completion.
990  Simply changing the buffer text or setting `window-start'  Simply changing the buffer text or setting `window-start'
991  does not update this value.  does not update this value.
992    Return nil if there is no recorded value.  \(This can happen if the
993    last redisplay of WINDOW was preempted, and did not finish.)
994  If UPDATE is non-nil, compute the up-to-date position  If UPDATE is non-nil, compute the up-to-date position
995  if it isn't already recorded.  */)  if it isn't already recorded.  */)
996       (window, update)       (window, update)
# Line 1051  if it isn't already recorded.  */) Line 1056  if it isn't already recorded.  */)
1056  }  }
1057    
1058  DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0,  DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0,
1059         doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer.  */)         doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer.
1060    Return POS.  */)
1061       (window, pos)       (window, pos)
1062       Lisp_Object window, pos;       Lisp_Object window, pos;
1063  {  {
# Line 1074  DEFUN ("set-window-point", Fset_window_p Line 1080  DEFUN ("set-window-point", Fset_window_p
1080    
1081  DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,  DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,
1082         doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.         doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.
1083    Return POS.
1084  Optional third arg NOFORCE non-nil inhibits next redisplay  Optional third arg NOFORCE non-nil inhibits next redisplay
1085  from overriding motion of point in order to display at this exact start.  */)  from overriding motion of point in order to display at this exact start.  */)
1086       (window, pos, noforce)       (window, pos, noforce)
# Line 1799  static Lisp_Object Line 1806  static Lisp_Object
1806  window_list_1 (window, minibuf, all_frames)  window_list_1 (window, minibuf, all_frames)
1807       Lisp_Object window, minibuf, all_frames;       Lisp_Object window, minibuf, all_frames;
1808  {  {
1809    Lisp_Object tail, list;    Lisp_Object tail, list, rest;
1810    
1811    decode_next_window_args (&window, &minibuf, &all_frames);    decode_next_window_args (&window, &minibuf, &all_frames);
1812    list = Qnil;    list = Qnil;
# Line 1808  window_list_1 (window, minibuf, all_fram Line 1815  window_list_1 (window, minibuf, all_fram
1815      if (candidate_window_p (XCAR (tail), window, minibuf, all_frames))      if (candidate_window_p (XCAR (tail), window, minibuf, all_frames))
1816        list = Fcons (XCAR (tail), list);        list = Fcons (XCAR (tail), list);
1817    
1818    return Fnreverse (list);    /* Rotate the list to start with WINDOW.  */
1819      list = Fnreverse (list);
1820      rest = Fmemq (window, list);
1821      if (!NILP (rest) && !EQ (rest, list))
1822        {
1823          for (tail = list; XCDR (tail) != rest; tail = XCDR (tail))
1824            ;
1825          XSETCDR (tail, Qnil);
1826          list = nconc2 (rest, list);
1827        }
1828      return list;
1829  }  }
1830    
1831    
# Line 4838  scroll_command (n, direction) Line 4855  scroll_command (n, direction)
4855  }  }
4856    
4857  DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P",  DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P",
4858         doc: /* Scroll text of current window upward ARG lines; or near full screen if no ARG.         doc: /* Scroll text of current window upward ARG lines.
4859    If ARG is omitted or nil, scroll upward by a near full screen.
4860  A near full screen is `next-screen-context-lines' less than a full screen.  A near full screen is `next-screen-context-lines' less than a full screen.
4861  Negative ARG means scroll downward.  Negative ARG means scroll downward.
4862  If ARG is the atom `-', scroll downward by nearly full screen.  If ARG is the atom `-', scroll downward by nearly full screen.
# Line 4851  When calling from a program, supply as a Line 4869  When calling from a program, supply as a
4869  }  }
4870    
4871  DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P",  DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P",
4872         doc: /* Scroll text of current window down ARG lines; or near full screen if no ARG.         doc: /* Scroll text of current window down ARG lines.
4873    If ARG is omitted or nil, scroll down by a near full screen.
4874  A near full screen is `next-screen-context-lines' less than a full screen.  A near full screen is `next-screen-context-lines' less than a full screen.
4875  Negative ARG means scroll upward.  Negative ARG means scroll upward.
4876  If ARG is the atom `-', scroll upward by nearly full screen.  If ARG is the atom `-', scroll upward by nearly full screen.
# Line 4865  When calling from a program, supply as a Line 4884  When calling from a program, supply as a
4884    
4885  DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0,  DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0,
4886         doc: /* Return the other window for \"other window scroll\" commands.         doc: /* Return the other window for \"other window scroll\" commands.
 If in the minibuffer, `minibuffer-scroll-window' if non-nil  
 specifies the window.  
4887  If `other-window-scroll-buffer' is non-nil, a window  If `other-window-scroll-buffer' is non-nil, a window
4888  showing that buffer is used.  */)  showing that buffer is used.
4889    If in the minibuffer, `minibuffer-scroll-window' if non-nil
4890    specifies the window.  This takes precedence over
4891    `other-window-scroll-buffer'.  */)
4892       ()       ()
4893  {  {
4894    Lisp_Object window;    Lisp_Object window;
# Line 4914  if the current one is at the bottom.  Ne Line 4934  if the current one is at the bottom.  Ne
4934  If ARG is the atom `-', scroll downward by nearly full screen.  If ARG is the atom `-', scroll downward by nearly full screen.
4935  When calling from a program, supply as argument a number, nil, or `-'.  When calling from a program, supply as argument a number, nil, or `-'.
4936    
 If in the minibuffer, `minibuffer-scroll-window' if non-nil  
 specifies the window to scroll.  
4937  If `other-window-scroll-buffer' is non-nil, scroll the window  If `other-window-scroll-buffer' is non-nil, scroll the window
4938  showing that buffer, popping the buffer up if necessary.  */)  showing that buffer, popping the buffer up if necessary.
4939    If in the minibuffer, `minibuffer-scroll-window' if non-nil
4940    specifies the window to scroll.  This takes precedence over
4941    `other-window-scroll-buffer'.  */)
4942       (arg)       (arg)
4943       Lisp_Object arg;       Lisp_Object arg;
4944  {  {
# Line 5893  redirection (see `redirect-frame-focus') Line 5914  redirection (see `redirect-frame-focus')
5914    
5915  DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion,  DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion,
5916         0, UNEVALLED, 0,         0, UNEVALLED, 0,
5917         doc: /* Execute body, preserving window sizes and contents.         doc: /* Execute BODY, preserving window sizes and contents.
5918    Return the value of the last form in BODY.
5919  Restore which buffer appears in which window, where display starts,  Restore which buffer appears in which window, where display starts,
5920  and the value of point and mark for each window.  and the value of point and mark for each window.
5921  Also restore the choice of selected window.  Also restore the choice of selected window.
# Line 6153  DEFUN ("set-window-vscroll", Fset_window Line 6175  DEFUN ("set-window-vscroll", Fset_window
6175         doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL.         doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL.
6176  WINDOW nil means use the selected window.  Normally, VSCROLL is a  WINDOW nil means use the selected window.  Normally, VSCROLL is a
6177  non-negative multiple of the canonical character height of WINDOW;  non-negative multiple of the canonical character height of WINDOW;
6178  optional third arg PIXELS_P non-nil means that VSCROLL is in pixels.  */)  optional third arg PIXELS_P non-nil means that VSCROLL is in pixels.
6179    If PIXELS-P is nil, VSCROLL may have to be rounded so that it
6180    corresponds to an integral number of pixels.  The return value is the
6181    result of this rounding.
6182    If PIXELS-P is non-nil, the return value is VSCROLL.  */)
6183    (window, vscroll, pixels_p)    (window, vscroll, pixels_p)
6184       Lisp_Object window, vscroll, pixels_p;       Lisp_Object window, vscroll, pixels_p;
6185  {  {
# Line 6637  The selected frame is the one whose conf Line 6663  The selected frame is the one whose conf
6663    
6664    DEFVAR_BOOL ("window-size-fixed", &window_size_fixed,    DEFVAR_BOOL ("window-size-fixed", &window_size_fixed,
6665                 doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size.                 doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size.
6666    If the value is`height', then only the window's height is fixed.
6667    If the value is `width', then only the window's width is fixed.
6668    Any other non-nil value fixes both the width and the height.
6669  Emacs won't change the size of any window displaying that buffer,  Emacs won't change the size of any window displaying that buffer,
6670  unless you explicitly change the size, or Emacs has no other choice.  unless you explicitly change the size, or Emacs has no other choice.  */);
 This variable automatically becomes buffer-local when set.  */);  
6671    Fmake_variable_buffer_local (Qwindow_size_fixed);    Fmake_variable_buffer_local (Qwindow_size_fixed);
6672    window_size_fixed = 0;    window_size_fixed = 0;
6673    

Legend:
Removed from v.1.445.2.4  
changed lines
  Added in v.1.445.2.5

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