Acacia
ia_node.h
1 #ifndef LIB_IA2_IA_NODE_H_
2 #define LIB_IA2_IA_NODE_H_
3 
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
8 #include <oleacc.h>
9 #include <wrl/client.h>
10 
11 #include "acacia/export.h"
12 #include "acacia/ia2/ia_2.h"
13 #include "acacia/ia2/ia_action.h"
14 #include "acacia/ia2/ia_component.h"
15 #include "acacia/ia2/ia_hyperlink.h"
16 #include "acacia/ia2/ia_table2.h"
17 #include "acacia/ia2/ia_table_cell.h"
18 #include "acacia/ia2/ia_text.h"
19 #include "acacia/ia2/ia_value.h"
20 
21 namespace acacia {
22  // end of axapi group
28 
36 class ACACIA_EXPORT IANode;
37 
50 ACACIA_EXPORT IANode findRootIANodeForName(const std::string& name,
51  const int pid = 0);
52 
64 ACACIA_EXPORT IANode findRootIANodeForPID(const int pid);
65 
66 class ACACIA_EXPORT IANode {
67  public:
68  IANode(){};
69  IANode(Microsoft::WRL::ComPtr<IAccessible> root, VARIANT child_id)
70  : root_(root), child_id_(child_id){};
71  IANode(Microsoft::WRL::ComPtr<IAccessible> root) : root_(root) {
72  child_id_.intVal = CHILDID_SELF;
73  child_id_.vt = VT_I4;
74  };
75  ~IANode(){};
76 
85 
94 
103 
112 
121 
130 
139 
148 
155  bool isNull();
156 
162  std::string getAccRole();
163 
169  std::string getAccName();
170 
176  std::string getAccDescription();
177 
184 
200 
206  long getAccState();
207 
214  std::vector<std::string> getStateStrings();
215 
216  private:
217  Microsoft::WRL::ComPtr<IServiceProvider> GetServiceProvider();
218 
219  Microsoft::WRL::ComPtr<IAccessible> root_;
220  // This variant is used to recieve IAccessible
221  // information about either the accessible object itself,
222  // or its partial child.
223  // TODO: Create own type for partial children. #95
224  VARIANT child_id_;
225 };
226 
227 } // namespace acacia
228 
229 #endif // LIB_IA2_IA_NODE_H_
Definition: ia_2.h:38
Definition: ia_action.h:20
Definition: ia_component.h:20
Definition: ia_node.h:66
Definition: ia_table2.h:20
Definition: ia_table_cell.h:13
Definition: ia_text.h:13
Definition: ia_value.h:20
std::string getAccDescription()
IAValue QueryValue()
IAComponent QueryComponent()
std::vector< std::string > getStateStrings()
IATableCell QueryTableCell()
IATable2 QueryTable2()
IAAction QueryAction()
std::string getAccRole()
IAHyperlink QueryHyperlink()
IANode AccessibleChildAt(int index)
ACACIA_EXPORT IANode findRootIANodeForPID(const int pid)
ACACIA_EXPORT IANode findRootIANodeForName(const std::string &name, const int pid=0)
IAText QueryText()
long getAccState()
class ACACIA_EXPORT IANode
Definition: ia_node.h:36
long getAccChildCount()
std::string getAccName()