File: io-abstract.h

package info (click to toggle)
oleo 1.6-16
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,640 kB
  • ctags: 3,139
  • sloc: ansic: 39,221; yacc: 1,737; sh: 362; makefile: 88
file content (174 lines) | stat: -rw-r--r-- 5,338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#ifndef IO_ABSTRACTH
#define IO_ABSTRACTH
/*	Copyright (C) 1992, 1993 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Oleo; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
/*  t. lord	Fri Aug  7 12:48:16 1992	*/

#ifdef DEFINE_IO_VARS
#define EXTERN
#else
#define EXTERN extern
#endif

#include "global.h"
#include "line.h"
#include "window.h"


#if PROTOTYPES
EXTERN void (*io_open_display) (void);
EXTERN void (*io_redisp) (void);	/* Refresh the existing image. */
EXTERN void (*io_repaint) (void);	/* $$$ Recompute the image. */
EXTERN void (*io_repaint_win) (struct window *);
EXTERN void (*io_close_display) (void);

/*
 * Low level input.
 */
EXTERN int (*io_input_avail) (void);/* How many chars can be read? */
EXTERN void (*io_scan_for_input) (int ok_to_block);
EXTERN void (*io_wait_for_input) (void);
EXTERN int (*io_read_kbd) (volatile char *buf, int size);

/* A curses compatible interface.  These have no effect on low level
   calls except to consume characters which io_read_kbd might
   otherwise return. */
EXTERN void (*io_nodelay) (int);
EXTERN int (*io_getch) (void);

/* Annoy the user: */
EXTERN void (*io_bell) (void);

/* High level i/o. */

EXTERN void (*io_flush) (void); 

/* Input and status areas: */
EXTERN void (*io_clear_input_before) (void);
EXTERN void (*io_clear_input_after) (void);
EXTERN void (*io_update_status) (void);
EXTERN int (*io_get_chr) (char *prompt);

EXTERN void (*io_fix_input) (void);
EXTERN void (*io_move_cursor) (void);
EXTERN void (*io_erase) (int len);
EXTERN void (*io_insert) (int len);
EXTERN void (*io_over) (char *, int len);
#else /* PROTOTYPES */
EXTERN void (*io_open_display) ();
EXTERN void (*io_redisp) ();	/* Refresh the existing image. */
EXTERN void (*io_repaint) ();	/* $$$ Recompute the image. */
EXTERN void (*io_repaint_win) ();
EXTERN void (*io_close_display) ();

/*
 * Low level input.
 */
EXTERN int (*io_input_avail) ();/* How many chars can be read? */
EXTERN void (*io_scan_for_input) ();
EXTERN void (*io_wait_for_input) ();
EXTERN int (*io_read_kbd) ();

/* A curses compatible interface.  These have no effect on low level
   calls except to consume characters which io_read_kbd might
   otherwise return. */
EXTERN void (*io_nodelay) ();
EXTERN int (*io_getch) ();

/* Annoy the user: */
EXTERN void (*io_bell) ();

/* High level i/o. */

EXTERN void (*io_flush) (); 

/* Input and status areas: */
EXTERN void (*io_clear_input_before) ();
EXTERN void (*io_clear_input_after) ();
EXTERN void (*io_update_status) ();
EXTERN int (*io_get_chr) ();

EXTERN void (*io_fix_input) ();
EXTERN void (*io_move_cursor) ();
EXTERN void (*io_erase) ();
EXTERN void (*io_insert) ();
EXTERN void (*io_over) ();
#endif /* PROTOTYPES */

#ifndef X_DISPLAY_MISSING
#if PROTOTYPES
extern int io_col_to_input_pos (int col);
#else /* PROTOTYPES */
extern int io_col_to_input_pos ();
#endif /* PROTOTYPES */
#else
#define io_col_to_input_pos(i)  0
#endif


#if PROTOTYPES
/* Cell values */
EXTERN void (*io_hide_cell_cursor) (void);
EXTERN void (*io_display_cell_cursor) (void);
EXTERN void (*io_pr_cell_win) (struct window *,
			       CELLREF, CELLREF,
			       CELL *);

/* The terminal's cursor may be in the current cell or the input area. */
EXTERN void (*io_cellize_cursor) (void);
EXTERN void (*io_inputize_cursor) (void);
#else PROTOTYPES
/* Cell values */
EXTERN void (*io_hide_cell_cursor) ();
EXTERN void (*io_display_cell_cursor) ();
EXTERN void (*io_pr_cell_win) ();

/* The terminal's cursor may be in the current cell or the input area. */
EXTERN void (*io_cellize_cursor) ();
EXTERN void (*io_inputize_cursor) ();
#endif /* PROTOTYPES */

#define IO_SETUP						\
  io_open_display = _io_open_display;				\
  io_redisp = _io_redisp;					\
  io_repaint = _io_repaint;					\
  io_repaint_win = _io_repaint_win;				\
  io_close_display = _io_close_display;				\
  io_input_avail = _io_input_avail; 				\
  io_scan_for_input = _io_scan_for_input; 			\
  io_wait_for_input = _io_wait_for_input; 			\
  io_read_kbd = _io_read_kbd; 					\
  io_nodelay = _io_nodelay; 					\
  io_getch = _io_getch; 					\
  io_bell = _io_bell;	 					\
  io_get_chr = _io_get_chr; 					\
  io_update_status = _io_update_status; 		      	\
  io_fix_input = _io_fix_input;					\
  io_move_cursor = _io_move_cursor;				\
  io_erase = _io_erase;						\
  io_insert = _io_insert;					\
  io_over = _io_over;						\
  io_flush = _io_flush;						\
  io_clear_input_before = _io_clear_input_before;		\
  io_clear_input_after = _io_clear_input_after; 		\
  io_pr_cell_win = _io_pr_cell_win;				\
  io_hide_cell_cursor = _io_hide_cell_cursor;			\
  io_cellize_cursor = _io_cellize_cursor;			\
  io_inputize_cursor = _io_inputize_cursor;			\
  io_display_cell_cursor = _io_display_cell_cursor


#endif