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
|
// SDLOnButtonPress.h
//
#import "SDLRPCNotification.h"
#import "SDLButtonName.h"
#import "SDLButtonPressMode.h"
/**
* Notifies application of button press events for buttons to which the
* application is subscribed. SDL supports two button press events defined as
* follows:
*
* <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>
*
* @see SDLSubscribeButton
* @see SDLUnsubscribeButton
*
* @since SDL 1.0
*/
NS_ASSUME_NONNULL_BEGIN
@interface SDLOnButtonPress : SDLRPCNotification
/**
* @abstract the button's name
*
* @see SDLButtonName
*
* Required
*/
@property (strong, nonatomic) SDLButtonName buttonName;
/**
* @abstract Indicates whether this is a LONG or SHORT button press event
*
* @see SDLButtonPressMode
*
* Required
*/
@property (strong, nonatomic) SDLButtonPressMode buttonPressMode;
/**
* @abstract If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)
*
* @since SDL 2.0
*
* Optional, Integer 0 - 65536
*/
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *customButtonID;
@end
NS_ASSUME_NONNULL_END
|