95
103
extern int window_scroll_step;
97
105
/* Make the modeline member for WINDOW. */
98
extern void window_make_modeline ();
106
extern void window_make_modeline (WINDOW *window);
100
108
/* Initalize the window system by creating THE_SCREEN and THE_ECHO_AREA.
101
109
Create the first window ever, and make it permanent.
102
110
You pass WIDTH and HEIGHT; the dimensions of the total screen size. */
103
extern void window_initialize_windows ();
111
extern void window_initialize_windows (int width, int height);
105
113
/* Make a new window showing NODE, and return that window structure.
106
114
The new window is made to be the active window. If NODE is passed
107
115
as NULL, then show the node showing in the active window. If the
108
116
window could not be made return a NULL pointer. The active window
109
117
is not changed.*/
110
extern WINDOW *window_make_window ();
118
extern WINDOW *window_make_window (NODE *node);
112
120
/* Delete WINDOW from the list of known windows. If this window was the
113
121
active window, make the next window in the chain be the active window,
114
122
or the previous window in the chain if there is no next window. */
115
extern void window_delete_window ();
123
extern void window_delete_window (WINDOW *window);
117
125
/* A function to call when the screen changes size, and some windows have
118
126
to get deleted. The function is called with the window to be deleted
121
129
extern VFunction *window_deletion_notifier;
123
131
/* Set WINDOW to display NODE. */
124
extern void window_set_node_of_window ();
132
extern void window_set_node_of_window (WINDOW *window, NODE *node);
126
134
/* Tell the window system that the size of the screen has changed. This
127
135
causes lots of interesting things to happen. The permanent windows
128
136
are resized, as well as every visible window. You pass WIDTH and HEIGHT;
129
137
the dimensions of the total screen size. */
130
extern void window_new_screen_size ();
138
extern void window_new_screen_size (int width, int height);
132
140
/* Change the height of WINDOW by AMOUNT. This also automagically adjusts
133
141
the previous and next windows in the chain. If there is only one user
134
142
window, then no change takes place. */
135
extern void window_change_window_height ();
143
extern void window_change_window_height (WINDOW *window, int amount);
137
145
/* Adjust the pagetop of WINDOW such that the cursor point will be visible. */
138
extern void window_adjust_pagetop ();
146
extern void window_adjust_pagetop (WINDOW *window);
140
148
/* Tile all of the windows currently displayed in the global variable
141
149
WINDOWS. If argument DO_INTERNALS is non-zero, tile windows displaying
142
150
internal nodes as well. */
143
151
#define DONT_TILE_INTERNALS 0
144
152
#define TILE_INTERNALS 1
145
extern void window_tile_windows ();
153
extern void window_tile_windows (int style);
147
155
/* Toggle the state of line wrapping in WINDOW. This can do a bit of fancy
149
extern void window_toggle_wrap ();
157
extern void window_toggle_wrap (WINDOW *window);
151
159
/* For every window in CHAIN, set the flags member to have FLAG set. */
152
extern void window_mark_chain ();
160
extern void window_mark_chain (WINDOW *chain, int flag);
154
162
/* For every window in CHAIN, clear the flags member of FLAG. */
155
extern void window_unmark_chain ();
163
extern void window_unmark_chain (WINDOW *chain, int flag);
157
165
/* Make WINDOW start displaying at PERCENT percentage of its node. */
158
extern void window_goto_percentage ();
166
extern void window_goto_percentage (WINDOW *window, int percent);
160
168
/* Build a new node which has FORMAT printed with ARG1 and ARG2 as the
162
extern NODE *build_message_node ();
170
extern NODE *build_message_node (char *format, void *arg1, void *arg2);
164
172
/* Useful functions can be called from outside of window.c. */
165
extern void initialize_message_buffer ();
173
extern void initialize_message_buffer (void);
167
175
/* Print FORMAT with ARG1,2 to the end of the current message buffer. */
168
extern void printf_to_message_buffer ();
176
extern void printf_to_message_buffer (char *format, void *arg1, void *arg2,
170
179
/* Convert the contents of the message buffer to a node. */
171
extern NODE *message_buffer_to_node ();
180
extern NODE *message_buffer_to_node (void);
173
182
/* Return the length of the most recently printed line in message buffer. */
174
extern int message_buffer_length_this_line ();
183
extern int message_buffer_length_this_line (void);
176
185
/* Pad STRING to COUNT characters by inserting blanks. */
177
extern int pad_to ();
186
extern int pad_to (int count, char *string);
179
188
/* Make a message appear in the echo area, built from FORMAT, ARG1 and ARG2.
180
189
The arguments are treated similar to printf () arguments, but not all of
181
190
printf () hair is present. The message appears immediately. If there was
182
191
already a message appearing in the echo area, it is removed. */
183
extern void window_message_in_echo_area ();
192
extern void window_message_in_echo_area (char *format, void *arg1, void *arg2);
185
194
/* Place a temporary message in the echo area built from FORMAT, ARG1
186
195
and ARG2. The message appears immediately, but does not destroy
187
196
any existing message. A future call to unmessage_in_echo_area ()
188
197
restores the old contents. */
189
extern void message_in_echo_area ();
190
extern void unmessage_in_echo_area ();
198
extern void message_in_echo_area (char *format, void *arg1, void *arg2);
199
extern void unmessage_in_echo_area (void);
192
201
/* Clear the echo area, removing any message that is already present.
193
202
The echo area is cleared immediately. */
194
extern void window_clear_echo_area ();
203
extern void window_clear_echo_area (void);
196
205
/* Quickly guess the approximate number of lines to that NODE would
197
206
take to display. This really only counts carriage returns. */
198
extern int window_physical_lines ();
207
extern int window_physical_lines (NODE *node);
200
209
/* Calculate a list of line starts for the node belonging to WINDOW. The line
201
210
starts are pointers to the actual text within WINDOW->NODE. */
202
extern void calculate_line_starts ();
211
extern void calculate_line_starts (WINDOW *window);
204
213
/* Given WINDOW, recalculate the line starts for the node it displays. */
205
extern void recalculate_line_starts ();
214
extern void recalculate_line_starts (WINDOW *window);
207
216
/* Return the number of characters it takes to display CHARACTER on the
208
217
screen at HPOS. */
209
extern int character_width ();
218
extern int character_width (int character, int hpos);
211
220
/* Return the number of characters it takes to display STRING on the
212
221
screen at HPOS. */
213
extern int string_width ();
222
extern int string_width (char *string, int hpos);
215
224
/* Return the index of the line containing point. */
216
extern int window_line_of_point ();
225
extern int window_line_of_point (WINDOW *window);
218
227
/* Get and return the goal column for this window. */
219
extern int window_get_goal_column ();
228
extern int window_get_goal_column (WINDOW *window);
221
230
/* Get and return the printed column offset of the cursor in this window. */
222
extern int window_get_cursor_column ();
231
extern int window_get_cursor_column (WINDOW *window);
224
233
/* Get and Set the node, pagetop, and point of WINDOW. */
225
extern void window_get_state (), window_set_state ();
234
extern void window_get_state (WINDOW *window, SEARCH_STATE *state);
235
extern void window_set_state (WINDOW *window, SEARCH_STATE *state);
227
237
/* Count the number of characters in LINE that precede the printed column
228
238
offset of GOAL. */
229
extern int window_chars_to_goal ();
239
extern int window_chars_to_goal (char *line, int goal);
231
241
#endif /* not INFO_WINDOW_H */