io/pointer,io/router: [API] make pass-through a property of AreaOp

We're about to make operation scopes explicit, which would result in
both AreaOp and PassOp be scoped. However, PassOp seems to light to have
its separate stack, so this change instead makes pass-through a property
of an area. We're assuming that clients that want pass-through are also
aware of the affected hit area.

API change: replace PassOps with the AreaOp.PassThrough field.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-03 18:23:55 +02:00
parent 62daadb37c
commit 6f80b94b4a
6 changed files with 51 additions and 56 deletions
+1 -6
View File
@@ -19,7 +19,6 @@ const (
TypeLinearGradient
TypeArea
TypePointerInput
TypePass
TypeClipboardRead
TypeClipboardWrite
TypeKeyInput
@@ -45,9 +44,8 @@ const (
TypePaintLen = 1
TypeColorLen = 1 + 4
TypeLinearGradientLen = 1 + 8*2 + 4*2
TypeAreaLen = 1 + 1 + 4*4
TypeAreaLen = 1 + 1 + 1 + 4*4
TypePointerInputLen = 1 + 1 + 1 + 2*4 + 2*4
TypePassLen = 1 + 1
TypeClipboardReadLen = 1
TypeClipboardWriteLen = 1
TypeKeyInputLen = 1 + 1
@@ -90,7 +88,6 @@ func (t OpType) Size() int {
TypeLinearGradientLen,
TypeAreaLen,
TypePointerInputLen,
TypePassLen,
TypeClipboardReadLen,
TypeClipboardWriteLen,
TypeKeyInputLen,
@@ -142,8 +139,6 @@ func (t OpType) String() string {
return "Area"
case TypePointerInput:
return "PointerInput"
case TypePass:
return "Pass"
case TypeClipboardRead:
return "ClipboardRead"
case TypeClipboardWrite: