| 1 |
/************************************************************************** |
| 2 |
* This program is Copyright (C) 1986-2002 by Jonathan Payne. JOVE is * |
| 3 |
* provided by Jonathan and Jovehacks without charge and without * |
| 4 |
* warranty. You may copy, modify, and/or distribute JOVE, provided that * |
| 5 |
* this notice is included in all the source files and documentation. * |
| 6 |
**************************************************************************/ |
| 7 |
|
| 8 |
/* typedef struct window Window in jove.h */ |
| 9 |
|
| 10 |
struct window { |
| 11 |
Window |
| 12 |
*w_prev, /* circular list */ |
| 13 |
*w_next; |
| 14 |
Buffer *w_bufp; /* buffer associated with this window */ |
| 15 |
LinePtr |
| 16 |
w_top, /* top line */ |
| 17 |
w_line; /* current line */ |
| 18 |
long w_topnum; /* buffer line number of the topline */ |
| 19 |
int |
| 20 |
w_char, |
| 21 |
w_height, /* window height (including mode line) */ |
| 22 |
w_dotcol, /* screen column of w_line (set by UpdWindow) */ |
| 23 |
w_dotline, /* screen line number of w_line (set by UpdWindow) */ |
| 24 |
w_flags, |
| 25 |
#define W_TOPGONE 01 |
| 26 |
#define W_CURGONE 02 /* topline (curline) of window has been deleted |
| 27 |
since the last time a redisplay was called */ |
| 28 |
#define W_VISSPACE 04 |
| 29 |
#define W_NUMLINES 010 |
| 30 |
w_LRscroll; /* amount of LeftRight scrolling in window */ |
| 31 |
#ifdef MAC |
| 32 |
int w_topline; /* row number of top line in window */ |
| 33 |
/* Note: "ControlHandle w_control" would require more includes */ |
| 34 |
struct ControlRecord **w_control; /* scroll bar for window */ |
| 35 |
#endif |
| 36 |
}; |
| 37 |
|
| 38 |
#define W_NUMWIDTH(w) (((w)->w_flags & W_NUMLINES)? 8 : 0) |
| 39 |
#define SIWIDTH(off) ((off) != 0? 1 : 0) /* width of shift indicator, if any */ |
| 40 |
|
| 41 |
extern Window |
| 42 |
*fwind, /* first window in list */ |
| 43 |
*curwind; /* current window */ |
| 44 |
|
| 45 |
#define one_windp() (fwind->w_next == fwind) |
| 46 |
#define WSIZE(wp) ((wp)->w_height - 1) /* window lines, without modeline */ |
| 47 |
|
| 48 |
extern int |
| 49 |
in_window(Window *windes,LinePtr line); |
| 50 |
|
| 51 |
extern Window |
| 52 |
*div_wind(Window *wp,int n), |
| 53 |
*windbp(Buffer *bp); |
| 54 |
|
| 55 |
extern void |
| 56 |
CalcWind(Window *w), |
| 57 |
CentWind(Window *w), |
| 58 |
SetTop(Window *w,LinePtr line), |
| 59 |
SetWind(Window *new), |
| 60 |
WindSize(Window *w,int inc), |
| 61 |
del_wind(Window *wp), |
| 62 |
pop_wind(const char *name, jbool clobber, int btype), |
| 63 |
tiewind(Window *w, Buffer *bp), /* util.c!! */ |
| 64 |
winit(void); |
| 65 |
|
| 66 |
/* Commands: */ |
| 67 |
|
| 68 |
extern void |
| 69 |
DelCurWindow(void), |
| 70 |
GotoWind(void), |
| 71 |
GrowWindowCmd(void), |
| 72 |
NextWindow(void), |
| 73 |
OneWindow(void), |
| 74 |
PageNWind(void), |
| 75 |
PrevWindow(void), |
| 76 |
ScrollLeft(void), |
| 77 |
ScrollRight(void), |
| 78 |
ShrWindow(void), |
| 79 |
SplitWind(void), |
| 80 |
WNumLines(void), |
| 81 |
WVisSpace(void), |
| 82 |
WindFind(void); |
| 83 |
|
| 84 |
/* Variables: */ |
| 85 |
|
| 86 |
extern int ScrollStep; /* VAR: how should we scroll */ |
| 87 |
|
| 88 |
#ifdef HIGHLIGHTING |
| 89 |
extern jbool ScrollBar; /* VAR: whether the scrollbar is used */ |
| 90 |
#endif |