Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / gtx / gtxdumbwin.h
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
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
8 */
9
10 #ifndef __gator_dumbwindows_h
11 #define __gator_dumbwindows_h 1
12
13 #include "gtxwindows.h" /*Base gator window dfns */
14
15 /*Value for gwin w_type field*/
16 #define GATOR_WIN_DUMB 1
17
18 /*Private data for a dumb gwin*/
19 #if 0
20 struct gator_dumbgwin {
21 WINDOW *wp; /*Window pointer */
22 int charwidth; /*Character width in pixels */
23 int charheight; /*Character height in pixels */
24 char box_vertchar; /*Vertical char for boxing purposes */
25 char box_horizchar; /*Horizontal char for boxing purposes */
26 };
27 #endif /* 0 */
28
29 /*Dumb gwin's creation parameters*/
30 struct gator_dumbgwin_params {
31 struct gwin_createparams gwin_params; /*Basic params for the window */
32 char box_vertchar; /*Vertical char for boxing purposes */
33 char box_horizchar; /*Horizontal char for boxing purposes */
34 };
35
36 /*Dumb windows initialization routine*/
37
38 extern int gator_dumbgwin_init(int);
39 /*
40 * Summary:
41 * Initialize the dumb window package.
42 *
43 * Args:
44 * int adebug: Is debugging turned on?
45 *
46 * Returns:
47 * 0 on success,
48 * Error value otherwise.
49 */
50
51 /*Dumb window's creation routine*/
52
53 extern struct gwin *gator_dumbgwin_create(void *);
54 /*
55 * Summary:
56 * Create a dumb window.
57 *
58 * Args:
59 * struct gator_dumbgwin_params *params : Ptr to creation parameters.
60 *
61 * Returns:
62 * Ptr to the created dumb window structure if successful,
63 * Error value otherwise.
64 */
65
66 /*Dumb cleanup routine*/
67
68 extern int gator_dumbgwin_cleanup(struct gwin *);
69 /*
70 * Summary:
71 * Clean up after the dumb window package.
72 *
73 * Args:
74 * struct gwin *gwp : Ptr to base window.
75 *
76 * Returns:
77 * 0 on success,
78 * Error value otherwise.
79 */
80
81 extern struct gwinbaseops gator_dumb_gwinbops;
82
83 /*Dumb window's routines*/
84
85 extern int gator_dumbgwin_box(struct gwin *);
86 /*
87 * Summary:
88 * Draw a box around the given dumb window.
89 *
90 * Args:
91 * struct gwin *gwp : Ptr to the dumb window to draw
92 * a box around.
93 *
94 * Returns:
95 * 0: Success.
96 * Error value otherwise.
97 */
98
99 extern int gator_dumbgwin_clear(struct gwin *);
100 /*
101 * Summary:
102 * Clear out the given dumb window.
103 *
104 * Args:
105 * struct gwin *gwp : Ptr to the dumb window to clear
106 * out.
107 *
108 * Returns:
109 * 0: Success.
110 * Error value otherwise.
111 */
112
113 extern int gator_dumbgwin_destroy(struct gwin *);
114 /*
115 * Summary:
116 * Destroy the given dumb window.
117 *
118 * Args:
119 * struct gwin *gwp : Ptr to the dumb window to destroy.
120 *
121 * Returns:
122 * 0: Success.
123 * Error value otherwise.
124 */
125
126 extern int gator_dumbgwin_display(struct gwin *);
127 /*
128 * Summary:
129 * Display/redraw the given dumb window.
130 *
131 * Args:
132 * struct gwin *gwp : Ptr to the dumb window to draw.
133 *
134 * Returns:
135 * 0: Success.
136 * Error value otherwise.
137 */
138
139 extern int gator_dumbgwin_drawline(struct gwin *, struct gwin_lineparams *);
140 /*
141 * Summary:
142 * Draw a line between two points in the given dumb
143 * window.
144 *
145 * Args:
146 * struct gwin *gwp : Ptr to the dumb window in which
147 * the line is to be drawn.
148 * struct gwin_lineparams *params : Ptr to other params.
149 *
150 * Returns:
151 * 0: Success.
152 * Error value otherwise.
153 */
154
155 extern int gator_dumbgwin_drawrectangle(struct gwin *,
156 struct gwin_rectparams *);
157 /*
158 * Summary:
159 * Draw a rectangle in the given dumb window.
160 *
161 * Args:
162 * struct gwin *gwp : Ptr to the dumb window in which
163 * the rectangle is to be drawn.
164 * struct gwin_rectparams *params : Ptr to other params.
165 *
166 * Returns:
167 * 0: Success.
168 * Error value otherwise.
169 */
170
171 extern int gator_dumbgwin_drawchar(struct gwin *,
172 struct gwin_charparams *);
173 /*
174 * Summary:
175 * Draw a character in the given dumb window.
176 *
177 * Args:
178 * struct gwin *gwp : Ptr to the dumb window in which
179 * the character is to be drawn.
180 * struct gwin_charparams *params : Ptr to other params.
181 *
182 * Returns:
183 * 0: Success.
184 * Error value otherwise.
185 */
186
187 extern int gator_dumbgwin_drawstring(struct gwin *, struct gwin_strparams *);
188 /*
189 * Summary:
190 * Draw a string in the given dumb window.
191 *
192 * Args:
193 * struct gwin *gwp : Ptr to the dumb window in which
194 * the string is to be drawn.
195 * struct gwin_strparams *params : Ptr to other params.
196 *
197 * Returns:
198 * 0: Success.
199 * Error value otherwise.
200 */
201
202 extern int gator_dumbgwin_invert(struct gwin *, struct gwin_invparams *);
203 /*
204 * Summary:
205 * Invert a region in the given dumb window.
206 *
207 * Args:
208 * struct gwin *gwp : Ptr to the dumb window in which
209 * the inverted region lies.
210 * struct gwin_invparams *params : Ptr to other params.
211 *
212 * Returns:
213 * 0: Success.
214 * Error value otherwise.
215 */
216
217 extern int gator_dumbgwin_getchar(struct gwin *gwp);
218 /* get a character from a window */
219
220 extern int gator_dumbgwin_getdimensions(struct gwin *,
221 struct gwin_sizeparams *);
222
223 extern int gator_dumbgwin_wait(struct gwin *gwp);
224
225 #endif /* __gator_dumbwindows_h */