1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
//
// SDLTouchManager.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 6/14/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SDLTouchManagerDelegate.h"
#import "SDLTouchType.h"
@class SDLTouch;
NS_ASSUME_NONNULL_BEGIN
typedef void(^SDLTouchEventHandler)(SDLTouch *touch, SDLTouchType type);
@interface SDLTouchManager : NSObject
@property (nonatomic, weak, nullable) id<SDLTouchManagerDelegate> touchEventDelegate;
/**
* @abstract
* Returns all OnTouchEvent notifications as SDLTouch and SDLTouchType objects.
*/
@property (copy, nonatomic, nullable) SDLTouchEventHandler touchEventHandler;
/**
* @abstract
* Distance between two taps on the screen, in the head unit's coordinate system, used
* for registering double-tap callbacks.
* @remark
* Default is 50 pixels.
*/
@property (nonatomic, assign) CGFloat tapDistanceThreshold;
/**
* @abstract
* Time (in seconds) between tap events to register a double-tap callback.
* @remark
* Default is 0.4 seconds.
*/
@property (nonatomic, assign) CGFloat tapTimeThreshold;
/**
* @abstract
* Time (in seconds) between movement events to register panning or pinching
* callbacks.
* @remark
* Default is 0.05 seconds.
*/
@property (nonatomic, assign) CGFloat movementTimeThreshold;
/**
* @abstract
* Boolean denoting whether or not the touch manager should deliver touch event
* callbacks.
* @remark
* Default is true.
*/
@property (nonatomic, assign, getter=isTouchEnabled) BOOL touchEnabled;
/**
* @abstract
* Cancels pending touch event timers that may be in progress.
* @remark
* Currently only impacts the timer used to register single taps.
*/
- (void)cancelPendingTouches;
@end
NS_ASSUME_NONNULL_END
|