michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") michael@0: cpp_quote("//") michael@0: cpp_quote("// ISimpleDOMNode") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// An interface that extends MSAA's IAccessible to provide readonly DOM node information via cross-process COM.") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_nodeInfo(") michael@0: cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name") michael@0: cpp_quote("// /* [out] */ short *nameSpaceID,") michael@0: cpp_quote("// /* [out] */ BSTR *nodeValue, ") michael@0: cpp_quote("// /* [out] */ unsigned int *numChildren); ") michael@0: cpp_quote("// /* [out] */ unsigned int *uniqueID; // In Win32 accessible events we generate, the target's childID matches to this") michael@0: cpp_quote("// /* [out] */ unsigned short *nodeType,") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Get the basic information about a node.") michael@0: cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_attributes(") michael@0: cpp_quote("// /* [in] */ unsigned short maxAttribs,") michael@0: cpp_quote("// /* [out] */ unsigned short *numAttribs,") michael@0: cpp_quote("// /* [out] */ BSTR *attribNames,") michael@0: cpp_quote("// /* [out] */ short *nameSpaceID,") michael@0: cpp_quote("// /* [out] */ BSTR *attribValues);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each") michael@0: cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_attributesForNames(") michael@0: cpp_quote("// /* [in] */ unsigned short numAttribs,") michael@0: cpp_quote("// /* [in] */ BSTR *attribNames,") michael@0: cpp_quote("// /* [in] */ short *nameSpaceID,") michael@0: cpp_quote("// /* [out] */ BSTR *attribValues);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Takes 2 arrays - the attribute names and namespace IDs, and returns an array of corresponding values") michael@0: cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace") michael@0: cpp_quote("//") michael@0: cpp_quote("// computedStyle( ") michael@0: cpp_quote("// /* [in] */ unsigned short maxStyleProperties,") michael@0: cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ") michael@0: cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") michael@0: cpp_quote("// /* [out] */ BSTR *styleProperties, ") michael@0: cpp_quote("// /* [out] */ BSTR *styleValues);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Returns 2 arrays -- the style properties and their values") michael@0: cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") michael@0: cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") michael@0: cpp_quote("//") michael@0: cpp_quote("// computedStyleForProperties( ") michael@0: cpp_quote("// /* [in] */ unsigned short numStyleProperties, ") michael@0: cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") michael@0: cpp_quote("// /* [in] */ BSTR *styleProperties, ") michael@0: cpp_quote("// /* [out] */ BSTR *styleValues);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Scroll the current view so that this dom node is visible.") michael@0: cpp_quote("// placeTopLeft=TRUE: scroll until the top left corner of the dom node is at the top left corner of the view.") michael@0: cpp_quote("// placeTopLeft=FALSE: scroll minimally to make the dom node visible. Don't scroll at all if already visible.") michael@0: cpp_quote("//") michael@0: cpp_quote("// scrollTo( ") michael@0: cpp_quote("// /* [in] */ boolean placeTopLeft); ") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Returns style property values for those properties in the styleProperties [in] array") michael@0: cpp_quote("// Returns 2 arrays -- the style properties and their values") michael@0: cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") michael@0: cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_parentNode (/* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// get_firstChild (/* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// get_lastChild (/* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// get_previousSibling(/* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// get_nextSibling (/* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// get_childAt (/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// DOM navigation - get a different node.") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_innerHTML(/* [out] */ BSTR *htmlText);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Returns HTML of this DOM node's subtree. Does not include the start and end tag for this node/element.") michael@0: cpp_quote("//") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_localInterface(/* [out] */ void **localInterface);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Only available in Gecko's process") michael@0: cpp_quote("//") michael@0: cpp_quote("//") michael@0: cpp_quote("// get_language(/* [out] */ BSTR *htmlText);") michael@0: cpp_quote("// ---------------------------------------------------------------------------------------------------=") michael@0: cpp_quote("// Returns the computed language for this node, or empty string if unknown.") michael@0: cpp_quote("//") michael@0: cpp_quote("//") michael@0: cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") michael@0: cpp_quote("") michael@0: cpp_quote("") michael@0: michael@0: import "objidl.idl"; michael@0: import "oaidl.idl"; michael@0: michael@0: import "ISimpleDOMText.idl"; michael@0: import "ISimpleDOMDocument.idl"; michael@0: michael@0: [object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)] michael@0: interface ISimpleDOMNode : IUnknown michael@0: { michael@0: const unsigned short NODETYPE_ELEMENT = 1; michael@0: const unsigned short NODETYPE_ATTRIBUTE = 2; michael@0: const unsigned short NODETYPE_TEXT = 3; michael@0: const unsigned short NODETYPE_CDATA_SECTION = 4; michael@0: const unsigned short NODETYPE_ENTITY_REFERENCE = 5; michael@0: const unsigned short NODETYPE_ENTITY = 6; michael@0: const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7; michael@0: const unsigned short NODETYPE_COMMENT = 8; michael@0: const unsigned short NODETYPE_DOCUMENT = 9; michael@0: const unsigned short NODETYPE_DOCUMENT_TYPE = 10; michael@0: const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11; michael@0: const unsigned short NODETYPE_NOTATION = 12; michael@0: michael@0: [propget] HRESULT nodeInfo( michael@0: [out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text") michael@0: [out] short *nameSpaceID, michael@0: [out] BSTR *nodeValue, michael@0: [out] unsigned int *numChildren, michael@0: [out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this michael@0: [out, retval] unsigned short *nodeType michael@0: ); michael@0: michael@0: [propget] HRESULT attributes( michael@0: [in] unsigned short maxAttribs, michael@0: [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames, michael@0: [out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID, michael@0: [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues, michael@0: [out, retval] unsigned short *numAttribs michael@0: ); michael@0: michael@0: [propget] HRESULT attributesForNames( michael@0: [in] unsigned short numAttribs, michael@0: [in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames, michael@0: [in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID, michael@0: [out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues michael@0: ); michael@0: michael@0: [propget] HRESULT computedStyle( michael@0: [in] unsigned short maxStyleProperties, michael@0: [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes michael@0: [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties, michael@0: [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues, michael@0: [out, retval] unsigned short *numStyleProperties michael@0: ); michael@0: michael@0: [propget] HRESULT computedStyleForProperties( michael@0: [in] unsigned short numStyleProperties, michael@0: [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes michael@0: [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties, michael@0: [out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues michael@0: ); michael@0: michael@0: HRESULT scrollTo([in] boolean placeTopLeft); michael@0: michael@0: [propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node); michael@0: [propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node); michael@0: [propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node); michael@0: [propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node); michael@0: [propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node); michael@0: [propget] HRESULT childAt([in] unsigned childIndex, michael@0: [out, retval] ISimpleDOMNode **node); michael@0: michael@0: [propget] HRESULT innerHTML([out, retval] BSTR *innerHTML); michael@0: michael@0: [propget, local] HRESULT localInterface([out][retval] void **localInterface); michael@0: michael@0: [propget] HRESULT language([out, retval] BSTR *language); michael@0: } michael@0: michael@0: michael@0: [ michael@0: uuid(a6245497-9c0b-4449-85a5-bd6ad07df8ea), michael@0: helpstring("ISimpleDOM Type Library") michael@0: ] michael@0: library ISimpleDOM michael@0: { michael@0: interface ISimpleDOMNode; michael@0: interface ISimpleDOMText; michael@0: interface ISimpleDOMDocument; michael@0: }; michael@0: