Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / widget / src / photon / nsWidgetFactory.cpp
blobe3cd700dfe41ef74fcb9d6d94f7ef5f375f4f91c
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Christopher Blizzard.
19 * Portions created by the Initial Developer are Copyright (C) 2000
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Christopher Blizzzard <blizzard@mozilla.org>
24 * Stuart Parmenter <pavlov@netscape.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #include "nsIGenericFactory.h"
41 #include "nsIModule.h"
42 #include "nsCOMPtr.h"
43 #include "nsWidgetsCID.h"
45 #include "nsWindow.h"
46 #include "nsAppShell.h"
47 #include "nsToolkit.h"
48 #include "nsLookAndFeel.h"
49 #include "nsTransferable.h"
50 #include "nsClipboard.h"
51 #include "nsClipboardHelper.h"
52 #include "nsHTMLFormatConverter.h"
53 #ifdef PHOTON_DND
54 #include "nsDragService.h"
55 #endif
56 #include "nsSound.h"
57 #ifdef IBMBIDI
58 #include "nsBidiKeyboard.h"
59 #endif
61 #include "nsFilePicker.h"
63 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
64 NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
65 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
66 NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
67 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
68 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
69 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
70 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
71 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
72 #ifdef PHOTON_DND
73 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
74 #endif
75 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
76 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
78 #ifdef IBMBIDI
79 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
80 #endif
82 static nsModuleComponentInfo components[] =
84 { "Ph nsWindow",
85 NS_WINDOW_CID,
86 "@mozilla.org/widgets/window/ph;1",
87 nsWindowConstructor },
88 { "Ph Child nsWindow",
89 NS_CHILD_CID,
90 "@mozilla.org/widgets/child_window/ph;1",
91 ChildWindowConstructor },
92 { "Ph AppShell",
93 NS_APPSHELL_CID,
94 "@mozilla.org/widget/appshell/ph;1",
95 nsAppShellConstructor },
96 { "Ph Toolkit",
97 NS_TOOLKIT_CID,
98 "@mozilla.org/widget/toolkit/ph;1",
99 nsToolkitConstructor },
100 { "Ph Look And Feel",
101 NS_LOOKANDFEEL_CID,
102 "@mozilla.org/widget/lookandfeel;1",
103 nsLookAndFeelConstructor },
104 { "Transferrable",
105 NS_TRANSFERABLE_CID,
106 "@mozilla.org/widget/transferable;1",
107 nsTransferableConstructor },
108 { "Ph Clipboard",
109 NS_CLIPBOARD_CID,
110 "@mozilla.org/widget/clipboard;1",
111 nsClipboardConstructor },
112 { "Clipboard Helper",
113 NS_CLIPBOARDHELPER_CID,
114 "@mozilla.org/widget/clipboardhelper;1",
115 nsClipboardHelperConstructor },
116 { "HTML Format Converter",
117 NS_HTMLFORMATCONVERTER_CID,
118 "@mozilla.org/widget/htmlformatconverter;1",
119 nsHTMLFormatConverterConstructor },
120 #ifdef PHOTON_DND
121 { "Ph Drag Service",
122 NS_DRAGSERVICE_CID,
123 "@mozilla.org/widget/dragservice;1",
124 nsDragServiceConstructor },
125 #endif
126 { "Ph Sound",
127 NS_SOUND_CID,
128 "@mozilla.org/sound;1",
129 nsSoundConstructor },
130 #ifdef IBMBIDI
131 { "Gtk Bidi Keyboard",
132 NS_BIDIKEYBOARD_CID,
133 "@mozilla.org/widget/bidikeyboard;1",
134 nsBidiKeyboardConstructor },
135 #endif // IBMBIDI
137 { "Photon File Picker",
138 NS_FILEPICKER_CID,
139 "@mozilla.org/filepicker;1",
140 nsFilePickerConstructor },
143 static void
144 nsWidgetPhModuleDtor(nsIModule *self)
146 // nsPhIMEHelper::Shutdown();
149 NS_IMPL_NSGETMODULE_WITH_DTOR(nsWidgetPhModule,
150 components,
151 nsWidgetPhModuleDtor)