Back to index

lightning-sunbird  0.9+nobinonly
nsStaticXULComponents.cpp
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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) 2001
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *      Christopher Seawood <cls@seawood.org>
00024  *   Chris Waterson <waterson@netscape.com>
00025  *   Benjamin Smedberg <bsmedberg@covad.net>
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either the GNU General Public License Version 2 or later (the "GPL"), or
00029  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 
00041 #define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1
00042 
00043 #include "nsIGenericFactory.h"
00044 #include "nsXPCOM.h"
00045 #include "nsStaticComponents.h"
00046 #include "nsMemory.h"
00047 
00048 #define NSGETMODULE(_name) _name##_NSGetModule
00049 
00050 #ifdef MOZ_MATHML
00051 #define MATHML_MODULES MODULE(nsUCvMathModule)
00052 #else
00053 #define MATHML_MODULES
00054 #endif
00055 
00056 #ifdef XP_WIN
00057 #define INTL_COMPAT_MODULES MODULE(I18nCompatibility)
00058 #else
00059 #define INTL_COMPAT_MODULES
00060 #endif
00061 
00062 #ifdef NECKO2
00063 #define NECKO2_MODULES MODULE(necko_secondary_protocols)
00064 #else
00065 #define NECKO2_MODULES
00066 #endif
00067 
00068 #ifdef MOZ_IPCD
00069 #define IPC_MODULE MODULE(ipcdclient)
00070 #else
00071 #define IPC_MODULE
00072 #endif
00073 
00074 #ifdef MOZ_ENABLE_POSTSCRIPT
00075 #define POSTSCRIPT_MODULES MODULE(nsGfxPSModule)
00076 #else
00077 #define POSTSCRIPT_MODULES
00078 #endif
00079 
00080 #ifdef XP_WIN
00081 #  define GFX_MODULES MODULE(nsGfxModule)
00082 #  define WIDGET_MODULES MODULE(nsWidgetModule)
00083 #elif defined(XP_MACOSX)
00084 #  define GFX_MODULES MODULE(nsGfxMacModule)
00085 #  define WIDGET_MODULES MODULE(nsWidgetMacModule)
00086 #elif defined(XP_BEOS)
00087 #  define GFX_MODULES MODULE(nsGfxBeOSModule)
00088 #  define WIDGET_MODULES MODULE(nsWidgetBeOSModule)
00089 #elif defined(XP_OS2)
00090 #  define GFX_MODULES MODULE(nsGfxOS2Module)
00091 #  define WIDGET_MODULES MODULE(nsWidgetOS2Module)
00092 #endif
00093 
00094 #ifdef MOZ_ENABLE_CAIRO_GFX
00095 #define GFX_MODULES MODULE(nsGfxModule)
00096 #else
00097 #  if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
00098 #  define GFX_MODULES MODULE(nsGfxGTKModule)
00099 #  elif defined(MOZ_WIDGET_QT)
00100 #  define GFX_MODULES MODULE(nsGfxQtModule)
00101 #  elif defined(MOZ_WIDGET_XLIB)
00102 #  define GFX_MODULES MODULE(nsGfxXlibModule)
00103 #  elif defined(MOZ_WIDGET_PHOTON)
00104 #  define GFX_MODULES MODULE(nsGfxPhModule)
00105 #  endif
00106 #endif
00107 
00108 #ifdef ICON_DECODER
00109 #define ICON_MODULE MODULE(nsIconDecoderModule)
00110 #else
00111 #define ICON_MODULE
00112 #endif
00113 
00114 #ifdef MOZ_WIDGET_GTK
00115 #define WIDGET_MODULES MODULE(nsWidgetGTKModule)
00116 #endif
00117 #ifdef MOZ_WIDGET_GTK2
00118 #define WIDGET_MODULES MODULE(nsWidgetGtk2Module)
00119 #endif
00120 #ifdef MOZ_WIDGET_XLIB
00121 #define WIDGET_MODULES MODULE(nsWidgetXLIBModule)
00122 #endif
00123 #ifdef MOZ_WIDGET_PHOTON
00124 #define WIDGET_MODULES MODULE(nsWidgetPhModule)
00125 #endif
00126 #ifdef MOZ_WIDGET_QT
00127 #define WIDGET_MODULES MODULE(nsWidgetQtModule)
00128 #endif
00129 
00130 #ifdef MOZ_ENABLE_XPRINT
00131 #define XPRINT_MODULES MODULE(nsGfxXprintModule)
00132 #else
00133 #define XPRINT_MODULES
00134 #endif
00135 
00136 #ifdef OJI
00137 #define OJI_MODULES MODULE(nsCJVMManagerModule)
00138 #else
00139 #define OJI_MODULES
00140 #endif
00141 
00142 #ifdef ACCESSIBILITY
00143 #define ACCESS_MODULES MODULE(nsAccessibilityModule)
00144 #else
00145 #define ACCESS_MODULES
00146 #endif
00147 
00148 #ifdef MOZ_ENABLE_XREMOTE
00149 #define XREMOTE_MODULES MODULE(RemoteServiceModule)
00150 #else
00151 #define XREMOTE_MODULES
00152 #endif
00153 
00154 #ifdef MOZ_STORAGE
00155 #define STORAGE_MODULE MODULE(mozStorageModule)
00156 #else
00157 #define STORAGE_MODULE
00158 #endif
00159 
00160 #ifdef MOZ_PLACES
00161 #define PLACES_MODULES
00162 #else
00163 #define PLACES_MODULES \
00164     MODULE(nsMorkModule)
00165 #endif    
00166 
00167 #define XUL_MODULES                          \
00168     MODULE(xpcomObsoleteModule)              \
00169     MODULE(xpconnect)                        \
00170     MATHML_MODULES                           \
00171     MODULE(nsUConvModule)                    \
00172     MODULE(nsI18nModule)                     \
00173     INTL_COMPAT_MODULES                      \
00174     MODULE(necko_core_and_primary_protocols) \
00175     NECKO2_MODULES                           \
00176     IPC_MODULE                               \
00177     MODULE(nsJarModule)                      \
00178     MODULE(nsPrefModule)                     \
00179     MODULE(nsSecurityManagerModule)          \
00180     MODULE(nsRDFModule)                      \
00181     MODULE(nsParserModule)                   \
00182     POSTSCRIPT_MODULES                       \
00183     GFX_MODULES                              \
00184     WIDGET_MODULES                           \
00185     MODULE(nsImageLib2Module)                \
00186     ICON_MODULE                              \
00187     MODULE(nsPluginModule)                   \
00188     MODULE(nsLayoutModule)                   \
00189     MODULE(docshell_provider)                \
00190     MODULE(embedcomponents)                  \
00191     MODULE(Browser_Embedding_Module)         \
00192     MODULE(nsEditorModule)                   \
00193     OJI_MODULES                              \
00194     ACCESS_MODULES                           \
00195     MODULE(appshell)                         \
00196     MODULE(nsTransactionManagerModule)       \
00197     MODULE(nsComposerModule)                 \
00198     MODULE(nsChromeModule)                   \
00199     MODULE(nsFindComponent)                  \
00200     MODULE(application)                      \
00201     MODULE(Apprunner)                        \
00202     MODULE(CommandLineModule)                \
00203     STORAGE_MODULE                           \
00204     PLACES_MODULES                           \
00205     MODULE(nsToolkitCompsModule)             \
00206     XREMOTE_MODULES                          \
00207     MODULE(nsSoftwareUpdate)                 \
00208     MODULE(JavaScript_Debugger)              \
00209     /* end of list */
00210 
00211 #define MODULE(_name) \
00212 NSGETMODULE_ENTRY_POINT(_name) (nsIComponentManager*, nsIFile*, nsIModule**);
00213 
00214 XUL_MODULES
00215 
00216 #undef MODULE
00217 
00218 #define MODULE(_name) { #_name, NSGETMODULE(_name) },
00219 
00223 static nsStaticModuleInfo const gStaticModuleInfo[] = {
00224        XUL_MODULES
00225 };
00226 
00227 nsStaticModuleInfo const *const kPStaticModules = gStaticModuleInfo;
00228 PRUint32 const kStaticModuleCount = NS_ARRAY_LENGTH(gStaticModuleInfo);