1 #ifndef IO_ABSTRACTH 2 #define IO_ABSTRACTH 3 /* 4 * $Id: io-abstract.h,v 1.8 2000/08/10 21:02:50 danny Exp $ 5 * 6 * Copyright � 1992, 1993 Free Software Foundation, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2, or (at your option) 11 * any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with Oleo; see the file COPYING. If not, write to 20 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 21 */ 22 #ifdef DEFINE_IO_VARS 23 #define EXTERN 24 #else 25 #define EXTERN extern 26 #endif 27 28 #include "global.h" 29 #include "line.h" 30 #include "window.h" 31 32 #ifndef VOLATILE 33 #define VOLATILE volatile 34 #endif 35 36 EXTERN void (*io_open_display) (void); 37 EXTERN void (*io_redisp) (void); /* Refresh the existing image. */ 38 EXTERN void (*io_repaint) (void); /* $$$ Recompute the image. */ 39 EXTERN void (*io_repaint_win) (struct window *); 40 EXTERN void (*io_close_display) (int); 41 42 /* 43 * Low level input. 44 */ 45 EXTERN int (*io_input_avail) (void);/* How many chars can be read? */ 46 EXTERN void (*io_scan_for_input) (int ok_to_block); 47 EXTERN void (*io_wait_for_input) (void); 48 EXTERN int (*io_read_kbd) (char *buf, int size); 49 50 /* A curses compatible interface. These have no effect on low level 51 calls except to consume characters which io_read_kbd might 52 otherwise return. */ 53 EXTERN void (*io_nodelay) (int); 54 EXTERN int (*io_getch) (void); 55 56 /* Annoy the user: */ 57 EXTERN void (*io_bell) (void); 58 59 /* High level i/o. */ 60 61 EXTERN void (*io_flush) (void); 62 63 /* Input and status areas: */ 64 EXTERN void (*io_clear_input_before) (void); 65 EXTERN void (*io_clear_input_after) (void); 66 EXTERN void (*io_update_status) (void); 67 EXTERN int (*io_get_chr) (char *prompt); 68 69 EXTERN void (*io_fix_input) (void); 70 EXTERN void (*io_move_cursor) (void); 71 EXTERN void (*io_erase) (int len); 72 EXTERN void (*io_insert) (int len); 73 EXTERN void (*io_over) (char *, int len); 74 75 #ifndef X_DISPLAY_MISSING 76 extern int io_col_to_input_pos (int col); 77 #else 78 #define io_col_to_input_pos(i) 0 79 #endif 80 81 82 /* Cell values */ 83 EXTERN void (*io_hide_cell_cursor) (void); 84 EXTERN void (*io_display_cell_cursor) (void); 85 EXTERN void (*io_pr_cell_win) (struct window *, 86 CELLREF, CELLREF, 87 CELL *); 88 89 /* The terminal's cursor may be in the current cell or the input area. */ 90 EXTERN void (*io_cellize_cursor) (void); 91 EXTERN void (*io_inputize_cursor) (void); 92 93 /* The main loop */ 94 EXTERN void (*io_command_loop) (int); 95 96 #endif /* IO_ABSTRACTH */ 97