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>
22 #include "gtxdumbwin.h" /*Interface definition */
23 #include <stdio.h> /*Standard I/O package */
26 int dumb_debug; /*Is debugging turned on? */
27 static char mn[] = "gator_dumbwindows"; /*Module name */
30 * Version of standard operations for a dumb window.
32 struct gwinops dumb_gwinops = {
35 gator_dumbgwin_destroy,
36 gator_dumbgwin_display,
37 gator_dumbgwin_drawline,
38 gator_dumbgwin_drawrectangle,
39 gator_dumbgwin_drawchar,
40 gator_dumbgwin_drawstring,
41 gator_dumbgwin_invert,
42 gator_dumbgwin_getchar,
43 gator_dumbgwin_getdimensions,
47 struct gwinbaseops gator_dumb_gwinbops = {
48 gator_dumbgwin_create,
49 gator_dumbgwin_cleanup
53 * Macros to map pixel positions to row & column positions.
54 * (Note: for now, they are the identity function!!)
56 #define GATOR_MAP_X_TO_COL(w, x) (x)
57 #define GATOR_MAP_Y_TO_LINE(w, y) (y)
59 /*------------------------------------------------------------------------
63 * Initialize the dumb window package.
66 * int adebug: Is debugging turned on?
70 * Error value otherwise.
73 * Nothing interesting.
77 *------------------------------------------------------------------------*/
80 gator_dumbgwin_init(int adebug)
81 { /*gator_dumbgwin_init */
83 static char rn[] = "gator_dumbgwin_init"; /*Routine name */
86 * Remember if we'll be doing debugging, init dumb and clear the
92 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
95 * We always return success here.
99 } /*gator_dumbgwin_init */
101 /*------------------------------------------------------------------------
102 * gator_dumbgwin_create
105 * Create a dumb window.
108 * struct gator_dumbgwin_params *params : Ptr to creation parameters.
111 * Ptr to the created dumb window if successful,
112 * Null ptr otherwise.
115 * Nothing interesting.
119 *------------------------------------------------------------------------*/
122 gator_dumbgwin_create(struct gator_dumbgwin_params *params)
123 { /*gator_dumbgwin_create */
125 static char rn[] = "gator_dumbgwin_create"; /*Routine name */
128 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
131 * Return failure here, fill this routine in at some point.
135 } /*gator_dumbgwin_create */
137 /*------------------------------------------------------------------------
138 * gator_dumbgwin_cleanup
141 * Create a dumb window.
144 * struct gwin *gwp : Ptr to base window.
148 * Error value otherwise.
151 * Nothing interesting.
155 *------------------------------------------------------------------------*/
158 gator_dumbgwin_cleanup(struct gwin *gwp)
159 { /*gator_dumbgwin_cleanup */
161 static char rn[] = "gator_dumbgwin_cleanup"; /*Routine name */
164 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
167 * Return success here, fill this routine in at some point.
171 } /*gator_dumbgwin_cleanup */
173 /*------------------------------------------------------------------------
177 * Draw a box around the given dumb window.
180 * struct gwin *gwp : Ptr to the dumb window to draw
185 * Error value otherwise.
188 * Nothing interesting.
192 *------------------------------------------------------------------------*/
195 gator_dumbgwin_box(struct gwin *gwp)
196 { /*gator_dumbgwin_box */
198 static char rn[] = "gator_dumbgwin_box"; /*Routine name */
201 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
204 * Return success here, fill in the routine at some point.
208 } /*gator_dumbgwin_box */
210 /*------------------------------------------------------------------------
211 * gator_dumbgwin_clear
214 * Clear out the given dumb window.
217 * struct gwin *gwp : Ptr to the dumb window to clear out.
221 * Error value otherwise.
224 * Nothing interesting.
228 *------------------------------------------------------------------------*/
231 gator_dumbgwin_clear(struct gwin *gwp)
232 { /*gator_dumbgwin_clear */
234 static char rn[] = "gator_dumbgwin_clear"; /*Routine name */
237 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
240 * Return success, fill in this routine at some point.
244 } /*gator_dumbgwin_clear */
246 /*------------------------------------------------------------------------
247 * gator_dumbgwin_destroy
250 * Destroy the given dumb window.
253 * struct gwin *gwp : Ptr to the dumb window to destroy.
257 * Error value otherwise.
260 * Nothing interesting.
264 *------------------------------------------------------------------------*/
267 gator_dumbgwin_destroy(struct gwin *gwp)
268 { /*gator_dumbgwin_destroy */
270 static char rn[] = "gator_dumbgwin_destroy"; /*Routine name */
273 fprintf(stderr, "[%s:%s] Called", mn, rn);
277 } /*gator_dumbgwin_destroy */
279 /*------------------------------------------------------------------------
280 * gator_dumbgwin_display
283 * Display/redraw the given dumb window.
286 * struct gwin *gwp : Ptr to the dumb window to draw.
290 * Error value otherwise.
293 * Nothing interesting.
297 *------------------------------------------------------------------------*/
300 gator_dumbgwin_display(struct gwin *gwp)
301 { /*gator_dumbgwin_display */
303 static char rn[] = "gator_dumbgwin_display"; /*Routine name */
306 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
309 * Return success, fill in this routine at some point.
313 } /*gator_dumbgwin_display */
315 /*------------------------------------------------------------------------
316 * gator_dumbgwin_drawline
319 * Draw a line between two points in the given dumb
323 * struct gwin *gwp : Ptr to the dumb window in which
324 * the line is to be drawn.
325 * struct gwin_lineparams *params : Ptr to other params.
329 * Error value otherwise.
332 * Nothing interesting.
336 *------------------------------------------------------------------------*/
339 gator_dumbgwin_drawline(struct gwin *gwp, struct gwin_lineparams *params)
340 { /*gator_dumbgwin_drawline */
342 static char rn[] = "gator_dumbgwin_drawline"; /*Routine name */
345 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
349 * Return success, fill in this routine at some point.
353 } /*gator_dumbgwin_drawline */
355 /*------------------------------------------------------------------------
356 * gator_dumbgwin_drawrectangle
359 * Draw a rectangle in the given dumb window.
362 * struct gwin *gwp : Ptr to the dumb window in which
363 * the rectangle is to be drawn.
364 * struct gwin_rectparams *params : Ptr to other params.
368 * Error value otherwise.
371 * Nothing interesting.
375 *------------------------------------------------------------------------*/
378 gator_dumbgwin_drawrectangle(struct gwin *gwp, struct gwin_rectparams *params)
379 { /*gator_dumbgwin_drawrectangle */
381 static char rn[] = "gator_dumbgwin_drawrectangle"; /*Routine name */
384 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
388 * Return success, fill in this routine at some point.
392 } /*gator_dumbgwin_drawrectangle */
394 /*------------------------------------------------------------------------
395 * gator_dumbgwin_drawchar
398 * Draw a character in the given dumb window.
401 * struct gwin *gwp : Ptr to the dumb window in which
402 * the character is to be drawn.
403 * struct gwin_charparams *params : Ptr to other params.
407 * Error value otherwise.
410 * Nothing interesting.
414 *------------------------------------------------------------------------*/
417 gator_dumbgwin_drawchar(struct gwin *gwp, struct gwin_charparams *params)
418 { /*gator_dumbgwin_drawchar */
420 static char rn[] = "gator_dumbgwin_drawchar"; /*Routine name */
423 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
426 * Return success, fill in this routine at some point.
430 } /*gator_dumbgwin_drawchar */
432 /*------------------------------------------------------------------------
433 * gator_dumbgwin_drawstring
436 * Draw a string in the given dumb window.
439 * struct gwin *gwp : Ptr to the dumb window in which
440 * the string is to be drawn.
441 * struct gwin_strparams *params : Ptr to other params.
445 * Error value otherwise.
448 * Nothing interesting.
452 *------------------------------------------------------------------------*/
455 gator_dumbgwin_drawstring(struct gwin *gwp, struct gwin_strparams *params)
456 { /*gator_dumbgwin_drawstring */
458 static char rn[] = "gator_dumbgwin_drawstring"; /*Routine name */
461 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
464 * Return success, fill in this routine at some point.
468 } /*gator_dumbgwin_drawstring */
470 /*------------------------------------------------------------------------
471 * gator_dumbgwin_invert
474 * Invert a region in the given dumb window.
477 * struct gwin *gwp : Ptr to the dumb window in which
478 * the inverted region lies.
479 * struct gwin_invparams *params : Ptr to other params.
483 * Error value otherwise.
486 * Nothing interesting.
490 *------------------------------------------------------------------------*/
493 gator_dumbgwin_invert(struct gwin *gwp, struct gwin_invparams *params)
494 { /*gator_dumbgwin_invert */
496 static char rn[] = "gator_dumbgwin_invert"; /*Routine name */
499 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
503 * Return success, fill in this routine at some point.
507 } /*gator_dumbgwin_invert */
509 /*------------------------------------------------------------------------
510 * gator_dumbgwin_getchar
513 * Pick up a character from the given window.
516 * struct gwin *gwp : Ptr to the dumb window to listen to.
519 * Value of the character read,
523 * Nothing interesting.
527 *------------------------------------------------------------------------*/
530 gator_dumbgwin_getchar(struct gwin *gwp)
531 { /*gator_dumbgwin_getchar */
533 static char rn[] = "gator_dumbgwin_getchar"; /*Routine name */
536 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
541 } /*gator_dumbgwin_getchar */
543 /*------------------------------------------------------------------------
544 * gator_dumbgwin_getdimensions
547 * Get the window's X,Y dimensions.
550 * struct gwin *gwp : Ptr to the dumb window to examine.
551 * struct gwin_sizeparams *aparms : Ptr to size params to set.
558 * Nothing interesting.
562 *------------------------------------------------------------------------*/
565 gator_dumbgwin_getdimensions(struct gwin *gwp, struct gwin_sizeparams *aparms)
566 { /*gator_dumbgwin_getdimensions */
568 static char rn[] = "gator_dumbgwin_getdimensions"; /*Routine name */
571 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
576 } /*gator_dumbgwin_getdimensions */
578 /*------------------------------------------------------------------------
579 * gator_dumbgwin_wait
582 * Wait until input is available.
585 * struct gwin *gwp : Ptr to the dumb window to wait on.
592 * Nothing interesting.
596 *------------------------------------------------------------------------*/
599 gator_dumbgwin_wait(struct gwin *gwp)
600 { /*gator_dumbgwin_wait */
602 static char rn[] = "gator_dumbgwin_wait"; /*Routine name */
605 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
610 } /*gator_dumbgwin_wait */