-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindowinfo.go
More file actions
90 lines (84 loc) · 2.17 KB
/
windowinfo.go
File metadata and controls
90 lines (84 loc) · 2.17 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package view
import (
graphics "github.com/AndroidGoLab/binder/android/graphics"
"github.com/AndroidGoLab/binder/parcel"
)
// Code generated by aidlgen. DO NOT EDIT.
type WindowInfo struct {
DisplayId int32
TaskId int32
Type int32
Layer int32
Focused bool
AccessibilityIdOfAnchor int64
InPictureInPicture bool
HasFlagWatchOutsideTouch bool
RegionInScreen graphics.Region
MagnificationSpec MagnificationSpec
}
var _ parcel.Parcelable = (*WindowInfo)(nil)
func (s *WindowInfo) MarshalParcel(
p *parcel.Parcel,
) error {
p.WriteInt32(s.DisplayId)
p.WriteInt32(s.TaskId)
p.WriteInt32(s.Type)
p.WriteInt32(s.Layer)
p.WriteNullStrongBinder() // null Token
p.WriteNullStrongBinder() // null ParentToken
p.WriteNullStrongBinder() // null ActivityToken
p.WriteBool(s.Focused)
if _err := s.RegionInScreen.MarshalParcel(p); _err != nil {
return _err
}
p.WriteInt32(-1) // null Title
p.WriteInt64(s.AccessibilityIdOfAnchor)
p.WriteBool(s.InPictureInPicture)
p.WriteBool(s.HasFlagWatchOutsideTouch)
p.WriteInt32(-1) // null TransformMatrix
p.WriteInt32(1)
p.WriteInt32(-1) // null ChildTokens
if _err := s.MagnificationSpec.MarshalParcel(p); _err != nil {
return _err
}
p.WriteInt32(0) // null Locales
return nil
}
func (s *WindowInfo) UnmarshalParcel(
p *parcel.Parcel,
) error {
var _err error
s.DisplayId, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.TaskId, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.Type, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.Layer, _err = p.ReadInt32()
if _err != nil {
return _err
}
if _, _, _binderErr := p.ReadNullableStrongBinder(); _binderErr != nil {
return _binderErr
}
if _, _, _binderErr := p.ReadNullableStrongBinder(); _binderErr != nil {
return _binderErr
}
if _, _, _binderErr := p.ReadNullableStrongBinder(); _binderErr != nil {
return _binderErr
}
s.Focused, _err = p.ReadBool()
if _err != nil {
return _err
}
if _err := s.RegionInScreen.UnmarshalParcel(p); _err != nil {
return _err
}
return nil // opaque Title: cannot skip without known wire format
}