tor-browser

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

ISimpleDOMText.idl (4205B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 import "objidl.idl";
      8 import "oaidl.idl";
      9 
     10 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
     11 cpp_quote("//")
     12 cpp_quote("// ISimpleDOMText")
     13 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
     14 cpp_quote("// An interface that extends MSAA's IAccessible to provide important additional capabilities on text nodes")
     15 cpp_quote("//")
     16 cpp_quote("// [propget] domText(/* out,retval */ BSTR *domText")
     17 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
     18 cpp_quote("// Similar to IAccessible::get_accName, but does not strip out whitespace characters.")
     19 cpp_quote("// Important for retrieving the correct start/end substring indices to use with other")
     20 cpp_quote("// methods in ISimpleDOMText.")
     21 cpp_quote("//")
     22 cpp_quote("//")
     23 cpp_quote("// get_[un]clippedSubstringBounds(")
     24 cpp_quote("//   /* [in] */ unsigned int startIndex,")
     25 cpp_quote("//   /* [in] */ unsigned int endIndex,")
     26 cpp_quote("//   /* [out] */ int *x,")
     27 cpp_quote("//   /* [out] */ int *y,")
     28 cpp_quote("//   /* [out] */ int *width,")
     29 cpp_quote("//   /* [out] */ int *height);")
     30 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
     31 cpp_quote("// Both methods get_clippedSubstringBounds and get_unclippedSubstringBounds return the screen pixel")
     32 cpp_quote("// coordinates of the given text substring. The in parameters for start and end indices refer")
     33 cpp_quote("// to the string returned by ISimpleDOMText::get_domText().")
     34 cpp_quote("//")
     35 cpp_quote("//")
     36 cpp_quote("// scrollToSubstring(")
     37 cpp_quote("//   /* [in] */ unsigned int startIndex,")
     38 cpp_quote("//   /* [in] */ unsigned int endIndex);")
     39 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
     40 cpp_quote("// In scrollable views, scrolls to ensure that the specified substring is visible onscreen.")
     41 cpp_quote("// The in parameters for start and end indices refer to the string returned")
     42 cpp_quote("// by ISimpleDOMText::get_domText().")
     43 cpp_quote("//")
     44 cpp_quote("//")
     45 cpp_quote("// [propget] fontFamily(/* out,retval */ BSTR *fontFamily);")
     46 cpp_quote("// ---------------------------------------------------------------------------------------------------=")
     47 cpp_quote("// Return a single computed font family name, which is better than the comma delineated list")
     48 cpp_quote("// that is returned by the ISimpleDOMNode computed style methods for font-family.")
     49 cpp_quote("// In other words, return something like 'Arial' instead of 'Arial, Helvetica, Sans-serif'.")
     50 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
     51 cpp_quote("")
     52 cpp_quote("")
     53 
     54 [object, uuid(4e747be5-2052-4265-8af0-8ecad7aad1c0)]
     55 interface ISimpleDOMText: IUnknown
     56 {
     57  // Includes whitespace in DOM
     58  [propget] HRESULT domText([out, retval] BSTR *domText);
     59 
     60  HRESULT get_clippedSubstringBounds([in] unsigned int startIndex,
     61                                     [in] unsigned int endIndex,
     62                                     [out] int *x,
     63                                     [out] int *y,
     64                                     [out] int *width,
     65                                     [out] int *height);
     66 
     67  HRESULT get_unclippedSubstringBounds([in] unsigned int startIndex,
     68                                       [in] unsigned int endIndex,
     69                                       [out] int *x,
     70                                       [out] int *y,
     71                                       [out] int *width,
     72                                       [out] int *height);
     73 
     74  HRESULT scrollToSubstring([in] unsigned int startIndex,
     75                            [in] unsigned int endIndex);
     76 
     77  [propget] HRESULT fontFamily([out, retval] BSTR *fontFamily);
     78 };