remove ifdef IBMBIDI from widget, r+sr=roc+moz bug 89203

This commit is contained in:
cbiesinger%web.de 2003-01-17 11:40:13 +00:00
Родитель be3f75278e
Коммит d8658d7ac9
20 изменённых файлов: 10 добавлений и 334 удалений

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -50,9 +50,7 @@
#include "nsLookAndFeel.h"
#include "nsFilePicker.h"
#include "nsScrollbar.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
// Drag & Drop, Clipboard
#include "nsTransferable.h"
@ -74,9 +72,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsresult nsHorizScrollbarConstructor(nsISupports *aOuter,REFNSIID aIID,
void **aResult)
@ -184,12 +180,10 @@ static const nsModuleComponentInfo components[] =
NS_DRAGSERVICE_CID,
"@mozilla.org/widget/dragservice;1",
nsDragServiceConstructor },
#ifdef IBMBIDI
{ "BeOS Bidi Keyboard",
{ "BeOS Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif // IBMBIDI
{ "BeOS File Picker",
NS_FILEPICKER_CID,
"@mozilla.org/filepicker;1",

Просмотреть файл

@ -52,9 +52,7 @@
#include "nsSound.h"
#include "nsFullScreen.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
// Drag & Drop, Clipboard
@ -79,9 +77,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFullScreen)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static NS_IMETHODIMP
nsHorizScrollbarConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
@ -207,12 +203,10 @@ static const nsModuleComponentInfo components[] =
nsDragServiceConstructor },
{ "Full Screen", NS_FULLSCREEN_SERVICE_CID,
NS_FULLSCREEN_SERVICE_CONTRACTID, nsFullScreenConstructor },
#ifdef IBMBIDI
{ "Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif // IBMBIDI
};

Просмотреть файл

@ -1,50 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is IBM code.
*
* The Initial Developer of the Original Code is IBM.
* Portions created by IBM are
* Copyright (C) International Business Machines
* Corporation, 2000. All Rights Reserved.
*
* Contributor(s): Simon Montagu
*/
#include "nsBidiKeyboard.h"
NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard)
nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard()
{
}
nsBidiKeyboard::~nsBidiKeyboard()
{
}
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -72,9 +72,7 @@
#include "nsScrollbar.h"
#include "nsNativeScrollbar.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
#include "nsIGenericFactory.h"
@ -99,9 +97,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragHelperService)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsModuleComponentInfo components[] =
@ -174,12 +170,10 @@ static nsModuleComponentInfo components[] =
NS_DRAGHELPERSERVICE_CID,
"@mozilla.org/widget/draghelperservice;1",
nsDragHelperServiceConstructor },
#ifdef IBMBIDI
{ "Gtk Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif // IBMBIDI
{ "Horiz Scrollbar",
NS_HORZSCROLLBAR_CID,
"@mozilla.org/widgets/horizscroll/mac;1",

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -59,9 +59,7 @@
#include "nsScrollbar.h"
#include "nsSound.h"
#include "nsGtkMozRemoteHelper.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
#include "nsGtkIMEHelper.h"
@ -81,9 +79,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGtkXRemoteWidgetHelper)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsresult nsHorizScrollbarConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
@ -220,13 +216,11 @@ static const nsModuleComponentInfo components[] =
{ NS_IXREMOTEWIDGETHELPER_CLASSNAME,
NS_GTKXREMOTEWIDGETHELPER_CID,
NS_IXREMOTEWIDGETHELPER_CONTRACTID,
nsGtkXRemoteWidgetHelperConstructor }
#ifdef IBMBIDI
, { "Gtk Bidi Keyboard",
nsGtkXRemoteWidgetHelperConstructor },
{ "Gtk Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor }
#endif // IBMBIDI
};
PR_STATIC_CALLBACK(void)

Просмотреть файл

@ -51,16 +51,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -50,9 +50,7 @@
#include "nsClipboard.h"
#include "nsDragService.h"
#include "nsSound.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
#ifdef ACCESSIBILITY
#include "nsAccessibilityInterface.h"
@ -63,9 +61,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGtkXRemoteWidgetHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
@ -185,12 +181,10 @@ static const nsModuleComponentInfo components[] =
NS_HTMLFORMATCONVERTER_CID,
"@mozilla.org/widget/htmlformatconverter/gtk;1",
nsHTMLFormatConverterConstructor },
#ifdef IBMBIDI
{ "Gtk2 Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif /* IBMBIDI */
{ "Gtk2 Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
};
PR_STATIC_CALLBACK(void)

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -85,9 +85,7 @@
#include "nsSound.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
#include "nsIGenericFactory.h"
@ -119,9 +117,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragHelperService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static const nsModuleComponentInfo components[] =
{
@ -217,12 +213,10 @@ static const nsModuleComponentInfo components[] =
NS_NATIVESCROLLBAR_CID,
"@mozilla.org/widget/nativescrollbar;1",
nsNativeScrollbarConstructor },
#ifdef IBMBIDI
{ "Gtk Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif // IBMBIDI
};
NS_IMPL_NSGETMODULE(nsWidgetMacModule, components)

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -50,16 +50,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -52,9 +52,7 @@
#include "nsDragService.h"
#include "nsScrollbar.h"
#include "nsSound.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
#include <prlog.h>
struct PRLogModuleInfo *PhWidLog = nsnull;
@ -70,9 +68,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsresult nsHorizScrollbarConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
@ -182,12 +178,10 @@ static nsModuleComponentInfo components[] =
NS_SOUND_CID,
"@mozilla.org/sound;1",
nsSoundConstructor },
#ifdef IBMBIDI
{ "Gtk Bidi Keyboard",
{ "Gtk Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
#endif // IBMBIDI
};
PR_STATIC_CALLBACK(void)

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -1,184 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Christopher Blizzard.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* John C. Griggs <johng@corel.com>
* Dan Rosen <dr@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsWidgetsCID.h"
#include "nsWindow.h"
#include "nsAppShell.h"
#include "nsToolkit.h"
#include "nsLookAndFeel.h"
#include "nsTransferable.h"
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
#include "nsHTMLFormatConverter.h"
#include "nsDragService.h"
#include "nsScrollbar.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsresult nsHorizScrollbarConstructor(nsISupports *aOuter,REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsISupports *inst = nsnull;
if (NULL == aResult) {
rv = NS_ERROR_NULL_POINTER;
return rv;
}
*aResult = NULL;
if (NULL != aOuter) {
rv = NS_ERROR_NO_AGGREGATION;
return rv;
}
inst = (nsISupports*)(nsBaseWidget*)(nsWidget*)new nsScrollbar(PR_FALSE);
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID,aResult);
NS_RELEASE(inst);
return rv;
}
static nsresult nsVertScrollbarConstructor(nsISupports *aOuter,REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsISupports *inst = nsnull;
if (NULL == aResult) {
rv = NS_ERROR_NULL_POINTER;
return rv;
}
*aResult = NULL;
if (NULL != aOuter) {
rv = NS_ERROR_NO_AGGREGATION;
return rv;
}
inst = (nsISupports*)(nsBaseWidget*)(nsWidget*)new nsScrollbar(PR_TRUE);
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
static const nsModuleComponentInfo components[] =
{
{ "Qt nsWindow",
NS_WINDOW_CID,
"@mozilla.org/widgets/window/qt;1",
nsWindowConstructor },
{ "Qt Child nsWindow",
NS_CHILD_CID,
"@mozilla.org/widgets/child_window/qt;1",
ChildWindowConstructor },
{ "Qt Horiz Scrollbar",
NS_HORZSCROLLBAR_CID,
"@mozilla.org/widgets/horizscroll/qt;1",
nsHorizScrollbarConstructor },
{ "Qt Vert Scrollbar",
NS_VERTSCROLLBAR_CID,
"@mozilla.org/widgets/vertscroll/qt;1",
nsVertScrollbarConstructor },
{ "Qt AppShell",
NS_APPSHELL_CID,
"@mozilla.org/widget/appshell/qt;1",
nsAppShellConstructor },
{ "Qt Toolkit",
NS_TOOLKIT_CID,
"@mozilla.org/widget/toolkit/qt;1",
nsToolkitConstructor },
{ "Qt Look And Feel",
NS_LOOKANDFEEL_CID,
"@mozilla.org/widget/lookandfeel/qt;1",
nsLookAndFeelConstructor },
{ "Transferrable",
NS_TRANSFERABLE_CID,
"@mozilla.org/widget/transferable;1",
nsTransferableConstructor },
{ "Qt Clipboard",
NS_CLIPBOARD_CID,
"@mozilla.org/widget/clipboard;1",
nsClipboardConstructor },
{ "Clipboard Helper",
NS_CLIPBOARDHELPER_CID,
"@mozilla.org/widget/clipboardhelper;1",
nsClipboardHelperConstructor },
{ "HTML Format Converter",
NS_HTMLFORMATCONVERTER_CID,
"@mozilla.org/widget/htmlformatconverter/qt;1",
nsHTMLFormatConverterConstructor },
{ "Qt Drag Service",
NS_DRAGSERVICE_CID,
"@mozilla.org/widget/dragservice;1",
nsDragServiceConstructor }
#ifdef IBMBIDI
, { "Qt Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor }
#endif // IBMBIDI
};
NS_IMPL_NSGETMODULE(nsWidgetQTModule,components)

Просмотреть файл

@ -27,12 +27,10 @@ NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard)
nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard()
{
#ifdef IBMBIDI
mDefaultsSet = PR_FALSE;
mLTRKeyboard[0] = '\0';
mRTLKeyboard[0] = '\0';
mCurrentLocaleName[0] = '\0';
#endif
}
nsBidiKeyboard::~nsBidiKeyboard()
@ -41,7 +39,6 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
if (!mDefaultsSet) {
nsresult result = EnumerateKeyboards();
if (NS_SUCCEEDED(result))
@ -63,14 +60,12 @@ NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
return NS_ERROR_FAILURE;
}
}
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
HKL currentLocale;
currentLocale = ::GetKeyboardLayout(0);
@ -97,11 +92,9 @@ NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
"mLTRKeyboard has string length >= KL_NAMELENGTH");
NS_ASSERTION((strlen(mLTRKeyboard) < KL_NAMELENGTH),
"mRTLKeyboard has string length >= KL_NAMELENGTH");
#endif
return NS_OK;
}
#ifdef IBMBIDI
// Get the list of keyboard layouts available in the system
// Set mLTRKeyboard to the first LTR keyboard in the list and mRTLKeyboard to the first RTL keyboard in the list
@ -201,4 +194,3 @@ PRBool nsBidiKeyboard::IsRTLLanguage(HKL aLocale)
return PR_FALSE;
}
}
#endif // IBMBIDI

Просмотреть файл

@ -34,7 +34,6 @@ public:
nsBidiKeyboard();
virtual ~nsBidiKeyboard();
#ifdef IBMBIDI
protected:
nsresult EnumerateKeyboards();
@ -44,7 +43,6 @@ protected:
char mLTRKeyboard[KL_NAMELENGTH];
char mRTLKeyboard[KL_NAMELENGTH];
char mCurrentLocaleName[KL_NAMELENGTH];
#endif // IBMBIDI
};

Просмотреть файл

@ -35,16 +35,12 @@ nsBidiKeyboard::~nsBidiKeyboard()
NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
{
*aIsRTL = PR_FALSE;
#ifdef IBMBIDI
// XXX Insert platform specific code to determine keyboard direction
#endif
return NS_OK;
}
NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
{
#ifdef IBMBIDI
// XXX Insert platform specific code to set keyboard language
#endif
return NS_OK;
}

Просмотреть файл

@ -59,9 +59,7 @@
#include "nsScrollBar.h"
#include "nsSound.h"
#ifdef IBMBIDI
#include "nsBidiKeyboard.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
@ -78,9 +76,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
static nsresult nsHorizScrollbarConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
@ -208,13 +204,11 @@ static const nsModuleComponentInfo components[] =
NS_DRAGSERVICE_CID,
// "@mozilla.org/widget/dragservice/xlib;1",
"@mozilla.org/widget/dragservice;1",
nsDragServiceConstructor }
#ifdef IBMBIDI
, { "Xlib Bidi Keyboard",
nsDragServiceConstructor },
{ "Xlib Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor }
#endif // IBMBIDI
};
PR_STATIC_CALLBACK(void)