forked from joejulian/gio
gesture,widget: add hovered property
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -125,6 +125,16 @@ func (c *Click) Add(ops *op.Ops) {
|
||||
op.Add(ops)
|
||||
}
|
||||
|
||||
// Hovered returns whether a pointer is inside the area.
|
||||
func (c *Click) Hovered() bool {
|
||||
return c.entered
|
||||
}
|
||||
|
||||
// Pressed returns whether a pointer is pressing.
|
||||
func (c *Click) Pressed() bool {
|
||||
return c.pressed
|
||||
}
|
||||
|
||||
// Events returns the next click event, if any.
|
||||
func (c *Click) Events(q event.Queue) []ClickEvent {
|
||||
var events []ClickEvent
|
||||
|
||||
Reference in New Issue
Block a user