summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-18 21:41:46 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-18 21:41:46 +0200
commit3d0f88fcf9a262680c19bd5c44e407a02c409dcf (patch)
treecfd39dbe14683e5c9fa4b24805a49c3301a10f3f /src/ui/widget.c
parent0962147cc8fa92e5a79458bf1270ded51c9a4433 (diff)
iOS: Working on touch event handling
Handle finger down, motion, and up events to implement basic taps, long presses, and inertia scrolling. Much finetuning still to be done, and certain widgets like input fields and scrollbars need a direct drag mode (they were working fine via the "mouse" events already).
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index b60c67e3..5afb004f 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -731,6 +731,9 @@ size_t childIndex_Widget(const iWidget *d, const iAnyObject *child) {
731} 731}
732 732
733iAny *hitChild_Widget(const iWidget *d, iInt2 coord) { 733iAny *hitChild_Widget(const iWidget *d, iInt2 coord) {
734 if (d->flags & unhittable_WidgetFlag) {
735 return NULL;
736 }
734 iConstForEach(ObjectList, i, d->children) { 737 iConstForEach(ObjectList, i, d->children) {
735 iAny *found = hitChild_Widget(constAs_Widget(i.object), coord); 738 iAny *found = hitChild_Widget(constAs_Widget(i.object), coord);
736 if (found) return found; 739 if (found) return found;