From: caro Date: Sun, 20 Nov 2011 06:44:11 +0000 (+0000) Subject: Ecore_Win32: formatting X-Git-Tag: build/2012-07-04.173327~677 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da5d30d5bf63048987d0a8d71f028b30b125863a;p=profile%2Fivi%2Fecore.git Ecore_Win32: formatting git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@65422 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c index 8726ef3..c0b74d8 100644 --- a/src/lib/ecore_win32/ecore_win32_event.c +++ b/src/lib/ecore_win32/ecore_win32_event.c @@ -20,23 +20,23 @@ typedef enum { - ECORE_WIN32_KEY_MASK_LSHIFT = 1 << 0, - ECORE_WIN32_KEY_MASK_RSHIFT = 1 << 1, - ECORE_WIN32_KEY_MASK_LCONTROL = 1 << 2, - ECORE_WIN32_KEY_MASK_RCONTROL = 1 << 3, - ECORE_WIN32_KEY_MASK_LMENU = 1 << 4, - ECORE_WIN32_KEY_MASK_RMENU = 1 << 5 + ECORE_WIN32_KEY_MASK_LSHIFT = 1 << 0, + ECORE_WIN32_KEY_MASK_RSHIFT = 1 << 1, + ECORE_WIN32_KEY_MASK_LCONTROL = 1 << 2, + ECORE_WIN32_KEY_MASK_RCONTROL = 1 << 3, + ECORE_WIN32_KEY_MASK_LMENU = 1 << 4, + ECORE_WIN32_KEY_MASK_RMENU = 1 << 5 } Ecore_Win32_Key_Mask; /***** Private declarations *****/ -static Ecore_Win32_Window *_ecore_win32_mouse_down_last_window = NULL; -static Ecore_Win32_Window *_ecore_win32_mouse_down_last_last_window = NULL; -static long _ecore_win32_mouse_down_last_time = 0 ; -static long _ecore_win32_mouse_down_last_last_time = 0 ; -static int _ecore_win32_mouse_down_did_triple = 0; -static int _ecore_win32_mouse_up_count = 0; +static Ecore_Win32_Window *_ecore_win32_mouse_down_last_window = NULL; +static Ecore_Win32_Window *_ecore_win32_mouse_down_last_last_window = NULL; +static long _ecore_win32_mouse_down_last_time = 0 ; +static long _ecore_win32_mouse_down_last_last_time = 0 ; +static int _ecore_win32_mouse_down_did_triple = 0; +static int _ecore_win32_mouse_up_count = 0; static Ecore_Win32_Key_Mask _ecore_win32_key_mask = 0; static void _ecore_win32_event_free_key_down(void *data, @@ -45,12 +45,12 @@ static void _ecore_win32_event_free_key_down(void *data, static void _ecore_win32_event_free_key_up(void *data, void *ev); -static int _ecore_win32_event_keystroke_get(int key, - int is_extended, +static int _ecore_win32_event_keystroke_get(int key, + int is_extended, Eina_Bool is_down, - char **keyname, - char **keysymbol, - char **keycompose); + char **keyname, + char **keysymbol, + char **keycompose); static int _ecore_win32_event_char_get(int key, char **keyname, @@ -813,146 +813,145 @@ _ecore_win32_event_keystroke_get(int key, break; case VK_SHIFT: { - SHORT res; - - if (is_down) - { - res = GetKeyState(VK_LSHIFT); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LSHIFT; - kn = "Shift_L"; - ks = "Shift_L"; - kc = ""; - } - res = GetKeyState(VK_RSHIFT); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RSHIFT; - kn = "Shift_R"; - ks = "Shift_R"; - kc = ""; - } - } - else /* is_up */ - { - res = GetKeyState(VK_LSHIFT); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LSHIFT)) - { - kn = "Shift_L"; - ks = "Shift_L"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LSHIFT; - } - res = GetKeyState(VK_RSHIFT); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RSHIFT)) - { - kn = "Shift_R"; - ks = "Shift_R"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT; - } - } - break; + SHORT res; + + if (is_down) + { + res = GetKeyState(VK_LSHIFT); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LSHIFT; + kn = "Shift_L"; + ks = "Shift_L"; + kc = ""; + } + res = GetKeyState(VK_RSHIFT); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RSHIFT; + kn = "Shift_R"; + ks = "Shift_R"; + kc = ""; + } + } + else /* is_up */ + { + res = GetKeyState(VK_LSHIFT); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LSHIFT)) + { + kn = "Shift_L"; + ks = "Shift_L"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LSHIFT; + } + res = GetKeyState(VK_RSHIFT); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RSHIFT)) + { + kn = "Shift_R"; + ks = "Shift_R"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT; + } + } + break; } case VK_CONTROL: { - SHORT res; - SHORT res2; - - if (is_down) - { - res = GetKeyState(VK_LCONTROL); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LCONTROL; - kn = "Control_L"; - ks = "Control_L"; - kc = ""; - break; - } - res = GetKeyState(VK_RCONTROL); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RCONTROL; - kn = "Control_R"; - ks = "Control_R"; - kc = ""; - break; - } - } - else /* is_up */ - { - res = GetKeyState(VK_LCONTROL); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LCONTROL)) - { - kn = "Control_L"; - ks = "Control_L"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LCONTROL; - break; - } - res = GetKeyState(VK_RCONTROL); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RCONTROL)) - { - kn = "Control_R"; - ks = "Control_R"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RCONTROL; - break; - } - } - break; + SHORT res; + + if (is_down) + { + res = GetKeyState(VK_LCONTROL); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LCONTROL; + kn = "Control_L"; + ks = "Control_L"; + kc = ""; + break; + } + res = GetKeyState(VK_RCONTROL); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RCONTROL; + kn = "Control_R"; + ks = "Control_R"; + kc = ""; + break; + } + } + else /* is_up */ + { + res = GetKeyState(VK_LCONTROL); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LCONTROL)) + { + kn = "Control_L"; + ks = "Control_L"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LCONTROL; + break; + } + res = GetKeyState(VK_RCONTROL); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RCONTROL)) + { + kn = "Control_R"; + ks = "Control_R"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RCONTROL; + break; + } + } + break; } case VK_MENU: { - SHORT res; - - if (is_down) - { - res = GetKeyState(VK_LMENU); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LMENU; - kn = "Alt_L"; - ks = "Alt_L"; - kc = ""; - } - res = GetKeyState(VK_RMENU); - if (res & 0x8000) - { - _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RMENU; - kn = "Alt_R"; - ks = "Alt_R"; - kc = ""; - } - } - else /* is_up */ - { - res = GetKeyState(VK_LMENU); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LMENU)) - { - kn = "Alt_L"; - ks = "Alt_L"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LMENU; - } - res = GetKeyState(VK_RMENU); - if (!(res & 0x8000) && - (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RMENU)) - { - kn = "Alt_R"; - ks = "Alt_R"; - kc = ""; - _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RMENU; - } - } - break; + SHORT res; + + if (is_down) + { + res = GetKeyState(VK_LMENU); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LMENU; + kn = "Alt_L"; + ks = "Alt_L"; + kc = ""; + } + res = GetKeyState(VK_RMENU); + if (res & 0x8000) + { + _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RMENU; + kn = "Alt_R"; + ks = "Alt_R"; + kc = ""; + } + } + else /* is_up */ + { + res = GetKeyState(VK_LMENU); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LMENU)) + { + kn = "Alt_L"; + ks = "Alt_L"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LMENU; + } + res = GetKeyState(VK_RMENU); + if (!(res & 0x8000) && + (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RMENU)) + { + kn = "Alt_R"; + ks = "Alt_R"; + kc = ""; + _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RMENU; + } + } + break; } case VK_F1: kn = "F1";