quakeforge/tools/qwaq/qwaq-app.r
Bill Currie edde4bad15 Create a basic hello world
And it has begun. It has some problems, but worse, it seems I broke
qfprogs and maybe pr_debug.c.
2020-02-27 01:18:38 +09:00

23 lines
507 B
R

typedef struct window_s *window_t;
void initialize (void) = #0;
window_t create_window (int xpos, int ypos, int xlen, int ylen) = #0;
void destroy_window (window_t win) = #0;
void wprintf (window_t win, string fmt, ...) = #0;
int wgetch (window_t win) = #0;
int main (int argc, string *argv)
{
int ch;
initialize ();
window_t win = create_window (20, 5, 50, 10);
wprintf (win, "Hi there!\n");
do {
ch = wgetch (win);
if (ch) {
wprintf (win, "%d\n", ch);
}
} while (ch != 27);
return 0;
}