forked from auuunya/go-element
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcondition.go
143 lines (126 loc) · 3.5 KB
/
condition.go
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
package uiautomation
import (
"syscall"
"unsafe"
)
type IUIAutomationCondition struct {
vtbl *IUnKnown
}
type IUIAutomationConditionVtbl struct {
IUnKnownVtbl
}
type IUIAutomationAndCondition struct {
vtbl *IUIAutomationCondition
}
type IUIAutomationAndConditionVtbl struct {
IUIAutomationConditionVtbl
Get_ChildCount uintptr
GetChildren uintptr
GetChildrenAsNativeArray uintptr
}
func Get_ChildCount(v *IUIAutomationAndCondition) int32 {
var retVal int32
syscall.SyscallN(
(*IUIAutomationAndConditionVtbl)(unsafe.Pointer(v.vtbl)).Get_ChildCount,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
return retVal
}
func GetChildren(v *IUIAutomationAndCondition) (*TagSafeArray, error) {
var retVal *TagSafeArray
ret, _, _ := syscall.SyscallN(
(*IUIAutomationAndConditionVtbl)(unsafe.Pointer(v.vtbl)).GetChildren,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
if ret != 0 {
return nil, HResult(ret)
}
return retVal, nil
}
func GetChildrenAsNativeArray(v *IUIAutomationAndCondition) (*IUIAutomationCondition, int32, error) {
var retVal *IUIAutomationCondition
var retVal2 int32
ret, _, _ := syscall.SyscallN(
(*IUIAutomationAndConditionVtbl)(unsafe.Pointer(v.vtbl)).GetChildrenAsNativeArray,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
uintptr(unsafe.Pointer(&retVal2)),
)
if ret != 0 {
return nil, -1, HResult(ret)
}
return retVal, retVal2, nil
}
type IUIAutomationBoolCondition struct {
vtbl *IUIAutomationCondition
}
type IUIAutomationBoolConditionVtbl struct {
IUIAutomationConditionVtbl
Get_BooleanValue uintptr
}
func Get_BooleanValue(v *IUIAutomationBoolCondition) int32 {
var retVal int32
syscall.SyscallN(
(*IUIAutomationBoolConditionVtbl)(unsafe.Pointer(v.vtbl)).Get_BooleanValue,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
return retVal
}
type IUIAutomationNotCondition struct {
vtbl *IUIAutomationCondition
}
type IUIAutomationNotConditionVtbl struct {
IUIAutomationConditionVtbl
GetChild uintptr
}
func GetChild(v *IUIAutomationNotCondition) (*IUIAutomationCondition, error) {
var retVal *IUIAutomationCondition
ret, _, _ := syscall.SyscallN(
(*IUIAutomationNotConditionVtbl)(unsafe.Pointer(v.vtbl)).GetChild,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
if ret != 0 {
return nil, HResult(ret)
}
return retVal, nil
}
type IUIAutomationPropertyCondition struct {
vtbl *IUIAutomationCondition
}
type IUIAutomationPropertyConditionVtbl struct {
IUIAutomationConditionVtbl
Get_PropertyConditionFlags uintptr
Get_PropertyId uintptr
Get_PropertyValue uintptr
}
func Get_PropertyConditionFlags(v *IUIAutomationPropertyCondition) *PropertyConditionFlags {
var retVal *PropertyConditionFlags
syscall.SyscallN(
(*IUIAutomationPropertyConditionVtbl)(unsafe.Pointer(v.vtbl)).Get_PropertyConditionFlags,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
return retVal
}
func Get_PropertyId(v *IUIAutomationPropertyCondition) *PropertyId {
var retVal *PropertyId
syscall.SyscallN(
(*IUIAutomationPropertyConditionVtbl)(unsafe.Pointer(v.vtbl)).Get_PropertyId,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
return retVal
}
func Get_PropertyValue(v *IUIAutomationPropertyCondition) *VARIANT {
var retVal *VARIANT
syscall.SyscallN(
(*IUIAutomationPropertyConditionVtbl)(unsafe.Pointer(v.vtbl)).Get_PropertyValue,
uintptr(unsafe.Pointer(v)),
uintptr(unsafe.Pointer(&retVal)),
)
return retVal
}