ui/pointer: unexport OpArea.Hit

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-05 10:46:23 +02:00
parent 13f69a28ac
commit b12430bab3
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ func (op *OpArea) decode(d []byte) {
}
}
func (op *OpArea) Hit(pos f32.Point) HitResult {
func (op *OpArea) hit(pos f32.Point) HitResult {
switch op.kind {
case areaRect:
if 0 <= pos.X && pos.X < float32(op.size.X) &&
+4 -4
View File
@@ -109,7 +109,7 @@ func (q *Queue) opHit(handlers *[]Key, pos f32.Point) {
if !ok {
continue
}
res := h.area.Hit(pos)
res := h.area.hit(pos)
opaque = opaque || res == HitOpaque
if res != HitNone {
*handlers = append(*handlers, n.key)
@@ -238,7 +238,7 @@ func (q *Queue) Push(e Event) {
case i == 0:
e.Priority = Foremost
}
e.Hit = h.area.Hit(e.Position) != HitNone
e.Hit = h.area.hit(e.Position) != HitNone
e.Position = h.transform.InvTransform(e.Position)
h.events = append(h.events, e)
if e.Type == Release {
@@ -256,11 +256,11 @@ func (q *Queue) Push(e Event) {
}
}
func (a areaIntersection) Hit(p f32.Point) HitResult {
func (a areaIntersection) hit(p f32.Point) HitResult {
res := HitNone
for _, area := range a {
tp := area.trans.InvTransform(p)
res = area.area.Hit(tp)
res = area.area.hit(tp)
if res == HitNone {
break
}