home *** CD-ROM | disk | FTP | other *** search
- #ifndef WINDOW_H
- #define WINDOW_H
- /*
- * There is a window structure allocated for every active display window. The
- * windows are kept in a big list, in top to bottom screen order, with the
- * listhead at "wheadp". Each window contains its own values of dot and mark.
- * The flag field contains some bits that are set by commands to guide
- * redisplay; although this is a bit of a compromise in terms of decoupling,
- * the full blown redisplay is just too expensive to run for every input
- * character.
- */
-
- #ifndef LIST_H
- #include "list.h"
- #endif
-
- struct window {
- struct list w_list; /* List header */
- struct buffer *w_bufp; /* Buffer displayed in window */
- struct line *w_linep;/* Top line in the window */
- struct line *w_dotp; /* Line containing "." */
- struct line *w_markp;/* Line containing "mark" */
- short w_doto; /* Byte offset for "." */
- short w_marko;/* Byte offset for "mark" */
- char w_toprow; /* Origin 0 top row of window */
- char w_ntrows; /* # of rows of text in window */
- char w_force;/* If NZ, forcing row. */
- char w_flag; /* Flags. */
- };
- #define w_wndp w_list.l_p.l_wp
- #define w_name w_list.l_name
-
- /*
- * Window flags are set by command processors to tell the display system what
- * has happened to the buffer mapped by the window. Setting "WFHARD" is
- * always a safe thing to do, but it may do more work than is necessary.
- * Always try to set the simplest action that achieves the required update.
- * Because commands set bits in the "w_flag", update will see all change
- * flags, and do the most general one.
- */
- #define WFFORCE 0x01 /* Force reframe. */
- #define WFMOVE 0x02 /* Movement from line to line. */
- #define WFEDIT 0x04 /* Editing within a line. */
- #define WFHARD 0x08 /* Better to a full display. */
- #define WFMODE 0x10 /* Update mode line. */
-
- /*
- * Window Externals
- */
- extern struct window *curwp;
- extern struct window *wheadp;
- extern struct window *popbuf();
- extern struct window *wpopup();
- /*
- * Prototypes for window functions.
- */
- #ifndef NO_PROTO
- int showbuffer(struct buffer * bp, struct window * wp, int flags);
- struct window *popbuf(struct buffer * bp);
- struct window *wpopup(void);
- void modeline(struct window * wp);
- #endif
- #endif
-