summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLTouchEvent.html
blob: 70cbc0f2b5c9b8604bca5f3ef1b344ec06901a53 (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
<h1>SDLTouchEvent Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-touchEventId">touchEventId</a></li>
  <li><a href="#section-timeStamp">timeStamp</a></li>
  <li><a href="#section-coord">coord</a></li>
</ul>

<h3>Overview</h3>

<p>Undocumented</p>


<section class="section task-group-section">
  <h3 id="section-touchEventId">
      touchEventId
  </h3>
  
  <p>A touch&rsquo;s unique identifier.  The application can track the current touch events by id.
If a touch event has type begin, the id should be added to the set of touches.
If a touch event has type end, the id should be removed from the set of touches.</p>

<p>Mandatory, 0-9</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">touchEventId</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">touchEventId</span><span class="p">:</span> <span class="kt">NSNumber</span> <span class="o">&amp;</span> <span class="nf">SDLInt</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-timeStamp">
      timeStamp
  </h3>
  
  <p>The time that the touch was recorded.  This number can the time since the beginning of the session or something else as long as the units are in milliseconds.</p>

<p>The timestamp is used to determined the rate of change of position of a touch.</p>

<p>The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user.</p>

<p>If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array.</p>

<p>Mandatory, array size 1-1000, contains <NSNumber> size 0-5000000000</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span>
    <span class="n">NSArray</span><span class="o">&lt;</span><span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</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="p">[</span><span class="kt">NSNumber</span> <span class="o">&amp;</span> <span class="kt"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-coord">
      coord
  </h3>
  
  <p>Mandatory, array size 1-1000, contains SDLTouchCoord</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span>
    <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLTouchCoord.html">SDLTouchCoord</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">coord</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">coord</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLTouchCoord.html">SDLTouchCoord</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
</section>