From a0dfbbe73640522074820dbce51b982fafe348ec Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Wed, 29 May 2013 15:34:49 +0900 Subject: [PATCH] Bug 855975 part.22 Move sModifierKeyMap from nsWindowDefs.h to KeyboardLayout.h r=jimm --- widget/windows/KeyboardLayout.h | 11 +++++++++++ widget/windows/WinUtils.cpp | 1 + widget/windows/nsWindowDefs.h | 11 ----------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/widget/windows/KeyboardLayout.h b/widget/windows/KeyboardLayout.h index 47c3cd2030ed..bd29933ebe32 100644 --- a/widget/windows/KeyboardLayout.h +++ b/widget/windows/KeyboardLayout.h @@ -41,6 +41,17 @@ struct nsModifierKeyState; namespace mozilla { namespace widget { +static const uint32_t sModifierKeyMap[][3] = { + { nsIWidget::CAPS_LOCK, VK_CAPITAL, 0 }, + { nsIWidget::NUM_LOCK, VK_NUMLOCK, 0 }, + { nsIWidget::SHIFT_L, VK_SHIFT, VK_LSHIFT }, + { nsIWidget::SHIFT_R, VK_SHIFT, VK_RSHIFT }, + { nsIWidget::CTRL_L, VK_CONTROL, VK_LCONTROL }, + { nsIWidget::CTRL_R, VK_CONTROL, VK_RCONTROL }, + { nsIWidget::ALT_L, VK_MENU, VK_LMENU }, + { nsIWidget::ALT_R, VK_MENU, VK_RMENU } +}; + class KeyboardLayout; class ModifierKeyState { diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index 79eab005d11b..e20de9be21d2 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -7,6 +7,7 @@ #include "WinUtils.h" #include "nsWindow.h" #include "nsWindowDefs.h" +#include "KeyboardLayout.h" #include "nsGUIEvent.h" #include "nsIDOMMouseEvent.h" #include "mozilla/Preferences.h" diff --git a/widget/windows/nsWindowDefs.h b/widget/windows/nsWindowDefs.h index 85a466289a62..56200d9572a1 100644 --- a/widget/windows/nsWindowDefs.h +++ b/widget/windows/nsWindowDefs.h @@ -197,17 +197,6 @@ const char kClassNameDialog[] = "MozillaDialogClass"; const char kClassNameDropShadow[] = "MozillaDropShadowWindowClass"; const char kClassNameTemp[] = "MozillaTempWindowClass"; -static const uint32_t sModifierKeyMap[][3] = { - { nsIWidget::CAPS_LOCK, VK_CAPITAL, 0 }, - { nsIWidget::NUM_LOCK, VK_NUMLOCK, 0 }, - { nsIWidget::SHIFT_L, VK_SHIFT, VK_LSHIFT }, - { nsIWidget::SHIFT_R, VK_SHIFT, VK_RSHIFT }, - { nsIWidget::CTRL_L, VK_CONTROL, VK_LCONTROL }, - { nsIWidget::CTRL_R, VK_CONTROL, VK_RCONTROL }, - { nsIWidget::ALT_L, VK_MENU, VK_LMENU }, - { nsIWidget::ALT_R, VK_MENU, VK_RMENU } -}; - /************************************************************** * * SECTION: structs