tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ISimpleDOMNode.idl (10140B)


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