Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATGUI/CATAccessible.h Source File

CATAccessible.h

Go to the documentation of this file.
00001 /// \file CATAccessible.h
00002 /// \brief Base class for Microsoft's IAccessible handling
00003 /// \ingroup CATGUI
00004 ///
00005 /// Copyright (c) 2007-2008 by Michael Ellison.
00006 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00007 ///
00008 // $Author: mikeellison $
00009 // $Date: 2008-01-24 06:27:32 -0600 (Thu, 24 Jan 2008) $
00010 // $Revision:   $
00011 // $NoKeywords: $
00012 
00013 #ifndef _CATACCESSIBLE_H_
00014 #define _CATACCESSIBLE_H_
00015 
00016 #include "CATInternal.h"
00017 #include "CATGuiObj.h"
00018 #include <Oleacc.h>
00019 
00020 class CATWindow;
00021 
00022 #define CATACC HRESULT STDMETHODCALLTYPE
00023 
00024 class CATAccessible : public IAccessible
00025 {
00026     public:
00027         // IHateCOM
00028 
00029         CATAccessible(CATGuiObj* object, CATWindow* window);
00030 
00031         /// Called by the linked CATGuiObject upon it's destruction.
00032         /// We should clear our ptr to it and release a ref.
00033         virtual  void   ObjectDeath();
00034 
00035         // IUnknown
00036         virtual  CATACC QueryInterface(         REFIID          riid,
00037                                                 void **         ppvObject);
00038         virtual  ULONG STDMETHODCALLTYPE AddRef ( void);
00039 
00040         virtual  ULONG STDMETHODCALLTYPE Release( void);
00041 
00042         // IDispatch
00043         virtual  CATACC GetTypeInfoCount(       UINT *          pctinfo);
00044         
00045         virtual  CATACC GetTypeInfo(            UINT            iTInfo,
00046                                                 LCID            lcid,
00047                                                 ITypeInfo **    ppTInfo);
00048         
00049         virtual  CATACC GetIDsOfNames(          REFIID          riid,
00050                                                 __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
00051                                                 UINT            cNames,
00052                                                 LCID            lcid,
00053                                                 __RPC__out_ecount_full(cNames) DISPID *rgDispId);
00054         
00055         virtual  CATACC Invoke(                 DISPID          dispIdMember,
00056                                                 REFIID          riid,
00057                                                 LCID            lcid,
00058                                                 WORD            wFlags,
00059                                                 DISPPARAMS *    pDispParams,
00060                                                 VARIANT *       pVarResult,
00061                                                 EXCEPINFO *     pExcepInfo,
00062                                                 UINT *          puArgErr);
00063 
00064         // IAccessible
00065         virtual  CATACC get_accParent    (      IDispatch**     ppdispParent);
00066         
00067         virtual  CATACC get_accChildCount(      long *          pcountChildren);        
00068         
00069         virtual  CATACC get_accChild     (      VARIANT         varChild,
00070                                                 IDispatch **    ppdispChild);
00071         
00072         virtual  CATACC get_accName      (      VARIANT         varChild,
00073                                                 BSTR *          pszName);
00074         
00075         virtual  CATACC get_accValue     (      VARIANT         varChild,
00076                                                 BSTR *          pszValue);
00077         
00078         virtual  CATACC get_accDescription(     VARIANT         varChild,
00079                                                 BSTR *          pszDescription);
00080         
00081         virtual  CATACC get_accRole      (      VARIANT         varChild,
00082                                                 VARIANT *       pvarRole);
00083         
00084         virtual  CATACC get_accState     (      VARIANT         varChild, 
00085                                                 VARIANT *       pvarState);
00086         
00087         virtual  CATACC get_accHelp      (      VARIANT         varChild,
00088                                                 BSTR *          pszHelp);
00089         
00090         virtual  CATACC get_accHelpTopic (      BSTR *          pszHelpFile,
00091                                                 VARIANT         varChild,
00092                                                 long *          pidTopic);
00093         
00094         virtual  CATACC get_accKeyboardShortcut(VARIANT         varChild,
00095                                                 BSTR *          pszKeyboardShortcut);
00096         
00097         virtual  CATACC get_accFocus     (      VARIANT *       pvarChild);
00098         
00099         virtual  CATACC get_accSelection (      VARIANT *       pvarChildren);
00100         
00101         virtual  CATACC get_accDefaultAction(   VARIANT         varChild,
00102                                                 BSTR *          pszDefaultAction);
00103         
00104         virtual  CATACC accSelect        (      long            flagsSelect,
00105                                                 VARIANT         varChild);
00106         
00107         virtual  CATACC accLocation      (      long *          pxLeft,
00108                                                 long *          pyTop,
00109                                                 long *          pcxWidth,
00110                                                 long *          pcyHeight,
00111                                                  VARIANT        varChild);
00112         
00113         virtual  CATACC accNavigate      (      long            navDir,
00114                                                 VARIANT         varStart,
00115                                                 VARIANT *       pvarEndUpAt);
00116         
00117         virtual  CATACC accHitTest       (      long            xLeft,
00118                                                 long            yTop,
00119                                                 VARIANT *       pvarChild);
00120         
00121         virtual  CATACC accDoDefaultAction(     VARIANT         varChild);
00122         
00123         virtual CATACC put_accName       (      VARIANT         varChild,
00124                                                 BSTR            szName);
00125         
00126         virtual CATACC put_accValue      (      VARIANT         varChild,
00127                                                 BSTR            szValue);
00128     
00129     protected:
00130         virtual     ~CATAccessible();
00131         CATGuiObj*   fObject;
00132         CATWindow*   fWindow;
00133         CATUInt32    fRefCount;
00134 };
00135 
00136 #undef CATACC
00137 
00138 #endif // _CATACCESSIBLE_H_

Generated on Mon Feb 11 04:09:51 2008 for Game Accessibility Suite by doxygen 1.5.4