Commit ceca2ff1 authored by Tor Lillqvist's avatar Tor Lillqvist

Adapt to the GDK_KEY changes

parent 73ea777c
......@@ -98,5 +98,5 @@ gdk_keyval_from_name (const gchar *keyval_name)
if (found != NULL)
return found->keyval;
else
return GDK_VoidSymbol;
return GDK_KEY_VoidSymbol;
}
......@@ -125,7 +125,7 @@ gdk_keymap_init (GdkKeymap *keymap)
* @upper: (out): return location for uppercase version of @symbol
*
* Obtains the upper- and lower-case versions of the keyval @symbol.
* Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc.
* Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc.
*
**/
void
......@@ -149,101 +149,101 @@ gdk_keyval_convert_case (guint symbol,
switch (symbol >> 8)
{
case 0: /* Latin 1 */
if ((symbol >= GDK_A) && (symbol <= GDK_Z))
xlower += (GDK_a - GDK_A);
else if ((symbol >= GDK_a) && (symbol <= GDK_z))
xupper -= (GDK_a - GDK_A);
else if ((symbol >= GDK_Agrave) && (symbol <= GDK_Odiaeresis))
xlower += (GDK_agrave - GDK_Agrave);
else if ((symbol >= GDK_agrave) && (symbol <= GDK_odiaeresis))
xupper -= (GDK_agrave - GDK_Agrave);
else if ((symbol >= GDK_Ooblique) && (symbol <= GDK_Thorn))
xlower += (GDK_oslash - GDK_Ooblique);
else if ((symbol >= GDK_oslash) && (symbol <= GDK_thorn))
xupper -= (GDK_oslash - GDK_Ooblique);
if ((symbol >= GDK_KEY_A) && (symbol <= GDK_KEY_Z))
xlower += (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_a) && (symbol <= GDK_KEY_z))
xupper -= (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_Agrave) && (symbol <= GDK_KEY_Odiaeresis))
xlower += (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_agrave) && (symbol <= GDK_KEY_odiaeresis))
xupper -= (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_Ooblique) && (symbol <= GDK_KEY_Thorn))
xlower += (GDK_KEY_oslash - GDK_KEY_Ooblique);
else if ((symbol >= GDK_KEY_oslash) && (symbol <= GDK_KEY_thorn))
xupper -= (GDK_KEY_oslash - GDK_KEY_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_Aogonek)
xlower = GDK_aogonek;
else if (symbol >= GDK_Lstroke && symbol <= GDK_Sacute)
xlower += (GDK_lstroke - GDK_Lstroke);
else if (symbol >= GDK_Scaron && symbol <= GDK_Zacute)
xlower += (GDK_scaron - GDK_Scaron);
else if (symbol >= GDK_Zcaron && symbol <= GDK_Zabovedot)
xlower += (GDK_zcaron - GDK_Zcaron);
else if (symbol == GDK_aogonek)
xupper = GDK_Aogonek;
else if (symbol >= GDK_lstroke && symbol <= GDK_sacute)
xupper -= (GDK_lstroke - GDK_Lstroke);
else if (symbol >= GDK_scaron && symbol <= GDK_zacute)
xupper -= (GDK_scaron - GDK_Scaron);
else if (symbol >= GDK_zcaron && symbol <= GDK_zabovedot)
xupper -= (GDK_zcaron - GDK_Zcaron);
else if (symbol >= GDK_Racute && symbol <= GDK_Tcedilla)
xlower += (GDK_racute - GDK_Racute);
else if (symbol >= GDK_racute && symbol <= GDK_tcedilla)
xupper -= (GDK_racute - GDK_Racute);
if (symbol == GDK_KEY_Aogonek)
xlower = GDK_KEY_aogonek;
else if (symbol >= GDK_KEY_Lstroke && symbol <= GDK_KEY_Sacute)
xlower += (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_Scaron && symbol <= GDK_KEY_Zacute)
xlower += (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_Zcaron && symbol <= GDK_KEY_Zabovedot)
xlower += (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol == GDK_KEY_aogonek)
xupper = GDK_KEY_Aogonek;
else if (symbol >= GDK_KEY_lstroke && symbol <= GDK_KEY_sacute)
xupper -= (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_scaron && symbol <= GDK_KEY_zacute)
xupper -= (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_zcaron && symbol <= GDK_KEY_zabovedot)
xupper -= (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol >= GDK_KEY_Racute && symbol <= GDK_KEY_Tcedilla)
xlower += (GDK_KEY_racute - GDK_KEY_Racute);
else if (symbol >= GDK_KEY_racute && symbol <= GDK_KEY_tcedilla)
xupper -= (GDK_KEY_racute - GDK_KEY_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Hstroke && symbol <= GDK_Hcircumflex)
xlower += (GDK_hstroke - GDK_Hstroke);
else if (symbol >= GDK_Gbreve && symbol <= GDK_Jcircumflex)
xlower += (GDK_gbreve - GDK_Gbreve);
else if (symbol >= GDK_hstroke && symbol <= GDK_hcircumflex)
xupper -= (GDK_hstroke - GDK_Hstroke);
else if (symbol >= GDK_gbreve && symbol <= GDK_jcircumflex)
xupper -= (GDK_gbreve - GDK_Gbreve);
else if (symbol >= GDK_Cabovedot && symbol <= GDK_Scircumflex)
xlower += (GDK_cabovedot - GDK_Cabovedot);
else if (symbol >= GDK_cabovedot && symbol <= GDK_scircumflex)
xupper -= (GDK_cabovedot - GDK_Cabovedot);
if (symbol >= GDK_KEY_Hstroke && symbol <= GDK_KEY_Hcircumflex)
xlower += (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_Gbreve && symbol <= GDK_KEY_Jcircumflex)
xlower += (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_hstroke && symbol <= GDK_KEY_hcircumflex)
xupper -= (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_gbreve && symbol <= GDK_KEY_jcircumflex)
xupper -= (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_Cabovedot && symbol <= GDK_KEY_Scircumflex)
xlower += (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
else if (symbol >= GDK_KEY_cabovedot && symbol <= GDK_KEY_scircumflex)
xupper -= (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Rcedilla && symbol <= GDK_Tslash)
xlower += (GDK_rcedilla - GDK_Rcedilla);
else if (symbol >= GDK_rcedilla && symbol <= GDK_tslash)
xupper -= (GDK_rcedilla - GDK_Rcedilla);
else if (symbol == GDK_ENG)
xlower = GDK_eng;
else if (symbol == GDK_eng)
xupper = GDK_ENG;
else if (symbol >= GDK_Amacron && symbol <= GDK_Umacron)
xlower += (GDK_amacron - GDK_Amacron);
else if (symbol >= GDK_amacron && symbol <= GDK_umacron)
xupper -= (GDK_amacron - GDK_Amacron);
if (symbol >= GDK_KEY_Rcedilla && symbol <= GDK_KEY_Tslash)
xlower += (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol >= GDK_KEY_rcedilla && symbol <= GDK_KEY_tslash)
xupper -= (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol == GDK_KEY_ENG)
xlower = GDK_KEY_eng;
else if (symbol == GDK_KEY_eng)
xupper = GDK_KEY_ENG;
else if (symbol >= GDK_KEY_Amacron && symbol <= GDK_KEY_Umacron)
xlower += (GDK_KEY_amacron - GDK_KEY_Amacron);
else if (symbol >= GDK_KEY_amacron && symbol <= GDK_KEY_umacron)
xupper -= (GDK_KEY_amacron - GDK_KEY_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Serbian_DJE && symbol <= GDK_Serbian_DZE)
xlower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (symbol >= GDK_Serbian_dje && symbol <= GDK_Serbian_dze)
xupper += (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (symbol >= GDK_Cyrillic_YU && symbol <= GDK_Cyrillic_HARDSIGN)
xlower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
else if (symbol >= GDK_Cyrillic_yu && symbol <= GDK_Cyrillic_hardsign)
xupper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
if (symbol >= GDK_KEY_Serbian_DJE && symbol <= GDK_KEY_Serbian_DZE)
xlower -= (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Serbian_dje && symbol <= GDK_KEY_Serbian_dze)
xupper += (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Cyrillic_YU && symbol <= GDK_KEY_Cyrillic_HARDSIGN)
xlower -= (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
else if (symbol >= GDK_KEY_Cyrillic_yu && symbol <= GDK_KEY_Cyrillic_hardsign)
xupper += (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_Greek_ALPHAaccent && symbol <= GDK_Greek_OMEGAaccent)
xlower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (symbol >= GDK_Greek_alphaaccent && symbol <= GDK_Greek_omegaaccent &&
symbol != GDK_Greek_iotaaccentdieresis &&
symbol != GDK_Greek_upsilonaccentdieresis)
xupper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (symbol >= GDK_Greek_ALPHA && symbol <= GDK_Greek_OMEGA)
xlower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
else if (symbol >= GDK_Greek_alpha && symbol <= GDK_Greek_omega &&
symbol != GDK_Greek_finalsmallsigma)
xupper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
if (symbol >= GDK_KEY_Greek_ALPHAaccent && symbol <= GDK_KEY_Greek_OMEGAaccent)
xlower += (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_alphaaccent && symbol <= GDK_KEY_Greek_omegaaccent &&
symbol != GDK_KEY_Greek_iotaaccentdieresis &&
symbol != GDK_KEY_Greek_upsilonaccentdieresis)
xupper -= (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_ALPHA && symbol <= GDK_KEY_Greek_OMEGA)
xlower += (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
else if (symbol >= GDK_KEY_Greek_alpha && symbol <= GDK_KEY_Greek_omega &&
symbol != GDK_KEY_Greek_finalsmallsigma)
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
break;
}
......
......@@ -966,7 +966,7 @@ fill_key_event_string (GdkEvent *event)
*/
c = 0;
if (event->key.keyval != GDK_VoidSymbol)
if (event->key.keyval != GDK_KEY_VoidSymbol)
c = gdk_keyval_to_unicode (event->key.keyval);
if (c)
......@@ -1003,13 +1003,13 @@ fill_key_event_string (GdkEvent *event)
if (event->key.string)
event->key.length = bytes_written;
}
else if (event->key.keyval == GDK_Escape)
else if (event->key.keyval == GDK_KEY_Escape)
{
event->key.length = 1;
event->key.string = g_strdup ("\033");
}
else if (event->key.keyval == GDK_Return ||
event->key.keyval == GDK_KP_Enter)
else if (event->key.keyval == GDK_KEY_Return ||
event->key.keyval == GDK_KEY_KP_Enter)
{
event->key.length = 1;
event->key.string = g_strdup ("\r");
......@@ -2063,7 +2063,7 @@ gdk_event_translate (MSG *msg,
GDK_KEY_PRESS : GDK_KEY_RELEASE);
event->key.window = window;
event->key.time = _gdk_win32_get_next_tick (msg->time);
event->key.keyval = GDK_VoidSymbol;
event->key.keyval = GDK_KEY_VoidSymbol;
event->key.string = NULL;
event->key.length = 0;
event->key.hardware_keycode = msg->wParam;
......
......@@ -83,154 +83,154 @@ handle_special (guint vk,
switch (vk)
{
case VK_CANCEL:
*ksymp = GDK_Cancel; break;
*ksymp = GDK_KEY_Cancel; break;
case VK_BACK:
*ksymp = GDK_BackSpace; break;
*ksymp = GDK_KEY_BackSpace; break;
case VK_TAB:
if (shift & 0x1)
*ksymp = GDK_ISO_Left_Tab;
*ksymp = GDK_KEY_ISO_Left_Tab;
else
*ksymp = GDK_Tab;
*ksymp = GDK_KEY_Tab;
break;
case VK_CLEAR:
*ksymp = GDK_Clear; break;
*ksymp = GDK_KEY_Clear; break;
case VK_RETURN:
*ksymp = GDK_Return; break;
*ksymp = GDK_KEY_Return; break;
case VK_SHIFT:
case VK_LSHIFT:
*ksymp = GDK_Shift_L; break;
*ksymp = GDK_KEY_Shift_L; break;
case VK_CONTROL:
case VK_LCONTROL:
*ksymp = GDK_Control_L; break;
*ksymp = GDK_KEY_Control_L; break;
case VK_MENU:
case VK_LMENU:
*ksymp = GDK_Alt_L; break;
*ksymp = GDK_KEY_Alt_L; break;
case VK_PAUSE:
*ksymp = GDK_Pause; break;
*ksymp = GDK_KEY_Pause; break;
case VK_ESCAPE:
*ksymp = GDK_Escape; break;
*ksymp = GDK_KEY_Escape; break;
case VK_PRIOR:
*ksymp = GDK_Prior; break;
*ksymp = GDK_KEY_Prior; break;
case VK_NEXT:
*ksymp = GDK_Next; break;
*ksymp = GDK_KEY_Next; break;
case VK_END:
*ksymp = GDK_End; break;
*ksymp = GDK_KEY_End; break;
case VK_HOME:
*ksymp = GDK_Home; break;
*ksymp = GDK_KEY_Home; break;
case VK_LEFT:
*ksymp = GDK_Left; break;
*ksymp = GDK_KEY_Left; break;
case VK_UP:
*ksymp = GDK_Up; break;
*ksymp = GDK_KEY_Up; break;
case VK_RIGHT:
*ksymp = GDK_Right; break;
*ksymp = GDK_KEY_Right; break;
case VK_DOWN:
*ksymp = GDK_Down; break;
*ksymp = GDK_KEY_Down; break;
case VK_SELECT:
*ksymp = GDK_Select; break;
*ksymp = GDK_KEY_Select; break;
case VK_PRINT:
*ksymp = GDK_Print; break;
*ksymp = GDK_KEY_Print; break;
case VK_EXECUTE:
*ksymp = GDK_Execute; break;
*ksymp = GDK_KEY_Execute; break;
case VK_INSERT:
*ksymp = GDK_Insert; break;
*ksymp = GDK_KEY_Insert; break;
case VK_DELETE:
*ksymp = GDK_Delete; break;
*ksymp = GDK_KEY_Delete; break;
case VK_HELP:
*ksymp = GDK_Help; break;
*ksymp = GDK_KEY_Help; break;
case VK_LWIN:
*ksymp = GDK_Meta_L; break;
*ksymp = GDK_KEY_Meta_L; break;
case VK_RWIN:
*ksymp = GDK_Meta_R; break;
*ksymp = GDK_KEY_Meta_R; break;
case VK_APPS:
*ksymp = GDK_Menu; break;
*ksymp = GDK_KEY_Menu; break;
case VK_MULTIPLY:
*ksymp = GDK_KP_Multiply; break;
*ksymp = GDK_KEY_KP_Multiply; break;
case VK_ADD:
*ksymp = GDK_KP_Add; break;
*ksymp = GDK_KEY_KP_Add; break;
case VK_SEPARATOR:
*ksymp = GDK_KP_Separator; break;
*ksymp = GDK_KEY_KP_Separator; break;
case VK_SUBTRACT:
*ksymp = GDK_KP_Subtract; break;
*ksymp = GDK_KEY_KP_Subtract; break;
case VK_DIVIDE:
*ksymp = GDK_KP_Divide; break;
*ksymp = GDK_KEY_KP_Divide; break;
case VK_NUMPAD0:
*ksymp = GDK_KP_0; break;
*ksymp = GDK_KEY_KP_0; break;
case VK_NUMPAD1:
*ksymp = GDK_KP_1; break;
*ksymp = GDK_KEY_KP_1; break;
case VK_NUMPAD2:
*ksymp = GDK_KP_2; break;
*ksymp = GDK_KEY_KP_2; break;
case VK_NUMPAD3:
*ksymp = GDK_KP_3; break;
*ksymp = GDK_KEY_KP_3; break;
case VK_NUMPAD4:
*ksymp = GDK_KP_4; break;
*ksymp = GDK_KEY_KP_4; break;
case VK_NUMPAD5:
*ksymp = GDK_KP_5; break;
*ksymp = GDK_KEY_KP_5; break;
case VK_NUMPAD6:
*ksymp = GDK_KP_6; break;
*ksymp = GDK_KEY_KP_6; break;
case VK_NUMPAD7:
*ksymp = GDK_KP_7; break;
*ksymp = GDK_KEY_KP_7; break;
case VK_NUMPAD8:
*ksymp = GDK_KP_8; break;
*ksymp = GDK_KEY_KP_8; break;
case VK_NUMPAD9:
*ksymp = GDK_KP_9; break;
*ksymp = GDK_KEY_KP_9; break;
case VK_F1:
*ksymp = GDK_F1; break;
*ksymp = GDK_KEY_F1; break;
case VK_F2:
*ksymp = GDK_F2; break;
*ksymp = GDK_KEY_F2; break;
case VK_F3:
*ksymp = GDK_F3; break;
*ksymp = GDK_KEY_F3; break;
case VK_F4:
*ksymp = GDK_F4; break;
*ksymp = GDK_KEY_F4; break;
case VK_F5:
*ksymp = GDK_F5; break;
*ksymp = GDK_KEY_F5; break;
case VK_F6:
*ksymp = GDK_F6; break;
*ksymp = GDK_KEY_F6; break;
case VK_F7:
*ksymp = GDK_F7; break;
*ksymp = GDK_KEY_F7; break;
case VK_F8:
*ksymp = GDK_F8; break;
*ksymp = GDK_KEY_F8; break;
case VK_F9:
*ksymp = GDK_F9; break;
*ksymp = GDK_KEY_F9; break;
case VK_F10:
*ksymp = GDK_F10; break;
*ksymp = GDK_KEY_F10; break;
case VK_F11:
*ksymp = GDK_F11; break;
*ksymp = GDK_KEY_F11; break;
case VK_F12:
*ksymp = GDK_F12; break;
*ksymp = GDK_KEY_F12; break;
case VK_F13:
*ksymp = GDK_F13; break;
*ksymp = GDK_KEY_F13; break;
case VK_F14:
*ksymp = GDK_F14; break;
*ksymp = GDK_KEY_F14; break;
case VK_F15:
*ksymp = GDK_F15; break;
*ksymp = GDK_KEY_F15; break;
case VK_F16:
*ksymp = GDK_F16; break;
*ksymp = GDK_KEY_F16; break;
case VK_F17:
*ksymp = GDK_F17; break;
*ksymp = GDK_KEY_F17; break;
case VK_F18:
*ksymp = GDK_F18; break;
*ksymp = GDK_KEY_F18; break;
case VK_F19:
*ksymp = GDK_F19; break;
*ksymp = GDK_KEY_F19; break;
case VK_F20:
*ksymp = GDK_F20; break;
*ksymp = GDK_KEY_F20; break;
case VK_F21:
*ksymp = GDK_F21; break;
*ksymp = GDK_KEY_F21; break;
case VK_F22:
*ksymp = GDK_F22; break;
*ksymp = GDK_KEY_F22; break;
case VK_F23:
*ksymp = GDK_F23; break;
*ksymp = GDK_KEY_F23; break;
case VK_F24:
*ksymp = GDK_F24; break;
*ksymp = GDK_KEY_F24; break;
case VK_NUMLOCK:
*ksymp = GDK_Num_Lock; break;
*ksymp = GDK_KEY_Num_Lock; break;
case VK_SCROLL:
*ksymp = GDK_Scroll_Lock; break;
*ksymp = GDK_KEY_Scroll_Lock; break;
case VK_RSHIFT:
*ksymp = GDK_Shift_R; break;
*ksymp = GDK_KEY_Shift_R; break;
case VK_RCONTROL:
*ksymp = GDK_Control_R; break;
*ksymp = GDK_KEY_Control_R; break;
case VK_RMENU:
*ksymp = GDK_Alt_R; break;
*ksymp = GDK_KEY_Alt_R; break;
}
}
......@@ -283,39 +283,39 @@ handle_dead (guint keysym,
switch (keysym)
{
case '"': /* 0x022 */
*ksymp = GDK_dead_diaeresis; break;
*ksymp = GDK_KEY_dead_diaeresis; break;
case '\'': /* 0x027 */
*ksymp = GDK_dead_acute; break;
case GDK_asciicircum: /* 0x05e */
*ksymp = GDK_dead_circumflex; break;
case GDK_grave: /* 0x060 */
*ksymp = GDK_dead_grave; break;
case GDK_asciitilde: /* 0x07e */
*ksymp = GDK_dead_tilde; break;
case GDK_diaeresis: /* 0x0a8 */
*ksymp = GDK_dead_diaeresis; break;
case GDK_degree: /* 0x0b0 */
*ksymp = GDK_dead_abovering; break;
case GDK_acute: /* 0x0b4 */
*ksymp = GDK_dead_acute; break;
case GDK_periodcentered: /* 0x0b7 */
*ksymp = GDK_dead_abovedot; break;
case GDK_cedilla: /* 0x0b8 */
*ksymp = GDK_dead_cedilla; break;
case GDK_breve: /* 0x1a2 */
*ksymp = GDK_dead_breve; break;
case GDK_ogonek: /* 0x1b2 */
*ksymp = GDK_dead_ogonek; break;
case GDK_caron: /* 0x1b7 */
*ksymp = GDK_dead_caron; break;
case GDK_doubleacute: /* 0x1bd */
*ksymp = GDK_dead_doubleacute; break;
case GDK_abovedot: /* 0x1ff */
*ksymp = GDK_dead_abovedot; break;
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_asciicircum: /* 0x05e */
*ksymp = GDK_KEY_dead_circumflex; break;
case GDK_KEY_grave: /* 0x060 */
*ksymp = GDK_KEY_dead_grave; break;
case GDK_KEY_asciitilde: /* 0x07e */
*ksymp = GDK_KEY_dead_tilde; break;
case GDK_KEY_diaeresis: /* 0x0a8 */
*ksymp = GDK_KEY_dead_diaeresis; break;
case GDK_KEY_degree: /* 0x0b0 */
*ksymp = GDK_KEY_dead_abovering; break;
case GDK_KEY_acute: /* 0x0b4 */
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_periodcentered: /* 0x0b7 */
*ksymp = GDK_KEY_dead_abovedot; break;
case GDK_KEY_cedilla: /* 0x0b8 */
*ksymp = GDK_KEY_dead_cedilla; break;
case GDK_KEY_breve: /* 0x1a2 */
*ksymp = GDK_KEY_dead_breve; break;
case GDK_KEY_ogonek: /* 0x1b2 */
*ksymp = GDK_KEY_dead_ogonek; break;
case GDK_KEY_caron: /* 0x1b7 */
*ksymp = GDK_KEY_dead_caron; break;
case GDK_KEY_doubleacute: /* 0x1bd */
*ksymp = GDK_KEY_dead_doubleacute; break;
case GDK_KEY_abovedot: /* 0x1ff */
*ksymp = GDK_KEY_dead_abovedot; break;
case 0x1000384: /* Greek tonos */
*ksymp = GDK_dead_acute; break;
case GDK_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_Greek_accentdieresis; break;
*ksymp = GDK_KEY_dead_acute; break;
case GDK_KEY_Greek_accentdieresis: /* 0x7ae */
*ksymp = GDK_KEY_Greek_accentdieresis; break;
default:
/* By default use the keysym as such. This takes care of for
* instance the dead U+09CD (BENGALI VIRAMA) on the ekushey
......@@ -354,7 +354,7 @@ update_keymap (void)
keysym_tab[vk*4+0] =
keysym_tab[vk*4+1] =
keysym_tab[vk*4+2] =
keysym_tab[vk*4+3] = GDK_VoidSymbol;
keysym_tab[vk*4+3] = GDK_KEY_VoidSymbol;
else
{
gint shift;
......@@ -434,7 +434,7 @@ update_keymap (void)
}
}
if (*ksymp == 0)
*ksymp = GDK_VoidSymbol;
*ksymp = GDK_KEY_VoidSymbol;
}
key_state[vk] = 0;
......@@ -442,9 +442,9 @@ update_keymap (void)
* the mapping with Control+Alt is different.
*/
if (!_gdk_keyboard_has_altgr)
if ((keysym_tab[vk*4 + 2] != GDK_VoidSymbol &&
if ((keysym_tab[vk*4 + 2] != GDK_KEY_VoidSymbol &&
keysym_tab[vk*4] != keysym_tab[vk*4 + 2]) ||
(keysym_tab[vk*4 + 3] != GDK_VoidSymbol &&
(keysym_tab[vk*4 + 3] != GDK_KEY_VoidSymbol &&
keysym_tab[vk*4 + 1] != keysym_tab[vk*4 + 3]))
_gdk_keyboard_has_altgr = TRUE;
......@@ -472,8 +472,8 @@ update_keymap (void)
if (ToAsciiEx (vk, scancode, key_state,
(LPWORD) chars, 0, _gdk_input_locale) == 1)
{
if (chars[0] >= GDK_space &&
chars[0] <= GDK_asciitilde &&
if (chars[0] >= GDK_KEY_space &&
chars[0] <= GDK_KEY_asciitilde &&
chars[0] == keysym_tab[vk*4 + 1])
{
/* CapsLock acts as ShiftLock */
......@@ -735,7 +735,7 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
sym = keysym_tab[key->keycode*4 + key->group*2 + key->level];
if (sym == GDK_VoidSymbol)
if (sym == GDK_KEY_VoidSymbol)
return 0;
else
return sym;
......@@ -804,23 +804,23 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
* the key for those.
*/
if (shift_level == 1 &&
keyvals[group*2 + 1] == GDK_VoidSymbol &&
keyvals[group*2] != GDK_VoidSymbol)
keyvals[group*2 + 1] == GDK_KEY_VoidSymbol &&
keyvals[group*2] != GDK_KEY_VoidSymbol)
{
shift_level = 0;
ignore_shift = TRUE;
}
if (group == 1 &&
keyvals[2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + shift_level] != GDK_VoidSymbol)
keyvals[2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + shift_level] != GDK_KEY_VoidSymbol)
{
group = 0;
ignore_group = TRUE;
}
if (keyvals[group *2 + shift_level] == GDK_VoidSymbol &&
keyvals[0 + 0] != GDK_VoidSymbol)
if (keyvals[group *2 + shift_level] == GDK_KEY_VoidSymbol &&
keyvals[0 + 0] != GDK_KEY_VoidSymbol)
{
shift_level = 0;
group = 0;
......@@ -831,11 +831,11 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
/* See whether the group and shift level actually mattered
* to know what to put in consumed_modifiers
*/
if (keyvals[group*2 + 1] == GDK_VoidSymbol ||
if (keyvals[group*2 + 1] == GDK_KEY_VoidSymbol ||
keyvals[group*2 + 0] == keyvals[group*2 + 1])
ignore_shift = TRUE;
if (keyvals[2 + shift_level] == GDK_VoidSymbol ||
if (keyvals[2 + shift_level] == GDK_KEY_VoidSymbol ||
keyvals[0 + shift_level] == keyvals[2 + shift_level])
ignore_group = TRUE;
......@@ -875,7 +875,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval)));
#endif
return tmp_keyval != GDK_VoidSymbol;
return tmp_keyval != GDK_KEY_VoidSymbol;
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment