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
|
//
// SDLTouch.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 6/14/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#import <UIKit/UIKit.h>
@class SDLTouchEvent;
/// Enum: SDLTouchIdentifier
///
/// Identifies finger touch
typedef enum {
/// Touch was first finger
SDLTouchIdentifierFirstFinger = 0,
/// Touch was second finger
SDLTouchIdentifierSecondFinger = 1
} SDLTouchIdentifier;
NS_ASSUME_NONNULL_BEGIN
/// Describes a touch location
@interface SDLTouch : NSObject
/**
* @abstract
* Initializes a touch.
* @param touchEvent
* Incoming touch event from onOnTouchEvent notification.
* @return SDLTouch
* Instance of SDLTouch.
*/
- (instancetype)initWithTouchEvent:(SDLTouchEvent *)touchEvent;
/**
* @abstract
* Identifier of the touch's finger. Refer to SDLTouchIdentifier for valid
* identifiers.
*/
@property (nonatomic, assign, readonly) NSInteger identifier;
/**
* @abstract
* Location of touch point, in the head unit's coordinate system.
*/
@property (nonatomic, assign, readonly) CGPoint location;
/**
* @abstract
* Timestamp in which the touch occured.
*/
@property (nonatomic, assign, readonly) NSUInteger timeStamp;
/**
* @abstract
* Returns whether or not this touch is a first finger.
*/
@property (nonatomic, assign, readonly) BOOL isFirstFinger;
/**
* @abstract
* Returns whether or not this touch is a second finger.
*/
@property (nonatomic, assign, readonly) BOOL isSecondFinger;
@end
NS_ASSUME_NONNULL_END
|