widget/qt/nsBidiKeyboard.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* vim:expandtab:shiftwidth=4:tabstop=4:
     3  */
     4 /* This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 #include <Qt>
     9 #include <QGuiApplication>
    11 #include "nsBidiKeyboard.h"
    13 NS_IMPL_ISUPPORTS(nsBidiKeyboard, nsIBidiKeyboard)
    15 nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard()
    16 {
    17   Reset();
    18 }
    20 nsBidiKeyboard::~nsBidiKeyboard()
    21 {
    22 }
    24 NS_IMETHODIMP nsBidiKeyboard::Reset()
    25 {
    26   return NS_OK;
    27 }
    29 NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(bool *aIsRTL)
    30 {
    31     *aIsRTL = false;
    33     QInputMethod* input = qApp->inputMethod();
    34     Qt::LayoutDirection layoutDir = input ? input->inputDirection() : Qt::LeftToRight;
    36     if (layoutDir == Qt::RightToLeft) {
    37         *aIsRTL = true;
    38     }
    40     return NS_OK;
    41 }
    43 NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(bool* aResult)
    44 {
    45   // not implemented yet
    46   return NS_ERROR_NOT_IMPLEMENTED;
    47 }

mercurial