blob: 10d0b0b75bd40ee64b63fcffcc352df8230d783d (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
<h1>SDLTouch Class Reference</h1>
<h3>Section Contents</h3>
<ul>
<li><a href="#section--initWithTouchEvent:">-initWithTouchEvent:</a></li>
<li><a href="#section-identifier">identifier</a></li>
<li><a href="#section-location">location</a></li>
<li><a href="#section-timeStamp">timeStamp</a></li>
<li><a href="#section-isFirstFinger">isFirstFinger</a></li>
<li><a href="#section-isSecondFinger">isSecondFinger</a></li>
</ul>
<h3>Overview</h3>
<p>Describes a touch location</p>
<section class="section task-group-section">
<h3 id="section--initWithTouchEvent:">
-initWithTouchEvent:
</h3>
<p>@abstract
Initializes a touch.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithTouchEvent</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLTouchEvent.html">SDLTouchEvent</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">touchEvent</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">touchEvent</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLTouchEvent.html">SDLTouchEvent</a></span><span class="p">)</span></code></pre>
<h4>Parameters</h4>
<dl>
<dt>touchEvent</dt>
<dd><p>Incoming touch event from onOnTouchEvent notification.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>SDLTouch
Instance of SDLTouch.</p>
</div>
<h3 id="section-identifier">
identifier
</h3>
<p>@abstract
Identifier of the touch’s finger. Refer to SDLTouchIdentifier for valid
identifiers.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSInteger</span> <span class="n">identifier</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">identifier</span><span class="p">:</span> <span class="kt">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
<h3 id="section-location">
location
</h3>
<p>@abstract
Location of touch point, in the head unit’s coordinate system.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">CGPoint</span> <span class="n">location</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">location</span><span class="p">:</span> <span class="kt">CGPoint</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
<h3 id="section-timeStamp">
timeStamp
</h3>
<p>@abstract
Timestamp in which the touch occurred.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">NSUInteger</span> <span class="n">timeStamp</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">timeStamp</span><span class="p">:</span> <span class="kt">UInt</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
<h3 id="section-isFirstFinger">
isFirstFinger
</h3>
<p>@abstract
Returns whether or not this touch is a first finger.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">isFirstFinger</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isFirstFinger</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
<h3 id="section-isSecondFinger">
isSecondFinger
</h3>
<p>@abstract
Returns whether or not this touch is a second finger.</p>
<h4>Objective-C</h4>
<pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">readonly</span><span class="p">)</span> <span class="n">BOOL</span> <span class="n">isSecondFinger</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isSecondFinger</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</section>
|