1 /*
2  * Copyright (C) 2002 Red Hat, Inc.
3  *
4  * This is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Library General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the Free Software
16  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 /* The interfaces in this file are subject to change at any time. */
20 
21 #ifndef vte_keymap_h_included
22 #define vte_keymap_h_included
23 
24 #include <glib.h>
25 #include <gdk/gdk.h>
26 #include "vtetc.h"
27 
28 G_BEGIN_DECLS
29 
30 #define VTE_META_MASK		GDK_META_MASK
31 #define VTE_NUMLOCK_MASK	GDK_MOD2_MASK
32 
33 /* Map the specified keyval/modifier setup, dependent on the mode, to either
34  * a literal string or a capability name. */
35 void _vte_keymap_map(guint keyval,
36 		     GdkModifierType modifiers,
37 		     gboolean sun_mode,
38 		     gboolean hp_mode,
39 		     gboolean legacy_mode,
40 		     gboolean vt220_mode,
41 		     gboolean app_cursor_keys,
42 		     gboolean app_keypad_keys,
43 		     struct _vte_termcap *termcap,
44 		     const char *term,
45 		     char **normal,
46 		     gssize *normal_length,
47 		     const char **special);
48 
49 /* Return TRUE if a keyval is just a modifier key. */
50 gboolean _vte_keymap_key_is_modifier(guint keyval);
51 
52 /* Add modifiers to the sequence if they're needed. */
53 void _vte_keymap_key_add_key_modifiers(guint keyval,
54 				       GdkModifierType modifiers,
55 				       gboolean sun_mode,
56 				       gboolean hp_mode,
57 				       gboolean legacy_mode,
58 				       gboolean vt220_mode,
59 				       gboolean app_cursor_keys,
60 				       char **normal,
61 				       gssize *normal_length);
62 
63 G_END_DECLS
64 
65 #endif
66