Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /************************************************************************* |
michael@0 | 2 | * |
michael@0 | 3 | * File Name (AccessibleAction.idl) |
michael@0 | 4 | * |
michael@0 | 5 | * IAccessible2 IDL Specification |
michael@0 | 6 | * |
michael@0 | 7 | * Copyright (c) 2007, 2013 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 | |
michael@0 | 58 | /** This enum defines values which are predefined actions for use when implementing |
michael@0 | 59 | support for media. |
michael@0 | 60 | |
michael@0 | 61 | This enum is used when specifying an action for IAccessibleAction::doAction. |
michael@0 | 62 | */ |
michael@0 | 63 | |
michael@0 | 64 | enum IA2Actions { |
michael@0 | 65 | IA2_ACTION_OPEN = -1, /**< Used to inform the server that the client will |
michael@0 | 66 | signal via IA2_ACTION_COMPLETE when it has consumed |
michael@0 | 67 | the content provided by the object. This action |
michael@0 | 68 | allows the object's server to wait for all clients |
michael@0 | 69 | to signal their readiness for additional content. |
michael@0 | 70 | Any form of content generation that requires |
michael@0 | 71 | synchronization with an AT would require use of this |
michael@0 | 72 | action. One example is the generation of text describing |
michael@0 | 73 | visual content not obvious from a video's sound track. |
michael@0 | 74 | In this scenario the Text to Speech or Braille output |
michael@0 | 75 | may take more time than the related length of silence |
michael@0 | 76 | in the video's sound track. */ |
michael@0 | 77 | IA2_ACTION_COMPLETE = -2, /**< Used by the client to inform the server that it has |
michael@0 | 78 | consumed the most recent content provided by this object. */ |
michael@0 | 79 | IA2_ACTION_CLOSE = -3 /**< Used to inform the server that the client no longer |
michael@0 | 80 | requires synchronization. */ |
michael@0 | 81 | }; |
michael@0 | 82 | |
michael@0 | 83 | /** @brief This interface gives access to actions that can be executed |
michael@0 | 84 | for accessible objects. |
michael@0 | 85 | |
michael@0 | 86 | Every accessible object that can be manipulated via the native GUI beyond the |
michael@0 | 87 | methods available either in the MSAA IAccessible interface or in the set of |
michael@0 | 88 | IAccessible2 interfaces (other than this IAccessibleAction interface) should |
michael@0 | 89 | support the IAccessibleAction interface in order to provide Assistive Technology |
michael@0 | 90 | access to all the actions that can be performed by the object. Each action can |
michael@0 | 91 | be performed or queried for a name, description or associated key bindings. |
michael@0 | 92 | Actions are needed more for ATs that assist the mobility impaired, such as |
michael@0 | 93 | on-screen keyboards and voice command software. By providing actions directly, |
michael@0 | 94 | the AT can present them to the user without the user having to perform the extra |
michael@0 | 95 | steps to navigate a context menu. |
michael@0 | 96 | |
michael@0 | 97 | The first action should be equivalent to the MSAA default action. If there is |
michael@0 | 98 | only one action, %IAccessibleAction should also be implemented. |
michael@0 | 99 | */ |
michael@0 | 100 | [object, uuid(B70D9F59-3B5A-4dba-AB9E-22012F607DF5)] |
michael@0 | 101 | interface IAccessibleAction : IUnknown |
michael@0 | 102 | { |
michael@0 | 103 | |
michael@0 | 104 | /** @brief Returns the number of accessible actions available in this object. |
michael@0 | 105 | |
michael@0 | 106 | If there are more than one, the first one is considered the |
michael@0 | 107 | "default" action of the object. |
michael@0 | 108 | @param [out] nActions |
michael@0 | 109 | The returned value of the number of actions is zero if there are |
michael@0 | 110 | no actions. |
michael@0 | 111 | @retval S_OK |
michael@0 | 112 | @note This method is missing a [propget] prefix in the IDL. The result is the |
michael@0 | 113 | method is named nActions in generated C++ code instead of get_nActions. |
michael@0 | 114 | */ |
michael@0 | 115 | HRESULT nActions |
michael@0 | 116 | ( |
michael@0 | 117 | [out,retval] long* nActions |
michael@0 | 118 | ); |
michael@0 | 119 | |
michael@0 | 120 | /** @brief Performs the specified Action on the object. |
michael@0 | 121 | @param [in] actionIndex |
michael@0 | 122 | 0 based index specifying the action to perform. If it lies outside |
michael@0 | 123 | the valid range no action is performed. |
michael@0 | 124 | @retval S_OK |
michael@0 | 125 | @retval S_FALSE if action could not be performed |
michael@0 | 126 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 127 | @note If implementing support for media, refer to the predefined constants in the ::IA2Actions enum. |
michael@0 | 128 | */ |
michael@0 | 129 | HRESULT doAction |
michael@0 | 130 | ( |
michael@0 | 131 | [in] long actionIndex |
michael@0 | 132 | ); |
michael@0 | 133 | |
michael@0 | 134 | /** @brief Returns a description of the specified action of the object. |
michael@0 | 135 | @param [in] actionIndex |
michael@0 | 136 | 0 based index specifying which action's description to return. |
michael@0 | 137 | If it lies outside the valid range an empty string is returned. |
michael@0 | 138 | @param [out] description |
michael@0 | 139 | The returned value is a localized string of the specified action. |
michael@0 | 140 | @retval S_OK |
michael@0 | 141 | @retval S_FALSE if there is nothing to return, [out] value is NULL |
michael@0 | 142 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 143 | */ |
michael@0 | 144 | [propget] HRESULT description |
michael@0 | 145 | ( |
michael@0 | 146 | [in] long actionIndex, |
michael@0 | 147 | [out, retval] BSTR *description |
michael@0 | 148 | ); |
michael@0 | 149 | |
michael@0 | 150 | /** @brief Returns an array of BSTRs describing one or more key bindings, if |
michael@0 | 151 | there are any, associated with the specified action. |
michael@0 | 152 | |
michael@0 | 153 | The returned strings are the localized human readable key sequences to be |
michael@0 | 154 | used to activate each action, e.g. "Ctrl+Shift+D". Since these key |
michael@0 | 155 | sequences are to be used when the object has focus, they are like |
michael@0 | 156 | mnemonics (access keys), and not like shortcut (accelerator) keys. |
michael@0 | 157 | |
michael@0 | 158 | There is no need to implement this method for single action controls since |
michael@0 | 159 | that would be redundant with the standard MSAA programming practice of |
michael@0 | 160 | getting the mnemonic from get_accKeyboardShortcut. |
michael@0 | 161 | |
michael@0 | 162 | An AT such as an On Screen Keyboard might not expose these bindings but |
michael@0 | 163 | provide alternative means of activation. |
michael@0 | 164 | |
michael@0 | 165 | Note: the client allocates and passes in an array of pointers. The server |
michael@0 | 166 | allocates the BSTRs and passes back one or more pointers to these BSTRs into |
michael@0 | 167 | the array of pointers allocated by the client. The client is responsible |
michael@0 | 168 | for deallocating the BSTRs. |
michael@0 | 169 | |
michael@0 | 170 | @param [in] actionIndex |
michael@0 | 171 | 0 based index specifying which action's key bindings should be returned. |
michael@0 | 172 | @param [in] nMaxBindings |
michael@0 | 173 | This parameter is ignored. Refer to @ref _arrayConsideration |
michael@0 | 174 | "Special Consideration when using Arrays" for more details. |
michael@0 | 175 | @param [out] keyBindings |
michael@0 | 176 | An array of BSTRs, allocated by the server, one for each key binding. |
michael@0 | 177 | The client must free it with CoTaskMemFree. |
michael@0 | 178 | @param [out] nBindings |
michael@0 | 179 | The number of key bindings returned; the size of the returned array. |
michael@0 | 180 | @retval S_OK |
michael@0 | 181 | @retval S_FALSE if there are no key bindings, [out] values are NULL and 0 respectively |
michael@0 | 182 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 183 | */ |
michael@0 | 184 | [propget] HRESULT keyBinding |
michael@0 | 185 | ( |
michael@0 | 186 | [in] long actionIndex, |
michael@0 | 187 | [in] long nMaxBindings, |
michael@0 | 188 | [out, size_is(,nMaxBindings), length_is(,*nBindings)] BSTR **keyBindings, |
michael@0 | 189 | [out, retval] long *nBindings |
michael@0 | 190 | ); |
michael@0 | 191 | |
michael@0 | 192 | /** @brief Returns the non-localized name of specified action. |
michael@0 | 193 | @param [in] actionIndex |
michael@0 | 194 | 0 based index specifying which action's non-localized name should be returned. |
michael@0 | 195 | @param [out] name |
michael@0 | 196 | @retval S_OK |
michael@0 | 197 | @retval S_FALSE if there is nothing to return, [out] value is NULL |
michael@0 | 198 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 199 | */ |
michael@0 | 200 | [propget] HRESULT name |
michael@0 | 201 | ( |
michael@0 | 202 | [in] long actionIndex, |
michael@0 | 203 | [out, retval] BSTR *name |
michael@0 | 204 | ); |
michael@0 | 205 | |
michael@0 | 206 | /** @brief Returns the localized name of specified action. |
michael@0 | 207 | @param [in] actionIndex |
michael@0 | 208 | 0 based index specifying which action's localized name should be returned. |
michael@0 | 209 | @param [out] localizedName |
michael@0 | 210 | @retval S_OK |
michael@0 | 211 | @retval S_FALSE if there is nothing to return, [out] value is NULL |
michael@0 | 212 | @retval E_INVALIDARG if bad [in] passed |
michael@0 | 213 | */ |
michael@0 | 214 | [propget] HRESULT localizedName |
michael@0 | 215 | ( |
michael@0 | 216 | [in] long actionIndex, |
michael@0 | 217 | [out, retval] BSTR *localizedName |
michael@0 | 218 | ); |
michael@0 | 219 | |
michael@0 | 220 | } |