Added support for pieces casting 'shadow'. This feature is controlled by -shadow...
[tetrinet.git] / io.h
bloba5f9b88ea1c082015a0a8e343ddf64165f40b827
1 /* Tetrinet for Linux, by Andrew Church <achurch@achurch.org>
2 * This program is public domain.
4 * Input/output interface declaration and constant definitions.
5 */
7 #ifndef IO_H
8 #define IO_H
10 /* Text buffers: */
11 #define BUFFER_PLINE 0
12 #define BUFFER_GMSG 1
13 #define BUFFER_ATTDEF 2
15 typedef struct {
17 /**** Input routine. ****/
19 /* Wait for input and return either an ASCII code, a K_* value, -1 if
20 * server input is waiting, or -2 if we time out. */
21 int (*wait_for_input)(int msec);
23 /**** Output routines. ****/
25 /* Initialize for output. */
26 void (*screen_setup)(void);
27 /* Redraw the screen. */
28 void (*screen_refresh)(void);
29 /* Redraw the screen after clearing it. */
30 void (*screen_redraw)(void);
32 /* Draw text into the given buffer. */
33 void (*draw_text)(int bufnum, const char *s);
34 /* Clear the given text buffer. */
35 void (*clear_text)(int bufnum);
37 /* Set up the fields display. */
38 void (*setup_fields)(void);
39 /* Draw our own field. */
40 void (*draw_own_field)(void);
41 /* Draw someone else's field. */
42 void (*draw_other_field)(int player);
43 /* Draw the game status information. */
44 void (*draw_status)(void);
45 /* Draw specials stuff */
46 void (*draw_specials)(void);
47 /* Write a text string for usage of a special. */
48 void (*draw_attdef)(const char *type, int from, int to);
49 /* Draw the game message input window. */
50 void (*draw_gmsg_input)(const char *s, int pos);
51 /* Clear the game message input window. */
52 void (*clear_gmsg_input)(void);
54 /* Set up the partyline display. */
55 void (*setup_partyline)(void);
56 /* Draw the partyline input string with the cursor at the given position. */
57 void (*draw_partyline_input)(const char *s, int pos);
59 /* Set up the winlist display. */
60 void (*setup_winlist)(void);
62 } Interface;
64 extern Interface tty_interface, xwin_interface;
66 #endif /* IO_H */