ObjFW  Diff

Differences From Artifact [d675a51f7b]:

To Artifact [542208ba0a]:


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
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







-
+

-
+



















-
+



-
-
+
+

-
+




/**
 * @brief The currently pressed buttons on the controller.
 */
@property (readonly, nonatomic) OFSet OF_GENERIC(OFString *) *pressedButtons;

/**
 * @brief The number of axes the controller has.
 * @brief The number of analog sticks the controller has.
 */
@property (readonly, nonatomic) size_t numAxes;
@property (readonly, nonatomic) size_t numAnalogSticks;

/**
 * @brief Returns the number of available controllers.
 *
 * @return The number of available controllers
 */
+ (size_t)numControllers;

/**
 * @brief Returns the specified controller.
 *
 * @param index The index of the controller to return
 * @return The specified controller
 */
+ (OFGameController *)controllerWithIndex: (size_t)index;

- (instancetype)init OF_UNAVAILABLE;

/**
 * @brief Returns the current position of the specified axis.
 * @brief Returns the current position of the specified analog stick.
 *
 * The range is from (-1, -1) to (1, 1).
 *
 * @param index The index of the axis whose position to return
 * @return The current position of the specified axis
 * @param index The index of the analog stick whose position to return
 * @return The current position of the specified analog stick
 */
- (OFPoint)positionOfAxisWithIndex: (size_t)index;
- (OFPoint)positionOfAnalogStickWithIndex: (size_t)index;
@end

OF_ASSUME_NONNULL_END