-
Notifications
You must be signed in to change notification settings - Fork 1
/
AccessibleTextView.h
82 lines (53 loc) · 3.14 KB
/
AccessibleTextView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// AccessibleTextView.h
#ifndef AccessibleTextView_h
#define AccessibleTextView_h
#include "TextView.h"
#include <Windows.h>
#include <OleAcc.h>
class AccessibleTextView : public IAccessible
{
public:
AccessibleTextView( TextView& textView );
// IUknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject );
virtual ULONG STDMETHODCALLTYPE AddRef();
virtual ULONG STDMETHODCALLTYPE Release();
// IDispatch
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount( UINT *pctinfo );
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo );
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId );
virtual HRESULT STDMETHODCALLTYPE Invoke( DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS* pDispParams,
VARIANT* pVarResult,
EXCEPINFO* pExcepInfo,
UINT* puArgErr );
// IAccessible
virtual HRESULT STDMETHODCALLTYPE get_accParent( IDispatch** ppdispParent );
virtual HRESULT STDMETHODCALLTYPE get_accChildCount( long* pcountChildren );
virtual HRESULT STDMETHODCALLTYPE get_accChild( VARIANT varChild, IDispatch** ppdispChild );
virtual HRESULT STDMETHODCALLTYPE get_accName( VARIANT varChild, BSTR* pszName );
virtual HRESULT STDMETHODCALLTYPE get_accValue( VARIANT varChild, BSTR* pszValue );
virtual HRESULT STDMETHODCALLTYPE get_accDescription( VARIANT varChild, BSTR* pszDescription );
virtual HRESULT STDMETHODCALLTYPE get_accRole( VARIANT varChild, VARIANT* pvarRole );
virtual HRESULT STDMETHODCALLTYPE get_accState( VARIANT varChild,VARIANT* pvarState );
virtual HRESULT STDMETHODCALLTYPE get_accHelp( VARIANT varChild, BSTR* pszHelp );
virtual HRESULT STDMETHODCALLTYPE get_accHelpTopic( BSTR* pszHelpFile, VARIANT varChild, long* pidTopic );
virtual HRESULT STDMETHODCALLTYPE get_accKeyboardShortcut( VARIANT varChild, BSTR* pszKeyboardShortcut );
virtual HRESULT STDMETHODCALLTYPE get_accFocus( VARIANT* pvarChild );
virtual HRESULT STDMETHODCALLTYPE get_accSelection( VARIANT* pvarChildren );
virtual HRESULT STDMETHODCALLTYPE get_accDefaultAction( VARIANT varChild, BSTR* pszDefaultAction );
virtual HRESULT STDMETHODCALLTYPE accSelect( long flagsSelect, VARIANT varChild );
virtual HRESULT STDMETHODCALLTYPE accLocation( long* pxLeft, long* pyTop, long* pcxWidth, long* pcyHeight, VARIANT varChild );
virtual HRESULT STDMETHODCALLTYPE accNavigate( long navDir, VARIANT varStart, VARIANT* pvarEndUpAt );
virtual HRESULT STDMETHODCALLTYPE accHitTest( long xLeft, long yTop, VARIANT* pvarChild );
virtual HRESULT STDMETHODCALLTYPE accDoDefaultAction( VARIANT varChild );
virtual HRESULT STDMETHODCALLTYPE put_accName( VARIANT varChild, BSTR szName );
virtual HRESULT STDMETHODCALLTYPE put_accValue( VARIANT varChild, BSTR szValue );
private:
ULONG m_refCount;
TextView& m_textView;
};
#endif