1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * 3 * ***** BEGIN LICENSE BLOCK ***** 4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * 6 * The contents of this file are subject to the Mozilla Public License Version 7 * 1.1 (the "License"); you may not use this file except in compliance with 8 * the License. You may obtain a copy of the License at 9 * http://www.mozilla.org/MPL/ 10 * 11 * Software distributed under the License is distributed on an "AS IS" basis, 12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 * for the specific language governing rights and limitations under the 14 * License. 15 * 16 * The Original Code is the Mozilla browser. 17 * 18 * The Initial Developer of the Original Code is 19 * Netscape Communications Corporation. 20 * Portions created by the Initial Developer are Copyright (C) 1999 21 * the Initial Developer. All Rights Reserved. 22 * 23 * Contributor(s): 24 * 25 * Alternatively, the contents of this file may be used under the terms of 26 * either of the GNU General Public License Version 2 or later (the "GPL"), 27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 * in which case the provisions of the GPL or the LGPL are applicable instead 29 * of those above. If you wish to allow use of your version of this file only 30 * under the terms of either the GPL or the LGPL, and not to allow others to 31 * use your version of this file under the terms of the MPL, indicate your 32 * decision by deleting the provisions above and replace them with the notice 33 * and other provisions required by the GPL or the LGPL. If you do not delete 34 * the provisions above, a recipient may use your version of this file under 35 * the terms of any one of the MPL, the GPL or the LGPL. 36 * 37 * ***** END LICENSE BLOCK ***** */ 38 39import "objidl.idl"; 40import "oaidl.idl"; 41 42cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 43cpp_quote("//") 44cpp_quote("// ISimpleDOMText") 45cpp_quote("// ---------------------------------------------------------------------------------------------------=") 46cpp_quote("// An interface that extends MSAA's IAccessible to provide important additional capabilities on text nodes") 47cpp_quote("//") 48cpp_quote("// @STATUS UNDER_REVIEW") 49cpp_quote("//") 50cpp_quote("// [propget] domText(/* out,retval */ BSTR *domText") 51cpp_quote("// ---------------------------------------------------------------------------------------------------=") 52cpp_quote("// Similar to IAccessible::get_accName, but does not strip out whitespace characters.") 53cpp_quote("// Important for retrieving the correct start/end substring indices to use with other") 54cpp_quote("// methods in ISimpleDOMText.") 55cpp_quote("//") 56cpp_quote("//") 57cpp_quote("// get_[un]clippedSubstringBounds(") 58cpp_quote("// /* [in] */ unsigned int startIndex,") 59cpp_quote("// /* [in] */ unsigned int endIndex,") 60cpp_quote("// /* [out] */ int *x,") 61cpp_quote("// /* [out] */ int *y,") 62cpp_quote("// /* [out] */ int *width,") 63cpp_quote("// /* [out] */ int *height);") 64cpp_quote("// ---------------------------------------------------------------------------------------------------=") 65cpp_quote("// Both methods get_clippedSubstringBounds and get_unclippedSubstringBounds return the screen pixel") 66cpp_quote("// coordinates of the given text substring. The in parameters for start and end indices refer") 67cpp_quote("// to the string returned by ISimpleDOMText::get_domText().") 68cpp_quote("//") 69cpp_quote("//") 70cpp_quote("// scrollToSubstring(") 71cpp_quote("// /* [in] */ unsigned int startIndex,") 72cpp_quote("// /* [in] */ unsigned int endIndex);") 73cpp_quote("// ---------------------------------------------------------------------------------------------------=") 74cpp_quote("// In scrollable views, scrolls to ensure that the specified substring is visible onscreen.") 75cpp_quote("// The in parameters for start and end indices refer to the string returned") 76cpp_quote("// by ISimpleDOMText::get_domText().") 77cpp_quote("//") 78cpp_quote("//") 79cpp_quote("// [propget] fontFamily(/* out,retval */ BSTR *fontFamily);") 80cpp_quote("// ---------------------------------------------------------------------------------------------------=") 81cpp_quote("// Return a single computed font family name, which is better than the comma delineated list") 82cpp_quote("// that is returned by the ISimpleDOMNode computed style methods for font-family.") 83cpp_quote("// In other words, return something like 'Arial' instead of 'Arial, Helvetica, Sans-serif'.") 84cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 85cpp_quote("") 86cpp_quote("") 87 88[object, uuid(4e747be5-2052-4265-8af0-8ecad7aad1c0)] 89interface ISimpleDOMText: IUnknown 90{ 91 // Includes whitespace in DOM 92 [propget] HRESULT domText([out, retval] BSTR *domText); 93 94 HRESULT get_clippedSubstringBounds([in] unsigned int startIndex, 95 [in] unsigned int endIndex, 96 [out] int *x, 97 [out] int *y, 98 [out] int *width, 99 [out] int *height); 100 101 HRESULT get_unclippedSubstringBounds([in] unsigned int startIndex, 102 [in] unsigned int endIndex, 103 [out] int *x, 104 [out] int *y, 105 [out] int *width, 106 [out] int *height); 107 108 HRESULT scrollToSubstring([in] unsigned int startIndex, 109 [in] unsigned int endIndex); 110 111 [propget] HRESULT fontFamily([out, retval] BSTR *fontFamily); 112}; 113 114