From 2acc486899b7253dbbc1656ea444c596d8af16ad Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 21 Apr 2021 19:51:22 +0300 Subject: Mobile: Working on scroll bounce behavior --- src/ui/touch.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/ui/touch.h') diff --git a/src/ui/touch.h b/src/ui/touch.h index 0a24248b..1a6fb350 100644 --- a/src/ui/touch.h +++ b/src/ui/touch.h @@ -27,10 +27,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ iDeclareType(Widget) +enum iWidgetTouchMode { + none_WidgetTouchMode, + touch_WidgetTouchMode, + momentum_WidgetTouchMode, +}; + iBool processEvent_Touch (const SDL_Event *); void update_Touch (void); -void stopWidgetMomentum_Touch(iWidget *widget); -void widgetDestroyed_Touch (iWidget *widget); + +float stopWidgetMomentum_Touch (const iWidget *widget); +enum iWidgetTouchMode widgetMode_Touch (const iWidget *widget); +void widgetDestroyed_Touch (iWidget *widget); iInt2 latestPosition_Touch (void); /* valid during processing of current event */ size_t numFingers_Touch (void); -- cgit v1.2.3