michael@0: /************************************************************************* michael@0: * michael@0: * File Name (AccessibleEditableText.idl) michael@0: * michael@0: * IAccessible2 IDL Specification michael@0: * michael@0: * Copyright (c) 2007, 2012 Linux Foundation michael@0: * Copyright (c) 2006 IBM Corporation michael@0: * Copyright (c) 2000, 2006 Sun Microsystems, Inc. michael@0: * All rights reserved. michael@0: * michael@0: * michael@0: * Redistribution and use in source and binary forms, with or without michael@0: * modification, are permitted provided that the following conditions michael@0: * are met: michael@0: * michael@0: * 1. Redistributions of source code must retain the above copyright michael@0: * notice, this list of conditions and the following disclaimer. michael@0: * michael@0: * 2. Redistributions in binary form must reproduce the above michael@0: * copyright notice, this list of conditions and the following michael@0: * disclaimer in the documentation and/or other materials michael@0: * provided with the distribution. michael@0: * michael@0: * 3. Neither the name of the Linux Foundation nor the names of its michael@0: * contributors may be used to endorse or promote products michael@0: * derived from this software without specific prior written michael@0: * permission. michael@0: * michael@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND michael@0: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, michael@0: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@0: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE michael@0: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR michael@0: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT michael@0: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; michael@0: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) michael@0: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN michael@0: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR michael@0: * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, michael@0: * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: * michael@0: * This BSD License conforms to the Open Source Initiative "Simplified michael@0: * BSD License" as published at: michael@0: * http://www.opensource.org/licenses/bsd-license.php michael@0: * michael@0: * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 michael@0: * mark may be used in accordance with the Linux Foundation Trademark michael@0: * Policy to indicate compliance with the IAccessible2 specification. michael@0: * michael@0: ************************************************************************/ michael@0: michael@0: import "objidl.idl"; michael@0: import "oaidl.idl"; michael@0: import "oleacc.idl"; michael@0: import "IA2CommonTypes.idl"; michael@0: michael@0: /** @brief This interface provides clipboard capability to text objects. michael@0: michael@0: This interface is typically used in conjunction with the IAccessibleText michael@0: interface and complements that interface with the additional capability of michael@0: clipboard operations. Note that even a read only text object can support michael@0: the copy capability so this interface is not limited to editable objects. michael@0: michael@0: The substrings used with this interface are specified as follows: michael@0: If startOffset is less than endOffset, the substring starts with the michael@0: character at startOffset and ends with the character just before endOffset. michael@0: If endOffset is lower than startOffset, the result is the same as a call michael@0: with the two arguments exchanged. The whole text can be defined by passing michael@0: the indices zero and IAccessibleText::nCharacters. If both indices have the michael@0: same value, an empty string is defined. michael@0: michael@0: Refer to the @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about a special offset constant that can be used in %IAccessibleEditableText methods. michael@0: */ michael@0: [object, uuid(A59AA09A-7011-4b65-939D-32B1FB5547E3)] michael@0: interface IAccessibleEditableText : IUnknown michael@0: { michael@0: michael@0: /** @brief Copies the text range into the clipboard. michael@0: michael@0: The selection is set to the specified offsets and then selection is copied into michael@0: the system clipboard. michael@0: michael@0: @param [in] startOffset michael@0: Start index of the text to moved into the clipboard. michael@0: The valid range is 0..length. michael@0: @param [in] endOffset michael@0: End index of the text to moved into the clipboard. michael@0: The valid range is 0..length. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @note Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: @deprecated This function is available via the application's GUI. michael@0: */ michael@0: HRESULT copyText michael@0: ( michael@0: [in] long startOffset, michael@0: [in] long endOffset michael@0: ); michael@0: michael@0: /** @brief Deletes a range of text. michael@0: michael@0: The text between and including the two given indices is deleted michael@0: from the text represented by this object. michael@0: michael@0: @param [in] startOffset michael@0: Start index of the text to be deleted. michael@0: The valid range is 0..length. michael@0: @param [in] endOffset michael@0: End index of the text to be deleted. michael@0: The valid range is 0..length. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @note Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: */ michael@0: HRESULT deleteText michael@0: ( michael@0: [in] long startOffset, michael@0: [in] long endOffset michael@0: ); michael@0: michael@0: /** @brief Inserts text at the specified position. michael@0: michael@0: The specified string is inserted at the given index into the text michael@0: represented by this object. michael@0: michael@0: @param [in] offset michael@0: Index at which to insert the text. michael@0: The valid range is 0..length. michael@0: Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: @param [in] text michael@0: Text that is inserted. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: */ michael@0: HRESULT insertText michael@0: ( michael@0: [in] long offset, michael@0: [in] BSTR *text michael@0: ); michael@0: michael@0: /** @brief Deletes a range of text and copies it to the clipboard. michael@0: michael@0: The selection is set to the specified offsets, the selection is then copied into michael@0: the system clipboard, and then the selection is deleted. michael@0: michael@0: @param [in] startOffset michael@0: Start index of the text to be deleted. michael@0: The valid range is 0..length. michael@0: @param [in] endOffset michael@0: End index of the text to be deleted. michael@0: The valid range is 0..length. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @note Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: @deprecated This function is available via the application's GUI. michael@0: */ michael@0: HRESULT cutText michael@0: ( michael@0: [in] long startOffset, michael@0: [in] long endOffset michael@0: ); michael@0: michael@0: /** @brief Pastes content from the clipboard. michael@0: michael@0: Any existing selection is removed, the clipboard content is then pasted into michael@0: this object's text at the given offset. This method is similar to the insertText michael@0: method. If the index is not valid the system clipboard content is not inserted. The michael@0: behavior is the same as when Ctrl+V is used, i.e. the pasted contents are not michael@0: necessarily plain text. michael@0: michael@0: @param [in] offset michael@0: Index at which to insert the content from the system clipboard into michael@0: the text represented by this object. michael@0: The valid range is 0..length. michael@0: Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @deprecated This function is available via the application's GUI. michael@0: */ michael@0: HRESULT pasteText michael@0: ( michael@0: [in] long offset michael@0: ); michael@0: michael@0: /** @brief Replaces text. michael@0: michael@0: The text between the two given indices is replaced by the specified michael@0: replacement string. This method is equivalent to calling first michael@0: IAccessibleEditableText::deleteText with the two indices and then michael@0: calling IAccessibleEditableText::insertText with the replacement text michael@0: at the start index. michael@0: michael@0: @param [in] startOffset michael@0: Start index of the text to be replaced. michael@0: The valid range is 0..length. michael@0: @param [in] endOffset michael@0: End index of the text to be replaced. michael@0: The valid range is 0..length. michael@0: @param [in] text michael@0: The Text that replaces the text between the given indices. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @note Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: */ michael@0: HRESULT replaceText michael@0: ( michael@0: [in] long startOffset, michael@0: [in] long endOffset, michael@0: [in] BSTR *text michael@0: ); michael@0: michael@0: /** @brief Replaces the attributes of a text range by the given set of attributes. michael@0: michael@0: Sets the attributes for the text between the two given indices. The old michael@0: attributes are replaced by the new list of attributes. michael@0: michael@0: @param [in] startOffset michael@0: Start index of the text whose attributes are modified. michael@0: The valid range is 0..length. michael@0: @param [in] endOffset michael@0: End index of the text whose attributes are modified. michael@0: The valid range is 0..length. michael@0: @param [in] attributes michael@0: Set of attributes that replaces the old list of attributes of michael@0: the specified text portion. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: @note Refer to @ref _specialOffsets michael@0: "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" michael@0: for information about special offsets that can be used in %IAccessibleEditableText michael@0: methods. michael@0: */ michael@0: HRESULT setAttributes michael@0: ( michael@0: [in] long startOffset, michael@0: [in] long endOffset, michael@0: [in] BSTR *attributes michael@0: ); michael@0: } michael@0: