LibreOffice Module winaccessibility (master) 1
AccAction.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include "Resource.h" // main symbols
23#include "AccActionBase.h"
24
28class ATL_NO_VTABLE CAccAction :
29 public CComObjectRoot,
30 public CComCoClass<CAccAction, &CLSID_AccAction>,
31 public IAccessibleAction,
32 public CAccActionBase
33{
34public:
36 {
37
38 }
39
40 DECLARE_NO_REGISTRY()
41
42 BEGIN_COM_MAP(CAccAction)
43 COM_INTERFACE_ENTRY(IAccessibleAction)
44 COM_INTERFACE_ENTRY(IUNOXWrapper)
45 COM_INTERFACE_ENTRY_FUNC_BLIND(0,SmartQI_)
46#if defined __clang__
47#pragma clang diagnostic push
48#pragma clang diagnostic ignored "-Winconsistent-missing-override"
49#endif
50 END_COM_MAP()
51#if defined __clang__
52#pragma clang diagnostic pop
53#endif
54
55 static HRESULT WINAPI SmartQI_(void* pv,
56 REFIID iid, void** ppvObject, DWORD_PTR)
57 {
58 return static_cast<CAccAction*>(pv)->SmartQI(iid,ppvObject);
59 }
60
61 HRESULT SmartQI(REFIID iid, void** ppvObject)
62 {
63 if( m_pOuterUnknown )
64 return OuterQueryInterface(iid,ppvObject);
65 return E_FAIL;
66 }
67
68 // IAccessibleAction
69public:
70 // IAccessibleAction
71
72 // Returns the number of action.
73 STDMETHOD(nActions)(/*[out,retval]*/long* nActions) override;
74
75 // Performs specified action on the object.
76 STDMETHOD(doAction)(/* [in] */ long actionIndex) override;
77
78 // Gets description of specified action.
79 STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description) override;
80
81 // added , 2006/06/28, for driver 07/11
82 // get the action name
83 STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name) override;
84
85 // get the localized action name
86 STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName) override;
87
88 // Returns key binding object (if any) associated with specified action
89 // key binding is string.
90 // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
91 STDMETHOD(get_keyBinding)(
92 /* [in] */ long actionIndex,
93 /* [in] */ long nMaxBinding,
94 /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
95 /* [retval][out] */ long __RPC_FAR *nBinding) override;
96
97 // Override of IUNOXWrapper.
98 STDMETHOD(put_XSubInterface)(hyper pXSubInterface) override;
99
100};
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long long nMaxBinding
Definition: AccActionBase.h:60
long long BSTR __RPC_FAR *__RPC_FAR long __RPC_FAR * nBinding
Definition: AccActionBase.h:62
CAccAction implements IAccessibleAction interface.
Definition: AccAction.h:33
CAccAction()
Definition: AccAction.h:35
static HRESULT WINAPI SmartQI_(void *pv, REFIID iid, void **ppvObject, DWORD_PTR)
Definition: AccAction.h:55
HRESULT SmartQI(REFIID iid, void **ppvObject)
Definition: AccAction.h:61
This interface gives access to actions that can be executed for accessible objects.
BSTR localizedName([in] long actionIndex)
Returns the localized name of specified action.
BSTR description([in] long actionIndex)
Returns a description of the specified action of the object.
HRESULT nActions([out, retval] long *nActions)
Returns the number of accessible actions available in this object.
long keyBinding([in] long actionIndex,[in] long nMaxBindings,[out, size_is(, nMaxBindings), length_is(, *nBindings)] BSTR keyBindings)
Returns an array of BSTRs describing one or more key bindings, if there are any, associated with the ...
BSTR name([in] long actionIndex)
Returns the non-localized name of specified action.