1 /*
2  * keys.h: header for keys.c
3  *
4  * Written By Michael Sandrof
5  *
6  * Copyright (c) 1990 Michael Sandrof.
7  * Copyright (c) 1991, 1992 Troy Rollo.
8  * Copyright (c) 1992-2000 Matthew R. Green.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notice, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  * 3. The name of the author may not be used to endorse or promote products
20  *    derived from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  */
34 
35 /*
36  * NOTE: This file is automatically created!
37  *
38  * from: @(#) Id: keys.h.proto,v 1.20 2000/04/04 03:10:49 mrg Exp
39  * @(#)$Id: keys.h.proto,v 1.20 2000/04/04 03:10:49 mrg Exp $
40  */
41 
42 #ifndef __keys_h_
43 #define __keys_h_
44 
45 #define BACKSPACE 0
46 #define BACKWARD_CHARACTER 1
47 #define BACKWARD_HISTORY 2
48 #define BACKWARD_WORD 3
49 #define BEGINNING_OF_LINE 4
50 #define CLEAR_SCREEN 5
51 #define COMMAND_COMPLETION 6
52 #define DELETE_CHARACTER 7
53 #define DELETE_NEXT_WORD 8
54 #define DELETE_PREVIOUS_WORD 9
55 #define END_OF_LINE 10
56 #define ENTER_DIGRAPH 11
57 #define	ENTER_MENU 12
58 #define ERASE_LINE 13
59 #define ERASE_TO_BEG_OF_LINE 14
60 #define ERASE_TO_END_OF_LINE 15
61 #define FORWARD_CHARACTER 16
62 #define FORWARD_HISTORY 17
63 #define FORWARD_WORD 18
64 #define JOIN_INVITE 19
65 #define META1_CHARACTER 20
66 #define META2_CHARACTER 21
67 #define META3_CHARACTER 22
68 #define META4_CHARACTER 23
69 #define META5_CHARACTER 24
70 #define META6_CHARACTER 25
71 #define META7_CHARACTER 26
72 #define META8_CHARACTER 27
73 #define NEXT_WINDOW 28
74 #define NOTHING 29
75 #define OPER_VIEW 30
76 #define PARSE_COMMAND 31
77 #define PREVIOUS_WINDOW 32
78 #define QUIT_IRC 33
79 #define QUOTE_CHARACTER 34
80 #define REFRESH_INPUTLINE 35
81 #define REFRESH_SCREEN 36
82 #define REPLY_TO 37
83 #define SCROLL_BACKWARD 38
84 #define SCROLL_END 39
85 #define SCROLL_FORWARD 40
86 #define SCROLL_START 41
87 #define SELF_INSERT 42
88 #define SEND_LINE 43
89 #define STOP_IRC 44
90 #define SWAP_LAST_WINDOW 45
91 #define SWAP_NEXT_WINDOW 46
92 #define SWAP_PREVIOUS_WINDOW 47
93 #define SWITCH_CHANNELS 48
94 #define TOGGLE_INSERT_MODE 49
95 #define TOGGLE_STOP_SCREEN 50
96 #define TRANSPOSE_CHARACTERS 51
97 #define TYPE_TEXT 52
98 #define UNSTOP_ALL_WINDOWS 53
99 #define YANK_FROM_CUTBUFFER 54
100 #define NUMBER_OF_FUNCTIONS 55
101 
102 /* KeyMap: the structure of the irc keymaps */
103 typedef struct
104 {
105 	int	index;
106 	u_char	changed;
107 	int	global;
108 	u_char	*stuff;
109 }	KeyMap;
110 
111 /* KeyMapNames: the structure of the keymap to realname array */
112 typedef struct
113 {
114 	char	*name;
115 	void	(*func) _((u_int, u_char *));
116 }	KeyMapNames;
117 
118 extern	KeyMap	keys[],
119 		meta1_keys[],
120 		meta2_keys[],
121 		meta3_keys[],
122 		meta4_keys[],
123 		meta5_keys[],
124 		meta6_keys[],
125 		meta7_keys[],
126 		meta8_keys[];
127 extern	KeyMapNames key_names[];
128 
129 	void	(* get_send_line _((void))) _((u_int, u_char *));
130 	void	save_bindings _((FILE *, int));
131 	void	change_send_line _((void (*)(u_int, u_char *)));
132 	void	bindcmd _((u_char *, u_char *, u_char *));
133 	void	rbindcmd _((u_char *, u_char *, u_char *));
134 	void	parsekeycmd _((u_char *, u_char *, u_char *));
135 	void	type _((u_char *, u_char *, u_char *));
136 
137 /* ninja's join invite key */
138 	void	join_invite _((u_int, u_char *));
139 
140 #endif /* __keys_h_ */
141