[vte/vte-next: 28/114] Use non-deprecated GDK_KEY_* symbols



commit 5c12b56591792ee433fba88383530e131ab0be49
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 21:52:39 2011 +0200

    Use non-deprecated GDK_KEY_* symbols

 src/iso2022.c |  197 ++++++++++++++---------------
 src/keymap.c  |  399 ++++++++++++++++++++++++++++-----------------------------
 src/vte.c     |  109 ++++++++---------
 3 files changed, 342 insertions(+), 363 deletions(-)
---
diff --git a/src/iso2022.c b/src/iso2022.c
index 79a9e01..6115935 100644
--- a/src/iso2022.c
+++ b/src/iso2022.c
@@ -37,13 +37,6 @@
 
 #include <gtk/gtk.h>
 
-#if GTK_CHECK_VERSION (2, 90, 7)
-#define GDK_KEY(symbol) GDK_KEY_##symbol
-#else
-#include <gdk/gdkkeysyms.h>
-#define GDK_KEY(symbol) GDK_##symbol
-#endif
-
 /* Maps which jive with XTerm's ESC ()*+ ? sequences, RFC 1468.  Add the
  * PC437 map because despite knowing that XTerm doesn't support it, certain
  * applications try to use it anyway. */
@@ -123,7 +116,7 @@ static const struct _vte_iso2022_map16 _vte_iso2022_map_0[] = {
 };
 /* United Kingdom.  VT100 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_A[] = {
-	{'$', GDK_KEY (sterling)},
+	{'$', GDK_KEY_sterling},
 };
 /* US-ASCII (no conversions).  VT100 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_B[] = {
@@ -131,128 +124,128 @@ static const struct _vte_iso2022_map16 _vte_iso2022_map_B[] = {
 };
 /* Dutch. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_4[] = {
-	{'#',  GDK_KEY (sterling)},
-	{'@',  GDK_KEY (threequarters)},
-	{'[',  GDK_KEY (ydiaeresis)},
-	{'\\', GDK_KEY (onehalf)},
-	{']',  GDK_KEY (bar)}, /* FIXME? not in XTerm 170 */
-	{'{',  GDK_KEY (diaeresis)},
+	{'#',  GDK_KEY_sterling},
+	{'@',  GDK_KEY_threequarters},
+	{'[',  GDK_KEY_ydiaeresis},
+	{'\\', GDK_KEY_onehalf},
+	{']',  GDK_KEY_bar}, /* FIXME? not in XTerm 170 */
+	{'{',  GDK_KEY_diaeresis},
 	{'|',  0x192}, /* f with hook (florin) */ /* FIXME? not in XTerm 170 */
-	{'}',  GDK_KEY (onequarter)},
-	{'~',  GDK_KEY (acute)}
+	{'}',  GDK_KEY_onequarter},
+	{'~',  GDK_KEY_acute}
 };
 /* Finnish. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_C[] = {
-	{'[',  GDK_KEY (Adiaeresis)},
-	{'\\', GDK_KEY (Odiaeresis)},
-	{']',  GDK_KEY (Aring)},
-	{'^',  GDK_KEY (Udiaeresis)},
-	{'`',  GDK_KEY (eacute)},
-	{'{',  GDK_KEY (adiaeresis)},
-	{'|',  GDK_KEY (odiaeresis)},
-	{'}',  GDK_KEY (aring)},
-	{'~',  GDK_KEY (udiaeresis)},
+	{'[',  GDK_KEY_Adiaeresis},
+	{'\\', GDK_KEY_Odiaeresis},
+	{']',  GDK_KEY_Aring},
+	{'^',  GDK_KEY_Udiaeresis},
+	{'`',  GDK_KEY_eacute},
+	{'{',  GDK_KEY_adiaeresis},
+	{'|',  GDK_KEY_odiaeresis},
+	{'}',  GDK_KEY_aring},
+	{'~',  GDK_KEY_udiaeresis},
 };
 /* French. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_R[] = {
-	{'#',  GDK_KEY (sterling)},
-	{'@',  GDK_KEY (agrave)},
-	{'[',  GDK_KEY (degree)},
-	{'\\', GDK_KEY (ccedilla)},
-	{']',  GDK_KEY (section)},
-	{'{',  GDK_KEY (eacute)},
-	{'|',  GDK_KEY (ugrave)},
-	{'}',  GDK_KEY (egrave)},
-	{'~',  GDK_KEY (diaeresis)},
+	{'#',  GDK_KEY_sterling},
+	{'@',  GDK_KEY_agrave},
+	{'[',  GDK_KEY_degree},
+	{'\\', GDK_KEY_ccedilla},
+	{']',  GDK_KEY_section},
+	{'{',  GDK_KEY_eacute},
+	{'|',  GDK_KEY_ugrave},
+	{'}',  GDK_KEY_egrave},
+	{'~',  GDK_KEY_diaeresis},
 };
 /* French Canadian. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_Q[] = {
-	{'@',  GDK_KEY (agrave)},
-	{'[',  GDK_KEY (acircumflex)},
-	{'\\', GDK_KEY (ccedilla)},
-	{']',  GDK_KEY (ecircumflex)},
-	{'^',  GDK_KEY (icircumflex)},
-	{'`',  GDK_KEY (ocircumflex)},
-	{'{',  GDK_KEY (eacute)},
-	{'|',  GDK_KEY (ugrave)},
-	{'}',  GDK_KEY (egrave)},
-	{'~',  GDK_KEY (ucircumflex)},
+	{'@',  GDK_KEY_agrave},
+	{'[',  GDK_KEY_acircumflex},
+	{'\\', GDK_KEY_ccedilla},
+	{']',  GDK_KEY_ecircumflex},
+	{'^',  GDK_KEY_icircumflex},
+	{'`',  GDK_KEY_ocircumflex},
+	{'{',  GDK_KEY_eacute},
+	{'|',  GDK_KEY_ugrave},
+	{'}',  GDK_KEY_egrave},
+	{'~',  GDK_KEY_ucircumflex},
 };
 /* German. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_K[] = {
-	{'@',  GDK_KEY (section)},
-	{'[',  GDK_KEY (Adiaeresis)},
-	{'\\', GDK_KEY (Odiaeresis)},
-	{']',  GDK_KEY (Udiaeresis)},
-	{'{',  GDK_KEY (adiaeresis)},
-	{'|',  GDK_KEY (odiaeresis)},
-	{'}',  GDK_KEY (udiaeresis)},
-	{'~',  GDK_KEY (ssharp)},
+	{'@',  GDK_KEY_section},
+	{'[',  GDK_KEY_Adiaeresis},
+	{'\\', GDK_KEY_Odiaeresis},
+	{']',  GDK_KEY_Udiaeresis},
+	{'{',  GDK_KEY_adiaeresis},
+	{'|',  GDK_KEY_odiaeresis},
+	{'}',  GDK_KEY_udiaeresis},
+	{'~',  GDK_KEY_ssharp},
 };
 /* Italian. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_Y[] = {
-	{'#',  GDK_KEY (sterling)},
-	{'@',  GDK_KEY (section)},
-	{'[',  GDK_KEY (degree)},
-	{'\\', GDK_KEY (ccedilla)},
-	{']',  GDK_KEY (eacute)},
-	{'`',  GDK_KEY (ugrave)},
-	{'{',  GDK_KEY (agrave)},
-	{'|',  GDK_KEY (ograve)},
-	{'}',  GDK_KEY (egrave)},
-	{'~',  GDK_KEY (igrave)},
+	{'#',  GDK_KEY_sterling},
+	{'@',  GDK_KEY_section},
+	{'[',  GDK_KEY_degree},
+	{'\\', GDK_KEY_ccedilla},
+	{']',  GDK_KEY_eacute},
+	{'`',  GDK_KEY_ugrave},
+	{'{',  GDK_KEY_agrave},
+	{'|',  GDK_KEY_ograve},
+	{'}',  GDK_KEY_egrave},
+	{'~',  GDK_KEY_igrave},
 };
 /* Norwegian and Danish. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_E[] = {
-	{'@',  GDK_KEY (Adiaeresis)},
-	{'[',  GDK_KEY (AE)},
-	{'\\', GDK_KEY (Ooblique)},
-	{']',  GDK_KEY (Aring)},
-	{'^',  GDK_KEY (Udiaeresis)},
-	{'`',  GDK_KEY (adiaeresis)},
-	{'{',  GDK_KEY (ae)},
-	{'|',  GDK_KEY (oslash)},
-	{'}',  GDK_KEY (aring)},
-	{'~',  GDK_KEY (udiaeresis)},
+	{'@',  GDK_KEY_Adiaeresis},
+	{'[',  GDK_KEY_AE},
+	{'\\', GDK_KEY_Ooblique},
+	{']',  GDK_KEY_Aring},
+	{'^',  GDK_KEY_Udiaeresis},
+	{'`',  GDK_KEY_adiaeresis},
+	{'{',  GDK_KEY_ae},
+	{'|',  GDK_KEY_oslash},
+	{'}',  GDK_KEY_aring},
+	{'~',  GDK_KEY_udiaeresis},
 };
 /* Spanish. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_Z[] = {
-	{'#',  GDK_KEY (sterling)},
-	{'@',  GDK_KEY (section)},
-	{'[',  GDK_KEY (exclamdown)},
-	{'\\', GDK_KEY (Ntilde)},
-	{']',  GDK_KEY (questiondown)},
-	{'{',  GDK_KEY (degree)},
-	{'|',  GDK_KEY (ntilde)},
-	{'}',  GDK_KEY (ccedilla)},
+	{'#',  GDK_KEY_sterling},
+	{'@',  GDK_KEY_section},
+	{'[',  GDK_KEY_exclamdown},
+	{'\\', GDK_KEY_Ntilde},
+	{']',  GDK_KEY_questiondown},
+	{'{',  GDK_KEY_degree},
+	{'|',  GDK_KEY_ntilde},
+	{'}',  GDK_KEY_ccedilla},
 };
 /* Swedish. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_H[] = {
-	{'@',  GDK_KEY (Eacute)},
-	{'[',  GDK_KEY (Adiaeresis)},
-	{'\\', GDK_KEY (Odiaeresis)},
-	{']',  GDK_KEY (Aring)},
-	{'^',  GDK_KEY (Udiaeresis)},
-	{'`',  GDK_KEY (eacute)},
-	{'{',  GDK_KEY (adiaeresis)},
-	{'|',  GDK_KEY (odiaeresis)},
-	{'}',  GDK_KEY (aring)},
-	{'~',  GDK_KEY (udiaeresis)},
+	{'@',  GDK_KEY_Eacute},
+	{'[',  GDK_KEY_Adiaeresis},
+	{'\\', GDK_KEY_Odiaeresis},
+	{']',  GDK_KEY_Aring},
+	{'^',  GDK_KEY_Udiaeresis},
+	{'`',  GDK_KEY_eacute},
+	{'{',  GDK_KEY_adiaeresis},
+	{'|',  GDK_KEY_odiaeresis},
+	{'}',  GDK_KEY_aring},
+	{'~',  GDK_KEY_udiaeresis},
 };
 /* Swiss. VT220 and higher (per XTerm docs). */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_equal[] = {
-	{'#',  GDK_KEY (ugrave)},
-	{'@',  GDK_KEY (agrave)},
-	{'[',  GDK_KEY (eacute)},
-	{'\\', GDK_KEY (ccedilla)},
-	{']',  GDK_KEY (ecircumflex)},
-	{'^',  GDK_KEY (icircumflex)},
-	{'_',  GDK_KEY (egrave)},
-	{'`',  GDK_KEY (ocircumflex)},
-	{'{',  GDK_KEY (adiaeresis)},
-	{'|',  GDK_KEY (odiaeresis)},
-	{'}',  GDK_KEY (udiaeresis)},
-	{'~',  GDK_KEY (ucircumflex)},
+	{'#',  GDK_KEY_ugrave},
+	{'@',  GDK_KEY_agrave},
+	{'[',  GDK_KEY_eacute},
+	{'\\', GDK_KEY_ccedilla},
+	{']',  GDK_KEY_ecircumflex},
+	{'^',  GDK_KEY_icircumflex},
+	{'_',  GDK_KEY_egrave},
+	{'`',  GDK_KEY_ocircumflex},
+	{'{',  GDK_KEY_adiaeresis},
+	{'|',  GDK_KEY_odiaeresis},
+	{'}',  GDK_KEY_udiaeresis},
+	{'~',  GDK_KEY_ucircumflex},
 };
 /* Codepage 437. */
 static const struct _vte_iso2022_map16 _vte_iso2022_map_U[] = {
diff --git a/src/keymap.c b/src/keymap.c
index 9a21669..6c194a1 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -27,13 +27,6 @@
 #include "keymap.h"
 #include "vtetc.h"
 
-#if GTK_CHECK_VERSION (2, 90, 7)
-#define GDK_KEY(symbol) GDK_KEY_##symbol
-#else
-#include <gdk/gdkkeysyms.h>
-#define GDK_KEY(symbol) GDK_##symbol
-#endif
-
 #if defined(HAVE_NCURSES_H) && defined(HAVE_TERM_H)
 #include <ncurses.h>
 #include <term.h>
@@ -890,104 +883,104 @@ static const struct _vte_keymap_group {
 	guint keyval;
 	const struct _vte_keymap_entry *entries;
 } _vte_keymap[] = {
-	{GDK_KEY (space),		_vte_keymap_GDK_space},
-	{GDK_KEY (Return),		_vte_keymap_GDK_Return},
-	{GDK_KEY (Escape),		_vte_keymap_GDK_Escape},
-	{GDK_KEY (Tab),		        _vte_keymap_GDK_Tab},
-	{GDK_KEY (ISO_Left_Tab),	_vte_keymap_GDK_ISO_Left_Tab},
-	{GDK_KEY (Home),		_vte_keymap_GDK_Home},
-	{GDK_KEY (End),		        _vte_keymap_GDK_End},
-	{GDK_KEY (Insert),		_vte_keymap_GDK_Insert},
-	{GDK_KEY (slash),		_vte_keymap_GDK_slash},
-	{GDK_KEY (question),		_vte_keymap_GDK_question},
+	{GDK_KEY_space,		_vte_keymap_GDK_space},
+	{GDK_KEY_Return,		_vte_keymap_GDK_Return},
+	{GDK_KEY_Escape,		_vte_keymap_GDK_Escape},
+	{GDK_KEY_Tab,		        _vte_keymap_GDK_Tab},
+	{GDK_KEY_ISO_Left_Tab,	_vte_keymap_GDK_ISO_Left_Tab},
+	{GDK_KEY_Home,		_vte_keymap_GDK_Home},
+	{GDK_KEY_End,		        _vte_keymap_GDK_End},
+	{GDK_KEY_Insert,		_vte_keymap_GDK_Insert},
+	{GDK_KEY_slash,		_vte_keymap_GDK_slash},
+	{GDK_KEY_question,		_vte_keymap_GDK_question},
 	/* GDK_KEY (Delete is all handled in code), due to funkiness. */
-	{GDK_KEY (Page_Up),		_vte_keymap_GDK_Page_Up},
-	{GDK_KEY (Page_Down),		_vte_keymap_GDK_Page_Down},
-
-	{GDK_KEY (2),			_vte_keymap_GDK_2},
-	{GDK_KEY (3),			_vte_keymap_GDK_3},
-	{GDK_KEY (4),			_vte_keymap_GDK_4},
-	{GDK_KEY (5),			_vte_keymap_GDK_5},
-	{GDK_KEY (6),			_vte_keymap_GDK_6},
-	{GDK_KEY (7),			_vte_keymap_GDK_7},
-	{GDK_KEY (8),			_vte_keymap_GDK_8},
-	{GDK_KEY (minus),		_vte_keymap_GDK_Minus},
-
-	{GDK_KEY (Up),		_vte_keymap_GDK_Up},
-	{GDK_KEY (Down),		_vte_keymap_GDK_Down},
-	{GDK_KEY (Right),		_vte_keymap_GDK_Right},
-	{GDK_KEY (Left),		_vte_keymap_GDK_Left},
-
-	{GDK_KEY (KP_Space),		_vte_keymap_GDK_KP_Space},
-	{GDK_KEY (KP_Tab),		_vte_keymap_GDK_KP_Tab},
-	{GDK_KEY (KP_Enter),		_vte_keymap_GDK_KP_Enter},
-	{GDK_KEY (KP_F1),		_vte_keymap_GDK_KP_F1},
-	{GDK_KEY (KP_F2),		_vte_keymap_GDK_KP_F2},
-	{GDK_KEY (KP_F3),		_vte_keymap_GDK_KP_F3},
-	{GDK_KEY (KP_F4),		_vte_keymap_GDK_KP_F4},
-	{GDK_KEY (KP_Multiply),	_vte_keymap_GDK_KP_Multiply},
-	{GDK_KEY (KP_Add),		_vte_keymap_GDK_KP_Add},
-	{GDK_KEY (KP_Separator),	_vte_keymap_GDK_KP_Separator},
-	{GDK_KEY (KP_Subtract),	_vte_keymap_GDK_KP_Subtract},
-	{GDK_KEY (KP_Decimal),	_vte_keymap_GDK_KP_Decimal_Delete},
-	{GDK_KEY (KP_Delete),		_vte_keymap_GDK_KP_Decimal_Delete},
-	{GDK_KEY (KP_Divide),		_vte_keymap_GDK_KP_Divide},
-	{GDK_KEY (KP_0),		_vte_keymap_GDK_KP_0},
-	{GDK_KEY (KP_Insert),		_vte_keymap_GDK_KP_Insert},
-	{GDK_KEY (KP_1),		_vte_keymap_GDK_KP_1},
-	{GDK_KEY (KP_End),		_vte_keymap_GDK_KP_End},
-	{GDK_KEY (KP_2),		_vte_keymap_GDK_KP_2},
-	{GDK_KEY (KP_Down),		_vte_keymap_GDK_KP_Down},
-	{GDK_KEY (KP_3),		_vte_keymap_GDK_KP_3},
-	{GDK_KEY (KP_Page_Down),	_vte_keymap_GDK_KP_Page_Down},
-	{GDK_KEY (KP_4),		_vte_keymap_GDK_KP_4},
-	{GDK_KEY (KP_Left),		_vte_keymap_GDK_KP_Left},
-	{GDK_KEY (KP_5),		_vte_keymap_GDK_KP_5},
-	{GDK_KEY (KP_Begin),		_vte_keymap_GDK_KP_Begin},
-	{GDK_KEY (KP_6),		_vte_keymap_GDK_KP_6},
-	{GDK_KEY (KP_Right),		_vte_keymap_GDK_KP_Right},
-	{GDK_KEY (KP_7),		_vte_keymap_GDK_KP_7},
-	{GDK_KEY (KP_Home),		_vte_keymap_GDK_KP_Home},
-	{GDK_KEY (KP_8),		_vte_keymap_GDK_KP_8},
-	{GDK_KEY (KP_Up),		_vte_keymap_GDK_KP_Up},
-	{GDK_KEY (KP_9),		_vte_keymap_GDK_KP_9},
-	{GDK_KEY (KP_Page_Up),	_vte_keymap_GDK_KP_Page_Up},
-
-	{GDK_KEY (F1),		_vte_keymap_GDK_F1},
-	{GDK_KEY (F2),		_vte_keymap_GDK_F2},
-	{GDK_KEY (F3),		_vte_keymap_GDK_F3},
-	{GDK_KEY (F4),		_vte_keymap_GDK_F4},
-	{GDK_KEY (F5),		_vte_keymap_GDK_F5},
-	{GDK_KEY (F6),		_vte_keymap_GDK_F6},
-	{GDK_KEY (F7),		_vte_keymap_GDK_F7},
-	{GDK_KEY (F8),		_vte_keymap_GDK_F8},
-	{GDK_KEY (F9),		_vte_keymap_GDK_F9},
-	{GDK_KEY (F10),		_vte_keymap_GDK_F10},
-	{GDK_KEY (F11),		_vte_keymap_GDK_F11},
-	{GDK_KEY (F12),		_vte_keymap_GDK_F12},
-	{GDK_KEY (F13),		_vte_keymap_GDK_F13},
-	{GDK_KEY (F14),		_vte_keymap_GDK_F14},
-	{GDK_KEY (F15),		_vte_keymap_GDK_F15},
-	{GDK_KEY (F16),		_vte_keymap_GDK_F16},
-	{GDK_KEY (F17),		_vte_keymap_GDK_F17},
-	{GDK_KEY (F18),		_vte_keymap_GDK_F18},
-	{GDK_KEY (F19),		_vte_keymap_GDK_F19},
-	{GDK_KEY (F20),		_vte_keymap_GDK_F20},
-	{GDK_KEY (F21),		_vte_keymap_GDK_F21},
-	{GDK_KEY (F22),		_vte_keymap_GDK_F22},
-	{GDK_KEY (F23),		_vte_keymap_GDK_F23},
-	{GDK_KEY (F24),		_vte_keymap_GDK_F24},
-	{GDK_KEY (F25),		_vte_keymap_GDK_F25},
-	{GDK_KEY (F26),		_vte_keymap_GDK_F26},
-	{GDK_KEY (F27),		_vte_keymap_GDK_F27},
-	{GDK_KEY (F28),		_vte_keymap_GDK_F28},
-	{GDK_KEY (F29),		_vte_keymap_GDK_F29},
-	{GDK_KEY (F30),		_vte_keymap_GDK_F30},
-	{GDK_KEY (F31),		_vte_keymap_GDK_F31},
-	{GDK_KEY (F32),		_vte_keymap_GDK_F32},
-	{GDK_KEY (F33),		_vte_keymap_GDK_F33},
-	{GDK_KEY (F34),		_vte_keymap_GDK_F34},
-	{GDK_KEY (F35),		_vte_keymap_GDK_F35},
+	{GDK_KEY_Page_Up,		_vte_keymap_GDK_Page_Up},
+	{GDK_KEY_Page_Down,		_vte_keymap_GDK_Page_Down},
+
+	{GDK_KEY_2,			_vte_keymap_GDK_2},
+	{GDK_KEY_3,			_vte_keymap_GDK_3},
+	{GDK_KEY_4,			_vte_keymap_GDK_4},
+	{GDK_KEY_5,			_vte_keymap_GDK_5},
+	{GDK_KEY_6,			_vte_keymap_GDK_6},
+	{GDK_KEY_7,			_vte_keymap_GDK_7},
+	{GDK_KEY_8,			_vte_keymap_GDK_8},
+	{GDK_KEY_minus,		_vte_keymap_GDK_Minus},
+
+	{GDK_KEY_Up,		_vte_keymap_GDK_Up},
+	{GDK_KEY_Down,		_vte_keymap_GDK_Down},
+	{GDK_KEY_Right,		_vte_keymap_GDK_Right},
+	{GDK_KEY_Left,		_vte_keymap_GDK_Left},
+
+	{GDK_KEY_KP_Space,		_vte_keymap_GDK_KP_Space},
+	{GDK_KEY_KP_Tab,		_vte_keymap_GDK_KP_Tab},
+	{GDK_KEY_KP_Enter,		_vte_keymap_GDK_KP_Enter},
+	{GDK_KEY_KP_F1,		_vte_keymap_GDK_KP_F1},
+	{GDK_KEY_KP_F2,		_vte_keymap_GDK_KP_F2},
+	{GDK_KEY_KP_F3,		_vte_keymap_GDK_KP_F3},
+	{GDK_KEY_KP_F4,		_vte_keymap_GDK_KP_F4},
+	{GDK_KEY_KP_Multiply,	_vte_keymap_GDK_KP_Multiply},
+	{GDK_KEY_KP_Add,		_vte_keymap_GDK_KP_Add},
+	{GDK_KEY_KP_Separator,	_vte_keymap_GDK_KP_Separator},
+	{GDK_KEY_KP_Subtract,	_vte_keymap_GDK_KP_Subtract},
+	{GDK_KEY_KP_Decimal,	_vte_keymap_GDK_KP_Decimal_Delete},
+	{GDK_KEY_KP_Delete,		_vte_keymap_GDK_KP_Decimal_Delete},
+	{GDK_KEY_KP_Divide,		_vte_keymap_GDK_KP_Divide},
+	{GDK_KEY_KP_0,		_vte_keymap_GDK_KP_0},
+	{GDK_KEY_KP_Insert,		_vte_keymap_GDK_KP_Insert},
+	{GDK_KEY_KP_1,		_vte_keymap_GDK_KP_1},
+	{GDK_KEY_KP_End,		_vte_keymap_GDK_KP_End},
+	{GDK_KEY_KP_2,		_vte_keymap_GDK_KP_2},
+	{GDK_KEY_KP_Down,		_vte_keymap_GDK_KP_Down},
+	{GDK_KEY_KP_3,		_vte_keymap_GDK_KP_3},
+	{GDK_KEY_KP_Page_Down,	_vte_keymap_GDK_KP_Page_Down},
+	{GDK_KEY_KP_4,		_vte_keymap_GDK_KP_4},
+	{GDK_KEY_KP_Left,		_vte_keymap_GDK_KP_Left},
+	{GDK_KEY_KP_5,		_vte_keymap_GDK_KP_5},
+	{GDK_KEY_KP_Begin,		_vte_keymap_GDK_KP_Begin},
+	{GDK_KEY_KP_6,		_vte_keymap_GDK_KP_6},
+	{GDK_KEY_KP_Right,		_vte_keymap_GDK_KP_Right},
+	{GDK_KEY_KP_7,		_vte_keymap_GDK_KP_7},
+	{GDK_KEY_KP_Home,		_vte_keymap_GDK_KP_Home},
+	{GDK_KEY_KP_8,		_vte_keymap_GDK_KP_8},
+	{GDK_KEY_KP_Up,		_vte_keymap_GDK_KP_Up},
+	{GDK_KEY_KP_9,		_vte_keymap_GDK_KP_9},
+	{GDK_KEY_KP_Page_Up,	_vte_keymap_GDK_KP_Page_Up},
+
+	{GDK_KEY_F1,		_vte_keymap_GDK_F1},
+	{GDK_KEY_F2,		_vte_keymap_GDK_F2},
+	{GDK_KEY_F3,		_vte_keymap_GDK_F3},
+	{GDK_KEY_F4,		_vte_keymap_GDK_F4},
+	{GDK_KEY_F5,		_vte_keymap_GDK_F5},
+	{GDK_KEY_F6,		_vte_keymap_GDK_F6},
+	{GDK_KEY_F7,		_vte_keymap_GDK_F7},
+	{GDK_KEY_F8,		_vte_keymap_GDK_F8},
+	{GDK_KEY_F9,		_vte_keymap_GDK_F9},
+	{GDK_KEY_F10,		_vte_keymap_GDK_F10},
+	{GDK_KEY_F11,		_vte_keymap_GDK_F11},
+	{GDK_KEY_F12,		_vte_keymap_GDK_F12},
+	{GDK_KEY_F13,		_vte_keymap_GDK_F13},
+	{GDK_KEY_F14,		_vte_keymap_GDK_F14},
+	{GDK_KEY_F15,		_vte_keymap_GDK_F15},
+	{GDK_KEY_F16,		_vte_keymap_GDK_F16},
+	{GDK_KEY_F17,		_vte_keymap_GDK_F17},
+	{GDK_KEY_F18,		_vte_keymap_GDK_F18},
+	{GDK_KEY_F19,		_vte_keymap_GDK_F19},
+	{GDK_KEY_F20,		_vte_keymap_GDK_F20},
+	{GDK_KEY_F21,		_vte_keymap_GDK_F21},
+	{GDK_KEY_F22,		_vte_keymap_GDK_F22},
+	{GDK_KEY_F23,		_vte_keymap_GDK_F23},
+	{GDK_KEY_F24,		_vte_keymap_GDK_F24},
+	{GDK_KEY_F25,		_vte_keymap_GDK_F25},
+	{GDK_KEY_F26,		_vte_keymap_GDK_F26},
+	{GDK_KEY_F27,		_vte_keymap_GDK_F27},
+	{GDK_KEY_F28,		_vte_keymap_GDK_F28},
+	{GDK_KEY_F29,		_vte_keymap_GDK_F29},
+	{GDK_KEY_F30,		_vte_keymap_GDK_F30},
+	{GDK_KEY_F31,		_vte_keymap_GDK_F31},
+	{GDK_KEY_F32,		_vte_keymap_GDK_F32},
+	{GDK_KEY_F33,		_vte_keymap_GDK_F33},
+	{GDK_KEY_F34,		_vte_keymap_GDK_F34},
+	{GDK_KEY_F35,		_vte_keymap_GDK_F35},
 };
 
 /* Map the specified keyval/modifier setup, dependent on the mode, to either
@@ -1059,13 +1052,13 @@ _vte_keymap_map(guint keyval,
 			mods &= entries[j].mod_mask;
 		}
 		switch (_vte_keymap[i].keyval) {
-		case GDK_KEY (2):
-		case GDK_KEY (3):
-		case GDK_KEY (4):
-		case GDK_KEY (5):
-		case GDK_KEY (6):
-		case GDK_KEY (7):
-		case GDK_KEY (8):
+		case GDK_KEY_2:
+		case GDK_KEY_3:
+		case GDK_KEY_4:
+		case GDK_KEY_5:
+		case GDK_KEY_6:
+		case GDK_KEY_7:
+		case GDK_KEY_8:
 			/* Known non-full-coverage cases. */
 			break;
 		default:
@@ -1220,34 +1213,34 @@ _vte_keymap_key_is_modifier(guint keyval)
 	gboolean modifier = FALSE;
 	/* Determine if this is just a modifier key. */
 	switch (keyval) {
-	case GDK_KEY (Alt_L):
-	case GDK_KEY (Alt_R):
-	case GDK_KEY (Caps_Lock):
-	case GDK_KEY (Control_L):
-	case GDK_KEY (Control_R):
-	case GDK_KEY (Eisu_Shift):
-	case GDK_KEY (Hyper_L):
-	case GDK_KEY (Hyper_R):
-	case GDK_KEY (ISO_First_Group_Lock):
-	case GDK_KEY (ISO_Group_Lock):
-	case GDK_KEY (ISO_Group_Shift):
-	case GDK_KEY (ISO_Last_Group_Lock):
-	case GDK_KEY (ISO_Level3_Lock):
-	case GDK_KEY (ISO_Level3_Shift):
-	case GDK_KEY (ISO_Lock):
-	case GDK_KEY (ISO_Next_Group_Lock):
-	case GDK_KEY (ISO_Prev_Group_Lock):
-	case GDK_KEY (Kana_Lock):
-	case GDK_KEY (Kana_Shift):
-	case GDK_KEY (Meta_L):
-	case GDK_KEY (Meta_R):
-	case GDK_KEY (Num_Lock):
-	case GDK_KEY (Scroll_Lock):
-	case GDK_KEY (Shift_L):
-	case GDK_KEY (Shift_Lock):
-	case GDK_KEY (Shift_R):
-	case GDK_KEY (Super_L):
-	case GDK_KEY (Super_R):
+	case GDK_KEY_Alt_L:
+	case GDK_KEY_Alt_R:
+	case GDK_KEY_Caps_Lock:
+	case GDK_KEY_Control_L:
+	case GDK_KEY_Control_R:
+	case GDK_KEY_Eisu_Shift:
+	case GDK_KEY_Hyper_L:
+	case GDK_KEY_Hyper_R:
+	case GDK_KEY_ISO_First_Group_Lock:
+	case GDK_KEY_ISO_Group_Lock:
+	case GDK_KEY_ISO_Group_Shift:
+	case GDK_KEY_ISO_Last_Group_Lock:
+	case GDK_KEY_ISO_Level3_Lock:
+	case GDK_KEY_ISO_Level3_Shift:
+	case GDK_KEY_ISO_Lock:
+	case GDK_KEY_ISO_Next_Group_Lock:
+	case GDK_KEY_ISO_Prev_Group_Lock:
+	case GDK_KEY_Kana_Lock:
+	case GDK_KEY_Kana_Shift:
+	case GDK_KEY_Meta_L:
+	case GDK_KEY_Meta_R:
+	case GDK_KEY_Num_Lock:
+	case GDK_KEY_Scroll_Lock:
+	case GDK_KEY_Shift_L:
+	case GDK_KEY_Shift_Lock:
+	case GDK_KEY_Shift_R:
+	case GDK_KEY_Super_L:
+	case GDK_KEY_Super_R:
 		modifier = TRUE;
 		break;
 	default:
@@ -1263,57 +1256,57 @@ _vte_keymap_key_gets_modifiers(guint keyval)
 	gboolean fkey = FALSE;
 	/* Determine if this key gets modifiers. */
 	switch (keyval) {
-	case GDK_KEY (Up):
-	case GDK_KEY (Down):
-	case GDK_KEY (Left):
-	case GDK_KEY (Right):
-	case GDK_KEY (Insert):
-	case GDK_KEY (Delete):
-	case GDK_KEY (Page_Up):
-	case GDK_KEY (Page_Down):
-	case GDK_KEY (KP_Up):
-	case GDK_KEY (KP_Down):
-	case GDK_KEY (KP_Left):
-	case GDK_KEY (KP_Right):
-	case GDK_KEY (KP_Insert):
-	case GDK_KEY (KP_Delete):
-	case GDK_KEY (KP_Page_Up):
-	case GDK_KEY (KP_Page_Down):
-	case GDK_KEY (F1):
-	case GDK_KEY (F2):
-	case GDK_KEY (F3):
-	case GDK_KEY (F4):
-	case GDK_KEY (F5):
-	case GDK_KEY (F6):
-	case GDK_KEY (F7):
-	case GDK_KEY (F8):
-	case GDK_KEY (F9):
-	case GDK_KEY (F10):
-	case GDK_KEY (F11):
-	case GDK_KEY (F12):
-	case GDK_KEY (F13):
-	case GDK_KEY (F14):
-	case GDK_KEY (F15):
-	case GDK_KEY (F16):
-	case GDK_KEY (F17):
-	case GDK_KEY (F18):
-	case GDK_KEY (F19):
-	case GDK_KEY (F20):
-	case GDK_KEY (F21):
-	case GDK_KEY (F22):
-	case GDK_KEY (F23):
-	case GDK_KEY (F24):
-	case GDK_KEY (F25):
-	case GDK_KEY (F26):
-	case GDK_KEY (F27):
-	case GDK_KEY (F28):
-	case GDK_KEY (F29):
-	case GDK_KEY (F30):
-	case GDK_KEY (F31):
-	case GDK_KEY (F32):
-	case GDK_KEY (F33):
-	case GDK_KEY (F34):
-	case GDK_KEY (F35):
+	case GDK_KEY_Up:
+	case GDK_KEY_Down:
+	case GDK_KEY_Left:
+	case GDK_KEY_Right:
+	case GDK_KEY_Insert:
+	case GDK_KEY_Delete:
+	case GDK_KEY_Page_Up:
+	case GDK_KEY_Page_Down:
+	case GDK_KEY_KP_Up:
+	case GDK_KEY_KP_Down:
+	case GDK_KEY_KP_Left:
+	case GDK_KEY_KP_Right:
+	case GDK_KEY_KP_Insert:
+	case GDK_KEY_KP_Delete:
+	case GDK_KEY_KP_Page_Up:
+	case GDK_KEY_KP_Page_Down:
+	case GDK_KEY_F1:
+	case GDK_KEY_F2:
+	case GDK_KEY_F3:
+	case GDK_KEY_F4:
+	case GDK_KEY_F5:
+	case GDK_KEY_F6:
+	case GDK_KEY_F7:
+	case GDK_KEY_F8:
+	case GDK_KEY_F9:
+	case GDK_KEY_F10:
+	case GDK_KEY_F11:
+	case GDK_KEY_F12:
+	case GDK_KEY_F13:
+	case GDK_KEY_F14:
+	case GDK_KEY_F15:
+	case GDK_KEY_F16:
+	case GDK_KEY_F17:
+	case GDK_KEY_F18:
+	case GDK_KEY_F19:
+	case GDK_KEY_F20:
+	case GDK_KEY_F21:
+	case GDK_KEY_F22:
+	case GDK_KEY_F23:
+	case GDK_KEY_F24:
+	case GDK_KEY_F25:
+	case GDK_KEY_F26:
+	case GDK_KEY_F27:
+	case GDK_KEY_F28:
+	case GDK_KEY_F29:
+	case GDK_KEY_F30:
+	case GDK_KEY_F31:
+	case GDK_KEY_F32:
+	case GDK_KEY_F33:
+	case GDK_KEY_F34:
+	case GDK_KEY_F35:
 		fkey = TRUE;
 		break;
 	default:
@@ -1328,19 +1321,19 @@ static gboolean
 is_cursor_key(guint keyval)
 {
 	switch (keyval) {
-	case GDK_KEY (Home):
-	case GDK_KEY (Left):
-	case GDK_KEY (Up):
-	case GDK_KEY (Right):
-	case GDK_KEY (Down):
-	case GDK_KEY (End):
-
-	case GDK_KEY (KP_Home):
-	case GDK_KEY (KP_Left):
-	case GDK_KEY (KP_Up):
-	case GDK_KEY (KP_Right):
-	case GDK_KEY (KP_Down):
-	case GDK_KEY (KP_End):
+	case GDK_KEY_Home:
+	case GDK_KEY_Left:
+	case GDK_KEY_Up:
+	case GDK_KEY_Right:
+	case GDK_KEY_Down:
+	case GDK_KEY_End:
+
+	case GDK_KEY_KP_Home:
+	case GDK_KEY_KP_Left:
+	case GDK_KEY_KP_Up:
+	case GDK_KEY_KP_Right:
+	case GDK_KEY_KP_Down:
+	case GDK_KEY_KP_End:
 		return TRUE;
 	default:
 		return FALSE;
diff --git a/src/vte.c b/src/vte.c
index af8c87b..b110957 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -62,13 +62,6 @@
 #include <locale.h>
 #endif
 
-#if GTK_CHECK_VERSION (2, 90, 7)
-#define GDK_KEY(symbol) GDK_KEY_##symbol
-#else
-#include <gdk/gdkkeysyms.h>
-#define GDK_KEY(symbol) GDK_##symbol
-#endif
-
 #ifndef HAVE_WINT_T
 typedef gunichar wint_t;
 #endif
@@ -4748,11 +4741,11 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 		/* We steal many keypad keys here. */
 		if (!terminal->pvt->im_preedit_active) {
 			switch (keyval) {
-			case GDK_KEY (KP_Add):
-			case GDK_KEY (KP_Subtract):
-			case GDK_KEY (KP_Multiply):
-			case GDK_KEY (KP_Divide):
-			case GDK_KEY (KP_Enter):
+			case GDK_KEY_KP_Add:
+			case GDK_KEY_KP_Subtract:
+			case GDK_KEY_KP_Multiply:
+			case GDK_KEY_KP_Divide:
+			case GDK_KEY_KP_Enter:
 				steal = TRUE;
 				break;
 			default:
@@ -4762,27 +4755,27 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 				steal = TRUE;
 			}
 			switch (keyval) {
-			case GDK_KEY (Multi_key):
-			case GDK_KEY (Codeinput):
-			case GDK_KEY (SingleCandidate):
-			case GDK_KEY (MultipleCandidate):
-			case GDK_KEY (PreviousCandidate):
-			case GDK_KEY (Kanji):
-			case GDK_KEY (Muhenkan):
-			case GDK_KEY (Henkan):
-			case GDK_KEY (Romaji):
-			case GDK_KEY (Hiragana):
-			case GDK_KEY (Katakana):
-			case GDK_KEY (Hiragana_Katakana):
-			case GDK_KEY (Zenkaku):
-			case GDK_KEY (Hankaku):
-			case GDK_KEY (Zenkaku_Hankaku):
-			case GDK_KEY (Touroku):
-			case GDK_KEY (Massyo):
-			case GDK_KEY (Kana_Lock):
-			case GDK_KEY (Kana_Shift):
-			case GDK_KEY (Eisu_Shift):
-			case GDK_KEY (Eisu_toggle):
+			case GDK_KEY_Multi_key:
+			case GDK_KEY_Codeinput:
+			case GDK_KEY_SingleCandidate:
+			case GDK_KEY_MultipleCandidate:
+			case GDK_KEY_PreviousCandidate:
+			case GDK_KEY_Kanji:
+			case GDK_KEY_Muhenkan:
+			case GDK_KEY_Henkan:
+			case GDK_KEY_Romaji:
+			case GDK_KEY_Hiragana:
+			case GDK_KEY_Katakana:
+			case GDK_KEY_Hiragana_Katakana:
+			case GDK_KEY_Zenkaku:
+			case GDK_KEY_Hankaku:
+			case GDK_KEY_Zenkaku_Hankaku:
+			case GDK_KEY_Touroku:
+			case GDK_KEY_Massyo:
+			case GDK_KEY_Kana_Lock:
+			case GDK_KEY_Kana_Shift:
+			case GDK_KEY_Eisu_Shift:
+			case GDK_KEY_Eisu_toggle:
 				steal = FALSE;
 				break;
 			default:
@@ -4808,7 +4801,7 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 		handled = FALSE;
 		/* Map the key to a sequence name if we can. */
 		switch (keyval) {
-		case GDK_KEY (BackSpace):
+		case GDK_KEY_BackSpace:
 			switch (terminal->pvt->backspace_binding) {
 			case VTE_ERASE_ASCII_BACKSPACE:
 				normal = g_strdup("");
@@ -4856,8 +4849,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 			}
 			handled = TRUE;
 			break;
-		case GDK_KEY (KP_Delete):
-		case GDK_KEY (Delete):
+		case GDK_KEY_KP_Delete:
+		case GDK_KEY_Delete:
 			switch (terminal->pvt->delete_binding) {
 			case VTE_ERASE_ASCII_BACKSPACE:
 				normal = g_strdup("\010");
@@ -4885,8 +4878,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 			handled = TRUE;
 			suppress_meta_esc = TRUE;
 			break;
-		case GDK_KEY (KP_Insert):
-		case GDK_KEY (Insert):
+		case GDK_KEY_KP_Insert:
+		case GDK_KEY_Insert:
 			if (modifiers & GDK_SHIFT_MASK) {
 				if (modifiers & GDK_CONTROL_MASK) {
 					vte_terminal_paste_clipboard(terminal);
@@ -4904,8 +4897,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 			}
 			break;
 		/* Keypad/motion keys. */
-		case GDK_KEY (KP_Up):
-		case GDK_KEY (Up):
+		case GDK_KEY_KP_Up:
+		case GDK_KEY_Up:
 			if (modifiers & GDK_CONTROL_MASK 
                             && modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_scroll_lines(terminal, -1);
@@ -4914,8 +4907,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 				suppress_meta_esc = TRUE;
 			}
 			break;
-		case GDK_KEY (KP_Down):
-		case GDK_KEY (Down):
+		case GDK_KEY_KP_Down:
+		case GDK_KEY_Down:
 			if (modifiers & GDK_CONTROL_MASK
                             && modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_scroll_lines(terminal, 1);
@@ -4924,8 +4917,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 				suppress_meta_esc = TRUE;
 			}
 			break;
-		case GDK_KEY (KP_Page_Up):
-		case GDK_KEY (Page_Up):
+		case GDK_KEY_KP_Page_Up:
+		case GDK_KEY_Page_Up:
 			if (modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_scroll_pages(terminal, -1);
 				scrolled = TRUE;
@@ -4933,8 +4926,8 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 				suppress_meta_esc = TRUE;
 			}
 			break;
-		case GDK_KEY (KP_Page_Down):
-		case GDK_KEY (Page_Down):
+		case GDK_KEY_KP_Page_Down:
+		case GDK_KEY_Page_Down:
 			if (modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_scroll_pages(terminal, 1);
 				scrolled = TRUE;
@@ -4942,16 +4935,16 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 				suppress_meta_esc = TRUE;
 			}
 			break;
-		case GDK_KEY (KP_Home):
-		case GDK_KEY (Home):
+		case GDK_KEY_KP_Home:
+		case GDK_KEY_Home:
 			if (modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_maybe_scroll_to_top(terminal);
 				scrolled = TRUE;
 				handled = TRUE;
 			}
 			break;
-		case GDK_KEY (KP_End):
-		case GDK_KEY (End):
+		case GDK_KEY_KP_End:
+		case GDK_KEY_End:
 			if (modifiers & GDK_SHIFT_MASK) {
 				vte_terminal_maybe_scroll_to_bottom(terminal);
 				scrolled = TRUE;
@@ -4959,17 +4952,17 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
 			}
 			break;
 		/* Let Shift +/- tweak the font, like XTerm does. */
-		case GDK_KEY (KP_Add):
-		case GDK_KEY (KP_Subtract):
+		case GDK_KEY_KP_Add:
+		case GDK_KEY_KP_Subtract:
 			if (modifiers &
 			    (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) {
 				switch (keyval) {
-				case GDK_KEY (KP_Add):
+				case GDK_KEY_KP_Add:
 					vte_terminal_emit_increase_font_size(terminal);
 					handled = TRUE;
 					suppress_meta_esc = TRUE;
 					break;
-				case GDK_KEY (KP_Subtract):
+				case GDK_KEY_KP_Subtract:
 					vte_terminal_emit_decrease_font_size(terminal);
 					handled = TRUE;
 					suppress_meta_esc = TRUE;
@@ -10846,7 +10839,7 @@ vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event)
 		 * so fake a few cursor keystrokes. */
 
 		_vte_keymap_map (
-				cnt > 0 ? GDK_KEY (Down) : GDK_KEY (Up),
+				cnt > 0 ? GDK_KEY_Down : GDK_KEY_Up,
 				terminal->pvt->modifiers,
 				terminal->pvt->sun_fkey_mode,
 				terminal->pvt->hp_fkey_mode,
@@ -12208,9 +12201,9 @@ vte_terminal_class_init(VteTerminalClass *klass)
 	binding_set = gtk_binding_set_by_class(klass);
 
 	/* Bind Copy, Paste, Cut keys */
-	gtk_binding_entry_add_signal(binding_set, GDK_KEY (F16), 0, "copy-clipboard",0);
-	gtk_binding_entry_add_signal(binding_set, GDK_KEY (F18), 0, "paste-clipboard", 0);
-	gtk_binding_entry_add_signal(binding_set, GDK_KEY (F20), 0, "copy-clipboard",0);
+	gtk_binding_entry_add_signal(binding_set, GDK_KEY_F16, 0, "copy-clipboard",0);
+	gtk_binding_entry_add_signal(binding_set, GDK_KEY_F18, 0, "paste-clipboard", 0);
+	gtk_binding_entry_add_signal(binding_set, GDK_KEY_F20, 0, "copy-clipboard",0);
 
 	process_timer = g_timer_new ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]