editor/txtsvc/src/nsTextServicesFactory.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/txtsvc/src/nsTextServicesFactory.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsIGenericFactory.h"
    1.10 +
    1.11 +#include "nsTextServicesDocument.h"
    1.12 +#include "nsTextServicesCID.h"
    1.13 +
    1.14 +////////////////////////////////////////////////////////////////////////
    1.15 +// Define the contructor function for the objects
    1.16 +//
    1.17 +// NOTE: This creates an instance of objects by using the default constructor
    1.18 +//
    1.19 +NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextServicesDocument)
    1.20 +
    1.21 +////////////////////////////////////////////////////////////////////////
    1.22 +// Define a table of CIDs implemented by this module along with other
    1.23 +// information like the function to create an instance, contractid, and
    1.24 +// class name.
    1.25 +//
    1.26 +static const nsModuleComponentInfo components[] = {
    1.27 +  { nullptr, NS_TEXTSERVICESDOCUMENT_CID, "@mozilla.org/textservices/textservicesdocument;1", nsTextServicesDocumentConstructor },
    1.28 +};
    1.29 +
    1.30 +////////////////////////////////////////////////////////////////////////
    1.31 +// Implement the NSGetModule() exported function for your module
    1.32 +// and the entire implementation of the module object.
    1.33 +//
    1.34 +NS_IMPL_NSGETMODULE(nsTextServicesModule, components)

mercurial