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/. */
|
2006-03-22 21:36:36 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This file defines enum values for all of the DOM objects which have
|
|
|
|
* an entry in nsDOMClassInfo.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsDOMClassInfoID_h__
|
|
|
|
#define nsDOMClassInfoID_h__
|
|
|
|
|
2011-08-11 17:29:50 +04:00
|
|
|
#include "nsIXPCScriptable.h"
|
|
|
|
|
2016-12-02 08:06:20 +03:00
|
|
|
enum nsDOMClassInfoID
|
|
|
|
{
|
|
|
|
eDOMClassInfo_DOMPrototype_id,
|
|
|
|
eDOMClassInfo_DOMConstructor_id,
|
2006-03-22 21:36:36 +03:00
|
|
|
|
2017-01-15 22:50:10 +03:00
|
|
|
// CSS classes
|
|
|
|
eDOMClassInfo_CSSStyleRule_id,
|
|
|
|
eDOMClassInfo_CSSImportRule_id,
|
|
|
|
eDOMClassInfo_CSSMediaRule_id,
|
|
|
|
eDOMClassInfo_CSSNameSpaceRule_id,
|
|
|
|
|
2016-12-02 08:06:20 +03:00
|
|
|
// XUL classes
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
eDOMClassInfo_XULCommandDispatcher_id,
|
|
|
|
#endif
|
|
|
|
eDOMClassInfo_XULControllers_id,
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
eDOMClassInfo_TreeSelection_id,
|
|
|
|
eDOMClassInfo_TreeContentView_id,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
eDOMClassInfo_XULTemplateBuilder_id,
|
|
|
|
eDOMClassInfo_XULTreeBuilder_id,
|
|
|
|
#endif
|
|
|
|
|
2017-01-15 22:50:10 +03:00
|
|
|
eDOMClassInfo_CSSMozDocumentRule_id,
|
|
|
|
eDOMClassInfo_CSSSupportsRule_id,
|
|
|
|
|
|
|
|
// @font-face in CSS
|
|
|
|
eDOMClassInfo_CSSFontFaceRule_id,
|
|
|
|
|
2016-12-02 08:06:20 +03:00
|
|
|
eDOMClassInfo_ContentFrameMessageManager_id,
|
|
|
|
eDOMClassInfo_ContentProcessMessageManager_id,
|
|
|
|
eDOMClassInfo_ChromeMessageBroadcaster_id,
|
|
|
|
eDOMClassInfo_ChromeMessageSender_id,
|
|
|
|
|
2017-01-15 22:50:10 +03:00
|
|
|
eDOMClassInfo_CSSKeyframeRule_id,
|
|
|
|
eDOMClassInfo_CSSKeyframesRule_id,
|
|
|
|
|
|
|
|
// @counter-style in CSS
|
|
|
|
eDOMClassInfo_CSSCounterStyleRule_id,
|
|
|
|
|
|
|
|
eDOMClassInfo_CSSPageRule_id,
|
|
|
|
|
|
|
|
eDOMClassInfo_CSSFontFeatureValuesRule_id,
|
|
|
|
|
2016-12-02 08:06:20 +03:00
|
|
|
eDOMClassInfo_XULControlElement_id,
|
|
|
|
eDOMClassInfo_XULLabeledControlElement_id,
|
|
|
|
eDOMClassInfo_XULButtonElement_id,
|
|
|
|
eDOMClassInfo_XULCheckboxElement_id,
|
|
|
|
eDOMClassInfo_XULPopupElement_id,
|
2010-02-25 08:58:18 +03:00
|
|
|
|
2006-03-22 21:36:36 +03:00
|
|
|
// This one better be the last one in this list
|
|
|
|
eDOMClassInfoIDCount
|
|
|
|
};
|
|
|
|
|
2007-03-19 12:19:16 +03:00
|
|
|
/**
|
|
|
|
* nsIClassInfo helper macros
|
|
|
|
*/
|
|
|
|
|
2013-03-16 08:31:38 +04:00
|
|
|
#ifdef MOZILLA_INTERNAL_API
|
2009-02-17 17:08:08 +03:00
|
|
|
|
2009-09-29 01:00:35 +04:00
|
|
|
class nsIClassInfo;
|
|
|
|
class nsXPCClassInfo;
|
|
|
|
|
2007-03-19 12:19:16 +03:00
|
|
|
extern nsIClassInfo*
|
|
|
|
NS_GetDOMClassInfoInstance(nsDOMClassInfoID aID);
|
|
|
|
|
|
|
|
#define NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(_class) \
|
2009-09-29 01:00:35 +04:00
|
|
|
if (aIID.Equals(NS_GET_IID(nsIClassInfo)) || \
|
|
|
|
aIID.Equals(NS_GET_IID(nsXPCClassInfo))) { \
|
2007-03-19 12:19:16 +03:00
|
|
|
foundInterface = NS_GetDOMClassInfoInstance(eDOMClassInfo_##_class##_id); \
|
|
|
|
if (!foundInterface) { \
|
2012-07-30 18:20:58 +04:00
|
|
|
*aInstancePtr = nullptr; \
|
2007-03-19 12:19:16 +03:00
|
|
|
return NS_ERROR_OUT_OF_MEMORY; \
|
|
|
|
} \
|
|
|
|
} else
|
|
|
|
|
2010-10-14 03:25:33 +04:00
|
|
|
#define NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO_CONDITIONAL(_class, condition) \
|
|
|
|
if ((condition) && \
|
|
|
|
(aIID.Equals(NS_GET_IID(nsIClassInfo)) || \
|
|
|
|
aIID.Equals(NS_GET_IID(nsXPCClassInfo)))) { \
|
|
|
|
foundInterface = NS_GetDOMClassInfoInstance(eDOMClassInfo_##_class##_id); \
|
|
|
|
if (!foundInterface) { \
|
2012-07-30 18:20:58 +04:00
|
|
|
*aInstancePtr = nullptr; \
|
2010-10-14 03:25:33 +04:00
|
|
|
return NS_ERROR_OUT_OF_MEMORY; \
|
|
|
|
} \
|
|
|
|
} else
|
|
|
|
|
2013-03-16 08:31:38 +04:00
|
|
|
#endif // MOZILLA_INTERNAL_API
|
2009-02-17 17:08:08 +03:00
|
|
|
|
2006-03-22 21:36:36 +03:00
|
|
|
#endif // nsDOMClassInfoID_h__
|