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
12 * Implementation of the gator dumb window facility.
14 *------------------------------------------------------------------------*/
16 #include <afsconfig.h>
17 #include <afs/param.h>
21 #include "gtxdumbwin.h" /*Interface definition */
23 int dumb_debug
; /*Is debugging turned on? */
24 static char mn
[] = "gator_dumbwindows"; /*Module name */
27 * Version of standard operations for a dumb window.
29 struct gwinops dumb_gwinops
= {
32 gator_dumbgwin_destroy
,
33 gator_dumbgwin_display
,
34 gator_dumbgwin_drawline
,
35 gator_dumbgwin_drawrectangle
,
36 gator_dumbgwin_drawchar
,
37 gator_dumbgwin_drawstring
,
38 gator_dumbgwin_invert
,
39 gator_dumbgwin_getchar
,
40 gator_dumbgwin_getdimensions
,
44 struct gwinbaseops gator_dumb_gwinbops
= {
45 gator_dumbgwin_create
,
46 gator_dumbgwin_cleanup
50 * Macros to map pixel positions to row & column positions.
51 * (Note: for now, they are the identity function!!)
53 #define GATOR_MAP_X_TO_COL(w, x) (x)
54 #define GATOR_MAP_Y_TO_LINE(w, y) (y)
56 /*------------------------------------------------------------------------
60 * Initialize the dumb window package.
63 * int adebug: Is debugging turned on?
67 * Error value otherwise.
70 * Nothing interesting.
74 *------------------------------------------------------------------------*/
77 gator_dumbgwin_init(int adebug
)
78 { /*gator_dumbgwin_init */
80 static char rn
[] = "gator_dumbgwin_init"; /*Routine name */
83 * Remember if we'll be doing debugging, init dumb and clear the
89 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
92 * We always return success here.
96 } /*gator_dumbgwin_init */
98 /*------------------------------------------------------------------------
99 * gator_dumbgwin_create
102 * Create a dumb window.
105 * struct gator_dumbgwin_params *params : Ptr to creation parameters.
108 * Ptr to the created dumb window if successful,
109 * Null ptr otherwise.
112 * Nothing interesting.
116 *------------------------------------------------------------------------*/
119 gator_dumbgwin_create(void *rock
)
120 { /*gator_dumbgwin_create */
122 static char rn
[] = "gator_dumbgwin_create"; /*Routine name */
124 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
127 * Return failure here, fill this routine in at some point.
131 } /*gator_dumbgwin_create */
133 /*------------------------------------------------------------------------
134 * gator_dumbgwin_cleanup
137 * Create a dumb window.
140 * struct gwin *gwp : Ptr to base window.
144 * Error value otherwise.
147 * Nothing interesting.
151 *------------------------------------------------------------------------*/
154 gator_dumbgwin_cleanup(struct gwin
*gwp
)
155 { /*gator_dumbgwin_cleanup */
157 static char rn
[] = "gator_dumbgwin_cleanup"; /*Routine name */
160 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
163 * Return success here, fill this routine in at some point.
167 } /*gator_dumbgwin_cleanup */
169 /*------------------------------------------------------------------------
173 * Draw a box around the given dumb window.
176 * struct gwin *gwp : Ptr to the dumb window to draw
181 * Error value otherwise.
184 * Nothing interesting.
188 *------------------------------------------------------------------------*/
191 gator_dumbgwin_box(struct gwin
*gwp
)
192 { /*gator_dumbgwin_box */
194 static char rn
[] = "gator_dumbgwin_box"; /*Routine name */
197 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
200 * Return success here, fill in the routine at some point.
204 } /*gator_dumbgwin_box */
206 /*------------------------------------------------------------------------
207 * gator_dumbgwin_clear
210 * Clear out the given dumb window.
213 * struct gwin *gwp : Ptr to the dumb window to clear out.
217 * Error value otherwise.
220 * Nothing interesting.
224 *------------------------------------------------------------------------*/
227 gator_dumbgwin_clear(struct gwin
*gwp
)
228 { /*gator_dumbgwin_clear */
230 static char rn
[] = "gator_dumbgwin_clear"; /*Routine name */
233 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
236 * Return success, fill in this routine at some point.
240 } /*gator_dumbgwin_clear */
242 /*------------------------------------------------------------------------
243 * gator_dumbgwin_destroy
246 * Destroy the given dumb window.
249 * struct gwin *gwp : Ptr to the dumb window to destroy.
253 * Error value otherwise.
256 * Nothing interesting.
260 *------------------------------------------------------------------------*/
263 gator_dumbgwin_destroy(struct gwin
*gwp
)
264 { /*gator_dumbgwin_destroy */
266 static char rn
[] = "gator_dumbgwin_destroy"; /*Routine name */
269 fprintf(stderr
, "[%s:%s] Called", mn
, rn
);
273 } /*gator_dumbgwin_destroy */
275 /*------------------------------------------------------------------------
276 * gator_dumbgwin_display
279 * Display/redraw the given dumb window.
282 * struct gwin *gwp : Ptr to the dumb window to draw.
286 * Error value otherwise.
289 * Nothing interesting.
293 *------------------------------------------------------------------------*/
296 gator_dumbgwin_display(struct gwin
*gwp
)
297 { /*gator_dumbgwin_display */
299 static char rn
[] = "gator_dumbgwin_display"; /*Routine name */
302 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
305 * Return success, fill in this routine at some point.
309 } /*gator_dumbgwin_display */
311 /*------------------------------------------------------------------------
312 * gator_dumbgwin_drawline
315 * Draw a line between two points in the given dumb
319 * struct gwin *gwp : Ptr to the dumb window in which
320 * the line is to be drawn.
321 * struct gwin_lineparams *params : Ptr to other params.
325 * Error value otherwise.
328 * Nothing interesting.
332 *------------------------------------------------------------------------*/
335 gator_dumbgwin_drawline(struct gwin
*gwp
, struct gwin_lineparams
*params
)
336 { /*gator_dumbgwin_drawline */
338 static char rn
[] = "gator_dumbgwin_drawline"; /*Routine name */
341 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
345 * Return success, fill in this routine at some point.
349 } /*gator_dumbgwin_drawline */
351 /*------------------------------------------------------------------------
352 * gator_dumbgwin_drawrectangle
355 * Draw a rectangle in the given dumb window.
358 * struct gwin *gwp : Ptr to the dumb window in which
359 * the rectangle is to be drawn.
360 * struct gwin_rectparams *params : Ptr to other params.
364 * Error value otherwise.
367 * Nothing interesting.
371 *------------------------------------------------------------------------*/
374 gator_dumbgwin_drawrectangle(struct gwin
*gwp
, struct gwin_rectparams
*params
)
375 { /*gator_dumbgwin_drawrectangle */
377 static char rn
[] = "gator_dumbgwin_drawrectangle"; /*Routine name */
380 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
384 * Return success, fill in this routine at some point.
388 } /*gator_dumbgwin_drawrectangle */
390 /*------------------------------------------------------------------------
391 * gator_dumbgwin_drawchar
394 * Draw a character in the given dumb window.
397 * struct gwin *gwp : Ptr to the dumb window in which
398 * the character is to be drawn.
399 * struct gwin_charparams *params : Ptr to other params.
403 * Error value otherwise.
406 * Nothing interesting.
410 *------------------------------------------------------------------------*/
413 gator_dumbgwin_drawchar(struct gwin
*gwp
, struct gwin_charparams
*params
)
414 { /*gator_dumbgwin_drawchar */
416 static char rn
[] = "gator_dumbgwin_drawchar"; /*Routine name */
419 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
422 * Return success, fill in this routine at some point.
426 } /*gator_dumbgwin_drawchar */
428 /*------------------------------------------------------------------------
429 * gator_dumbgwin_drawstring
432 * Draw a string in the given dumb window.
435 * struct gwin *gwp : Ptr to the dumb window in which
436 * the string is to be drawn.
437 * struct gwin_strparams *params : Ptr to other params.
441 * Error value otherwise.
444 * Nothing interesting.
448 *------------------------------------------------------------------------*/
451 gator_dumbgwin_drawstring(struct gwin
*gwp
, struct gwin_strparams
*params
)
452 { /*gator_dumbgwin_drawstring */
454 static char rn
[] = "gator_dumbgwin_drawstring"; /*Routine name */
457 fprintf(stderr
, "[%s:%s] Called\n", mn
, rn
);
460 * Return success, fill in this routine at some point.
464 } /*gator_dumbgwin_drawstring */
466 /*------------------------------------------------------------------------
467 * gator_dumbgwin_invert
470 * Invert a region in the given dumb window.
473 * struct gwin *gwp : Ptr to the dumb window in which
474 * the inverted region lies.
475 * struct gwin_invparams *params : Ptr to other params.
479 * Error value otherwise.
482 * Nothing interesting.
486 *------------------------------------------------------------------------*/
489 gator_dumbgwin_invert(struct gwin
*gwp
, struct gwin_invparams
*params
)
490 { /*gator_dumbgwin_invert */
492 static char rn
[] = "gator_dumbgwin_invert"; /*Routine name */
495 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
499 * Return success, fill in this routine at some point.
503 } /*gator_dumbgwin_invert */
505 /*------------------------------------------------------------------------
506 * gator_dumbgwin_getchar
509 * Pick up a character from the given window.
512 * struct gwin *gwp : Ptr to the dumb window to listen to.
515 * Value of the character read,
519 * Nothing interesting.
523 *------------------------------------------------------------------------*/
526 gator_dumbgwin_getchar(struct gwin
*gwp
)
527 { /*gator_dumbgwin_getchar */
529 static char rn
[] = "gator_dumbgwin_getchar"; /*Routine name */
532 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
537 } /*gator_dumbgwin_getchar */
539 /*------------------------------------------------------------------------
540 * gator_dumbgwin_getdimensions
543 * Get the window's X,Y dimensions.
546 * struct gwin *gwp : Ptr to the dumb window to examine.
547 * struct gwin_sizeparams *aparms : Ptr to size params to set.
554 * Nothing interesting.
558 *------------------------------------------------------------------------*/
561 gator_dumbgwin_getdimensions(struct gwin
*gwp
, struct gwin_sizeparams
*aparms
)
562 { /*gator_dumbgwin_getdimensions */
564 static char rn
[] = "gator_dumbgwin_getdimensions"; /*Routine name */
567 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
572 } /*gator_dumbgwin_getdimensions */
574 /*------------------------------------------------------------------------
575 * gator_dumbgwin_wait
578 * Wait until input is available.
581 * struct gwin *gwp : Ptr to the dumb window to wait on.
588 * Nothing interesting.
592 *------------------------------------------------------------------------*/
595 gator_dumbgwin_wait(struct gwin
*gwp
)
596 { /*gator_dumbgwin_wait */
598 static char rn
[] = "gator_dumbgwin_wait"; /*Routine name */
601 fprintf(stderr
, "[%s:%s] This routine is currently a no-op\n", mn
,
606 } /*gator_dumbgwin_wait */