//**************************************************************************** // // Copyright (c) 2001-2002, Microsoft Corporation // // File: AccessibleWrapper.H // // Copied from nt\shell\themes\themeui\SettingsPg.h // //**************************************************************************** #ifndef _ACCESSIBLE_WRAPPER_H_ #define _ACCESSIBLE_WRAPPER_H_ #include class CAccessibleWrapper: public IAccessible { // We need to do our own refcounting for this wrapper object ULONG m_ref; // Need ptr to the IAccessible IAccessible * m_pAcc; HWND m_hwnd; public: CAccessibleWrapper( HWND hwnd, IAccessible * pAcc); virtual ~CAccessibleWrapper(); // IUnknown // (We do our own ref counting) virtual STDMETHODIMP QueryInterface(REFIID riid, void** ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // IDispatch virtual STDMETHODIMP GetTypeInfoCount(UINT* pctinfo); virtual STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); virtual STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid); virtual STDMETHODIMP Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr); // IAccessible virtual STDMETHODIMP get_accParent(IDispatch ** ppdispParent); virtual STDMETHODIMP get_accChildCount(long* pChildCount); virtual STDMETHODIMP get_accChild(VARIANT varChild, IDispatch ** ppdispChild); virtual STDMETHODIMP get_accName(VARIANT varChild, BSTR* pszName); virtual STDMETHODIMP get_accValue(VARIANT varChild, BSTR* pszValue); virtual STDMETHODIMP get_accDescription(VARIANT varChild, BSTR* pszDescription); virtual STDMETHODIMP get_accRole(VARIANT varChild, VARIANT *pvarRole); virtual STDMETHODIMP get_accState(VARIANT varChild, VARIANT *pvarState); virtual STDMETHODIMP get_accHelp(VARIANT varChild, BSTR* pszHelp); virtual STDMETHODIMP get_accHelpTopic(BSTR* pszHelpFile, VARIANT varChild, long* pidTopic); virtual STDMETHODIMP get_accKeyboardShortcut(VARIANT varChild, BSTR* pszKeyboardShortcut); virtual STDMETHODIMP get_accFocus(VARIANT * pvarFocusChild); virtual STDMETHODIMP get_accSelection(VARIANT * pvarSelectedChildren); virtual STDMETHODIMP get_accDefaultAction(VARIANT varChild, BSTR* pszDefaultAction); virtual STDMETHODIMP accSelect(long flagsSel, VARIANT varChild); virtual STDMETHODIMP accLocation(long* pxLeft, long* pyTop, long* pcxWidth, long* pcyHeight, VARIANT varChild); virtual STDMETHODIMP accNavigate(long navDir, VARIANT varStart, VARIANT * pvarEndUpAt); virtual STDMETHODIMP accHitTest(long xLeft, long yTop, VARIANT * pvarChildAtPoint); virtual STDMETHODIMP accDoDefaultAction(VARIANT varChild); virtual STDMETHODIMP put_accName(VARIANT varChild, BSTR szName); virtual STDMETHODIMP put_accValue(VARIANT varChild, BSTR pszValue); }; #endif _ACCESSIBLE_WRAPPER_H_