accessible/public/msaa/ISimpleDOMNode.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
michael@0 7 cpp_quote("//")
michael@0 8 cpp_quote("// ISimpleDOMNode")
michael@0 9 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 10 cpp_quote("// An interface that extends MSAA's IAccessible to provide readonly DOM node information via cross-process COM.")
michael@0 11 cpp_quote("//")
michael@0 12 cpp_quote("// get_nodeInfo(")
michael@0 13 cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name")
michael@0 14 cpp_quote("// /* [out] */ short *nameSpaceID,")
michael@0 15 cpp_quote("// /* [out] */ BSTR *nodeValue, ")
michael@0 16 cpp_quote("// /* [out] */ unsigned int *numChildren); ")
michael@0 17 cpp_quote("// /* [out] */ unsigned int *uniqueID; // In Win32 accessible events we generate, the target's childID matches to this")
michael@0 18 cpp_quote("// /* [out] */ unsigned short *nodeType,")
michael@0 19 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 20 cpp_quote("// Get the basic information about a node.")
michael@0 21 cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()")
michael@0 22 cpp_quote("//")
michael@0 23 cpp_quote("// get_attributes(")
michael@0 24 cpp_quote("// /* [in] */ unsigned short maxAttribs,")
michael@0 25 cpp_quote("// /* [out] */ unsigned short *numAttribs,")
michael@0 26 cpp_quote("// /* [out] */ BSTR *attribNames,")
michael@0 27 cpp_quote("// /* [out] */ short *nameSpaceID,")
michael@0 28 cpp_quote("// /* [out] */ BSTR *attribValues);")
michael@0 29 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 30 cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each")
michael@0 31 cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
michael@0 32 cpp_quote("//")
michael@0 33 cpp_quote("// get_attributesForNames(")
michael@0 34 cpp_quote("// /* [in] */ unsigned short numAttribs,")
michael@0 35 cpp_quote("// /* [in] */ BSTR *attribNames,")
michael@0 36 cpp_quote("// /* [in] */ short *nameSpaceID,")
michael@0 37 cpp_quote("// /* [out] */ BSTR *attribValues);")
michael@0 38 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 39 cpp_quote("// Takes 2 arrays - the attribute names and namespace IDs, and returns an array of corresponding values")
michael@0 40 cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
michael@0 41 cpp_quote("//")
michael@0 42 cpp_quote("// computedStyle( ")
michael@0 43 cpp_quote("// /* [in] */ unsigned short maxStyleProperties,")
michael@0 44 cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ")
michael@0 45 cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
michael@0 46 cpp_quote("// /* [out] */ BSTR *styleProperties, ")
michael@0 47 cpp_quote("// /* [out] */ BSTR *styleValues);")
michael@0 48 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 49 cpp_quote("// Returns 2 arrays -- the style properties and their values")
michael@0 50 cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
michael@0 51 cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
michael@0 52 cpp_quote("//")
michael@0 53 cpp_quote("// computedStyleForProperties( ")
michael@0 54 cpp_quote("// /* [in] */ unsigned short numStyleProperties, ")
michael@0 55 cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
michael@0 56 cpp_quote("// /* [in] */ BSTR *styleProperties, ")
michael@0 57 cpp_quote("// /* [out] */ BSTR *styleValues);")
michael@0 58 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 59 cpp_quote("// Scroll the current view so that this dom node is visible.")
michael@0 60 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 61 cpp_quote("// placeTopLeft=FALSE: scroll minimally to make the dom node visible. Don't scroll at all if already visible.")
michael@0 62 cpp_quote("//")
michael@0 63 cpp_quote("// scrollTo( ")
michael@0 64 cpp_quote("// /* [in] */ boolean placeTopLeft); ")
michael@0 65 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 66 cpp_quote("// Returns style property values for those properties in the styleProperties [in] array")
michael@0 67 cpp_quote("// Returns 2 arrays -- the style properties and their values")
michael@0 68 cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
michael@0 69 cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
michael@0 70 cpp_quote("//")
michael@0 71 cpp_quote("// get_parentNode (/* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 72 cpp_quote("// get_firstChild (/* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 73 cpp_quote("// get_lastChild (/* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 74 cpp_quote("// get_previousSibling(/* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 75 cpp_quote("// get_nextSibling (/* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 76 cpp_quote("// get_childAt (/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);")
michael@0 77 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 78 cpp_quote("// DOM navigation - get a different node.")
michael@0 79 cpp_quote("//")
michael@0 80 cpp_quote("// get_innerHTML(/* [out] */ BSTR *htmlText);")
michael@0 81 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 82 cpp_quote("// Returns HTML of this DOM node's subtree. Does not include the start and end tag for this node/element.")
michael@0 83 cpp_quote("//")
michael@0 84 cpp_quote("//")
michael@0 85 cpp_quote("// get_localInterface(/* [out] */ void **localInterface);")
michael@0 86 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 87 cpp_quote("// Only available in Gecko's process")
michael@0 88 cpp_quote("//")
michael@0 89 cpp_quote("//")
michael@0 90 cpp_quote("// get_language(/* [out] */ BSTR *htmlText);")
michael@0 91 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
michael@0 92 cpp_quote("// Returns the computed language for this node, or empty string if unknown.")
michael@0 93 cpp_quote("//")
michael@0 94 cpp_quote("//")
michael@0 95 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
michael@0 96 cpp_quote("")
michael@0 97 cpp_quote("")
michael@0 98
michael@0 99 import "objidl.idl";
michael@0 100 import "oaidl.idl";
michael@0 101
michael@0 102 import "ISimpleDOMText.idl";
michael@0 103 import "ISimpleDOMDocument.idl";
michael@0 104
michael@0 105 [object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)]
michael@0 106 interface ISimpleDOMNode : IUnknown
michael@0 107 {
michael@0 108 const unsigned short NODETYPE_ELEMENT = 1;
michael@0 109 const unsigned short NODETYPE_ATTRIBUTE = 2;
michael@0 110 const unsigned short NODETYPE_TEXT = 3;
michael@0 111 const unsigned short NODETYPE_CDATA_SECTION = 4;
michael@0 112 const unsigned short NODETYPE_ENTITY_REFERENCE = 5;
michael@0 113 const unsigned short NODETYPE_ENTITY = 6;
michael@0 114 const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7;
michael@0 115 const unsigned short NODETYPE_COMMENT = 8;
michael@0 116 const unsigned short NODETYPE_DOCUMENT = 9;
michael@0 117 const unsigned short NODETYPE_DOCUMENT_TYPE = 10;
michael@0 118 const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11;
michael@0 119 const unsigned short NODETYPE_NOTATION = 12;
michael@0 120
michael@0 121 [propget] HRESULT nodeInfo(
michael@0 122 [out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text")
michael@0 123 [out] short *nameSpaceID,
michael@0 124 [out] BSTR *nodeValue,
michael@0 125 [out] unsigned int *numChildren,
michael@0 126 [out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this
michael@0 127 [out, retval] unsigned short *nodeType
michael@0 128 );
michael@0 129
michael@0 130 [propget] HRESULT attributes(
michael@0 131 [in] unsigned short maxAttribs,
michael@0 132 [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames,
michael@0 133 [out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID,
michael@0 134 [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues,
michael@0 135 [out, retval] unsigned short *numAttribs
michael@0 136 );
michael@0 137
michael@0 138 [propget] HRESULT attributesForNames(
michael@0 139 [in] unsigned short numAttribs,
michael@0 140 [in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames,
michael@0 141 [in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID,
michael@0 142 [out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues
michael@0 143 );
michael@0 144
michael@0 145 [propget] HRESULT computedStyle(
michael@0 146 [in] unsigned short maxStyleProperties,
michael@0 147 [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
michael@0 148 [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties,
michael@0 149 [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues,
michael@0 150 [out, retval] unsigned short *numStyleProperties
michael@0 151 );
michael@0 152
michael@0 153 [propget] HRESULT computedStyleForProperties(
michael@0 154 [in] unsigned short numStyleProperties,
michael@0 155 [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
michael@0 156 [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties,
michael@0 157 [out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues
michael@0 158 );
michael@0 159
michael@0 160 HRESULT scrollTo([in] boolean placeTopLeft);
michael@0 161
michael@0 162 [propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node);
michael@0 163 [propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node);
michael@0 164 [propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node);
michael@0 165 [propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node);
michael@0 166 [propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node);
michael@0 167 [propget] HRESULT childAt([in] unsigned childIndex,
michael@0 168 [out, retval] ISimpleDOMNode **node);
michael@0 169
michael@0 170 [propget] HRESULT innerHTML([out, retval] BSTR *innerHTML);
michael@0 171
michael@0 172 [propget, local] HRESULT localInterface([out][retval] void **localInterface);
michael@0 173
michael@0 174 [propget] HRESULT language([out, retval] BSTR *language);
michael@0 175 }
michael@0 176
michael@0 177
michael@0 178 [
michael@0 179 uuid(a6245497-9c0b-4449-85a5-bd6ad07df8ea),
michael@0 180 helpstring("ISimpleDOM Type Library")
michael@0 181 ]
michael@0 182 library ISimpleDOM
michael@0 183 {
michael@0 184 interface ISimpleDOMNode;
michael@0 185 interface ISimpleDOMText;
michael@0 186 interface ISimpleDOMDocument;
michael@0 187 };
michael@0 188

mercurial