1da976d84Selan // This may look like C code, but it is really -*- C++ -*-
2da976d84Selan 
3da976d84Selan /*
4da976d84Selan Copyright (C) 1989 Free Software Foundation
5da976d84Selan     written by Eric Newton (newton@rocky.oswego.edu)
6da976d84Selan 
7da976d84Selan This file is part of the GNU C++ Library.  This library is free
8da976d84Selan software; you can redistribute it and/or modify it under the terms of
9da976d84Selan the GNU Library General Public License as published by the Free
10da976d84Selan Software Foundation; either version 2 of the License, or (at your
11da976d84Selan option) any later version.  This library is distributed in the hope
12da976d84Selan that it will be useful, but WITHOUT ANY WARRANTY; without even the
13da976d84Selan implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14da976d84Selan PURPOSE.  See the GNU Library General Public License for more details.
15da976d84Selan You should have received a copy of the GNU Library General Public
16da976d84Selan License along with this library; if not, write to the Free Software
17da976d84Selan Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18da976d84Selan */
19da976d84Selan 
20da976d84Selan #ifndef _CursesWindow_h
21da976d84Selan #ifdef __GNUG__
22da976d84Selan #pragma interface
23da976d84Selan #endif
24da976d84Selan #define _CursesWindow_h
25da976d84Selan 
26da976d84Selan #include   <curses.h>
27da976d84Selan 
28da976d84Selan #if _G_HAVE_CURSES
29da976d84Selan 
30da976d84Selan // "Convert" macros to inlines, if needed.
31da976d84Selan #ifdef addch
32da976d84Selan inline int (addch)(char ch)  { return addch(ch); }
33da976d84Selan #undef addch
34da976d84Selan #endif
35da976d84Selan #ifdef addstr
36da976d84Selan /* The (char*) cast is to hack around missing const's */
37da976d84Selan inline int (addstr)(const char * str)  { return addstr((char*)str); }
38da976d84Selan #undef addstr
39da976d84Selan #endif
40da976d84Selan #ifdef clear
41da976d84Selan inline int (clear)()  { return clear(); }
42da976d84Selan #undef clear
43da976d84Selan #endif
44da976d84Selan #ifdef clearok
45da976d84Selan inline int (clearok)(WINDOW* win, int bf)  { return clearok(win, bf); }
46da976d84Selan #undef clearok
47da976d84Selan #else
48da976d84Selan extern "C" int clearok(WINDOW*, int);
49da976d84Selan #endif
50da976d84Selan #ifdef clrtobot
51da976d84Selan inline int (clrtobot)()  { return clrtobot(); }
52da976d84Selan #undef clrtobot
53da976d84Selan #endif
54da976d84Selan #ifdef clrtoeol
55da976d84Selan inline int (clrtoeol)()  { return clrtoeol(); }
56da976d84Selan #undef clrtoeol
57da976d84Selan #endif
58da976d84Selan #ifdef delch
59da976d84Selan inline int (delch)()  { return delch(); }
60da976d84Selan #undef delch
61da976d84Selan #endif
62da976d84Selan #ifdef deleteln
63da976d84Selan inline int (deleteln)()  { return deleteln(); }
64da976d84Selan #undef deleteln
65da976d84Selan #endif
66da976d84Selan #ifdef erase
67da976d84Selan inline int (erase)()  { return erase(); }
68da976d84Selan #undef erase
69da976d84Selan #endif
70da976d84Selan #ifdef flushok
71da976d84Selan inline int (flushok)(WINDOW* _win, int _bf)  { return flushok(_win, _bf); }
72da976d84Selan #undef flushok
73da976d84Selan #else
74da976d84Selan #define _no_flushok
75da976d84Selan #endif
76da976d84Selan #ifdef getch
77da976d84Selan inline int (getch)()  { return getch(); }
78da976d84Selan #undef getch
79da976d84Selan #endif
80da976d84Selan #ifdef getstr
81da976d84Selan inline int (getstr)(char *_str)  { return getstr(_str); }
82da976d84Selan #undef getstr
83da976d84Selan #endif
84da976d84Selan #ifdef getyx
85da976d84Selan inline void (getyx)(WINDOW* win, int& y, int& x) { getyx(win, y, x); }
86da976d84Selan #undef getyx
87da976d84Selan #endif
88da976d84Selan #ifdef inch
89da976d84Selan inline int (inch)()  { return inch(); }
90da976d84Selan #undef inch
91da976d84Selan #endif
92da976d84Selan #ifdef insch
93da976d84Selan inline int (insch)(char c)  { return insch(c); }
94da976d84Selan #undef insch
95da976d84Selan #endif
96da976d84Selan #ifdef insertln
97da976d84Selan inline int (insertln)()  { return insertln(); }
98da976d84Selan #undef insertln
99da976d84Selan #endif
100da976d84Selan #ifdef leaveok
101da976d84Selan inline int (leaveok)(WINDOW* win, int bf)  { return leaveok(win, bf); }
102da976d84Selan #undef leaveok
103da976d84Selan #else
104da976d84Selan extern "C" int leaveok(WINDOW* win, int bf);
105da976d84Selan #endif
106da976d84Selan #ifdef move
107da976d84Selan inline int (move)(int x, int y)  { return move(x, y); }
108da976d84Selan #undef move
109da976d84Selan #endif
110da976d84Selan #ifdef refresh
111da976d84Selan inline int (rfresh)()  { return refresh(); }
112da976d84Selan #undef refresh
113da976d84Selan #endif
114da976d84Selan #ifdef scrollok
115da976d84Selan inline int (scrollok)(WINDOW* win, int bf)  { return scrollok(win, bf); }
116da976d84Selan #undef scrollok
117da976d84Selan #else
118da976d84Selan #ifndef hpux
119da976d84Selan extern "C" int scrollok(WINDOW*, int);
120da976d84Selan #else
121da976d84Selan extern "C" int scrollok(WINDOW*, char);
122da976d84Selan #endif
123da976d84Selan #endif
124da976d84Selan #ifdef standend
125*075110dbSelan inline char * (standend)()  { return standend(); }
126da976d84Selan #undef standend
127da976d84Selan #endif
128da976d84Selan #ifdef standout
129*075110dbSelan inline char * (standout)()  { return standout(); }
130da976d84Selan #undef standout
131da976d84Selan #endif
132da976d84Selan #ifdef winch
133da976d84Selan inline int (winch)(WINDOW* win) { return winch(win); }
134da976d84Selan #undef winch
135da976d84Selan #endif
136da976d84Selan 
137da976d84Selan #ifdef mvwaddch
138da976d84Selan inline int (mvwaddch)(WINDOW *win, int y, int x, char ch)
139da976d84Selan { return mvwaddch(win, y, x, ch); }
140da976d84Selan #undef mvwaddch
141da976d84Selan #endif
142da976d84Selan #ifdef mvwaddstr
143da976d84Selan inline int (mvwaddstr)(WINDOW *win, int y, int x, const char * str)
144da976d84Selan { return mvwaddstr(win, y, x, (char*)str); }
145da976d84Selan #undef mvwaddstr
146da976d84Selan #endif
147da976d84Selan #ifdef mvwdelch
148da976d84Selan inline int (mvwdelch)(WINDOW *win, int y, int x) { return mvwdelch(win, y, x);}
149da976d84Selan #undef mvwdelch
150da976d84Selan #endif
151da976d84Selan #ifdef mvwgetch
152da976d84Selan inline int (mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);}
153da976d84Selan #undef mvwgetch
154da976d84Selan #endif
155da976d84Selan #ifdef mvwgetstr
156da976d84Selan inline int (mvwgetstr)(WINDOW *win, int y, int x, char *str)
157da976d84Selan {return mvwgetstr(win,y,x, str);}
158da976d84Selan #undef mvwgetstr
159da976d84Selan #endif
160da976d84Selan #ifdef mvwinch
161da976d84Selan inline int (mvwinch)(WINDOW *win, int y, int x) { return mvwinch(win, y, x);}
162da976d84Selan #undef mvwinch
163da976d84Selan #endif
164da976d84Selan #ifdef mvwinsch
165da976d84Selan inline int (mvwinsch)(WINDOW *win, int y, int x, char c)
166da976d84Selan { return mvwinsch(win, y, x, c); }
167da976d84Selan #undef mvwinsch
168da976d84Selan #endif
169da976d84Selan 
170da976d84Selan #ifdef mvaddch
171da976d84Selan inline int (mvaddch)(int y, int x, char ch)
172da976d84Selan { return mvaddch(y, x, ch); }
173da976d84Selan #undef mvaddch
174da976d84Selan #endif
175da976d84Selan #ifdef mvaddstr
176da976d84Selan inline int (mvaddstr)(int y, int x, const char * str)
177da976d84Selan { return mvaddstr(y, x, (char*)str); }
178da976d84Selan #undef mvaddstr
179da976d84Selan #endif
180da976d84Selan #ifdef mvdelch
181da976d84Selan inline int (mvdelch)(int y, int x) { return mvdelch(y, x);}
182da976d84Selan #undef mvdelch
183da976d84Selan #endif
184da976d84Selan #ifdef mvgetch
185da976d84Selan inline int (mvgetch)(int y, int x) { return mvgetch(y, x);}
186da976d84Selan #undef mvgetch
187da976d84Selan #endif
188da976d84Selan #ifdef mvgetstr
189da976d84Selan inline int (mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);}
190da976d84Selan #undef mvgetstr
191da976d84Selan #endif
192da976d84Selan #ifdef mvinch
193da976d84Selan inline int (mvinch)(int y, int x) { return mvinch(y, x);}
194da976d84Selan #undef mvinch
195da976d84Selan #endif
196da976d84Selan #ifdef mvinsch
197da976d84Selan inline int (mvinsch)(int y, int x, char c)
198da976d84Selan { return mvinsch(y, x, c); }
199da976d84Selan #undef mvinsch
200da976d84Selan #endif
201da976d84Selan 
202da976d84Selan /*
203da976d84Selan  *
204da976d84Selan  * C++ class for windows.
205da976d84Selan  *
206da976d84Selan  *
207da976d84Selan  */
208da976d84Selan 
209da976d84Selan class CursesWindow
210da976d84Selan {
211da976d84Selan protected:
212da976d84Selan   static int     count;           // count of all active windows:
213da976d84Selan                                   //   We rely on the c++ promise that
214da976d84Selan                                   //   all otherwise uninitialized
215da976d84Selan                                   //   static class vars are set to 0
216da976d84Selan 
217da976d84Selan   WINDOW *       w;               // the curses WINDOW
218da976d84Selan 
219da976d84Selan   int            alloced;         // true if we own the WINDOW
220da976d84Selan 
221da976d84Selan   CursesWindow*  par;             // parent, if subwindow
222da976d84Selan   CursesWindow*  subwins;         // head of subwindows list
223da976d84Selan   CursesWindow*  sib;             // next subwindow of parent
224da976d84Selan 
225da976d84Selan   void           kill_subwindows(); // disable all subwindows
226da976d84Selan 
227da976d84Selan public:
228da976d84Selan                  CursesWindow(WINDOW* &window);   // useful only for stdscr
229da976d84Selan 
230da976d84Selan                  CursesWindow(int lines,          // number of lines
231da976d84Selan                               int cols,           // number of columns
232da976d84Selan                               int begin_y,        // line origin
233da976d84Selan                               int begin_x);       // col origin
234da976d84Selan 
235da976d84Selan                  CursesWindow(CursesWindow& par,  // parent window
236da976d84Selan                               int lines,          // number of lines
237da976d84Selan                               int cols,           // number of columns
238da976d84Selan                               int by,             // absolute or relative
239da976d84Selan                               int bx,             //   origins:
240da976d84Selan                               char absrel = 'a'); // if `a', by & bx are
241da976d84Selan                                                   // absolute screen pos,
242da976d84Selan                                                   // else if `r', they are
243da976d84Selan                                                   // relative to par origin
244da976d84Selan                 ~CursesWindow();
245da976d84Selan 
246da976d84Selan // terminal status
247da976d84Selan   int            lines(); // number of lines on terminal, *not* window
248da976d84Selan   int            cols();  // number of cols  on terminal, *not* window
249da976d84Selan 
250da976d84Selan // window status
251da976d84Selan   int            height(); // number of lines in this window
252da976d84Selan   int            width();  // number of cols in this window
253da976d84Selan   int            begx();   // smallest x coord in window
254da976d84Selan   int            begy();   // smallest y coord in window
255da976d84Selan   int            maxx();   // largest  x coord in window
256da976d84Selan   int            maxy();   // largest  x coord in window
257da976d84Selan 
258da976d84Selan // window positioning
259da976d84Selan   int            move(int y, int x);
260da976d84Selan 
261da976d84Selan // coordinate positioning
262da976d84Selan   void           getyx(int& y, int& x);
263da976d84Selan   int            mvcur(int sy, int ey, int sx, int ex);
264da976d84Selan 
265da976d84Selan // input
266da976d84Selan   int            getch();
267da976d84Selan   int            getstr(char * str);
268da976d84Selan   int            scanw(const char *, ...);
269da976d84Selan 
270da976d84Selan // input + positioning
271da976d84Selan   int            mvgetch(int y, int x);
272da976d84Selan   int            mvgetstr(int y, int x, char * str);
273da976d84Selan   int            mvscanw(int, int, const char*, ...);
274da976d84Selan 
275da976d84Selan // output
276da976d84Selan   int            addch(const char ch);
277da976d84Selan   int            addstr(const char * str);
278da976d84Selan   int            printw(const char * fmt, ...);
279da976d84Selan   int            inch();
280da976d84Selan   int            insch(char c);
281da976d84Selan   int            insertln();
282da976d84Selan 
283da976d84Selan // output + positioning
284da976d84Selan   int            mvaddch(int y, int x, char ch);
285da976d84Selan   int            mvaddstr(int y, int x, const char * str);
286da976d84Selan   int            mvprintw(int y, int x, const char * fmt, ...);
287da976d84Selan   int            mvinch(int y, int x);
288da976d84Selan   int            mvinsch(int y, int x, char ch);
289da976d84Selan 
290da976d84Selan // borders
291da976d84Selan   int            box(char vert, char  hor);
292da976d84Selan 
293da976d84Selan // erasure
294da976d84Selan   int            erase();
295da976d84Selan   int            clear();
296da976d84Selan   int            clearok(int bf);
297da976d84Selan   int            clrtobot();
298da976d84Selan   int            clrtoeol();
299da976d84Selan   int            delch();
300da976d84Selan   int            mvdelch(int y, int x);
301da976d84Selan   int            deleteln();
302da976d84Selan 
303da976d84Selan // screen control
304da976d84Selan   int            scroll();
305da976d84Selan   int            scrollok(int bf);
306da976d84Selan   int            touchwin();
307da976d84Selan   int            refresh();
308da976d84Selan   int            leaveok(int bf);
309da976d84Selan #ifndef _no_flushok
310da976d84Selan   int            flushok(int bf);
311da976d84Selan #endif
312*075110dbSelan   char*            standout();
313*075110dbSelan   char*            standend();
314da976d84Selan 
315da976d84Selan // multiple window control
316da976d84Selan   int            overlay(CursesWindow &win);
317da976d84Selan   int            overwrite(CursesWindow &win);
318da976d84Selan 
319da976d84Selan 
320da976d84Selan // traversal support
321da976d84Selan   CursesWindow*  child();
322da976d84Selan   CursesWindow*  sibling();
323da976d84Selan   CursesWindow*  parent();
324da976d84Selan };
325da976d84Selan 
326da976d84Selan 
begx()327da976d84Selan inline int CursesWindow::begx()
328da976d84Selan {
329*075110dbSelan   return w->begx;
330da976d84Selan }
331da976d84Selan 
begy()332da976d84Selan inline int CursesWindow::begy()
333da976d84Selan {
334*075110dbSelan   return w->begy;
335da976d84Selan }
336da976d84Selan 
maxx()337da976d84Selan inline int CursesWindow::maxx()
338da976d84Selan {
339*075110dbSelan   return w->maxx;
340da976d84Selan }
341da976d84Selan 
maxy()342da976d84Selan inline int CursesWindow::maxy()
343da976d84Selan {
344*075110dbSelan   return w->maxy;
345da976d84Selan }
346da976d84Selan 
height()347da976d84Selan inline int CursesWindow::height()
348da976d84Selan {
349da976d84Selan   return maxy() - begy() + 1;
350da976d84Selan }
351da976d84Selan 
width()352da976d84Selan inline int CursesWindow::width()
353da976d84Selan {
354da976d84Selan   return maxx() - begx() + 1;
355da976d84Selan }
356da976d84Selan 
box(char vert,char hor)357da976d84Selan inline int CursesWindow::box(char vert, char  hor)
358da976d84Selan {
359da976d84Selan   return ::box(w, vert, hor);
360da976d84Selan }
361da976d84Selan 
overlay(CursesWindow & win)362da976d84Selan inline int CursesWindow::overlay(CursesWindow &win)
363da976d84Selan {
364da976d84Selan   return ::overlay(w, win.w);
365da976d84Selan }
366da976d84Selan 
overwrite(CursesWindow & win)367da976d84Selan inline int CursesWindow::overwrite(CursesWindow &win)
368da976d84Selan {
369da976d84Selan   return ::overwrite(w, win.w);
370da976d84Selan }
371da976d84Selan 
scroll()372da976d84Selan inline int CursesWindow::scroll()
373da976d84Selan {
374da976d84Selan   return ::scroll(w);
375da976d84Selan }
376da976d84Selan 
377da976d84Selan 
touchwin()378da976d84Selan inline int CursesWindow::touchwin()
379da976d84Selan {
380da976d84Selan   return ::touchwin(w);
381da976d84Selan }
382da976d84Selan 
addch(const char ch)383da976d84Selan inline int CursesWindow::addch(const char ch)
384da976d84Selan {
385da976d84Selan   return ::waddch(w, ch);
386da976d84Selan }
387da976d84Selan 
addstr(const char * str)388da976d84Selan inline int CursesWindow::addstr(const char * str)
389da976d84Selan {
390da976d84Selan   // The (char*) cast is to hack around prototypes in curses.h that
391da976d84Selan   // have const missing in the parameter lists.  [E.g. SVR4]
392da976d84Selan   return ::waddstr(w, (char*)str);
393da976d84Selan }
394da976d84Selan 
clear()395da976d84Selan inline int CursesWindow::clear()
396da976d84Selan {
397da976d84Selan   return ::wclear(w);
398da976d84Selan }
399da976d84Selan 
clrtobot()400da976d84Selan inline int CursesWindow::clrtobot()
401da976d84Selan {
402da976d84Selan   return ::wclrtobot(w);
403da976d84Selan }
404da976d84Selan 
clrtoeol()405da976d84Selan inline int CursesWindow::clrtoeol()
406da976d84Selan {
407da976d84Selan   return ::wclrtoeol(w);
408da976d84Selan }
409da976d84Selan 
delch()410da976d84Selan inline int CursesWindow::delch()
411da976d84Selan {
412da976d84Selan   return ::wdelch(w);
413da976d84Selan }
414da976d84Selan 
deleteln()415da976d84Selan inline int CursesWindow::deleteln()
416da976d84Selan {
417da976d84Selan   return ::wdeleteln(w);
418da976d84Selan }
419da976d84Selan 
erase()420da976d84Selan inline int CursesWindow::erase()
421da976d84Selan {
422da976d84Selan   return ::werase(w);
423da976d84Selan }
424da976d84Selan 
getch()425da976d84Selan inline int CursesWindow::getch()
426da976d84Selan {
427da976d84Selan   return ::wgetch(w);
428da976d84Selan }
429da976d84Selan 
getstr(char * str)430da976d84Selan inline int CursesWindow::getstr(char * str)
431da976d84Selan {
432da976d84Selan   return ::wgetstr(w, str);
433da976d84Selan }
434da976d84Selan 
inch()435da976d84Selan inline int CursesWindow::inch()
436da976d84Selan {
437da976d84Selan   return winch(w);
438da976d84Selan }
439da976d84Selan 
insch(char c)440da976d84Selan inline int CursesWindow::insch(char c)
441da976d84Selan {
442da976d84Selan   return ::winsch(w, c);
443da976d84Selan }
444da976d84Selan 
insertln()445da976d84Selan inline int CursesWindow::insertln()
446da976d84Selan {
447da976d84Selan   return ::winsertln(w);
448da976d84Selan }
449da976d84Selan 
move(int y,int x)450da976d84Selan inline int CursesWindow::move(int y, int x)
451da976d84Selan {
452da976d84Selan   return ::wmove(w, y, x);
453da976d84Selan }
454da976d84Selan 
455da976d84Selan 
mvcur(int sy,int ey,int sx,int ex)456da976d84Selan inline int CursesWindow::mvcur(int sy, int ey, int sx, int ex)
457da976d84Selan {
458da976d84Selan   return ::mvcur(sy, ey, sx,ex);
459da976d84Selan }
460da976d84Selan 
mvaddch(int y,int x,char ch)461da976d84Selan inline int CursesWindow::mvaddch(int y, int x, char ch)
462da976d84Selan {
463da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::waddch(w, ch);
464da976d84Selan }
465da976d84Selan 
mvgetch(int y,int x)466da976d84Selan inline int CursesWindow::mvgetch(int y, int x)
467da976d84Selan {
468da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::wgetch(w);
469da976d84Selan }
470da976d84Selan 
mvaddstr(int y,int x,const char * str)471da976d84Selan inline int CursesWindow::mvaddstr(int y, int x, const char * str)
472da976d84Selan {
473da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::waddstr(w, (char*)str);
474da976d84Selan }
475da976d84Selan 
mvgetstr(int y,int x,char * str)476da976d84Selan inline int CursesWindow::mvgetstr(int y, int x, char * str)
477da976d84Selan {
478da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::wgetstr(w, str);
479da976d84Selan }
480da976d84Selan 
mvinch(int y,int x)481da976d84Selan inline int CursesWindow::mvinch(int y, int x)
482da976d84Selan {
483da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::winch(w);
484da976d84Selan }
485da976d84Selan 
mvdelch(int y,int x)486da976d84Selan inline int CursesWindow::mvdelch(int y, int x)
487da976d84Selan {
488da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::wdelch(w);
489da976d84Selan }
490da976d84Selan 
mvinsch(int y,int x,char ch)491da976d84Selan inline int CursesWindow::mvinsch(int y, int x, char ch)
492da976d84Selan {
493da976d84Selan   return (::wmove(w, y, x)==ERR) ? ERR : ::winsch(w, ch);
494da976d84Selan }
495da976d84Selan 
refresh()496da976d84Selan inline int CursesWindow::refresh()
497da976d84Selan {
498da976d84Selan   return ::wrefresh(w);
499da976d84Selan }
500da976d84Selan 
clearok(int bf)501da976d84Selan inline int CursesWindow::clearok(int bf)
502da976d84Selan {
503da976d84Selan   return ::clearok(w,bf);
504da976d84Selan }
505da976d84Selan 
leaveok(int bf)506da976d84Selan inline int CursesWindow::leaveok(int bf)
507da976d84Selan {
508da976d84Selan   return ::leaveok(w,bf);
509da976d84Selan }
510da976d84Selan 
scrollok(int bf)511da976d84Selan inline int CursesWindow::scrollok(int bf)
512da976d84Selan {
513da976d84Selan   return ::scrollok(w,bf);
514da976d84Selan }
515da976d84Selan 
516da976d84Selan #ifndef _no_flushok
flushok(int bf)517da976d84Selan inline int CursesWindow::flushok(int bf)
518da976d84Selan {
519da976d84Selan   return ::flushok(w, bf);
520da976d84Selan }
521da976d84Selan #endif
522da976d84Selan 
getyx(int & y,int & x)523da976d84Selan inline void CursesWindow::getyx(int& y, int& x)
524da976d84Selan {
525da976d84Selan   ::getyx(w, y, x);
526da976d84Selan }
527da976d84Selan 
standout()528*075110dbSelan inline char *CursesWindow::standout()
529da976d84Selan {
530da976d84Selan   return ::wstandout(w);
531da976d84Selan }
532da976d84Selan 
standend()533*075110dbSelan inline char *CursesWindow::standend()
534da976d84Selan {
535da976d84Selan   return ::wstandend(w);
536da976d84Selan }
537da976d84Selan 
lines()538da976d84Selan inline int CursesWindow::lines()
539da976d84Selan {
540da976d84Selan   return LINES;
541da976d84Selan }
542da976d84Selan 
cols()543da976d84Selan inline int CursesWindow::cols()
544da976d84Selan {
545da976d84Selan   return COLS;
546da976d84Selan }
547da976d84Selan 
child()548da976d84Selan inline CursesWindow* CursesWindow::child()
549da976d84Selan {
550da976d84Selan   return subwins;
551da976d84Selan }
552da976d84Selan 
parent()553da976d84Selan inline CursesWindow* CursesWindow::parent()
554da976d84Selan {
555da976d84Selan   return par;
556da976d84Selan }
557da976d84Selan 
sibling()558da976d84Selan inline CursesWindow* CursesWindow::sibling()
559da976d84Selan {
560da976d84Selan   return sib;
561da976d84Selan }
562da976d84Selan 
563da976d84Selan #endif /* _G_HAVE_CURSES */
564*075110dbSelan 
565da976d84Selan #endif
566