other-licenses/ia2/AccessibleAction.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/other-licenses/ia2/AccessibleAction.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,220 @@
     1.4 +/*************************************************************************
     1.5 + *
     1.6 + *  File Name (AccessibleAction.idl)
     1.7 + *
     1.8 + *  IAccessible2 IDL Specification 
     1.9 + * 
    1.10 + *  Copyright (c) 2007, 2013 Linux Foundation 
    1.11 + *  Copyright (c) 2006 IBM Corporation 
    1.12 + *  Copyright (c) 2000, 2006 Sun Microsystems, Inc. 
    1.13 + *  All rights reserved. 
    1.14 + *   
    1.15 + *   
    1.16 + *  Redistribution and use in source and binary forms, with or without 
    1.17 + *  modification, are permitted provided that the following conditions 
    1.18 + *  are met: 
    1.19 + *   
    1.20 + *   1. Redistributions of source code must retain the above copyright 
    1.21 + *      notice, this list of conditions and the following disclaimer. 
    1.22 + *   
    1.23 + *   2. Redistributions in binary form must reproduce the above 
    1.24 + *      copyright notice, this list of conditions and the following 
    1.25 + *      disclaimer in the documentation and/or other materials 
    1.26 + *      provided with the distribution. 
    1.27 + *
    1.28 + *   3. Neither the name of the Linux Foundation nor the names of its 
    1.29 + *      contributors may be used to endorse or promote products 
    1.30 + *      derived from this software without specific prior written 
    1.31 + *      permission. 
    1.32 + *   
    1.33 + *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
    1.34 + *  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
    1.35 + *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
    1.36 + *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
    1.37 + *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
    1.38 + *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    1.39 + *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    1.40 + *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    1.41 + *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    1.42 + *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    1.43 + *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
    1.44 + *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    1.45 + *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    1.46 + *   
    1.47 + *  This BSD License conforms to the Open Source Initiative "Simplified 
    1.48 + *  BSD License" as published at: 
    1.49 + *  http://www.opensource.org/licenses/bsd-license.php 
    1.50 + *   
    1.51 + *  IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 
    1.52 + *  mark may be used in accordance with the Linux Foundation Trademark 
    1.53 + *  Policy to indicate compliance with the IAccessible2 specification. 
    1.54 + * 
    1.55 + ************************************************************************/ 
    1.56 +
    1.57 +import "objidl.idl";
    1.58 +import "oaidl.idl";
    1.59 +import "oleacc.idl";
    1.60 +
    1.61 +/** This enum defines values which are predefined actions for use when implementing
    1.62 + support for media.
    1.63 +
    1.64 + This enum is used when specifying an action for IAccessibleAction::doAction.
    1.65 +*/
    1.66 +
    1.67 +enum IA2Actions {
    1.68 +  IA2_ACTION_OPEN = -1,         /**< Used to inform the server that the client will
    1.69 +                                signal via IA2_ACTION_COMPLETE when it has consumed
    1.70 +                                the content provided by the object.  This action
    1.71 +                                allows the object's server to wait for all clients
    1.72 +                                to signal their readiness for additional content.
    1.73 +                                Any form of content generation that requires
    1.74 +                                synchronization with an AT would require use of this
    1.75 +                                action.  One example is the generation of text describing
    1.76 +                                visual content not obvious from a video's sound track.
    1.77 +                                In this scenario the Text to Speech or Braille output
    1.78 +                                may take more time than the related length of silence
    1.79 +                                in the video's sound track. */
    1.80 +  IA2_ACTION_COMPLETE = -2,  	/**< Used by the client to inform the server that it has
    1.81 +                                consumed the most recent content provided by this object. */
    1.82 +  IA2_ACTION_CLOSE = -3         /**< Used to inform the server that the client no longer
    1.83 +                                requires synchronization. */
    1.84 +};
    1.85 +        
    1.86 +/** @brief This interface gives access to actions that can be executed
    1.87 +  for accessible objects.
    1.88 +
    1.89 + Every accessible object that can be manipulated via the native GUI beyond the 
    1.90 +  methods available either in the MSAA IAccessible interface or in the set of 
    1.91 +  IAccessible2 interfaces (other than this IAccessibleAction interface) should 
    1.92 +  support the IAccessibleAction interface in order to provide Assistive Technology
    1.93 +  access to all the actions that can be performed by the object.  Each action can 
    1.94 +  be performed or queried for a name, description or associated key bindings.  
    1.95 +  Actions are needed more for ATs that assist the mobility impaired, such as
    1.96 +  on-screen keyboards and voice command software.  By providing actions directly,
    1.97 +  the AT can present them to the user without the user having to perform the extra
    1.98 +  steps to navigate a context menu.
    1.99 +
   1.100 + The first action should be equivalent to the MSAA default action.  If there is 
   1.101 +  only one action, %IAccessibleAction should also be implemented.
   1.102 +*/
   1.103 +[object, uuid(B70D9F59-3B5A-4dba-AB9E-22012F607DF5)]
   1.104 +interface IAccessibleAction : IUnknown
   1.105 +{
   1.106 +
   1.107 +  /** @brief Returns the number of accessible actions available in this object.
   1.108 +    
   1.109 +   If there are more than one, the first one is considered the
   1.110 +    "default" action of the object.
   1.111 +   @param [out] nActions
   1.112 +    The returned value of the number of actions is zero if there are
   1.113 +    no actions.
   1.114 +   @retval S_OK
   1.115 +   @note This method is missing a [propget] prefix in the IDL.  The result is the
   1.116 +    method is named nActions in generated C++ code instead of get_nActions.
   1.117 +  */
   1.118 +  HRESULT nActions
   1.119 +    (
   1.120 +     [out,retval] long* nActions
   1.121 +    );
   1.122 +
   1.123 +  /** @brief Performs the specified Action on the object.
   1.124 +   @param [in] actionIndex
   1.125 +    0 based index specifying the action to perform.  If it lies outside
   1.126 +    the valid range no action is performed.
   1.127 +   @retval S_OK
   1.128 +   @retval S_FALSE if action could not be performed
   1.129 +   @retval E_INVALIDARG if bad [in] passed
   1.130 +   @note If implementing support for media, refer to the predefined constants in the ::IA2Actions enum.
   1.131 +    */
   1.132 +  HRESULT doAction
   1.133 +    (
   1.134 +     [in] long actionIndex
   1.135 +    );
   1.136 +
   1.137 +  /** @brief Returns a description of the specified action of the object.
   1.138 +   @param [in] actionIndex
   1.139 +    0 based index specifying which action's description to return.
   1.140 +    If it lies outside the valid range an empty string is returned.
   1.141 +   @param [out] description
   1.142 +    The returned value is a localized string of the specified action.
   1.143 +   @retval S_OK
   1.144 +   @retval S_FALSE if there is nothing to return, [out] value is NULL 
   1.145 +   @retval E_INVALIDARG if bad [in] passed
   1.146 +    */
   1.147 +  [propget] HRESULT description
   1.148 +    (
   1.149 +     [in] long actionIndex,
   1.150 +     [out, retval] BSTR *description
   1.151 +    );
   1.152 +
   1.153 +  /** @brief Returns an array of BSTRs describing one or more key bindings, if
   1.154 +   there are any, associated with the specified action.
   1.155 +
   1.156 +   The returned strings are the localized human readable key sequences to be
   1.157 +   used to activate each action, e.g. "Ctrl+Shift+D".  Since these key
   1.158 +   sequences are to be used when the object has focus, they are like
   1.159 +   mnemonics (access keys), and not like shortcut (accelerator) keys.
   1.160 +
   1.161 +   There is no need to implement this method for single action controls since
   1.162 +   that would be redundant with the standard MSAA programming practice of
   1.163 +   getting the mnemonic from get_accKeyboardShortcut.
   1.164 +
   1.165 +   An AT such as an On Screen Keyboard might not expose these bindings but
   1.166 +   provide alternative means of activation.
   1.167 +
   1.168 +   Note: the client allocates and passes in an array of pointers.  The server
   1.169 +   allocates the BSTRs and passes back one or more pointers to these BSTRs into
   1.170 +   the array of pointers allocated by the client.  The client is responsible 
   1.171 +   for deallocating the BSTRs.
   1.172 +
   1.173 +   @param [in] actionIndex
   1.174 +    0 based index specifying which action's key bindings should be returned.
   1.175 +   @param [in] nMaxBindings
   1.176 +    This parameter is ignored. Refer to @ref _arrayConsideration
   1.177 +	"Special Consideration when using Arrays" for more details.
   1.178 +   @param [out] keyBindings
   1.179 +    An array of BSTRs, allocated by the server, one for each key binding.
   1.180 +	The client must free it with CoTaskMemFree.
   1.181 +   @param [out] nBindings
   1.182 +    The number of key bindings returned; the size of the returned array.
   1.183 +   @retval S_OK
   1.184 +   @retval S_FALSE if there are no key bindings, [out] values are NULL and 0 respectively 
   1.185 +   @retval E_INVALIDARG if bad [in] passed
   1.186 +	*/
   1.187 +  [propget] HRESULT keyBinding
   1.188 +    (
   1.189 +     [in] long actionIndex,
   1.190 +     [in] long nMaxBindings,
   1.191 +     [out, size_is(,nMaxBindings), length_is(,*nBindings)] BSTR **keyBindings,
   1.192 +	 [out, retval] long *nBindings
   1.193 +    );
   1.194 +
   1.195 +  /** @brief Returns the non-localized name of specified action.
   1.196 +   @param [in] actionIndex
   1.197 +    0 based index specifying which action's non-localized name should be returned.
   1.198 +   @param [out] name
   1.199 +   @retval S_OK
   1.200 +   @retval S_FALSE if there is nothing to return, [out] value is NULL 
   1.201 +   @retval E_INVALIDARG if bad [in] passed
   1.202 +   */
   1.203 +  [propget] HRESULT name
   1.204 +    (
   1.205 +     [in] long actionIndex,
   1.206 +     [out, retval] BSTR *name
   1.207 +    );
   1.208 +
   1.209 +  /** @brief Returns the localized name of specified action.
   1.210 +   @param [in] actionIndex
   1.211 +    0 based index specifying which action's localized name should be returned.
   1.212 +   @param [out] localizedName
   1.213 +   @retval S_OK
   1.214 +   @retval S_FALSE if there is nothing to return, [out] value is NULL 
   1.215 +   @retval E_INVALIDARG if bad [in] passed
   1.216 +   */
   1.217 +  [propget] HRESULT localizedName
   1.218 +    (
   1.219 +     [in] long actionIndex,
   1.220 +     [out, retval] BSTR *localizedName
   1.221 +    );
   1.222 +
   1.223 +}

mercurial