ObjFW  Diff

Differences From Artifact [805ad805e2]:

To Artifact [526e49cd36]:


25
26
27
28
29
30
31



32
33
34
35
36
37
38
39
40
41
42
43
44
45
25
26
27
28
29
30
31
32
33
34
35
36
37
38

39

40
41
42
43
44
45
46







+
+
+




-

-







@import ObjFW;
# else
#  import <ObjFW/OFObject.h>
#  import <ObjFW/OFString.h>
# endif
#endif

#import "OHGamepad.h"
#import "OHExtendedGamepad.h"

OF_ASSUME_NONNULL_BEGIN

@class OFArray OF_GENERIC(ObjectType);
@class OFNumber;
@class OHExtendedGamepad;
@class OHGameControllerProfile;
@class OHGamepad;

/**
 * @class OHGameController OHGameController.h ObjFWHID/OHGameController.h
 *
 * @brief A class for reading state from a game controller.
 */
@interface OHGameController: OFObject
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
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







-
+





-
+






-
+







 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFNumber *productID;

/**
 * @brief The raw profile for the game controller, meaning no remapping is
 *	  being performed.
 */
@property (readonly, nonatomic) OHGameControllerProfile *rawProfile;
@property (readonly, nonatomic) id <OHGameControllerProfile> rawProfile;

/**
 * @brief The gamepad profile for the game controller, or `nil` if not
 *	  supported.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OHGamepad *gamepad;
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id <OHGamepad> gamepad;

/**
 * @brief The extended gamepad profile for the game controller, or `nil` if not
 *	  supported.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    OHExtendedGamepad *extendedGamepad;
    id <OHExtendedGamepad> extendedGamepad;

/**
 * @brief Returns the available controllers.
 *
 * @return The available controllers
 */
+ (OFArray OF_GENERIC(OHGameController *) *)controllers;