forked from hnakamur/w32uiautomation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
iuiautomationselectionitempattern.go
46 lines (38 loc) · 1.1 KB
/
iuiautomationselectionitempattern.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
package w32uiautomation
import (
"syscall"
"unsafe"
"github.com/go-ole/go-ole"
)
type IUIAutomationSelectionItemPattern struct {
ole.IUnknown
}
type IUIAutomationSelectionItemPatternVtbl struct {
ole.IUnknownVtbl
Select uintptr
AddToSelection uintptr
RemoveFromSelection uintptr
Get_CurrentIsSelected uintptr
Get_CurrentSelectionContainer uintptr
Get_CachedIsSelected uintptr
Get_CachedSelectionContainer uintptr
}
var IID_IUIAutomationSelectionItemPattern = &ole.GUID{0xa8efa66a, 0x0fda, 0x421a, [8]byte{0x91, 0x94, 0x38, 0x02, 0x1f, 0x35, 0x78, 0xea}}
func (pat *IUIAutomationSelectionItemPattern) VTable() *IUIAutomationSelectionItemPatternVtbl {
return (*IUIAutomationSelectionItemPatternVtbl)(unsafe.Pointer(pat.RawVTable))
}
func (pat *IUIAutomationSelectionItemPattern) Select() error {
return select_(pat)
}
func select_(pat *IUIAutomationSelectionItemPattern) error {
hr, _, _ := syscall.Syscall(
pat.VTable().Select,
1,
uintptr(unsafe.Pointer(pat)),
0,
0)
if hr != 0 {
return ole.NewError(hr)
}
return nil
}