4 * (C) 1992 Joseph H. Allen
6 * This file is part of JOE (Joe's Own Editor)
12 __IDSTRING(rcsid_w_h, "$MirOS: contrib/code/jupp/w.h,v 1.6 2017/12/02 17:00:53 tg Exp $");
19 /* int getgrouph(W *);
20 * Get height of a family of windows
22 int getgrouph PARAMS((W *w));
25 * Find first (top-most) window of a family
27 W *findtopw PARAMS((W *w));
30 * Find last (bottom-most) window a family
32 W *findbotw PARAMS((W *w));
34 int demotegroup PARAMS((W *w));
36 /* W *lastw(SCREEN *t);
37 * Find last window on screen
39 W *lastw PARAMS((SCREEN *t));
41 /* Determine number of main windows
43 int countmain PARAMS((SCREEN *t));
45 /* void wfit(SCREEN *t);
47 * Fit all of the windows onto the screen
49 void wfit PARAMS((SCREEN *t));
55 /* SCREEN *screate(SCRN *);
59 SCREEN *screate PARAMS((SCRN *scrn));
61 /* void sresize(SCREEN *t);
64 void sresize PARAMS((SCREEN *t));
66 /* void chsize(SCREEN *t,int mul,int div)
67 * Resize windows: each window is multiplied by the fraction mul/div
69 void chsize PARAMS(());
71 /* W *wcreate(SCREEN *t,WATOM *watom,W *where,W *target,W *original,int height);
73 * Try to create a window
75 * 't' Is the screen the window is placed on
76 * 'watom' Type of new window
77 * 'where' The window is placed after this window, or if 'where'==0, the
78 * window is placed on the end of the screen
79 * 'target' The window operates on this window. The window becomes a
80 * member of 'target's family or starts a new family if
82 * 'original' Attempt to get 'height' from this window. When the window is
83 * aborted, the space gets returned to 'original' if it still
84 * exists. If 'original'==0, the window will force other
85 * windows to go off of the screen.
86 * 'height' The height of the window
88 * Returns the new window or returns 0 if there was not enough space to
89 * create the window and maintain family integrity.
91 W *wcreate PARAMS((SCREEN *t, WATOM *watom, W *where, W *target, W *original, int height, const unsigned char *huh, int *notify));
95 * Kill a window and it's children
97 int wabort PARAMS((W *w));
99 /* int wnext(SCREEN *);
101 * Switch to next window
103 int wnext PARAMS((SCREEN *t));
105 /* int wprev(SCREEN *);
107 * Switch to previous window
109 int wprev PARAMS((SCREEN *t));
113 * increase size of window. Return 0 for success, -1 for fail.
115 int wgrow PARAMS((W *w));
119 * Decrease size of window. Returns 0 for success, -1 for fail.
121 int wshrink PARAMS((W *w));
123 /* void wshowone(W *);
125 * Show only one window on the screen
127 void wshowone PARAMS((W *w));
129 /* void wshowall(SCREEN *);
131 * Show all windows on the screen, including the given one
133 void wshowall PARAMS((SCREEN *t));
135 /* void wredraw(W *);
137 * Force complete redraw of window
139 void wredraw PARAMS((W *w));
145 void updall PARAMS((void));
147 /* void msgnw[t](W *w, char *s);
148 * Display a message which will be eliminated on the next keypress.
149 * msgnw displays message on bottom line of window
150 * msgnwt displays message on top line of window
152 void msgnw PARAMS((W *w, const unsigned char *s));
153 void msgnwt PARAMS((W *w, const unsigned char *s));
155 #define JOE_MSGBUFSIZE 300
156 extern unsigned char msgbuf[JOE_MSGBUFSIZE]; /* Message composition buffer for msgnw/msgnwt */
158 void msgout PARAMS((W *w)); /* Output msgnw/msgnwt messages */
160 /* Common user functions */
162 int urtn PARAMS((BASE *b, int k)); /* User hit return */
163 int utype PARAMS((BASE *b, int k)); /* User types a character */
164 int uretyp PARAMS((BASE *bw)); /* Refresh the screen */
165 int ugroww PARAMS((BASE *bw)); /* Grow current window */
166 int uexpld PARAMS((BASE *bw)); /* Explode current window or show all windows */
167 int ushrnk PARAMS((BASE *bw)); /* Shrink current window */
168 int unextw PARAMS((BASE *bw)); /* Goto next window */
169 int uprevw PARAMS((BASE *bw)); /* Goto previous window */
171 void scrdel PARAMS((B *b, long int l, long int n, int flg));
172 void scrins PARAMS((B *b, long int l, long int n, int flg));