moz0814ex.txt
来自「mozilla developer book examples.」· 文本 代码 · 共 36 行
TXT
36 行
#include "nsIGenericFactory.h"
#include "nsSimple.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSimpleImpl)
static NS_METHOD nsSimpleRegistrationProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info)
{
return NS_OK;
}
static NS_METHOD nsSimpleUnregistrationProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info)
{
return NS_OK;
}
// For each class that wishes to support nsIClassInfo, add a line like this
NS_DECL_CLASSINFO(nsSimpleImpl)
static nsModuleComponentInfo components[ ] =
{
{ "A Simple Component", // a message to display when component is loaded
NS_SIMPLE_CID, // our UUID
NS_SIMPLE_CONTRACTID, // our human readable PROGID or CLSID
nsSimpleImplConstructor,
nsSimpleRegistrationProc /* NULL if you dont need one */,
nsSimpleUnregistrationProc /* NULL if you dont need one */,
NULL /* no factory destructor */,
NS_CI_INTERFACE_GETTER_NAME(nsSimpleImpl),
NULL /* no language helper */,
&NS_CLASSINFO_NAME(nsSimpleImpl)
}
};
NS_IMPL_NSGETMODULE(nsSimpleModule, components)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?