-
Notifications
You must be signed in to change notification settings - Fork 0
/
mouse.go
102 lines (77 loc) · 1.86 KB
/
mouse.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
//----------------------------------------
// 代码由GenlibVcl工具自动生成。
// Copyright © ying32. All Rights Reserved.
//
//----------------------------------------
package vcl
import (
. "gitee.com/ying32/govcl/vcl/api"
. "gitee.com/ying32/govcl/vcl/types"
)
type TMouse struct {
IObject
instance uintptr
}
func NewMouse() *TMouse {
m := new(TMouse)
m.instance = Mouse_Create()
return m
}
func MouseFromInst(inst uintptr) *TMouse {
m := new(TMouse)
m.instance = inst
return m
}
func MouseFromObj(obj IObject) *TMouse {
m := new(TMouse)
m.instance = CheckPtr(obj)
return m
}
func (m *TMouse) Free() {
if m.instance != 0 {
Mouse_Free(m.instance)
m.instance = 0
}
}
func (m *TMouse) Instance() uintptr {
return m.instance
}
func (m *TMouse) IsValid() bool {
return m.instance != 0
}
func (m *TMouse) ClassName() string {
return Mouse_ClassName(m.instance)
}
func (m *TMouse) Equals(Obj IObject) bool {
return Mouse_Equals(m.instance, CheckPtr(Obj))
}
func (m *TMouse) GetHashCode() int32 {
return Mouse_GetHashCode(m.instance)
}
func (m *TMouse) ToString() string {
return Mouse_ToString(m.instance)
}
func (m *TMouse) Capture() HWND {
return Mouse_GetCapture(m.instance)
}
func (m *TMouse) SetCapture(value HWND) {
Mouse_SetCapture(m.instance, value)
}
func (m *TMouse) CursorPos() TPoint {
return Mouse_GetCursorPos(m.instance)
}
func (m *TMouse) SetCursorPos(value TPoint) {
Mouse_SetCursorPos(m.instance, value)
}
func (m *TMouse) IsDragging() bool {
return Mouse_GetIsDragging(m.instance)
}
func (m *TMouse) IsPanning() bool {
return Mouse_GetIsPanning(m.instance)
}
func (m *TMouse) WheelPresent() bool {
return Mouse_GetWheelPresent(m.instance)
}
func (m *TMouse) WheelScrollLines() int32 {
return Mouse_GetWheelScrollLines(m.instance)
}