2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef __gator_curseswindows_h
11 #define __gator_curseswindows_h 1
13 #include "gtxwindows.h" /*Base gator window dfns */
14 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
17 #ifdef AFS_LINUX20_ENV
18 #include <ncurses.h> /*Curses library */
20 #include <curses.h> /*Curses library */
23 /*Value for gwin w_type field*/
24 #define GATOR_WIN_CURSES 2
26 /*Private data for a curses gwin*/
27 struct gator_cursesgwin {
28 WINDOW *wp; /*Window pointer */
29 int charwidth; /*Character width in pixels */
30 int charheight; /*Character height in pixels */
31 char box_vertchar; /*Vertical char for boxing purposes */
32 char box_horizchar; /*Horizontal char for boxing purposes */
35 /*Curses gwin's creation parameters*/
36 struct gator_cursesgwin_params {
37 struct gwin_createparams gwin_params; /*Basic params for the window */
38 int charwidth; /*Character width in pixels */
39 int charheight; /*Character height in pixels */
40 char box_vertchar; /*Vertical char for boxing purposes */
41 char box_horizchar; /*Horizontal char for boxing purposes */
44 /*Curses initialization routine*/
46 extern int gator_cursesgwin_init();
49 * Initialize the curses window package.
52 * int adebug: Is debugging turned on?
56 * Error value otherwise.
59 /*Curses window's creation routine*/
61 extern struct gwin *gator_cursesgwin_create();
64 * Create a curses window.
67 * struct gator_cursesgwin_params *params : Ptr to creation parameters.
70 * Ptr to the created curses window structure if successful,
71 * Error value otherwise.
74 /*Curses cleanup routine*/
76 extern int gator_cursesgwin_cleanup();
79 * Clean up after the curses window package.
82 * struct gwin *gwp : Ptr to base window.
86 * Error value otherwise.
89 extern struct gwinbaseops gator_curses_gwinbops;
91 /*Curses window's routines*/
93 extern int gator_cursesgwin_box();
96 * Draw a box around the given curses window.
99 * struct gwin *gwp : Ptr to the curses window to draw
104 * Error value otherwise.
107 extern int gator_cursesgwin_clear();
110 * Clear out the given curses window.
113 * struct gwin *gwp : Ptr to the curses window to clear
118 * Error value otherwise.
121 extern int gator_cursesgwin_destroy();
124 * Destroy the given curses window.
127 * struct gwin *gwp : Ptr to the curses window to destroy.
131 * Error value otherwise.
134 extern int gator_cursesgwin_display();
137 * Display/redraw the given curses window.
140 * struct gwin *gwp : Ptr to the curses window to draw.
144 * Error value otherwise.
147 extern int gator_cursesgwin_drawline();
150 * Draw a line between two points in the given curses
154 * struct gwin *gwp : Ptr to the curses window in which
155 * the line is to be drawn.
156 * struct gwin_lineparams *params : Ptr to other params.
160 * Error value otherwise.
163 extern int gator_cursesgwin_drawrectangle();
166 * Draw a rectangle in the given curses window.
169 * struct gwin *gwp : Ptr to the curses window in which
170 * the rectangle is to be drawn.
171 * struct gwin_rectparams *params : Ptr to other params.
175 * Error value otherwise.
178 extern int gator_cursesgwin_drawchar();
181 * Draw a character in the given curses window.
184 * struct gwin *gwp : Ptr to the curses window in which
185 * the character is to be drawn.
186 * struct gwin_charparams *params : Ptr to other params.
190 * Error value otherwise.
193 extern int gator_cursesgwin_drawstring();
196 * Draw a string in the given curses window.
199 * struct gwin *gwp : Ptr to the curses window in which
200 * the string is to be drawn.
201 * struct gwin_strparams *params : Ptr to other params.
205 * Error value otherwise.
208 extern int gator_cursesgwin_invert();
211 * Invert a region in the given curses window.
214 * struct gwin *gwp : Ptr to the curses window in which
215 * the inverted region lies.
216 * struct gwin_invparams *params : Ptr to other params.
220 * Error value otherwise.
223 extern int gator_cursesgwin_getchar();
225 extern int gator_cursesgwin_getdimensions();
227 extern int gator_cursesgwin_wait();
229 #endif /* __gator_curseswindows_h */