2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-09-05 03:03:16 +04:00
|
|
|
|
|
|
|
#ifndef nsIDOMScriptObjectFactory_h__
|
|
|
|
#define nsIDOMScriptObjectFactory_h__
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
#include "nsIDOMClassInfo.h"
|
2013-09-23 21:25:00 +04:00
|
|
|
#include "nsString.h"
|
1998-09-05 03:03:16 +04:00
|
|
|
|
2012-04-14 17:03:16 +04:00
|
|
|
#define NS_IDOM_SCRIPT_OBJECT_FACTORY_IID \
|
|
|
|
{ 0x2a50e17c, 0x46ff, 0x4150, \
|
|
|
|
{ 0xbb, 0x46, 0xd8, 0x07, 0xb3, 0x36, 0xde, 0xab } }
|
1998-09-05 03:03:16 +04:00
|
|
|
|
2009-09-29 01:00:35 +04:00
|
|
|
typedef nsXPCClassInfo* (*nsDOMClassInfoExternalConstructorFnc)
|
2009-02-17 17:08:08 +03:00
|
|
|
(const char* aName);
|
|
|
|
|
1998-09-05 03:03:16 +04:00
|
|
|
class nsIDOMScriptObjectFactory : public nsISupports {
|
|
|
|
public:
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOM_SCRIPT_OBJECT_FACTORY_IID)
|
1998-09-05 03:03:16 +04:00
|
|
|
|
2007-03-20 18:56:43 +03:00
|
|
|
NS_IMETHOD_(nsISupports *) GetClassInfoInstance(nsDOMClassInfoID aID) = 0;
|
|
|
|
NS_IMETHOD_(nsISupports *) GetExternalClassInfoInstance(const nsAString& aName) = 0;
|
2002-03-04 05:25:08 +03:00
|
|
|
|
|
|
|
// Register the info for an external class. aName must be static
|
|
|
|
// data, it will not be deleted by the DOM code. aProtoChainInterface
|
|
|
|
// must be registered in the JAVASCRIPT_DOM_INTERFACE category, or
|
|
|
|
// prototypes for this class won't work (except if the interface
|
|
|
|
// name starts with nsIDOM).
|
|
|
|
NS_IMETHOD RegisterDOMClassInfo(const char *aName,
|
|
|
|
nsDOMClassInfoExternalConstructorFnc aConstructorFptr,
|
|
|
|
const nsIID *aProtoChainInterface,
|
|
|
|
const nsIID **aInterfaces,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aScriptableFlags,
|
2011-09-29 10:19:26 +04:00
|
|
|
bool aHasClassInterface,
|
2002-03-04 05:25:08 +03:00
|
|
|
const nsCID *aConstructorCID) = 0;
|
1998-09-05 03:03:16 +04:00
|
|
|
};
|
|
|
|
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMScriptObjectFactory,
|
|
|
|
NS_IDOM_SCRIPT_OBJECT_FACTORY_IID)
|
|
|
|
|
1998-09-05 03:03:16 +04:00
|
|
|
#endif /* nsIDOMScriptObjectFactory_h__ */
|