2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsBidiKeyboard.h"
|
2009-10-16 02:12:09 -07:00
|
|
|
#include "nsCocoaUtils.h"
|
2011-05-08 03:19:15 -07:00
|
|
|
#include "TextInputHandler.h"
|
|
|
|
|
2013-01-15 04:22:03 -08:00
|
|
|
// This must be the last include:
|
|
|
|
#include "nsObjCExceptions.h"
|
|
|
|
|
2011-05-08 03:19:15 -07:00
|
|
|
using namespace mozilla::widget;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard)
|
|
|
|
|
|
|
|
nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
nsBidiKeyboard::~nsBidiKeyboard()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(bool *aIsRTL)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2012-10-15 18:43:50 -07:00
|
|
|
*aIsRTL = TISInputSourceWrapper::CurrentInputSource().IsForRTLLanguage();
|
2009-10-16 02:12:09 -07:00
|
|
|
return NS_OK;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(uint8_t aLevel)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
// XXX Insert platform specific code to set keyboard language
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2011-09-15 07:54:50 -07:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(bool* aResult)
|
2011-09-15 07:54:50 -07:00
|
|
|
{
|
|
|
|
// not implemented yet
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|