Back to index

lightning-sunbird  0.9+nobinonly
nsWidgetFactory.mm
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsIFactory.h"
00039 #include "nsISupports.h"
00040 #include "nsIComponentManager.h"
00041 #include "nsIGenericFactory.h"
00042 
00043 #include "nsWidgetsCID.h"
00044 
00045 #include "nsToolkit.h"
00046 #include "nsChildView.h"
00047 #include "nsCocoaWindow.h"
00048 #include "nsAppShellCocoa.h"
00049 #include "nsFilePicker.h"
00050 
00051 #include "nsMenuBarX.h"
00052 #include "nsMenuX.h"
00053 #include "nsMenuItemX.h"
00054 
00055 #include "nsClipboard.h"
00056 #include "nsClipboardHelper.h"
00057 #include "nsTransferable.h"
00058 #include "nsHTMLFormatConverter.h"
00059 #include "nsDragService.h"
00060 #include "nsDragHelperService.h"
00061 
00062 #include "nsLookAndFeel.h"
00063 
00064 #include "nsSound.h"
00065 #include "nsNativeScrollbar.h"
00066 
00067 #include "nsBidiKeyboard.h"
00068 
00069 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCocoaWindow)
00070 NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildView)
00071 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
00072 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellCocoa)
00073 NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
00074 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
00075 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuBarX)
00076 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuX)
00077 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuItemX)
00078 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
00079 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
00080 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
00081 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
00082 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
00083 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
00084 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
00085 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragHelperService)
00086 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
00087 
00088 static const nsModuleComponentInfo gComponents[] =
00089 {
00090        {      "nsWindow",
00091               NS_WINDOW_CID,
00092               "@mozilla.org/widgets/window/mac;1",
00093               nsCocoaWindowConstructor },
00094        {      "Popup nsWindow",
00095               NS_POPUP_CID,
00096               "@mozilla.org/widgets/popup/mac;1",
00097               nsCocoaWindowConstructor },
00098        {      "Child nsWindow",
00099               NS_CHILD_CID,
00100               "@mozilla.org/widgets/childwindow/mac;1",
00101               nsChildViewConstructor },
00102        {      "File Picker",
00103               NS_FILEPICKER_CID,
00104               "@mozilla.org/filepicker;1",
00105               nsFilePickerConstructor },
00106        {      "AppShell",
00107               NS_APPSHELL_CID,
00108               "@mozilla.org/widget/appshell/mac;1",
00109               nsAppShellCocoaConstructor },
00110        {      "Toolkit",
00111               NS_TOOLKIT_CID,
00112               "@mozilla.org/widget/toolkit/mac;1",
00113               nsToolkitConstructor },
00114        {      "Look And Feel",
00115               NS_LOOKANDFEEL_CID,
00116               "@mozilla.org/widget/lookandfeel;1",
00117               nsLookAndFeelConstructor },
00118        {      "Menubar",
00119               NS_MENUBAR_CID,
00120               "@mozilla.org/widget/menubar/mac;1",
00121               nsMenuBarXConstructor },
00122        {      "Menu",
00123               NS_MENU_CID,
00124               "@mozilla.org/widget/menu/mac;1",
00125               nsMenuXConstructor },
00126        {      "MenuItem",
00127               NS_MENUITEM_CID,
00128               "@mozilla.org/widget/menuitem/mac;1",
00129               nsMenuItemXConstructor },
00130        {      "Sound",
00131               NS_SOUND_CID,
00132               "@mozilla.org/sound;1",
00133               nsSoundConstructor },
00134        {      "Transferable",
00135               NS_TRANSFERABLE_CID,
00136               "@mozilla.org/widget/transferable;1",
00137               nsTransferableConstructor },
00138        {      "HTML Format Converter",
00139               NS_HTMLFORMATCONVERTER_CID,
00140               "@mozilla.org/widget/htmlformatconverter;1",
00141               nsHTMLFormatConverterConstructor },
00142        {      "Clipboard",
00143               NS_CLIPBOARD_CID,
00144               "@mozilla.org/widget/clipboard;1",
00145               nsClipboardConstructor },
00146        {      "Clipboard Helper",
00147               NS_CLIPBOARDHELPER_CID,
00148               "@mozilla.org/widget/clipboardhelper;1",
00149               nsClipboardHelperConstructor },
00150        {      "Drag Service",
00151               NS_DRAGSERVICE_CID,
00152               "@mozilla.org/widget/dragservice;1",
00153               nsDragServiceConstructor },
00154        {      "Drag Helper Service",
00155               NS_DRAGHELPERSERVICE_CID,
00156               "@mozilla.org/widget/draghelperservice;1",
00157               nsDragHelperServiceConstructor },
00158        {   "Cocoa Bidi Keyboard",
00159               NS_BIDIKEYBOARD_CID,
00160               "@mozilla.org/widget/bidikeyboard;1",
00161               nsBidiKeyboardConstructor },
00162        {      "Native Scrollbar",
00163               NS_NATIVESCROLLBAR_CID,
00164               "@mozilla.org/widget/nativescrollbar;1",
00165               nsNativeScrollbarConstructor }
00166 };
00167 
00168 NS_IMPL_NSGETMODULE(nsWidgetMacModule, gComponents)