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

Diff of /emacs/src/window.h

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

revision 1.49.2.1 by miles, Fri Apr 4 06:21:05 2003 UTC revision 1.49.2.2 by miles, Tue Oct 14 23:22:49 2003 UTC
# Line 1  Line 1 
1  /* Window definitions for GNU Emacs.  /* Window definitions for GNU Emacs.
2     Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001     Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001, 2003
3     Free Software Foundation, Inc.     Free Software Foundation, Inc.
4    
5  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 24  Boston, MA 02111-1307, USA.  */ Line 24  Boston, MA 02111-1307, USA.  */
24    
25  #include "dispextern.h"  #include "dispextern.h"
26    
27    extern Lisp_Object Qleft, Qright;
28    
29  /* Windows are allocated as if they were vectors, but then the  /* Windows are allocated as if they were vectors, but then the
30  Lisp data type is changed to Lisp_Window.  They are garbage  Lisp data type is changed to Lisp_Window.  They are garbage
31  collected along with the vectors.  collected along with the vectors.
# Line 108  struct window Line 110  struct window
110      Lisp_Object parent;      Lisp_Object parent;
111      /* The upper left corner coordinates of this window,      /* The upper left corner coordinates of this window,
112         as integers relative to upper left corner of frame = 0, 0 */         as integers relative to upper left corner of frame = 0, 0 */
113      Lisp_Object left;      Lisp_Object left_col;
114      Lisp_Object top;      Lisp_Object top_line;
115      /* The size of the window */      /* The size of the window */
116      Lisp_Object height;      Lisp_Object total_lines;
117      Lisp_Object width;      Lisp_Object total_cols;
118      /* The buffer displayed in this window */      /* The buffer displayed in this window */
119      /* Of the fields vchild, hchild and buffer, only one is non-nil.  */      /* Of the fields vchild, hchild and buffer, only one is non-nil.  */
120      Lisp_Object buffer;      Lisp_Object buffer;
# Line 160  struct window Line 162  struct window
162    
163      /* Width of left and right marginal areas.  A value of nil means      /* Width of left and right marginal areas.  A value of nil means
164         no margin.  */         no margin.  */
165      Lisp_Object left_margin_width;      Lisp_Object left_margin_cols, right_margin_cols;
166      Lisp_Object right_margin_width;  
167        /* Width of left and right fringes.
168           A value of nil or t means use frame values.  */
169        Lisp_Object left_fringe_width, right_fringe_width;
170    
171      /* Non-nil means fringes are drawn outside display margins;
172         othersize draw them between margin areas and text.  */
173        Lisp_Object fringes_outside_margins;
174    
175        /* Pixel width of scroll bars.
176           A value of nil or t means use frame values.  */
177        Lisp_Object scroll_bar_width;
178        /* Type of vertical scroll bar.  A value of nil means
179           no scroll bar.  A value of t means use frame value.  */
180        Lisp_Object vertical_scroll_bar_type;
181    
 /* The rest are currently not used or only half used */  
182      /* Frame coords of mark as of last time display completed */      /* Frame coords of mark as of last time display completed */
183      /* May be nil if mark does not exist or was not on frame */      /* May be nil if mark does not exist or was not on frame */
184      Lisp_Object last_mark_x;      Lisp_Object last_mark_x;
# Line 211  struct window Line 226  struct window
226    
227      /* Original window height and top before mini-window was      /* Original window height and top before mini-window was
228         enlarged. */         enlarged. */
229      Lisp_Object orig_height, orig_top;      Lisp_Object orig_total_lines, orig_top_line;
230    
231      /* No Lisp data may follow below this point without changing      /* No Lisp data may follow below this point without changing
232         mark_object in alloc.c.  The member current_matrix must be the         mark_object in alloc.c.  The member current_matrix must be the
# Line 281  struct window Line 296  struct window
296    
297  #define MINI_WINDOW_P(W)        (!NILP ((W)->mini_p))  #define MINI_WINDOW_P(W)        (!NILP ((W)->mini_p))
298    
299  /* Return the window column at which the text in window W starts.  /* General window layout:
300     This is different from the `left' field because it does not include  
301     a left-hand scroll bar if any.  */     LEFT_EDGE_COL         RIGHT_EDGE_COL
302       |                                  |
303  #define WINDOW_LEFT_MARGIN(W) \     |                                  |
304       (XFASTINT ((W)->left) \     |  BOX_LEFT_EDGE_COL               |
305        + FRAME_LEFT_SCROLL_BAR_WIDTH (XFRAME (WINDOW_FRAME (W))))     |  |           BOX_RIGHT_EDGE_COL  |
306       |  |                            |  |
307       v  v                            v  v
308       <-><-><---><-----------><---><-><->
309        ^  ^   ^        ^        ^   ^  ^
310        |  |   |        |        |   |  |
311        |  |   |        |        |   |  +-- RIGHT_SCROLL_BAR_COLS
312        |  |   |        |        |   +----- RIGHT_FRINGE_WIDTH
313        |  |   |        |        +--------- RIGHT_MARGIN_COLS
314        |  |   |        |
315        |  |   |        +------------------ TEXT_AREA_COLS
316        |  |   |
317        |  |   +--------------------------- LEFT_MARGIN_COLS
318        |  +------------------------------- LEFT_FRINGE_WIDTH
319        +---------------------------------- LEFT_SCROLL_BAR_COLS
320        
321    */
322    
323    
324    /* A handy macro.  */
325    
326    #define WINDOW_XFRAME(W) \
327      (XFRAME (WINDOW_FRAME ((W))))
328    
329    /* Return the canonical column width of the frame of window W.  */
330    
331    #define WINDOW_FRAME_COLUMN_WIDTH(W) \
332      (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
333    
334    /* Return the canonical column width of the frame of window W.  */
335    
336    #define WINDOW_FRAME_LINE_HEIGHT(W) \
337      (FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
338    
339    
340    /* Return the frame width in canonical column units.
341       This includes scroll bars and fringes.  */
342    
343    #define WINDOW_TOTAL_COLS(W) \
344      (XFASTINT ((W)->total_cols))
345    
346    /* Return the frame height in canonical line units.
347       This includes header and mode lines, if any.  */
348    
349    #define WINDOW_TOTAL_LINES(W) \
350      (XFASTINT ((W)->total_lines))
351    
352  /* Return the window column before which window W ends.  
353    /* Return the total pixel width of window W.  */
354    
355    #define WINDOW_TOTAL_WIDTH(W) \
356      (WINDOW_TOTAL_COLS (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
357    
358    /* Return the total pixel height of window W.  */
359    
360    #define WINDOW_TOTAL_HEIGHT(W) \
361      (WINDOW_TOTAL_LINES (W) * WINDOW_FRAME_LINE_HEIGHT (W))
362    
363    
364    /* Return the canonical frame column at which window W starts.
365       This includes a left-hand scroll bar, if any.  */
366    
367    #define WINDOW_LEFT_EDGE_COL(W) \
368      (XFASTINT ((W)->left_col))
369    
370    /* Return the canonical frame column before which window W ends.
371     This includes a right-hand scroll bar, if any.  */     This includes a right-hand scroll bar, if any.  */
372    
373  #define WINDOW_RIGHT_EDGE(W) \  #define WINDOW_RIGHT_EDGE_COL(W) \
374       (XFASTINT ((W)->left) + XFASTINT ((W)->width))    (WINDOW_LEFT_EDGE_COL (W) + WINDOW_TOTAL_COLS (W))
375    
376  /* Return the window column before which the text in window W ends.  /* Return the canonical frame line at which window W starts.
377     This is different from WINDOW_RIGHT_EDGE because it does not include     This includes a header line, if any.  */
378     a scroll bar or window-separating line on the right edge.  */  
379    #define WINDOW_TOP_EDGE_LINE(W) \
380      (XFASTINT ((W)->top_line))
381    
382    /* Return the canonical frame line before which window W ends.
383       This includes a mode line, if any.  */
384    
385    #define WINDOW_BOTTOM_EDGE_LINE(W) \
386      (WINDOW_TOP_EDGE_LINE (W) + WINDOW_TOTAL_LINES (W))
387    
388    
389    /* Return the frame x-position at which window W starts.
390       This includes a left-hand scroll bar, if any.  */
391    
392    #define WINDOW_LEFT_EDGE_X(W) \
393      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
394       + WINDOW_LEFT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
395    
396    /* Return the frame x- position before which window W ends.
397       This includes a right-hand scroll bar, if any.  */
398    
399    #define WINDOW_RIGHT_EDGE_X(W) \
400      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
401       + WINDOW_RIGHT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
402    
403    /* Return the frame y-position at which window W starts.
404       This includes a header line, if any.  */
405    
406    #define WINDOW_TOP_EDGE_Y(W) \
407      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
408       + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
409    
410    /* Return the frame y-position before which window W ends.
411       This includes a mode line, if any.  */
412    
413    #define WINDOW_BOTTOM_EDGE_Y(W) \
414      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
415       + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
416    
 #define WINDOW_RIGHT_MARGIN(W) \  
      (WINDOW_RIGHT_EDGE (W) \  
       - (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (XFRAME (WINDOW_FRAME (W))) \  
          ? FRAME_SCROLL_BAR_COLS (XFRAME (WINDOW_FRAME (W))) \  
          : 0))  
417    
418  /* 1 if window W takes up the full width of its frame.  */  /* 1 if window W takes up the full width of its frame.  */
419    
420  #define WINDOW_FULL_WIDTH_P(W) \  #define WINDOW_FULL_WIDTH_P(W) \
421       (XFASTINT ((W)->width) == FRAME_WINDOW_WIDTH (XFRAME (WINDOW_FRAME (W))))    (WINDOW_TOTAL_COLS (W) == FRAME_TOTAL_COLS (WINDOW_XFRAME (W)))
422    
423    /* 1 if window W's has no other windows to its left in its frame.  */
424    
425    #define WINDOW_LEFTMOST_P(W) \
426      (WINDOW_LEFT_EDGE_COL (W) == 0)
427    
428  /* 1 if window W's has no other windows to its right in its frame.  */  /* 1 if window W's has no other windows to its right in its frame.  */
429    
430  #define WINDOW_RIGHTMOST_P(W) \  #define WINDOW_RIGHTMOST_P(W) \
431       (WINDOW_RIGHT_EDGE (W) == FRAME_WINDOW_WIDTH (XFRAME (WINDOW_FRAME (W))))    (WINDOW_RIGHT_EDGE_COL (W) == FRAME_TOTAL_COLS (WINDOW_XFRAME (W)))
432    
433    
434    /* Return the frame column at which the text (or left fringe) in
435       window W starts.  This is different from the `LEFT_EDGE' because it
436       does not include a left-hand scroll bar if any.  */
437    
438    #define WINDOW_BOX_LEFT_EDGE_COL(W) \
439      (WINDOW_LEFT_EDGE_COL (W) \
440       + WINDOW_LEFT_SCROLL_BAR_COLS (W))
441    
442    /* Return the window column before which the text in window W ends.
443       This is different from WINDOW_RIGHT_EDGE_COL because it does not
444       include a scroll bar or window-separating line on the right edge.  */
445    
446    #define WINDOW_BOX_RIGHT_EDGE_COL(W) \
447      (WINDOW_RIGHT_EDGE_COL (W) \
448       - WINDOW_RIGHT_SCROLL_BAR_COLS (W))
449    
450    
451    /* Return the frame position at which the text (or left fringe) in
452       window W starts.  This is different from the `LEFT_EDGE' because it
453       does not include a left-hand scroll bar if any.  */
454    
455    #define WINDOW_BOX_LEFT_EDGE_X(W) \
456      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
457       + WINDOW_BOX_LEFT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
458    
459    /* Return the window column before which the text in window W ends.
460       This is different from WINDOW_RIGHT_EDGE_COL because it does not
461       include a scroll bar or window-separating line on the right edge.  */
462    
463    #define WINDOW_BOX_RIGHT_EDGE_X(W) \
464      (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
465       + WINDOW_BOX_RIGHT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
466    
467    
468    /* Width of left margin area in columns.  */
469    
470    #define WINDOW_LEFT_MARGIN_COLS(W)                      \
471      (NILP ((W)->left_margin_cols)                         \
472       ? 0                                                  \
473       : XINT ((W)->left_margin_cols))
474    
475    /* Width of right marginal area in columns.  */
476    
477    #define WINDOW_RIGHT_MARGIN_COLS(W)                     \
478      (NILP ((W)->right_margin_cols)                        \
479       ? 0                                                  \
480       : XINT ((W)->right_margin_cols))
481    
482    /* Width of left margin area in pixels.  */
483    
484    #define WINDOW_LEFT_MARGIN_WIDTH(W)                     \
485      (NILP ((W)->left_margin_cols)                         \
486       ? 0                                                  \
487       : (XINT ((W)->left_margin_cols)                      \
488          * WINDOW_FRAME_COLUMN_WIDTH (W)))
489    
490    /* Width of right marginal area in pixels.  */
491    
492    #define WINDOW_RIGHT_MARGIN_WIDTH(W)                    \
493      (NILP ((W)->right_margin_cols)                        \
494       ? 0                                                  \
495       : (XINT ((W)->right_margin_cols)                     \
496          * WINDOW_FRAME_COLUMN_WIDTH (W)))
497    
498    /* Total width of fringes reserved for drawing truncation bitmaps,
499       continuation bitmaps and alike.  The width is in canonical char
500       units of the frame.  This must currently be the case because window
501       sizes aren't pixel values.  If it weren't the case, we wouldn't be
502       able to split windows horizontally nicely.  */
503    
504    #define WINDOW_FRINGE_COLS(W)                           \
505      ((INTEGERP ((W)->left_fringe_width)                   \
506        || INTEGERP ((W)->right_fringe_width))              \
507       ? ((WINDOW_LEFT_FRINGE_WIDTH (W)                     \
508           + WINDOW_RIGHT_FRINGE_WIDTH (W)                  \
509           + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)             \
510          / WINDOW_FRAME_COLUMN_WIDTH (W))                  \
511       : FRAME_FRINGE_COLS (WINDOW_XFRAME (W)))
512    
513    /* Column-width of the left and right fringe.  */
514    
515    #define WINDOW_LEFT_FRINGE_COLS(W)                      \
516      ((WINDOW_LEFT_FRINGE_WIDTH ((W))                      \
517        + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)                \
518       / WINDOW_FRAME_COLUMN_WIDTH (W))
519    
520    #define WINDOW_RIGHT_FRINGE_COLS(W)                     \
521      ((WINDOW_RIGHT_FRINGE_WIDTH ((W))                     \
522        + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)                \
523       / WINDOW_FRAME_COLUMN_WIDTH (W))
524    
525    /* Pixel-width of the left and right fringe.  */
526    
527    #define WINDOW_LEFT_FRINGE_WIDTH(W)                     \
528      (INTEGERP ((W)->left_fringe_width)                    \
529       ? XFASTINT ((W)->left_fringe_width)                  \
530       : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
531    
532    #define WINDOW_RIGHT_FRINGE_WIDTH(W)                    \
533      (INTEGERP ((W)->right_fringe_width)                   \
534       ? XFASTINT ((W)->right_fringe_width)                 \
535       : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
536    
537    /* Total width of fringes in pixels.  */
538    
539    #define WINDOW_TOTAL_FRINGE_WIDTH(W)            \
540      (WINDOW_LEFT_FRINGE_WIDTH (W) + WINDOW_RIGHT_FRINGE_WIDTH (W))
541    
542    /* Are fringes outside display margins in window W.  */
543    
544    #define WINDOW_HAS_FRINGES_OUTSIDE_MARGINS(W)   \
545      (!NILP ((W)->fringes_outside_margins))
546    
547    /* Say whether scroll bars are currently enabled for window W,
548       and which side they are on.  */
549    
550    #define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w)              \
551      (EQ ((w)->vertical_scroll_bar_type, Qt)               \
552       ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w)) \
553       : EQ ((w)->vertical_scroll_bar_type, Qleft)          \
554       ? vertical_scroll_bar_left                           \
555       : EQ ((w)->vertical_scroll_bar_type, Qright)         \
556       ? vertical_scroll_bar_right                          \
557       : vertical_scroll_bar_none)                          \
558    
559    #define WINDOW_HAS_VERTICAL_SCROLL_BAR(w)               \
560      (EQ ((w)->vertical_scroll_bar_type, Qt)               \
561       ? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w)) \
562       : !NILP ((w)->vertical_scroll_bar_type))
563    
564    #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w)               \
565      (EQ ((w)->vertical_scroll_bar_type, Qt)                       \
566       ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w)) \
567       : EQ ((w)->vertical_scroll_bar_type, Qleft))
568    
569    #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w)              \
570      (EQ ((w)->vertical_scroll_bar_type, Qt)                       \
571       ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))\
572       : EQ ((w)->vertical_scroll_bar_type, Qright))
573    
574    /* Width that a scroll bar in window W should have, if there is one.
575       Measured in pixels.  If scroll bars are turned off, this is still
576       nonzero.  */
577    
578    #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w)               \
579      (INTEGERP ((w)->scroll_bar_width)                     \
580       ? XFASTINT ((w)->scroll_bar_width)                   \
581       : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w)))
582    
583    /* Width that a scroll bar in window W should have, if there is one.
584       Measured in columns (characters).  If scroll bars are turned off,
585       this is still nonzero.  */
586    
587    #define WINDOW_CONFIG_SCROLL_BAR_COLS(w)                \
588      (INTEGERP ((w)->scroll_bar_width)                     \
589       ? ((XFASTINT ((w)->scroll_bar_width)                 \
590           + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)             \
591          / WINDOW_FRAME_COLUMN_WIDTH (w))                  \
592       : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w)))
593    
594    /* Width of a scroll bar in window W, measured in columns (characters),
595       but only if scroll bars are on the left.  If scroll bars are on
596       the right in this frame, or there are no scroll bars, value is 0.  */
597    
598    #define WINDOW_LEFT_SCROLL_BAR_COLS(w)         \
599      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
600       ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w))       \
601       : 0)
602    
603    /* Width of a left scroll bar area in window W , measured in pixels.  */
604    
605    #define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w) \
606      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
607       ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
608       : 0)
609    
610    /* Width of a scroll bar in window W, measured in columns (characters),
611       but only if scroll bars are on the right.  If scroll bars are on
612       the left in this frame, or there are no scroll bars, value is 0.  */
613    
614    #define WINDOW_RIGHT_SCROLL_BAR_COLS(w)         \
615      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
616       ? WINDOW_CONFIG_SCROLL_BAR_COLS (w)          \
617       : 0)
618    
619    /* Width of a left scroll bar area in window W , measured in pixels.  */
620    
621    #define WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH(w)                            \
622      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)                           \
623       ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
624       : 0)
625    
626    
627    /* Actual width of a scroll bar in window W, measured in columns.  */
628    
629    #define WINDOW_SCROLL_BAR_COLS(w)              \
630      (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)          \
631       ? WINDOW_CONFIG_SCROLL_BAR_COLS (w)         \
632       : 0)
633    
634    /* Width of a left scroll bar area in window W , measured in pixels.  */
635    
636    #define WINDOW_SCROLL_BAR_AREA_WIDTH(w)                                  \
637      (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)                                   \
638       ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
639       : 0)
640    
641    
642    /* Return the frame position where the scroll bar of window W starts.  */
643    
644    #define WINDOW_SCROLL_BAR_AREA_X(W)             \
645      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W)  \
646       ? WINDOW_BOX_RIGHT_EDGE_X (W)                \
647       : WINDOW_LEFT_EDGE_X (W))
648    
649    
650    /* Height in pixels, and in lines, of the mode line.
651       May be zero if W doesn't have a mode line.  */
652    
653    #define WINDOW_MODE_LINE_HEIGHT(W)      \
654      (WINDOW_WANTS_MODELINE_P ((W))        \
655       ? CURRENT_MODE_LINE_HEIGHT (W)       \
656       : 0)
657    
658    #define WINDOW_MODE_LINE_LINES(W)               \
659      (!! WINDOW_WANTS_MODELINE_P ((W)))
660    
661    /* Height in pixels, and in lines, of the header line.
662       Zero if W doesn't have a header line.  */
663    
664    #define WINDOW_HEADER_LINE_HEIGHT(W)    \
665      (WINDOW_WANTS_HEADER_LINE_P ((W))     \
666       ? CURRENT_HEADER_LINE_HEIGHT (W)     \
667       : 0)
668    
669    #define WINDOW_HEADER_LINE_LINES(W)             \
670      (!! WINDOW_WANTS_HEADER_LINE_P ((W)))
671    
672    /* Pixel height of window W without mode line.  */
673    
674    #define WINDOW_BOX_HEIGHT_NO_MODE_LINE(W)       \
675      (WINDOW_TOTAL_HEIGHT ((W))                    \
676       - WINDOW_MODE_LINE_HEIGHT ((W)))
677    
678    /* Pixel height of window W without mode and header line.  */
679    
680    #define WINDOW_BOX_TEXT_HEIGHT(W)               \
681      (WINDOW_TOTAL_HEIGHT ((W))                    \
682       - WINDOW_MODE_LINE_HEIGHT ((W))              \
683       - WINDOW_HEADER_LINE_HEIGHT ((W)))
684    
685    
686    /* Convert window W relative pixel X to frame pixel coordinates.  */
687    
688    #define WINDOW_TO_FRAME_PIXEL_X(W, X)           \
689      ((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
690    
691    /* Convert window W relative pixel Y to frame pixel coordinates.  */
692    
693    #define WINDOW_TO_FRAME_PIXEL_Y(W, Y)           \
694      ((Y) + WINDOW_TOP_EDGE_Y ((W)))
695    
696    /* Convert frame relative pixel X to window relative pixel X.  */
697    
698    #define FRAME_TO_WINDOW_PIXEL_X(W, X)           \
699      ((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
700    
701    /* Convert frame relative pixel Y to window relative pixel Y.  */
702    
703    #define FRAME_TO_WINDOW_PIXEL_Y(W, Y)           \
704      ((Y) - WINDOW_TOP_EDGE_Y ((W)))
705    
706    /* Convert a text area relative x-position in window W to frame X
707       pixel coordinates.  */
708    
709    #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)              \
710      (window_box_left ((W), TEXT_AREA) + (X))
711    
712  /* This is the window in which the terminal's cursor should  /* This is the window in which the terminal's cursor should
713     be left when nothing is being done with it.  This must     be left when nothing is being done with it.  This must
# Line 366  extern Lisp_Object Vmouse_window; Line 759  extern Lisp_Object Vmouse_window;
759  extern Lisp_Object Vmouse_event;  extern Lisp_Object Vmouse_event;
760    
761  EXFUN (Fnext_window, 3);  EXFUN (Fnext_window, 3);
762  EXFUN (Fselect_window, 1);  EXFUN (Fselect_window, 2);
763  EXFUN (Fdisplay_buffer, 3);  EXFUN (Fdisplay_buffer, 3);
764  EXFUN (Fset_window_buffer, 2);  EXFUN (Fset_window_buffer, 3);
765  EXFUN (Fset_window_hscroll, 2);  EXFUN (Fset_window_hscroll, 2);
766  EXFUN (Fwindow_hscroll, 1);  EXFUN (Fwindow_hscroll, 1);
767  EXFUN (Fset_window_vscroll, 2);  EXFUN (Fset_window_vscroll, 2);
# Line 379  EXFUN (Fset_window_point, 2); Line 772  EXFUN (Fset_window_point, 2);
772  extern Lisp_Object make_window P_ ((void));  extern Lisp_Object make_window P_ ((void));
773  extern void delete_window P_ ((Lisp_Object));  extern void delete_window P_ ((Lisp_Object));
774  extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int,  extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int,
775                                                  enum window_part *, int));                                                  enum window_part *,
776                                                    int *, int*, int));
777  EXFUN (Fwindow_dedicated_p, 1);  EXFUN (Fwindow_dedicated_p, 1);
778  extern int window_height P_ ((Lisp_Object));  extern int window_height P_ ((Lisp_Object));
779  extern int window_width P_ ((Lisp_Object));  extern int window_width P_ ((Lisp_Object));
# Line 400  extern void shrink_mini_window P_ ((stru Line 794  extern void shrink_mini_window P_ ((stru
794     it's not allowed.  */     it's not allowed.  */
795    
796  void set_window_buffer P_ ((Lisp_Object window, Lisp_Object buffer,  void set_window_buffer P_ ((Lisp_Object window, Lisp_Object buffer,
797                              int run_hooks_p));                              int run_hooks_p, int keep_margins_p));
798    
799  /* Prompt to display in front of the minibuffer contents.  */  /* Prompt to display in front of the minibuffer contents.  */
800    
# Line 463  struct glyph *get_phys_cursor_glyph P_ ( Line 857  struct glyph *get_phys_cursor_glyph P_ (
857  #define WINDOW_LIVE_P(WINDOW) \  #define WINDOW_LIVE_P(WINDOW) \
858       (WINDOWP ((WINDOW)) && !NILP (XWINDOW ((WINDOW))->buffer))       (WINDOWP ((WINDOW)) && !NILP (XWINDOW ((WINDOW))->buffer))
859    
860    
861    /* These used to be in lisp.h.  */
862    
863    extern Lisp_Object Qwindowp, Qwindow_live_p;
864    extern Lisp_Object Vwindow_list;
865    
866    EXFUN (Fwindow_end, 2);
867    EXFUN (Fselected_window, 0);
868    EXFUN (Fdelete_window, 1);
869    EXFUN (Fwindow_buffer, 1);
870    EXFUN (Fget_buffer_window, 2);
871    EXFUN (Fsave_window_excursion, UNEVALLED);
872    EXFUN (Fsplit_window, 3);
873    EXFUN (Fset_window_configuration, 1);
874    EXFUN (Fcurrent_window_configuration, 1);
875    extern int compare_window_configurations P_ ((Lisp_Object, Lisp_Object, int));
876    EXFUN (Fcoordinates_in_window_p, 2);
877    EXFUN (Fwindow_at, 3);
878    EXFUN (Fpos_visible_in_window_p, 3);
879    extern void mark_window_cursors_off P_ ((struct window *));
880    extern int window_internal_height P_ ((struct window *));
881    extern int window_internal_width P_ ((struct window *));
882    EXFUN (Frecenter, 1);
883    EXFUN (Fscroll_other_window, 1);
884    EXFUN (Fset_window_start, 3);
885    extern void temp_output_buffer_show P_ ((Lisp_Object));
886    extern void replace_buffer_in_all_windows P_ ((Lisp_Object));
887    extern void init_window_once P_ ((void));
888    extern void init_window P_ ((void));
889    extern void syms_of_window P_ ((void));
890    extern void keys_of_window P_ ((void));
891    
892    extern int window_box_text_cols P_ ((struct window *w));
893    
894  #endif /* not WINDOW_H_INCLUDED */  #endif /* not WINDOW_H_INCLUDED */
895    
896    /* arch-tag: d4a6942f-e433-4ffe-ac10-2c3574f28577
897       (do not change this comment) */

Legend:
Removed from v.1.49.2.1  
changed lines
  Added in v.1.49.2.2

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