mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
hid: Deprecate old input interface
This commit is contained in:
parent
d290697bfd
commit
e904bb05d4
@ -11,6 +11,9 @@
|
||||
#include "../services/btdrv_types.h"
|
||||
#include "../sf/service.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
// Begin enums and output structs
|
||||
|
||||
/// HidDebugPadButton
|
||||
@ -61,8 +64,8 @@ typedef enum {
|
||||
HidKeyboardModifier_Hiragana = BIT(12),
|
||||
} HidKeyboardModifier;
|
||||
|
||||
/// HidKeyboardScancode
|
||||
typedef enum {
|
||||
/// HidKeyboardScancode \deprecated
|
||||
typedef enum DEPRECATED {
|
||||
KBD_NONE = 0x00,
|
||||
KBD_ERR_OVF = 0x01,
|
||||
|
||||
@ -335,8 +338,8 @@ typedef enum {
|
||||
HidNpadButton_AnySR = HidNpadButton_LeftSR | HidNpadButton_RightSR, ///< Bitmask containing SR buttons on both Joy-Cons (Left/Right)
|
||||
} HidNpadButton;
|
||||
|
||||
/// HidControllerKeys
|
||||
typedef enum {
|
||||
/// HidControllerKeys \deprecated
|
||||
typedef enum DEPRECATED {
|
||||
KEY_A = HidNpadButton_A,
|
||||
KEY_B = HidNpadButton_B,
|
||||
KEY_X = HidNpadButton_X,
|
||||
@ -384,8 +387,8 @@ typedef enum {
|
||||
KEY_SR = HidNpadButton_AnySR,
|
||||
} HidControllerKeys;
|
||||
|
||||
/// HidControllerJoystick
|
||||
typedef enum {
|
||||
/// HidControllerJoystick \deprecated
|
||||
typedef enum DEPRECATED {
|
||||
JOYSTICK_LEFT = 0,
|
||||
JOYSTICK_RIGHT = 1,
|
||||
|
||||
@ -454,8 +457,8 @@ typedef enum {
|
||||
HidGestureType_Rotate = 9, ///< Rotate
|
||||
} HidGestureType;
|
||||
|
||||
/// HidControllerID
|
||||
typedef enum {
|
||||
/// HidControllerID \deprecated
|
||||
typedef enum DEPRECATED {
|
||||
CONTROLLER_PLAYER_1 = 0,
|
||||
CONTROLLER_PLAYER_2 = 1,
|
||||
CONTROLLER_PLAYER_3 = 2,
|
||||
@ -670,8 +673,8 @@ typedef enum {
|
||||
HidPalmaFeature_MuteSwitch = BIT(3), ///< MuteSwitch
|
||||
} HidPalmaFeature;
|
||||
|
||||
/// touchPosition
|
||||
typedef struct touchPosition {
|
||||
/// touchPosition \deprecated
|
||||
typedef struct DEPRECATED touchPosition {
|
||||
u32 id;
|
||||
u32 px;
|
||||
u32 py;
|
||||
@ -686,14 +689,14 @@ typedef struct HidAnalogStickState {
|
||||
s32 y; ///< Y
|
||||
} HidAnalogStickState;
|
||||
|
||||
/// JoystickPosition
|
||||
typedef struct JoystickPosition {
|
||||
/// JoystickPosition \deprecated
|
||||
typedef struct DEPRECATED JoystickPosition {
|
||||
s32 dx;
|
||||
s32 dy;
|
||||
} JoystickPosition;
|
||||
|
||||
/// MousePosition
|
||||
typedef struct MousePosition {
|
||||
/// MousePosition \deprecated
|
||||
typedef struct DEPRECATED MousePosition {
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 velocityX;
|
||||
@ -714,8 +717,8 @@ typedef struct HidDirectionState {
|
||||
float direction[3][3]; ///< 3x3 matrix
|
||||
} HidDirectionState;
|
||||
|
||||
/// SixAxisSensorValues
|
||||
typedef struct SixAxisSensorValues {
|
||||
/// SixAxisSensorValues \deprecated DEPRECATED
|
||||
typedef struct DEPRECATED SixAxisSensorValues {
|
||||
HidVector accelerometer;
|
||||
HidVector gyroscope;
|
||||
HidVector unk;
|
||||
@ -1315,7 +1318,7 @@ Result hidInitialize(void);
|
||||
/// Exit hid. Called automatically during app exit.
|
||||
void hidExit(void);
|
||||
|
||||
void hidReset(void);
|
||||
void DEPRECATED hidReset(void); ///< \deprecated
|
||||
|
||||
/// Gets the Service object for the actual hid service session.
|
||||
Service* hidGetServiceSession(void);
|
||||
@ -1323,7 +1326,7 @@ Service* hidGetServiceSession(void);
|
||||
/// Gets the address of the SharedMemory.
|
||||
void* hidGetSharedmemAddr(void);
|
||||
|
||||
void hidScanInput(void);
|
||||
void DEPRECATED hidScanInput(void); ///< \deprecated
|
||||
|
||||
///@name TouchScreen
|
||||
///@{
|
||||
@ -1583,37 +1586,38 @@ size_t hidGetGestureStates(HidGestureState *states, size_t count);
|
||||
|
||||
///@}
|
||||
|
||||
bool hidIsControllerConnected(HidControllerID id);
|
||||
bool DEPRECATED hidIsControllerConnected(HidControllerID id); ///< \deprecated
|
||||
|
||||
u64 hidKeysHeld(HidControllerID id);
|
||||
u64 hidKeysDown(HidControllerID id);
|
||||
u64 hidKeysUp(HidControllerID id);
|
||||
u64 DEPRECATED hidKeysHeld(HidControllerID id); ///< \deprecated
|
||||
u64 DEPRECATED hidKeysDown(HidControllerID id); ///< \deprecated
|
||||
u64 DEPRECATED hidKeysUp(HidControllerID id); ///< \deprecated
|
||||
|
||||
u64 hidMouseButtonsHeld(void);
|
||||
u64 hidMouseButtonsDown(void);
|
||||
u64 hidMouseButtonsUp(void);
|
||||
void hidMouseRead(MousePosition *pos);
|
||||
u32 hidMouseMultiRead(MousePosition *entries, u32 num_entries);
|
||||
u64 DEPRECATED hidMouseButtonsHeld(void); ///< \deprecated
|
||||
u64 DEPRECATED hidMouseButtonsDown(void); ///< \deprecated
|
||||
u64 DEPRECATED hidMouseButtonsUp(void); ///< \deprecated
|
||||
void DEPRECATED hidMouseRead(MousePosition *pos); ///< \deprecated
|
||||
u32 DEPRECATED hidMouseMultiRead(MousePosition *entries, u32 num_entries); ///< \deprecated
|
||||
|
||||
bool hidKeyboardModifierHeld(HidKeyboardModifier modifier);
|
||||
bool hidKeyboardModifierDown(HidKeyboardModifier modifier);
|
||||
bool hidKeyboardModifierUp(HidKeyboardModifier modifier);
|
||||
bool DEPRECATED hidKeyboardModifierHeld(HidKeyboardModifier modifier); ///< \deprecated
|
||||
bool DEPRECATED hidKeyboardModifierDown(HidKeyboardModifier modifier); ///< \deprecated
|
||||
bool DEPRECATED hidKeyboardModifierUp(HidKeyboardModifier modifier); ///< \deprecated
|
||||
|
||||
bool hidKeyboardHeld(HidKeyboardScancode key);
|
||||
bool hidKeyboardDown(HidKeyboardScancode key);
|
||||
bool hidKeyboardUp(HidKeyboardScancode key);
|
||||
bool DEPRECATED hidKeyboardHeld(HidKeyboardScancode key); ///< \deprecated
|
||||
bool DEPRECATED hidKeyboardDown(HidKeyboardScancode key); ///< \deprecated
|
||||
bool DEPRECATED hidKeyboardUp(HidKeyboardScancode key); ///< \deprecated
|
||||
|
||||
u32 hidTouchCount(void);
|
||||
void hidTouchRead(touchPosition *pos, u32 point_id);
|
||||
u32 DEPRECATED hidTouchCount(void); ///< \deprecated
|
||||
void DEPRECATED hidTouchRead(touchPosition *pos, u32 point_id); ///< \deprecated
|
||||
|
||||
void hidJoystickRead(JoystickPosition *pos, HidControllerID id, HidControllerJoystick stick);
|
||||
u32 hidSixAxisSensorValuesRead(SixAxisSensorValues *values, HidControllerID id, u32 num_entries);
|
||||
void DEPRECATED hidJoystickRead(JoystickPosition *pos, HidControllerID id, HidControllerJoystick stick); ///< \deprecated
|
||||
u32 DEPRECATED hidSixAxisSensorValuesRead(SixAxisSensorValues *values, HidControllerID id, u32 num_entries); ///< \deprecated
|
||||
|
||||
/**
|
||||
* @brief This can be used to check what CONTROLLER_P1_AUTO uses.
|
||||
* @return 0 when CONTROLLER_PLAYER_1 is connected, otherwise returns 1 for handheld-mode.
|
||||
* @deprecated
|
||||
*/
|
||||
bool hidGetHandheldMode(void);
|
||||
bool DEPRECATED hidGetHandheldMode(void);
|
||||
|
||||
/**
|
||||
* @brief SendKeyboardLockKeyEvent
|
||||
@ -2330,3 +2334,4 @@ Result hidSetTouchScreenConfiguration(const HidTouchScreenConfigurationForNx *co
|
||||
*/
|
||||
Result hidIsFirmwareUpdateNeededForNotification(bool *out);
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
Loading…
Reference in New Issue
Block a user