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(adebug)
83 { /*gator_dumbgwin_init */
85 static char rn[] = "gator_dumbgwin_init"; /*Routine name */
88 * Remember if we'll be doing debugging, init dumb and clear the
94 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
97 * We always return success here.
101 } /*gator_dumbgwin_init */
103 /*------------------------------------------------------------------------
104 * gator_dumbgwin_create
107 * Create a dumb window.
110 * struct gator_dumbgwin_params *params : Ptr to creation parameters.
113 * Ptr to the created dumb window if successful,
114 * Null ptr otherwise.
117 * Nothing interesting.
121 *------------------------------------------------------------------------*/
124 gator_dumbgwin_create(params)
125 struct gator_dumbgwin_params *params;
127 { /*gator_dumbgwin_create */
129 static char rn[] = "gator_dumbgwin_create"; /*Routine name */
132 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
135 * Return failure here, fill this routine in at some point.
139 } /*gator_dumbgwin_create */
141 /*------------------------------------------------------------------------
142 * gator_dumbgwin_cleanup
145 * Create a dumb window.
148 * struct gwin *gwp : Ptr to base window.
152 * Error value otherwise.
155 * Nothing interesting.
159 *------------------------------------------------------------------------*/
162 gator_dumbgwin_cleanup(gwp)
165 { /*gator_dumbgwin_cleanup */
167 static char rn[] = "gator_dumbgwin_cleanup"; /*Routine name */
170 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
173 * Return success here, fill this routine in at some point.
177 } /*gator_dumbgwin_cleanup */
179 /*------------------------------------------------------------------------
183 * Draw a box around the given dumb window.
186 * struct gwin *gwp : Ptr to the dumb window to draw
191 * Error value otherwise.
194 * Nothing interesting.
198 *------------------------------------------------------------------------*/
201 gator_dumbgwin_box(gwp)
204 { /*gator_dumbgwin_box */
206 static char rn[] = "gator_dumbgwin_box"; /*Routine name */
209 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
212 * Return success here, fill in the routine at some point.
216 } /*gator_dumbgwin_box */
218 /*------------------------------------------------------------------------
219 * gator_dumbgwin_clear
222 * Clear out the given dumb window.
225 * struct gwin *gwp : Ptr to the dumb window to clear out.
229 * Error value otherwise.
232 * Nothing interesting.
236 *------------------------------------------------------------------------*/
239 gator_dumbgwin_clear(gwp)
242 { /*gator_dumbgwin_clear */
244 static char rn[] = "gator_dumbgwin_clear"; /*Routine name */
247 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
250 * Return success, fill in this routine at some point.
254 } /*gator_dumbgwin_clear */
256 /*------------------------------------------------------------------------
257 * gator_dumbgwin_destroy
260 * Destroy the given dumb window.
263 * struct gwin *gwp : Ptr to the dumb window to destroy.
267 * Error value otherwise.
270 * Nothing interesting.
274 *------------------------------------------------------------------------*/
277 gator_dumbgwin_destroy(gwp)
280 { /*gator_dumbgwin_destroy */
282 static char rn[] = "gator_dumbgwin_destroy"; /*Routine name */
285 fprintf(stderr, "[%s:%s] Called", mn, rn);
289 } /*gator_dumbgwin_destroy */
291 /*------------------------------------------------------------------------
292 * gator_dumbgwin_display
295 * Display/redraw the given dumb window.
298 * struct gwin *gwp : Ptr to the dumb window to draw.
302 * Error value otherwise.
305 * Nothing interesting.
309 *------------------------------------------------------------------------*/
312 gator_dumbgwin_display(gwp)
315 { /*gator_dumbgwin_display */
317 static char rn[] = "gator_dumbgwin_display"; /*Routine name */
320 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
323 * Return success, fill in this routine at some point.
327 } /*gator_dumbgwin_display */
329 /*------------------------------------------------------------------------
330 * gator_dumbgwin_drawline
333 * Draw a line between two points in the given dumb
337 * struct gwin *gwp : Ptr to the dumb window in which
338 * the line is to be drawn.
339 * struct gwin_lineparams *params : Ptr to other params.
343 * Error value otherwise.
346 * Nothing interesting.
350 *------------------------------------------------------------------------*/
353 gator_dumbgwin_drawline(gwp, params)
355 struct gwin_lineparams *params;
357 { /*gator_dumbgwin_drawline */
359 static char rn[] = "gator_dumbgwin_drawline"; /*Routine name */
362 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
366 * Return success, fill in this routine at some point.
370 } /*gator_dumbgwin_drawline */
372 /*------------------------------------------------------------------------
373 * gator_dumbgwin_drawrectangle
376 * Draw a rectangle in the given dumb window.
379 * struct gwin *gwp : Ptr to the dumb window in which
380 * the rectangle is to be drawn.
381 * struct gwin_rectparams *params : Ptr to other params.
385 * Error value otherwise.
388 * Nothing interesting.
392 *------------------------------------------------------------------------*/
395 gator_dumbgwin_drawrectangle(gwp, params)
397 struct gwin_rectparams *params;
399 { /*gator_dumbgwin_drawrectangle */
401 static char rn[] = "gator_dumbgwin_drawrectangle"; /*Routine name */
404 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
408 * Return success, fill in this routine at some point.
412 } /*gator_dumbgwin_drawrectangle */
414 /*------------------------------------------------------------------------
415 * gator_dumbgwin_drawchar
418 * Draw a character in the given dumb window.
421 * struct gwin *gwp : Ptr to the dumb window in which
422 * the character is to be drawn.
423 * struct gwin_charparams *params : Ptr to other params.
427 * Error value otherwise.
430 * Nothing interesting.
434 *------------------------------------------------------------------------*/
437 gator_dumbgwin_drawchar(gwp, params)
439 struct gwin_charparams *params;
441 { /*gator_dumbgwin_drawchar */
443 static char rn[] = "gator_dumbgwin_drawchar"; /*Routine name */
446 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
449 * Return success, fill in this routine at some point.
453 } /*gator_dumbgwin_drawchar */
455 /*------------------------------------------------------------------------
456 * gator_dumbgwin_drawstring
459 * Draw a string in the given dumb window.
462 * struct gwin *gwp : Ptr to the dumb window in which
463 * the string is to be drawn.
464 * struct gwin_strparams *params : Ptr to other params.
468 * Error value otherwise.
471 * Nothing interesting.
475 *------------------------------------------------------------------------*/
478 gator_dumbgwin_drawstring(gwp, params)
480 struct gwin_strparams *params;
482 { /*gator_dumbgwin_drawstring */
484 static char rn[] = "gator_dumbgwin_drawstring"; /*Routine name */
487 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
490 * Return success, fill in this routine at some point.
494 } /*gator_dumbgwin_drawstring */
496 /*------------------------------------------------------------------------
497 * gator_dumbgwin_invert
500 * Invert a region in the given dumb window.
503 * struct gwin *gwp : Ptr to the dumb window in which
504 * the inverted region lies.
505 * struct gwin_invparams *params : Ptr to other params.
509 * Error value otherwise.
512 * Nothing interesting.
516 *------------------------------------------------------------------------*/
519 gator_dumbgwin_invert(gwp, params)
521 struct gwin_invparams *params;
523 { /*gator_dumbgwin_invert */
525 static char rn[] = "gator_dumbgwin_invert"; /*Routine name */
528 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
532 * Return success, fill in this routine at some point.
536 } /*gator_dumbgwin_invert */
538 /*------------------------------------------------------------------------
539 * gator_dumbgwin_getchar
542 * Pick up a character from the given window.
545 * struct gwin *gwp : Ptr to the dumb window to listen to.
548 * Value of the character read,
552 * Nothing interesting.
556 *------------------------------------------------------------------------*/
559 gator_dumbgwin_getchar(gwp)
562 { /*gator_dumbgwin_getchar */
564 static char rn[] = "gator_dumbgwin_getchar"; /*Routine name */
567 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
572 } /*gator_dumbgwin_getchar */
574 /*------------------------------------------------------------------------
575 * gator_dumbgwin_getdimensions
578 * Get the window's X,Y dimensions.
581 * struct gwin *gwp : Ptr to the dumb window to examine.
582 * struct gwin_sizeparams *aparms : Ptr to size params to set.
589 * Nothing interesting.
593 *------------------------------------------------------------------------*/
596 gator_dumbgwin_getdimensions(gwp, aparms)
598 struct gwin_sizeparams *aparms;
600 { /*gator_dumbgwin_getdimensions */
602 static char rn[] = "gator_dumbgwin_getdimensions"; /*Routine name */
605 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
610 } /*gator_dumbgwin_getdimensions */
612 /*------------------------------------------------------------------------
613 * gator_dumbgwin_wait
616 * Wait until input is available.
619 * struct gwin *gwp : Ptr to the dumb window to wait on.
626 * Nothing interesting.
630 *------------------------------------------------------------------------*/
633 gator_dumbgwin_wait(gwp)
636 { /*gator_dumbgwin_wait */
638 static char rn[] = "gator_dumbgwin_wait"; /*Routine name */
641 fprintf(stderr, "[%s:%s] This routine is currently a no-op\n", mn,
646 } /*gator_dumbgwin_wait */