Annotation of 43BSD/contrib/emacs/src/window.h, revision 1.1.1.1

1.1       root        1: /* Window definitions for GNU Emacs.
                      2:    Copyright (C) 1985 Richard M. Stallman.
                      3: 
                      4: This file is part of GNU Emacs.
                      5: 
                      6: GNU Emacs is distributed in the hope that it will be useful,
                      7: but WITHOUT ANY WARRANTY.  No author or distributor
                      8: accepts responsibility to anyone for the consequences of using it
                      9: or for whether it serves any particular purpose or works at all,
                     10: unless he says so in writing.  Refer to the GNU Emacs General Public
                     11: License for full details.
                     12: 
                     13: Everyone is granted permission to copy, modify and redistribute
                     14: GNU Emacs, but only under the conditions described in the
                     15: GNU Emacs General Public License.   A copy of this license is
                     16: supposed to have been given to you along with GNU Emacs so you
                     17: can know your rights and responsibilities.  It should be in a
                     18: file named COPYING.  Among other things, the copyright notice
                     19: and this notice must be preserved on all copies.  */
                     20: 
                     21: 
                     22: /* Windows are allocated as if they were vectors, but then the
                     23: Lisp data type is changed to Lisp_Window.  They are garbage
                     24: collected along with the vectors.
                     25: 
                     26: All windows in use are arranged into a tree, with pointers up and down.
                     27: 
                     28: Windows that are leaves of the tree are actually displayed
                     29: and show the contents of buffers.  Windows that are not leaves
                     30: are used for representing the way groups of leaf windows are
                     31: arranged on the screen.  Leaf windows never become non-leaves.
                     32: They are deleted only by calling delete-window on them (but
                     33: this can be done implicitly).  Combination windows can be created
                     34: and deleted at any time.
                     35: 
                     36: A leaf window has a non-nil buffer field, and also
                     37:  has markers in its start and pointm fields.  Non-leaf windows
                     38:  have nil in these fields.
                     39: 
                     40: Non-leaf windows are either vertical or horizontal combinations.
                     41: 
                     42: A vertical combination window has children that are arranged
                     43: one above the next.  Its vchild field points to the uppermost child.
                     44: The parent field of each of the children points to the vertical
                     45: combination window.  The next field of each child points to the
                     46: child below it, or is nil for the lowest child.  The prev field
                     47: or each child points to the child above it, or is nil for the highest child.
                     48: 
                     49: A horizontal combination window has children that are side by side.
                     50: Its hchild field points to the leftmost child.  In each child
                     51: the next field points to the child to the right and the prev field
                     52: points to the child to the left.
                     53: 
                     54: The children of a vertical combination window may be leaf windows
                     55: or horizontal combination windows.  The children of a horizontal
                     56: combination window may be leaf windows or vertical combination windows.
                     57: 
                     58: At the top of the tree are two windows which have nil as parent.
                     59: The second of these is minibuf_window.  The first one manages all
                     60: the screen area that is not minibuffer, and is called the root window.
                     61: Different windows can be the root at different times;
                     62: initially the root window is a leaf window, but if more windows
                     63: are created then that leaf window ceases to be root and a newly
                     64: made combination window becomes root instead.
                     65: 
                     66: In any case, prev of the minibuf window is the root window and
                     67: next of the root window is the minibuf window.  To find the
                     68: root window at any time, do XWINDOW (minibuf_window)->prev.
                     69: 
                     70: */
                     71: 
                     72: struct window
                     73:   {
                     74:     /* The first two fields are really the header of a vector */
                     75:     /* The window code does not refer to them.  */
                     76:     int size;
                     77:     struct Lisp_Vector *vec_next;
                     78:     /* Following child (to right or down) at same level of tree */
                     79:     Lisp_Object next;
                     80:     /* Preceding child (to left or up) at same level of tree */
                     81:     Lisp_Object prev;
                     82:     /* First child of this window. */
                     83:     /* vchild is used if this is a vertical combination,
                     84:        hchild if this is a horizontal combination. */
                     85:     Lisp_Object hchild, vchild;
                     86:     /* The window this one is a child of. */
                     87:     Lisp_Object parent;
                     88:     /* The upper left corner coordinates of this window,
                     89:        as integers relative to upper left corner of screen = 0, 0 */
                     90:     Lisp_Object left;
                     91:     Lisp_Object top;
                     92:     /* The size of the window */
                     93:     Lisp_Object height;
                     94:     Lisp_Object width;
                     95:     /* The buffer displayed in this window */
                     96:     /* Of the fields vchild, hchild and buffer, only one is non-nil.  */
                     97:     Lisp_Object buffer;
                     98:     /* A marker pointing to where in the text to start displaying */
                     99:     Lisp_Object start;
                    100:     /* A marker pointing to where in the text point is in this window,
                    101:        used only when the window is not selected.
                    102:        This exists so that when multiple windows show one buffer
                    103:        each one can have its own value of point.  */
                    104:     Lisp_Object pointm;
                    105:     /* Non-nil means next redisplay must use the value of start
                    106:        set up for it in advance.  Set by scrolling commands.  */
                    107:     Lisp_Object force_start;
                    108:     /* Number of columns display within the window is scrolled to the left.
                    109:        Currently always zero since this is not implemented.  */
                    110:     Lisp_Object hscroll;
                    111:     /* Number saying how recently window was selected */
                    112:     Lisp_Object use_time;
                    113:     /* Unique number of window assigned when it was created */
                    114:     Lisp_Object sequence_number;
                    115:     /* No permanent meaning; used by save-window-excursion's bookkeeping */
                    116:     Lisp_Object temslot;
                    117:     /* text.modified of displayed buffer as of last time display completed */
                    118:     Lisp_Object last_modified;
                    119:     /* Value of point at that time */
                    120:     Lisp_Object last_point;
                    121: /* The rest are currently not used or only half used */
                    122:     /* Screen coords of point at that time */
                    123:     Lisp_Object last_point_x;
                    124:     Lisp_Object last_point_y;
                    125:     /* Screen coords of mark as of last time display completed */
                    126:     /* May be nil if mark does not exist or was not on screen */
                    127:     Lisp_Object last_mark_x;
                    128:     Lisp_Object last_mark_y;
                    129:     /* Number of characters in buffer past bottom of window,
                    130:        as of last redisplay that finished. */
                    131:     Lisp_Object window_end_pos;
                    132:     /* Vertical position (relative to window top) of that buffer position
                    133:        of the first of those characters */
                    134:     Lisp_Object window_end_vpos;
                    135:     /* Non-nil means must regenerate mode line of this window */
                    136:     Lisp_Object redo_mode_line;
                    137:   };
                    138: 
                    139: /* This is the window which displays the minibuffer.
                    140: It is always the same window.  */
                    141: 
                    142: extern Lisp_Object minibuf_window;
                    143: 
                    144: /* This is the window in which the terminal's cursor should
                    145:  be left when nothing is being done with it.  This must
                    146:  always be a leaf window, and its buffer is selected by
                    147:  the top level editing loop at the end of each command.  */
                    148: 
                    149: extern Lisp_Object selected_window;
                    150: 
                    151: #define new_windows 1
                    152: 
                    153: Lisp_Object Fnext_window ();
                    154: Lisp_Object Fselect_window ();
                    155: Lisp_Object Fdisplay_buffer ();
                    156: Lisp_Object Fshow_buffer ();
                    157: 
                    158: extern char *minibuf_prompt;   /* Prompt to display in front of the minibuffer contents */
                    159: 
                    160: extern char *minibuf_message;  /* Message to display instead of minibuffer contents */
                    161:                                /* This is what the functions error and message make, */
                    162:                                /* and command echoing uses it as well. */
                    163:                                /* It overrides the minibuf_prompt as well as the buffer */
                    164: 
                    165: extern int RecurseDepth;       /* Depth in recursive edits */
                    166: 
                    167: extern int MinibufDepth;       /* Depth in minibuffer invocations */
                    168: 
                    169: extern int RedoModes;          /* true iff we should redraw the mode lines
                    170:                                   on the next redisplay */
                    171: 
                    172: /* Minimum value of bf_s1 since last redisplay that finished.
                    173:  Valid for current buffer unless Cant1WinOpt is nonzero. */
                    174: 
                    175: extern int beg_unchanged;
                    176: 
                    177: /* Minimum value of bf_s2 since last redisplay that finished.
                    178:  Valid for current buffer unless Cant1WinOpt is nonzero. */
                    179: 
                    180: extern int end_unchanged;
                    181: 
                    182: /* bf_modified as of last redisplay that finished;
                    183:  if it matches bf_modified, beg_unchanged and end_unchanged
                    184:  contain no useful information */
                    185: extern int unchanged_modified;
                    186: 
                    187: /* Nonzero if head_clip or tail_clip of current buffer has changed
                    188:  since last redisplay that finished */
                    189: extern int clip_changed;
                    190: 
                    191: /* Nonzero if window sizes or contents have changed
                    192:  since last redisplay that finished */
                    193: extern int windows_or_buffers_changed;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.