ObjFW  Diff

Differences From Artifact [347fbd7215]:

To Artifact [e37811cd3f]:


27
28
29
30
31
32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
#  import <ObjFW/OFObject.h>
#  import <ObjFW/OFString.h>
# endif
#endif

OF_ASSUME_NONNULL_BEGIN

@class HIDGameControllerAxis;
@class HIDGameControllerButton;
@class OFArray OF_GENERIC(ObjectType);
@class OFDictionary OF_GENERIC(KeyType, ObjectType);
@class OFNumber;

/**


 * @brief A class for reading state from a game controller.
 */
@interface HIDGameController: OFObject
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nonatomic)
    OFArray <HIDGameController *> *controllers;
#endif







|
<

<



>
>







27
28
29
30
31
32
33
34

35

36
37
38
39
40
41
42
43
44
45
46
47
#  import <ObjFW/OFObject.h>
#  import <ObjFW/OFString.h>
# endif
#endif

OF_ASSUME_NONNULL_BEGIN

@class HIDGameControllerMapping;

@class OFArray OF_GENERIC(ObjectType);

@class OFNumber;

/**
 * @class HIDGameController HIDGameController.h ObjFWHID/HIDGameController.h
 *
 * @brief A class for reading state from a game controller.
 */
@interface HIDGameController: OFObject
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nonatomic)
    OFArray <HIDGameController *> *controllers;
#endif
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 product ID of the controller or `nil` if unavailable.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFNumber *productID;

/**
 * @brief A map of all button names to their @ref HIDGameControllerButton.
 */
@property (readonly, nonatomic)
    OFDictionary OF_GENERIC(OFString *, HIDGameControllerButton *) *buttons;

/**
 * @brief A map of all axis names to their @ref HIDGameControllerAxis.
 */
@property (readonly, nonatomic)
    OFDictionary OF_GENERIC(OFString *, HIDGameControllerAxis *) *axes;

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







|
<
<
<
|
<
<

|
<







58
59
60
61
62
63
64
65



66


67
68

69
70
71
72
73
74
75

/**
 * @brief The product ID of the controller or `nil` if unavailable.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFNumber *productID;

/**
 * @brief An unmapped mapping for the game controller, meaning no remapping is



 *	  being performed.


 */
@property (readonly, nonatomic) HIDGameControllerMapping *unmappedMapping;


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