Acacia
ia_2.h
1 #ifndef LIB_IA2_IA_2_H_
2 #define LIB_IA2_IA_2_H_
3 
4 #include <string>
5 #include <vector>
6 
7 #include <wrl/client.h>
8 
9 #include "acacia/export.h"
10 #include "third_party/ia2/include/ia2/ia2_api_all.h"
11 
12 namespace acacia {
13 
18 struct GroupPosition {
19  long level;
20  long setsize;
21  long position;
22 
23  GroupPosition(){};
24  GroupPosition(long level, long setsize, long position)
25  : level(level), setsize(setsize), position(position) {}
26 
27  bool IsEmpty() { return level == 0 && setsize == 0 && position == 0; }
28 };
29 
38 class ACACIA_EXPORT IA2 {
39  public:
40  IA2(Microsoft::WRL::ComPtr<IAccessible2> iface) : iface_(iface) {}
41  ~IA2(){};
42 
47  bool isNull() { return !iface_; }
48 
54  std::string toString();
55 
61  std::string getAttributes();
62 
72 
79  std::vector<std::string> getRelations();
80 
86  std::string role();
87 
93  long getStates();
94 
101  std::vector<std::string> getStateStrings();
102 
103  private:
104  Microsoft::WRL::ComPtr<IAccessible2> iface_;
105 };
106 
107 } // namespace acacia
108 
109 #endif // LIB_IA2_IA_2_H_
Definition: ia_2.h:38
std::string toString()
std::string role()
bool isNull()
Definition: ia_2.h:47
std::string getAttributes()
long getStates()
std::vector< std::string > getStateStrings()
GroupPosition getGroupPosition()
std::vector< std::string > getRelations()
Definition: ia_2.h:18