1 /* Tetrinet for Linux, by Andrew Church <achurch@achurch.org>
2 * This program is public domain.
4 * Input/output interface declaration and constant definitions.
11 #define BUFFER_PLINE 0
13 #define BUFFER_ATTDEF 2
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 (@s can contain enum tattr fields;
33 * these are the ones with < TATTR_MAX). */
34 void (*draw_text
)(int bufnum
, const char *s
);
35 /* Clear the given text buffer. */
36 void (*clear_text
)(int bufnum
);
38 /* Set up the fields display. */
39 void (*setup_fields
)(void);
40 /* Draw our own field. */
41 void (*draw_own_field
)(void);
42 /* Draw someone else's field. */
43 void (*draw_other_field
)(int player
);
44 /* Draw the game status information. */
45 void (*draw_status
)(void);
46 /* Draw specials stuff */
47 void (*draw_specials
)(void);
48 /* Write a text string for usage of a special. */
49 void (*draw_attdef
)(const char *type
, int from
, int to
);
50 /* Draw the game message input window. */
51 void (*draw_gmsg_input
)(const char *s
, int pos
);
52 /* Clear the game message input window. */
53 void (*clear_gmsg_input
)(void);
55 /* Set up the partyline display. */
56 void (*setup_partyline
)(void);
57 /* Draw the partyline input string with the cursor at the given position. */
58 void (*draw_partyline_input
)(const char *s
, int pos
);
60 /* Set up the winlist display. */
61 void (*setup_winlist
)(void);
65 extern Interface tty_interface
, xwin_interface
;
68 /* Text attributes; note that in strings, they are always encoded with +1 to
69 * avoid black terminating the string. */
72 /* Note that TATTR_CBLACK text should be visible on a black background, too. */
81 TATTR_CXBRIGHT
, /* | this with the colors above to get the bright variant. */