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

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-buttonName">buttonName</a></li>
  <li><a href="#section-buttonPressMode">buttonPressMode</a></li>
  <li><a href="#section-customButtonID">customButtonID</a></li>
</ul>

<h3>Overview</h3>

<p>Notifies application of button press events for buttons to which the
 application is subscribed. SDL supports two button press events defined as
 follows:</p>

<p><ul>
 <li>SHORT - Occurs when a button is depressed, then released within two
 seconds. The event is considered to occur immediately after the button is
 released.</li>
 <li>LONG - Occurs when a button is depressed and held for two seconds or
 more. The event is considered to occur immediately after the two second
 threshold has been crossed, before the button is released</li>
 </ul>
 <b>HMI Status Requirements:</b>
 <ul>
 HMILevel:
 <ul>
 <li>The application will receive OnButtonPress notifications for all
 subscribed buttons when HMILevel is FULL.</li>
 <li>The application will receive OnButtonPress notifications for subscribed
 media buttons when HMILevel is LIMITED.</li>
 <li>Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and
 PRESET_0-PRESET_9.</li>
 <li>The application will not receive OnButtonPress notification when HMILevel
 is BACKGROUND or NONE.</li>
 </ul>
 AudioStreamingState:
 <ul>
 <li> Any </li>
 </ul>
 SystemContext:
 <ul>
 <li>MAIN, VR. In MENU, only PRESET buttons. In VR, pressing any subscribable
 button will cancel VR.</li>
 </ul>
 </ul></p>
<div class="aside aside-see">
    <p class="aside-title">See</p>
    SDLSubscribeButton

</div>
<div class="aside aside-see">
    <p class="aside-title">See</p>
    SDLUnsubscribeButton

</div>

<p>@since SDL 1.0</p>


<section class="section task-group-section">
  <h3 id="section-buttonName">
      buttonName
  </h3>
  
  <p>@abstract the button&rsquo;s name</p>
<div class="aside aside-see">
    <p class="aside-title">See</p>
    SDLButtonName

</div>

<p>Required</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><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"><a href="../Type Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span> <span class="n">_Nonnull</span> <span class="n">buttonName</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">buttonName</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLButtonName.h@T@SDLButtonName">SDLButtonName</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-buttonPressMode">
      buttonPressMode
  </h3>
  
  <p>@abstract Indicates whether this is a LONG or SHORT button press event</p>
<div class="aside aside-see">
    <p class="aside-title">See</p>
    SDLButtonPressMode

</div>

<p>Required</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><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"><a href="../Type Definitions.html#/c:SDLButtonPressMode.h@T@SDLButtonPressMode">SDLButtonPressMode</a></span> <span class="n">_Nonnull</span> <span class="n">buttonPressMode</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">buttonPressMode</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLButtonPressMode.h@T@SDLButtonPressMode">SDLButtonPressMode</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-customButtonID">
      customButtonID
  </h3>
  
  <p>@abstract If ButtonName is <q>CUSTOM_BUTTON</q>, this references the integer ID passed by a custom button. (e.g. softButton ID)</p>

<p>@since SDL 2.0</p>

<p>Optional, Integer 0 - 65536</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><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">nullable</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">customButtonID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">customButtonID</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>

  
  
  
</section>