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 */
15 #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
19 #if defined(HAVE_NCURSES_H)
21 #elif defined(HAVE_CURSES_H)
25 /*Value for gwin w_type field*/
26 #define GATOR_WIN_CURSES 2
28 /*Private data for a curses gwin*/
29 struct gator_cursesgwin {
30 WINDOW *wp; /*Window pointer */
31 int charwidth; /*Character width in pixels */
32 int charheight; /*Character height in pixels */
33 char box_vertchar; /*Vertical char for boxing purposes */
34 char box_horizchar; /*Horizontal char for boxing purposes */
37 /*Curses gwin's creation parameters*/
38 struct gator_cursesgwin_params {
39 struct gwin_createparams gwin_params; /*Basic params for the window */
40 int charwidth; /*Character width in pixels */
41 int charheight; /*Character height in pixels */
42 char box_vertchar; /*Vertical char for boxing purposes */
43 char box_horizchar; /*Horizontal char for boxing purposes */
46 /*Curses initialization routine*/
48 extern int gator_cursesgwin_init(int adebug);
51 * Initialize the curses window package.
54 * int adebug: Is debugging turned on?
58 * Error value otherwise.
61 /*Curses window's creation routine*/
63 extern struct gwin *gator_cursesgwin_create(void *);
66 * Create a curses window.
69 * struct gator_cursesgwin_params *params : Ptr to creation parameters.
72 * Ptr to the created curses window structure if successful,
73 * Error value otherwise.
76 /*Curses cleanup routine*/
78 extern int gator_cursesgwin_cleanup(struct gwin *);
81 * Clean up after the curses window package.
84 * struct gwin *gwp : Ptr to base window.
88 * Error value otherwise.
91 extern struct gwinbaseops gator_curses_gwinbops;
93 /*Curses window's routines*/
95 extern int gator_cursesgwin_box(struct gwin *);
98 * Draw a box around the given curses window.
101 * struct gwin *gwp : Ptr to the curses window to draw
106 * Error value otherwise.
109 extern int gator_cursesgwin_clear(struct gwin *);
112 * Clear out the given curses window.
115 * struct gwin *gwp : Ptr to the curses window to clear
120 * Error value otherwise.
123 extern int gator_cursesgwin_destroy(struct gwin *);
126 * Destroy the given curses window.
129 * struct gwin *gwp : Ptr to the curses window to destroy.
133 * Error value otherwise.
136 extern int gator_cursesgwin_display(struct gwin *);
139 * Display/redraw the given curses window.
142 * struct gwin *gwp : Ptr to the curses window to draw.
146 * Error value otherwise.
149 extern int gator_cursesgwin_drawline(struct gwin *, struct gwin_lineparams *);
152 * Draw a line between two points in the given curses
156 * struct gwin *gwp : Ptr to the curses window in which
157 * the line is to be drawn.
158 * struct gwin_lineparams *params : Ptr to other params.
162 * Error value otherwise.
165 extern int gator_cursesgwin_drawrectangle(struct gwin *,
166 struct gwin_rectparams *);
169 * Draw a rectangle in the given curses window.
172 * struct gwin *gwp : Ptr to the curses window in which
173 * the rectangle is to be drawn.
174 * struct gwin_rectparams *params : Ptr to other params.
178 * Error value otherwise.
181 extern int gator_cursesgwin_drawchar(struct gwin *, struct gwin_charparams *);
184 * Draw a character in the given curses window.
187 * struct gwin *gwp : Ptr to the curses window in which
188 * the character is to be drawn.
189 * struct gwin_charparams *params : Ptr to other params.
193 * Error value otherwise.
196 extern int gator_cursesgwin_drawstring(struct gwin *, struct gwin_strparams *);
199 * Draw a string in the given curses window.
202 * struct gwin *gwp : Ptr to the curses window in which
203 * the string is to be drawn.
204 * struct gwin_strparams *params : Ptr to other params.
208 * Error value otherwise.
211 extern int gator_cursesgwin_invert(struct gwin *, struct gwin_invparams *);
214 * Invert a region in the given curses window.
217 * struct gwin *gwp : Ptr to the curses window in which
218 * the inverted region lies.
219 * struct gwin_invparams *params : Ptr to other params.
223 * Error value otherwise.
226 extern int gator_cursesgwin_getchar(struct gwin *);
228 extern int gator_cursesgwin_getdimensions(struct gwin *,
229 struct gwin_sizeparams *aparms);
231 extern int gator_cursesgwin_wait(struct gwin *);
233 #endif /* __gator_curseswindows_h */