mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
ui/pointer: unexport OpArea.Hit
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user