1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * John C. Griggs <johng@corel.com>.
19 * Portions created by the Initial Developer are Copyright (C) 2000
20 * the Initial Developer. All Rights Reserved.
23 * Zack Rusin <zack@kde.org>
24 * Lars Knoll <knoll@kde.org>
25 * John C. Griggs <johng@corel.com>
26 * Dan Rosen <dr@netscape.com>
28 * Alternatively, the contents of this file may be used under the terms of
29 * either the GNU General Public License Version 2 or later (the "GPL"), or
30 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 #include "nsIGenericFactory.h"
43 #include "nsIModule.h"
46 #include "nsWidgetsCID.h"
47 #include "nsAppShell.h"
49 #include "nsToolkit.h"
50 #include "nsHTMLFormatConverter.h"
51 #include "nsTransferable.h"
52 #include "nsLookAndFeel.h"
53 #include "nsAppShellSingleton.h"
54 #include "nsScreenManagerQt.h"
56 // #include "nsIComponentRegistrar.h"
57 // #include "nsComponentManagerUtils.h"
58 // #include "nsAutoPtr.h"
62 #include "nsFilePicker.h"
63 #include "nsClipboard.h"
64 #include "nsClipboardHelper.h"
65 #include "nsIdleServiceQt.h"
66 #include "nsDragService.h"
68 #include "nsBidiKeyboard.h"
69 #include "nsNativeThemeQt.h"
70 // #include "nsScrollbar.h"
72 // #include "nsGUIEvent.h"
73 // #include "nsQtEventDispatcher.h"
74 // #include "nsIRenderingContext.h"
75 // #include "nsIServiceManager.h"
76 // #include "nsGfxCIID.h"
77 // #include "nsIPrefBranch.h"
78 // #include "nsIPrefService.h"
81 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow
)
82 NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildWindow
)
83 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPopupWindow
)
84 NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit
)
85 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter
)
86 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable
)
87 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel
)
88 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerQt
)
91 static NS_DEFINE_CID(kNativeScrollCID, NS_NATIVESCROLLBAR_CID);
96 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard
)
97 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper
)
98 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService
)
99 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard
)
100 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIdleServiceQt
)
101 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound
)
102 #ifndef QT_XLIB_SURFACE
103 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeThemeQt
)
105 //NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
106 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker
)
109 static const nsModuleComponentInfo components
[] =
113 "@mozilla.org/widgets/window/qt;1",
114 nsWindowConstructor
},
115 { "Qt Child nsWindow",
117 "@mozilla.org/widgets/child_window/qt;1",
118 nsChildWindowConstructor
},
121 "@mozilla.org/widget/appshell/qt;1",
122 nsAppShellConstructor
},
123 { "Qt Look And Feel",
125 "@mozilla.org/widget/lookandfeel/qt;1",
126 nsLookAndFeelConstructor
},
127 { "Qt Popup nsWindow",
129 "@mozilla.org/widgets/popup_window/qt;1",
130 nsPopupWindowConstructor
},
131 { "HTML Format Converter",
132 NS_HTMLFORMATCONVERTER_CID
,
133 "@mozilla.org/widget/htmlformatconverter/qt;1",
134 nsHTMLFormatConverterConstructor
},
137 "@mozilla.org/widget/toolkit/qt;1",
138 nsToolkitConstructor
},
141 "@mozilla.org/widget/transferable;1",
142 nsTransferableConstructor
},
143 { "Qt Screen Manager",
144 NS_SCREENMANAGER_CID
,
145 "@mozilla.org/gfx/screenmanager;1",
146 nsScreenManagerQtConstructor
},
149 "@mozilla.org/widget/clipboard;1",
150 nsClipboardConstructor
},
151 { "Clipboard Helper",
152 NS_CLIPBOARDHELPER_CID
,
153 "@mozilla.org/widget/clipboardhelper;1",
154 nsClipboardHelperConstructor
},
157 "@mozilla.org/widget/dragservice;1",
158 nsDragServiceConstructor
},
159 { "Qt Bidi Keyboard",
161 "@mozilla.org/widget/bidikeyboard;1",
162 nsBidiKeyboardConstructor
},
165 "@mozilla.org/widget/idleservice;1",
166 nsIdleServiceQtConstructor
},
169 "@mozilla.org/sound;1",
170 nsSoundConstructor
},
171 #ifndef QT_XLIB_SURFACE
172 { "Native Theme Renderer",
173 NS_THEMERENDERER_CID
,
174 "@mozilla.org/chrome/chrome-native-theme;1",
175 nsNativeThemeQtConstructor
},
179 "@mozilla.org/filepicker;1",
180 nsFilePickerConstructor
}
184 PR_STATIC_CALLBACK(void)
185 nsWidgetQtModuleDtor(nsIModule
*aSelf
)
188 nsAppShellShutdown(aSelf
);
191 NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsWidgetQtModule
,
194 nsWidgetQtModuleDtor
)