-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeyevent.go
More file actions
74 lines (68 loc) · 1.5 KB
/
keyevent.go
File metadata and controls
74 lines (68 loc) · 1.5 KB
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
package view
import (
"github.com/AndroidGoLab/binder/parcel"
)
// Code generated by aidlgen. DO NOT EDIT.
type KeyEvent struct {
ParcelTokenKeyEvent int32
Id int32
DeviceId int32
Source int32
DisplayId int32
Action int32
KeyCode int32
RepeatCount int32
MetaState int32
ScanCode int32
Flags int32
DownTime int64
EventTime int64
Characters string
}
var _ parcel.Parcelable = (*KeyEvent)(nil)
func (s *KeyEvent) MarshalParcel(
p *parcel.Parcel,
) error {
p.WriteInt32(s.ParcelTokenKeyEvent)
p.WriteInt32(s.Id)
p.WriteInt32(s.DeviceId)
p.WriteInt32(s.Source)
p.WriteInt32(s.DisplayId)
p.WriteInt32(-1) // null Hmac
p.WriteInt32(s.Action)
p.WriteInt32(s.KeyCode)
p.WriteInt32(s.RepeatCount)
p.WriteInt32(s.MetaState)
p.WriteInt32(s.ScanCode)
p.WriteInt32(s.Flags)
p.WriteInt64(s.DownTime)
p.WriteInt64(s.EventTime)
p.WriteString16(s.Characters)
return nil
}
func (s *KeyEvent) UnmarshalParcel(
p *parcel.Parcel,
) error {
var _err error
s.ParcelTokenKeyEvent, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.Id, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.DeviceId, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.Source, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.DisplayId, _err = p.ReadInt32()
if _err != nil {
return _err
}
return nil // opaque Hmac: cannot skip without known wire format
}