Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /************************************************************************* |
michael@0 | 2 | * |
michael@0 | 3 | * File Name (AccessibleEditableText.idl) |
michael@0 | 4 | * |
michael@0 | 5 | * IAccessible2 IDL Specification |
michael@0 | 6 | * |
michael@0 | 7 | * Copyright (c) 2007, 2012 Linux Foundation |
michael@0 | 8 | * Copyright (c) 2006 IBM Corporation |
michael@0 | 9 | * Copyright (c) 2000, 2006 Sun Microsystems, Inc. |
michael@0 | 10 | * All rights reserved. |
michael@0 | 11 | * |
michael@0 | 12 | * |
michael@0 | 13 | * Redistribution and use in source and binary forms, with or without |
michael@0 | 14 | * modification, are permitted provided that the following conditions |
michael@0 | 15 | * are met: |
michael@0 | 16 | * |
michael@0 | 17 | * 1. Redistributions of source code must retain the above copyright |
michael@0 | 18 | * notice, this list of conditions and the following disclaimer. |
michael@0 | 19 | * |
michael@0 | 20 | * 2. Redistributions in binary form must reproduce the above |
michael@0 | 21 | * copyright notice, this list of conditions and the following |
michael@0 | 22 | * disclaimer in the documentation and/or other materials |
michael@0 | 23 | * provided with the distribution. |
michael@0 | 24 | * |
michael@0 | 25 | * 3. Neither the name of the Linux Foundation nor the names of its |
michael@0 | 26 | * contributors may be used to endorse or promote products |
michael@0 | 27 | * derived from this software without specific prior written |
michael@0 | 28 | * permission. |
michael@0 | 29 | * |
michael@0 | 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
michael@0 | 31 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
michael@0 | 32 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@0 | 33 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
michael@0 | 34 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
michael@0 | 35 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@0 | 36 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
michael@0 | 37 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
michael@0 | 38 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
michael@0 | 39 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
michael@0 | 40 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
michael@0 | 41 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
michael@0 | 42 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
michael@0 | 43 | * |
michael@0 | 44 | * This BSD License conforms to the Open Source Initiative "Simplified |
michael@0 | 45 | * BSD License" as published at: |
michael@0 | 46 | * http://www.opensource.org/licenses/bsd-license.php |
michael@0 | 47 | * |
michael@0 | 48 | * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 |
michael@0 | 49 | * mark may be used in accordance with the Linux Foundation Trademark |
michael@0 | 50 | * Policy to indicate compliance with the IAccessible2 specification. |
michael@0 | 51 | * |
michael@0 | 52 | ************************************************************************/ |
michael@0 | 53 | |
michael@0 | 54 | import "objidl.idl"; |
michael@0 | 55 | import "oaidl.idl"; |
michael@0 | 56 | import "oleacc.idl"; |
michael@0 | 57 | import "IA2CommonTypes.idl"; |
michael@0 | 58 | |
michael@0 | 59 | /** @brief This interface provides clipboard capability to text objects. |
michael@0 | 60 | |
michael@0 | 61 | This interface is typically used in conjunction with the IAccessibleText |
michael@0 | 62 | interface and complements that interface with the additional capability of |
michael@0 | 63 | clipboard operations. Note that even a read only text object can support |
michael@0 | 64 | the copy capability so this interface is not limited to editable objects. |
michael@0 | 65 | |
michael@0 | 66 | The substrings used with this interface are specified as follows: |
michael@0 | 67 | If startOffset is less than endOffset, the substring starts with the |
michael@0 | 68 | character at startOffset and ends with the character just before endOffset. |
michael@0 | 69 | If endOffset is lower than startOffset, the result is the same as a call |
michael@0 | 70 | with the two arguments exchanged. The whole text can be defined by passing |
michael@0 | 71 | the indices zero and IAccessibleText::nCharacters. If both indices have the |
michael@0 | 72 | same value, an empty string is defined. |
michael@0 | 73 | |
michael@0 | 74 | Refer to the @ref _specialOffsets |
michael@0 | 75 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 76 | for information about a special offset constant that can be used in %IAccessibleEditableText methods. |
michael@0 | 77 | */ |
michael@0 | 78 | [object, uuid(A59AA09A-7011-4b65-939D-32B1FB5547E3)] |
michael@0 | 79 | interface IAccessibleEditableText : IUnknown |
michael@0 | 80 | { |
michael@0 | 81 | |
michael@0 | 82 | /** @brief Copies the text range into the clipboard. |
michael@0 | 83 | |
michael@0 | 84 | The selection is set to the specified offsets and then selection is copied into |
michael@0 | 85 | the system clipboard. |
michael@0 | 86 | |
michael@0 | 87 | @param [in] startOffset |
michael@0 | 88 | Start index of the text to moved into the clipboard. |
michael@0 | 89 | The valid range is 0..length. |
michael@0 | 90 | @param [in] endOffset |
michael@0 | 91 | End index of the text to moved into the clipboard. |
michael@0 | 92 | The valid range is 0..length. |
michael@0 | 93 | @retval S_OK |
michael@0 | 94 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 95 | @note Refer to @ref _specialOffsets |
michael@0 | 96 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 97 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 98 | methods. |
michael@0 | 99 | @deprecated This function is available via the application's GUI. |
michael@0 | 100 | */ |
michael@0 | 101 | HRESULT copyText |
michael@0 | 102 | ( |
michael@0 | 103 | [in] long startOffset, |
michael@0 | 104 | [in] long endOffset |
michael@0 | 105 | ); |
michael@0 | 106 | |
michael@0 | 107 | /** @brief Deletes a range of text. |
michael@0 | 108 | |
michael@0 | 109 | The text between and including the two given indices is deleted |
michael@0 | 110 | from the text represented by this object. |
michael@0 | 111 | |
michael@0 | 112 | @param [in] startOffset |
michael@0 | 113 | Start index of the text to be deleted. |
michael@0 | 114 | The valid range is 0..length. |
michael@0 | 115 | @param [in] endOffset |
michael@0 | 116 | End index of the text to be deleted. |
michael@0 | 117 | The valid range is 0..length. |
michael@0 | 118 | @retval S_OK |
michael@0 | 119 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 120 | @note Refer to @ref _specialOffsets |
michael@0 | 121 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 122 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 123 | methods. |
michael@0 | 124 | */ |
michael@0 | 125 | HRESULT deleteText |
michael@0 | 126 | ( |
michael@0 | 127 | [in] long startOffset, |
michael@0 | 128 | [in] long endOffset |
michael@0 | 129 | ); |
michael@0 | 130 | |
michael@0 | 131 | /** @brief Inserts text at the specified position. |
michael@0 | 132 | |
michael@0 | 133 | The specified string is inserted at the given index into the text |
michael@0 | 134 | represented by this object. |
michael@0 | 135 | |
michael@0 | 136 | @param [in] offset |
michael@0 | 137 | Index at which to insert the text. |
michael@0 | 138 | The valid range is 0..length. |
michael@0 | 139 | Refer to @ref _specialOffsets |
michael@0 | 140 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 141 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 142 | methods. |
michael@0 | 143 | @param [in] text |
michael@0 | 144 | Text that is inserted. |
michael@0 | 145 | @retval S_OK |
michael@0 | 146 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 147 | */ |
michael@0 | 148 | HRESULT insertText |
michael@0 | 149 | ( |
michael@0 | 150 | [in] long offset, |
michael@0 | 151 | [in] BSTR *text |
michael@0 | 152 | ); |
michael@0 | 153 | |
michael@0 | 154 | /** @brief Deletes a range of text and copies it to the clipboard. |
michael@0 | 155 | |
michael@0 | 156 | The selection is set to the specified offsets, the selection is then copied into |
michael@0 | 157 | the system clipboard, and then the selection is deleted. |
michael@0 | 158 | |
michael@0 | 159 | @param [in] startOffset |
michael@0 | 160 | Start index of the text to be deleted. |
michael@0 | 161 | The valid range is 0..length. |
michael@0 | 162 | @param [in] endOffset |
michael@0 | 163 | End index of the text to be deleted. |
michael@0 | 164 | The valid range is 0..length. |
michael@0 | 165 | @retval S_OK |
michael@0 | 166 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 167 | @note Refer to @ref _specialOffsets |
michael@0 | 168 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 169 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 170 | methods. |
michael@0 | 171 | @deprecated This function is available via the application's GUI. |
michael@0 | 172 | */ |
michael@0 | 173 | HRESULT cutText |
michael@0 | 174 | ( |
michael@0 | 175 | [in] long startOffset, |
michael@0 | 176 | [in] long endOffset |
michael@0 | 177 | ); |
michael@0 | 178 | |
michael@0 | 179 | /** @brief Pastes content from the clipboard. |
michael@0 | 180 | |
michael@0 | 181 | Any existing selection is removed, the clipboard content is then pasted into |
michael@0 | 182 | this object's text at the given offset. This method is similar to the insertText |
michael@0 | 183 | method. If the index is not valid the system clipboard content is not inserted. The |
michael@0 | 184 | behavior is the same as when Ctrl+V is used, i.e. the pasted contents are not |
michael@0 | 185 | necessarily plain text. |
michael@0 | 186 | |
michael@0 | 187 | @param [in] offset |
michael@0 | 188 | Index at which to insert the content from the system clipboard into |
michael@0 | 189 | the text represented by this object. |
michael@0 | 190 | The valid range is 0..length. |
michael@0 | 191 | Refer to @ref _specialOffsets |
michael@0 | 192 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 193 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 194 | methods. |
michael@0 | 195 | @retval S_OK |
michael@0 | 196 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 197 | @deprecated This function is available via the application's GUI. |
michael@0 | 198 | */ |
michael@0 | 199 | HRESULT pasteText |
michael@0 | 200 | ( |
michael@0 | 201 | [in] long offset |
michael@0 | 202 | ); |
michael@0 | 203 | |
michael@0 | 204 | /** @brief Replaces text. |
michael@0 | 205 | |
michael@0 | 206 | The text between the two given indices is replaced by the specified |
michael@0 | 207 | replacement string. This method is equivalent to calling first |
michael@0 | 208 | IAccessibleEditableText::deleteText with the two indices and then |
michael@0 | 209 | calling IAccessibleEditableText::insertText with the replacement text |
michael@0 | 210 | at the start index. |
michael@0 | 211 | |
michael@0 | 212 | @param [in] startOffset |
michael@0 | 213 | Start index of the text to be replaced. |
michael@0 | 214 | The valid range is 0..length. |
michael@0 | 215 | @param [in] endOffset |
michael@0 | 216 | End index of the text to be replaced. |
michael@0 | 217 | The valid range is 0..length. |
michael@0 | 218 | @param [in] text |
michael@0 | 219 | The Text that replaces the text between the given indices. |
michael@0 | 220 | @retval S_OK |
michael@0 | 221 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 222 | @note Refer to @ref _specialOffsets |
michael@0 | 223 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 224 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 225 | methods. |
michael@0 | 226 | */ |
michael@0 | 227 | HRESULT replaceText |
michael@0 | 228 | ( |
michael@0 | 229 | [in] long startOffset, |
michael@0 | 230 | [in] long endOffset, |
michael@0 | 231 | [in] BSTR *text |
michael@0 | 232 | ); |
michael@0 | 233 | |
michael@0 | 234 | /** @brief Replaces the attributes of a text range by the given set of attributes. |
michael@0 | 235 | |
michael@0 | 236 | Sets the attributes for the text between the two given indices. The old |
michael@0 | 237 | attributes are replaced by the new list of attributes. |
michael@0 | 238 | |
michael@0 | 239 | @param [in] startOffset |
michael@0 | 240 | Start index of the text whose attributes are modified. |
michael@0 | 241 | The valid range is 0..length. |
michael@0 | 242 | @param [in] endOffset |
michael@0 | 243 | End index of the text whose attributes are modified. |
michael@0 | 244 | The valid range is 0..length. |
michael@0 | 245 | @param [in] attributes |
michael@0 | 246 | Set of attributes that replaces the old list of attributes of |
michael@0 | 247 | the specified text portion. |
michael@0 | 248 | @retval S_OK |
michael@0 | 249 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 250 | @note Refer to @ref _specialOffsets |
michael@0 | 251 | "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" |
michael@0 | 252 | for information about special offsets that can be used in %IAccessibleEditableText |
michael@0 | 253 | methods. |
michael@0 | 254 | */ |
michael@0 | 255 | HRESULT setAttributes |
michael@0 | 256 | ( |
michael@0 | 257 | [in] long startOffset, |
michael@0 | 258 | [in] long endOffset, |
michael@0 | 259 | [in] BSTR *attributes |
michael@0 | 260 | ); |
michael@0 | 261 | } |
michael@0 | 262 |