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
|
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
|
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
|
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#import "HIDGameControllerElement.h"
#import "HIDGameControllerAxis.h"
#import "HIDGameControllerButton.h"
#import "OHGameControllerElement.h"
#import "OHGameControllerAxis.h"
#import "OHGameControllerButton.h"
OF_ASSUME_NONNULL_BEGIN
/**
* @class HIDGameControllerDirectionalPad \
* HIDGameControllerDirectionalPad.h \
* ObjFWHID/HIDGameControllerDirectionalPad.h
* @class OHGameControllerDirectionalPad \
* OHGameControllerDirectionalPad.h
* ObjFWHID/OHGameControllerDirectionalPad.h
*
* @brief An directional pad or thumb stick of a game controller.
*/
OF_SUBCLASSING_RESTRICTED
@interface HIDGameControllerDirectionalPad: HIDGameControllerElement
@interface OHGameControllerDirectionalPad: OHGameControllerElement
{
HIDGameControllerAxis *_xAxis, *_yAxis;
HIDGameControllerButton *_upButton, *_downButton;
HIDGameControllerButton *_leftButton, *_rightButton;
OHGameControllerAxis *_xAxis, *_yAxis;
OHGameControllerButton *_upButton, *_downButton;
OHGameControllerButton *_leftButton, *_rightButton;
}
/**
* @brief The X axis of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerAxis *xAxis;
@property (readonly, nonatomic) OHGameControllerAxis *xAxis;
/**
* @brief The Y axis of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerAxis *yAxis;
@property (readonly, nonatomic) OHGameControllerAxis *yAxis;
/**
* @brief The up button of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerButton *upButton;
@property (readonly, nonatomic) OHGameControllerButton *upButton;
/**
* @brief The down button of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerButton *downButton;
@property (readonly, nonatomic) OHGameControllerButton *downButton;
/**
* @brief The left button of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerButton *leftButton;
@property (readonly, nonatomic) OHGameControllerButton *leftButton;
/**
* @brief The right button of the directional pad.
*/
@property (readonly, nonatomic) HIDGameControllerButton *rightButton;
@property (readonly, nonatomic) OHGameControllerButton *rightButton;
- (instancetype)initWithName: (OFString *)name OF_UNAVAILABLE;
- (instancetype)initWithName: (OFString *)name
xAxis: (HIDGameControllerAxis *)xAxis
yAxis: (HIDGameControllerAxis *)yAxis;
xAxis: (OHGameControllerAxis *)xAxis
yAxis: (OHGameControllerAxis *)yAxis;
- (instancetype)initWithName: (OFString *)name
upButton: (HIDGameControllerButton *)upButton
downButton: (HIDGameControllerButton *)downButton
leftButton: (HIDGameControllerButton *)leftButton
rightButton: (HIDGameControllerButton *)rightButton;
upButton: (OHGameControllerButton *)upButton
downButton: (OHGameControllerButton *)downButton
leftButton: (OHGameControllerButton *)leftButton
rightButton: (OHGameControllerButton *)rightButton;
@end
OF_ASSUME_NONNULL_END
|