- fprintf(stderr, "Line input field until end of line\n");
- glk_window_move_cursor(mainwin, 10, 18);
- glk_request_line_event(mainwin, buffer, 256, 0);
- while(1) {
- glk_select(&ev);
- if(ev.type == evtype_LineInput)
- break;
- }
-
- fprintf(stderr, "Another line input field until end of line\n");
- glk_window_move_cursor(mainwin, 10, 20);
- glk_request_line_event(mainwin, buffer, 256, 0);
- while(1) {
- glk_select(&ev);
- if(ev.type == evtype_LineInput)
- break;
- }
+ garglk_set_reversevideo(1);
+ for(y=0; y<height; y++) {
+ snprintf(buffer, 256, "%02d\n", y);
+ glk_put_string(buffer);
+ }
+ garglk_set_reversevideo(0);
+
+ glk_set_style(style_Emphasized);
+ for(y=0; y<height; y++) {
+ snprintf(buffer, 256, "%02d", y);
+ glk_window_move_cursor(mainwin, (y+1)*width-2, 0);
+ glk_put_string(buffer);
+ }
+ glk_set_style(style_Normal);
+
+ glk_window_move_cursor(mainwin, 2, 0);
+ glk_put_string("+");
+ glk_window_move_cursor(mainwin, width-3, 0);
+ glk_put_string("+");
+ glk_window_move_cursor(mainwin, 2, height-1);
+ glk_put_string("+");
+ glk_window_move_cursor(mainwin, width-3, height-1);
+ glk_put_string("+");
+
+ x = width / 2 - 10;
+ y = height / 2;