1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.h"
7 #include "mozilla/ModuleUtils.h"
9 #include "nsWidgetsCID.h"
11 #include "nsAppShell.h"
12 #include "nsAppShellSingleton.h"
13 #include "nsLookAndFeel.h"
14 #include "nsScreenManager.h"
16 NS_GENERIC_FACTORY_CONSTRUCTOR(UIKitScreenManager)
21 // This constructor should really be shared with all platforms.
22 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
26 NS_DEFINE_NAMED_CID(NS_APPSHELL_CID);
27 NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID);
28 NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
30 static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
31 {&kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor},
32 {&kNS_SCREENMANAGER_CID, false, nullptr, UIKitScreenManagerConstructor},
33 {&kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor},
36 static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
37 {"@mozilla.org/widget/appshell/uikit;1", &kNS_APPSHELL_CID},
38 {"@mozilla.org/gfx/screenmanager;1", &kNS_SCREENMANAGER_CID},
39 {"@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID},
42 static void nsWidgetUIKitModuleDtor() {
43 nsLookAndFeel::Shutdown();
47 extern const mozilla::Module kWidgetModule = {
48 mozilla::Module::kVersion, kWidgetCIDs, kWidgetContracts, nullptr, nullptr, nsAppShellInit,
49 nsWidgetUIKitModuleDtor};