171
|
1 /* session.h -- Functions found in session.c. */ |
|
2 |
|
3 /* This file is part of GNU Info, a program for reading online documentation |
|
4 stored in Info format. |
|
5 |
|
6 Copyright (C) 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 this program; if not, write to the Free Software |
1315
|
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
171
|
21 |
|
22 Written by Brian Fox (bfox@ai.mit.edu). */ |
|
23 |
|
24 #if !defined (_SESSION_H_) |
|
25 #define _SESSION_H_ |
|
26 |
|
27 #include "general.h" |
|
28 #include "dribble.h" |
|
29 |
|
30 /* All commands that can be invoked from within info_session () receive |
|
31 arguments in the same way. This simple define declares the header |
|
32 of a function named NAME, with associated documentation DOC. The |
|
33 documentation string is groveled out of the source files by the |
|
34 utility program `builddoc', which is also responsible for making |
|
35 the documentation/function-pointer maps. */ |
|
36 #define DECLARE_INFO_COMMAND(name, doc) \ |
|
37 void name (window, count, key) WINDOW *window; int count; unsigned char key; |
|
38 |
|
39 /* Variables found in session.h. */ |
|
40 extern VFunction *info_last_executed_command; |
|
41 |
|
42 /* Variable controlling the garbage collection of files briefly visited |
|
43 during searches. Such files are normally gc'ed, unless they were |
|
44 compressed to begin with. If this variable is non-zero, it says |
|
45 to gc even those file buffer contents which had to be uncompressed. */ |
|
46 extern int gc_compressed_files; |
|
47 |
|
48 /* When non-zero, tiling takes place automatically when info_split_window |
|
49 is called. */ |
|
50 extern int auto_tiling_p; |
|
51 |
|
52 /* Variable controlling the behaviour of default scrolling when you are |
|
53 already at the bottom of a node. */ |
|
54 extern int info_scroll_behaviour; |
|
55 extern char *info_scroll_choices[]; |
|
56 |
|
57 /* Values for info_scroll_behaviour. */ |
|
58 #define IS_Continuous 0 /* Try to get first menu item, or failing that, the |
|
59 "Next:" pointer, or failing that, the "Up:" and |
|
60 "Next:" of the up. */ |
|
61 #define IS_NextOnly 1 /* Try to get "Next:" menu item. */ |
|
62 #define IS_PageOnly 2 /* Simply give up at the bottom of a node. */ |
|
63 |
|
64 /* Utility functions found in session.c */ |
|
65 extern void info_dispatch_on_key (); |
|
66 extern unsigned char info_get_input_char (), info_get_another_input_char (); |
|
67 extern unsigned char info_input_pending_p (); |
|
68 extern void remember_window_and_node (), set_remembered_pagetop_and_point (); |
|
69 extern void set_window_pagetop (), info_set_node_of_window (); |
|
70 extern char *pretty_keyseq (); |
|
71 extern void initialize_keyseq (), add_char_to_keyseq (); |
|
72 extern void info_gather_typeahead (); |
|
73 extern FILE_BUFFER *file_buffer_of_window (); |
|
74 extern long info_search_in_node (), info_target_search_node (); |
|
75 extern void info_select_reference (); |
|
76 extern int info_any_buffered_input_p (); |
|
77 extern void print_node (); |
|
78 extern void dump_node_to_file (), dump_nodes_to_file (); |
|
79 |
|
80 /* Do the physical deletion of WINDOW, and forget this window and |
|
81 associated nodes. */ |
|
82 extern void info_delete_window_internal (); |
|
83 |
|
84 /* Tell Info that input is coming from the file FILENAME. */ |
|
85 extern void info_set_input_from_file (); |
|
86 |
|
87 #define return_if_control_g(val) \ |
|
88 do { \ |
|
89 info_gather_typeahead (); \ |
|
90 if (info_input_pending_p () == Control ('g')) \ |
|
91 return (val); \ |
|
92 } while (0) |
|
93 |
|
94 /* The names of the functions that run an info session. */ |
|
95 |
|
96 /* Starting an info session. */ |
|
97 extern void begin_multiple_window_info_session (), begin_info_session (); |
|
98 extern void begin_info_session_with_error (), info_session (); |
|
99 extern void info_read_and_dispatch (); |
|
100 |
|
101 /* Moving the point within a node. */ |
|
102 extern void info_next_line (), info_prev_line (); |
|
103 extern void info_end_of_line (), info_beginning_of_line (); |
|
104 extern void info_forward_char (), info_backward_char (); |
|
105 extern void info_forward_word (), info_backward_word (); |
|
106 extern void info_beginning_of_node (), info_end_of_node (); |
|
107 extern void info_move_to_prev_xref (), info_move_to_next_xref (); |
|
108 |
|
109 /* Scrolling text within a window. */ |
|
110 extern void info_scroll_forward (), info_scroll_backward (); |
|
111 extern void info_redraw_display (), info_toggle_wrap (); |
|
112 extern void info_move_to_window_line (); |
|
113 |
|
114 /* Manipulating multiple windows. */ |
|
115 extern void info_split_window (), info_delete_window (); |
|
116 extern void info_keep_one_window (), info_grow_window (); |
|
117 extern void info_scroll_other_window (), info_tile_windows (); |
|
118 extern void info_next_window (), info_prev_window (); |
|
119 |
|
120 /* Selecting nodes. */ |
|
121 extern void info_next_node (), info_prev_node (), info_up_node (); |
|
122 extern void info_last_node (), info_first_node (), info_history_node (); |
|
123 extern void info_goto_node (), info_top_node (), info_dir_node (); |
|
124 extern void info_global_next_node (), info_global_prev_node (); |
|
125 extern void info_kill_node (), info_view_file (); |
|
126 |
|
127 /* Selecting cross references. */ |
|
128 extern void info_menu_digit (), info_menu_item (), info_xref_item (); |
|
129 extern void info_find_menu (), info_select_reference_this_line (); |
|
130 |
|
131 /* Hacking numeric arguments. */ |
|
132 extern int info_explicit_arg, info_numeric_arg, info_numeric_arg_sign; |
|
133 |
|
134 extern void info_add_digit_to_numeric_arg (), info_universal_argument (); |
|
135 extern void info_initialize_numeric_arg (), info_numeric_arg_digit_loop (); |
|
136 |
|
137 /* Searching commands. */ |
|
138 extern void info_search (), isearch_forward (), isearch_backward (); |
|
139 |
|
140 /* Dumping and printing nodes. */ |
|
141 extern void info_print_node (); |
|
142 |
|
143 /* Miscellaneous commands. */ |
|
144 extern void info_abort_key (), info_quit (), info_do_lowercase_version (); |
|
145 |
|
146 #endif /* _SESSION_H_ */ |