1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/public/msaa/ISimpleDOMNode.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,188 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 1.10 +cpp_quote("//") 1.11 +cpp_quote("// ISimpleDOMNode") 1.12 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.13 +cpp_quote("// An interface that extends MSAA's IAccessible to provide readonly DOM node information via cross-process COM.") 1.14 +cpp_quote("//") 1.15 +cpp_quote("// get_nodeInfo(") 1.16 +cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name") 1.17 +cpp_quote("// /* [out] */ short *nameSpaceID,") 1.18 +cpp_quote("// /* [out] */ BSTR *nodeValue, ") 1.19 +cpp_quote("// /* [out] */ unsigned int *numChildren); ") 1.20 +cpp_quote("// /* [out] */ unsigned int *uniqueID; // In Win32 accessible events we generate, the target's childID matches to this") 1.21 +cpp_quote("// /* [out] */ unsigned short *nodeType,") 1.22 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.23 +cpp_quote("// Get the basic information about a node.") 1.24 +cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()") 1.25 +cpp_quote("//") 1.26 +cpp_quote("// get_attributes(") 1.27 +cpp_quote("// /* [in] */ unsigned short maxAttribs,") 1.28 +cpp_quote("// /* [out] */ unsigned short *numAttribs,") 1.29 +cpp_quote("// /* [out] */ BSTR *attribNames,") 1.30 +cpp_quote("// /* [out] */ short *nameSpaceID,") 1.31 +cpp_quote("// /* [out] */ BSTR *attribValues);") 1.32 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.33 +cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each") 1.34 +cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace") 1.35 +cpp_quote("//") 1.36 +cpp_quote("// get_attributesForNames(") 1.37 +cpp_quote("// /* [in] */ unsigned short numAttribs,") 1.38 +cpp_quote("// /* [in] */ BSTR *attribNames,") 1.39 +cpp_quote("// /* [in] */ short *nameSpaceID,") 1.40 +cpp_quote("// /* [out] */ BSTR *attribValues);") 1.41 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.42 +cpp_quote("// Takes 2 arrays - the attribute names and namespace IDs, and returns an array of corresponding values") 1.43 +cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace") 1.44 +cpp_quote("//") 1.45 +cpp_quote("// computedStyle( ") 1.46 +cpp_quote("// /* [in] */ unsigned short maxStyleProperties,") 1.47 +cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ") 1.48 +cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") 1.49 +cpp_quote("// /* [out] */ BSTR *styleProperties, ") 1.50 +cpp_quote("// /* [out] */ BSTR *styleValues);") 1.51 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.52 +cpp_quote("// Returns 2 arrays -- the style properties and their values") 1.53 +cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") 1.54 +cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") 1.55 +cpp_quote("//") 1.56 +cpp_quote("// computedStyleForProperties( ") 1.57 +cpp_quote("// /* [in] */ unsigned short numStyleProperties, ") 1.58 +cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") 1.59 +cpp_quote("// /* [in] */ BSTR *styleProperties, ") 1.60 +cpp_quote("// /* [out] */ BSTR *styleValues);") 1.61 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.62 +cpp_quote("// Scroll the current view so that this dom node is visible.") 1.63 +cpp_quote("// placeTopLeft=TRUE: scroll until the top left corner of the dom node is at the top left corner of the view.") 1.64 +cpp_quote("// placeTopLeft=FALSE: scroll minimally to make the dom node visible. Don't scroll at all if already visible.") 1.65 +cpp_quote("//") 1.66 +cpp_quote("// scrollTo( ") 1.67 +cpp_quote("// /* [in] */ boolean placeTopLeft); ") 1.68 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.69 +cpp_quote("// Returns style property values for those properties in the styleProperties [in] array") 1.70 +cpp_quote("// Returns 2 arrays -- the style properties and their values") 1.71 +cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") 1.72 +cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") 1.73 +cpp_quote("//") 1.74 +cpp_quote("// get_parentNode (/* [out] */ ISimpleDOMNode **newNodePtr);") 1.75 +cpp_quote("// get_firstChild (/* [out] */ ISimpleDOMNode **newNodePtr);") 1.76 +cpp_quote("// get_lastChild (/* [out] */ ISimpleDOMNode **newNodePtr);") 1.77 +cpp_quote("// get_previousSibling(/* [out] */ ISimpleDOMNode **newNodePtr);") 1.78 +cpp_quote("// get_nextSibling (/* [out] */ ISimpleDOMNode **newNodePtr);") 1.79 +cpp_quote("// get_childAt (/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);") 1.80 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.81 +cpp_quote("// DOM navigation - get a different node.") 1.82 +cpp_quote("//") 1.83 +cpp_quote("// get_innerHTML(/* [out] */ BSTR *htmlText);") 1.84 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.85 +cpp_quote("// Returns HTML of this DOM node's subtree. Does not include the start and end tag for this node/element.") 1.86 +cpp_quote("//") 1.87 +cpp_quote("//") 1.88 +cpp_quote("// get_localInterface(/* [out] */ void **localInterface);") 1.89 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.90 +cpp_quote("// Only available in Gecko's process") 1.91 +cpp_quote("//") 1.92 +cpp_quote("//") 1.93 +cpp_quote("// get_language(/* [out] */ BSTR *htmlText);") 1.94 +cpp_quote("// ---------------------------------------------------------------------------------------------------=") 1.95 +cpp_quote("// Returns the computed language for this node, or empty string if unknown.") 1.96 +cpp_quote("//") 1.97 +cpp_quote("//") 1.98 +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 1.99 +cpp_quote("") 1.100 +cpp_quote("") 1.101 + 1.102 +import "objidl.idl"; 1.103 +import "oaidl.idl"; 1.104 + 1.105 +import "ISimpleDOMText.idl"; 1.106 +import "ISimpleDOMDocument.idl"; 1.107 + 1.108 +[object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)] 1.109 +interface ISimpleDOMNode : IUnknown 1.110 +{ 1.111 + const unsigned short NODETYPE_ELEMENT = 1; 1.112 + const unsigned short NODETYPE_ATTRIBUTE = 2; 1.113 + const unsigned short NODETYPE_TEXT = 3; 1.114 + const unsigned short NODETYPE_CDATA_SECTION = 4; 1.115 + const unsigned short NODETYPE_ENTITY_REFERENCE = 5; 1.116 + const unsigned short NODETYPE_ENTITY = 6; 1.117 + const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7; 1.118 + const unsigned short NODETYPE_COMMENT = 8; 1.119 + const unsigned short NODETYPE_DOCUMENT = 9; 1.120 + const unsigned short NODETYPE_DOCUMENT_TYPE = 10; 1.121 + const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11; 1.122 + const unsigned short NODETYPE_NOTATION = 12; 1.123 + 1.124 + [propget] HRESULT nodeInfo( 1.125 + [out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text") 1.126 + [out] short *nameSpaceID, 1.127 + [out] BSTR *nodeValue, 1.128 + [out] unsigned int *numChildren, 1.129 + [out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this 1.130 + [out, retval] unsigned short *nodeType 1.131 + ); 1.132 + 1.133 + [propget] HRESULT attributes( 1.134 + [in] unsigned short maxAttribs, 1.135 + [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames, 1.136 + [out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID, 1.137 + [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues, 1.138 + [out, retval] unsigned short *numAttribs 1.139 + ); 1.140 + 1.141 + [propget] HRESULT attributesForNames( 1.142 + [in] unsigned short numAttribs, 1.143 + [in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames, 1.144 + [in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID, 1.145 + [out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues 1.146 + ); 1.147 + 1.148 + [propget] HRESULT computedStyle( 1.149 + [in] unsigned short maxStyleProperties, 1.150 + [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes 1.151 + [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties, 1.152 + [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues, 1.153 + [out, retval] unsigned short *numStyleProperties 1.154 + ); 1.155 + 1.156 + [propget] HRESULT computedStyleForProperties( 1.157 + [in] unsigned short numStyleProperties, 1.158 + [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes 1.159 + [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties, 1.160 + [out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues 1.161 + ); 1.162 + 1.163 + HRESULT scrollTo([in] boolean placeTopLeft); 1.164 + 1.165 + [propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node); 1.166 + [propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node); 1.167 + [propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node); 1.168 + [propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node); 1.169 + [propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node); 1.170 + [propget] HRESULT childAt([in] unsigned childIndex, 1.171 + [out, retval] ISimpleDOMNode **node); 1.172 + 1.173 + [propget] HRESULT innerHTML([out, retval] BSTR *innerHTML); 1.174 + 1.175 + [propget, local] HRESULT localInterface([out][retval] void **localInterface); 1.176 + 1.177 + [propget] HRESULT language([out, retval] BSTR *language); 1.178 +} 1.179 + 1.180 + 1.181 +[ 1.182 + uuid(a6245497-9c0b-4449-85a5-bd6ad07df8ea), 1.183 + helpstring("ISimpleDOM Type Library") 1.184 +] 1.185 +library ISimpleDOM 1.186 +{ 1.187 + interface ISimpleDOMNode; 1.188 + interface ISimpleDOMText; 1.189 + interface ISimpleDOMDocument; 1.190 +}; 1.191 +