widget/windows/nsBidiKeyboard.h
author Makoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 11 Mar 2016 17:48:10 +0900
changeset 323738 c8d83343c57b7c139b449d3ba106f741d60ce650
parent 215611 bc39c9162ca97497980230168798c1f8c14f215a
child 505383 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1033488 - Send RTL information to child process by WM_INPUTLANGCHANGE. r=masayuki, a=ritu MozReview-Commit-ID: KB9ok2oly7y

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __nsBidiKeyboard
#define __nsBidiKeyboard
#include "nsIBidiKeyboard.h"
#include <windows.h>

class nsBidiKeyboard : public nsIBidiKeyboard
{
  virtual ~nsBidiKeyboard();

public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIBIDIKEYBOARD

  nsBidiKeyboard();

  static void OnLayoutChange();

protected:

  nsresult SetupBidiKeyboards();
  bool IsRTLLanguage(HKL aLocale);

  bool mInitialized;
  bool mHaveBidiKeyboards;
  wchar_t  mLTRKeyboard[KL_NAMELENGTH];
  wchar_t  mRTLKeyboard[KL_NAMELENGTH];
  wchar_t  mCurrentLocaleName[KL_NAMELENGTH];
};


#endif // __nsBidiKeyboard