widget/windows/nsBidiKeyboard.h
author Cosmin Sabou <csabou@mozilla.com>
Thu, 08 Dec 2022 02:27:45 +0200
changeset 645062 58f36d1b73c53785b92ce1c96598826ce536099c
parent 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Backed out changeset 911f05c487a6 (bug 1800907) for causing assertions on 266445-1.html. CLOSED TREE

/* -*- 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