mirror of https://git.suyu.dev/suyu/suyu
Merge pull request #7580 from lioncash/input-doc
input_poller/input_mapping: Silence several -Wdocumentation warnings
This commit is contained in:
commit
9fa1cf3e01
|
@ -14,8 +14,8 @@ public:
|
||||||
MappingFactory();
|
MappingFactory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets all varables to beggin the mapping process
|
* Resets all variables to begin the mapping process
|
||||||
* @param "type": type of input desired to be returned
|
* @param type type of input desired to be returned
|
||||||
*/
|
*/
|
||||||
void BeginMapping(Polling::InputType type);
|
void BeginMapping(Polling::InputType type);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers mapping input data from the driver
|
* Registers mapping input data from the driver
|
||||||
* @param "data": An struct containing all the information needed to create a proper
|
* @param data A struct containing all the information needed to create a proper
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
*/
|
*/
|
||||||
void RegisterInput(const MappingData& data);
|
void RegisterInput(const MappingData& data);
|
||||||
|
@ -34,41 +34,41 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* If provided data satisfies the requeriments it will push an element to the input_queue
|
* If provided data satisfies the requirements it will push an element to the input_queue
|
||||||
* Supported input:
|
* Supported input:
|
||||||
* - Button: Creates a basic button ParamPackage
|
* - Button: Creates a basic button ParamPackage
|
||||||
* - HatButton: Creates a basic hat button ParamPackage
|
* - HatButton: Creates a basic hat button ParamPackage
|
||||||
* - Analog: Creates a basic analog ParamPackage
|
* - Analog: Creates a basic analog ParamPackage
|
||||||
* @param "data": An struct containing all the information needed to create a proper
|
* @param data A struct containing all the information needed to create a proper
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
*/
|
*/
|
||||||
void RegisterButton(const MappingData& data);
|
void RegisterButton(const MappingData& data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If provided data satisfies the requeriments it will push an element to the input_queue
|
* If provided data satisfies the requirements it will push an element to the input_queue
|
||||||
* Supported input:
|
* Supported input:
|
||||||
* - Button, HatButton: Pass the data to RegisterButton
|
* - Button, HatButton: Pass the data to RegisterButton
|
||||||
* - Analog: Stores the first axis and on the second axis creates a basic stick ParamPackage
|
* - Analog: Stores the first axis and on the second axis creates a basic stick ParamPackage
|
||||||
* @param "data": An struct containing all the information needed to create a proper
|
* @param data A struct containing all the information needed to create a proper
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
*/
|
*/
|
||||||
void RegisterStick(const MappingData& data);
|
void RegisterStick(const MappingData& data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If provided data satisfies the requeriments it will push an element to the input_queue
|
* If provided data satisfies the requirements it will push an element to the input_queue
|
||||||
* Supported input:
|
* Supported input:
|
||||||
* - Button, HatButton: Pass the data to RegisterButton
|
* - Button, HatButton: Pass the data to RegisterButton
|
||||||
* - Analog: Stores the first two axis and on the third axis creates a basic Motion
|
* - Analog: Stores the first two axis and on the third axis creates a basic Motion
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
* - Motion: Creates a basic Motion ParamPackage
|
* - Motion: Creates a basic Motion ParamPackage
|
||||||
* @param "data": An struct containing all the information needed to create a proper
|
* @param data A struct containing all the information needed to create a proper
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
*/
|
*/
|
||||||
void RegisterMotion(const MappingData& data);
|
void RegisterMotion(const MappingData& data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if driver can be mapped
|
* Returns true if driver can be mapped
|
||||||
* @param "data": An struct containing all the information needed to create a proper
|
* @param data A struct containing all the information needed to create a proper
|
||||||
* ParamPackage
|
* ParamPackage
|
||||||
*/
|
*/
|
||||||
bool IsDriverValid(const MappingData& data) const;
|
bool IsDriverValid(const MappingData& data) const;
|
||||||
|
|
|
@ -13,9 +13,6 @@ class Factory;
|
||||||
|
|
||||||
namespace InputCommon {
|
namespace InputCommon {
|
||||||
class InputEngine;
|
class InputEngine;
|
||||||
/**
|
|
||||||
* An Input factory. It receives input events and forward them to all input devices it created.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class OutputFactory final : public Common::Input::Factory<Common::Input::OutputDevice> {
|
class OutputFactory final : public Common::Input::Factory<Common::Input::OutputDevice> {
|
||||||
public:
|
public:
|
||||||
|
@ -24,10 +21,10 @@ public:
|
||||||
/**
|
/**
|
||||||
* Creates an output device from the parameters given.
|
* Creates an output device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid" text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique ouput device with the parameters specified
|
* @returns a unique output device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::OutputDevice> Create(
|
std::unique_ptr<Common::Input::OutputDevice> Create(
|
||||||
const Common::ParamPackage& params) override;
|
const Common::ParamPackage& params) override;
|
||||||
|
@ -36,6 +33,9 @@ private:
|
||||||
std::shared_ptr<InputEngine> input_engine;
|
std::shared_ptr<InputEngine> input_engine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An Input factory. It receives input events and forward them to all input devices it created.
|
||||||
|
*/
|
||||||
class InputFactory final : public Common::Input::Factory<Common::Input::InputDevice> {
|
class InputFactory final : public Common::Input::Factory<Common::Input::InputDevice> {
|
||||||
public:
|
public:
|
||||||
explicit InputFactory(std::shared_ptr<InputEngine> input_engine_);
|
explicit InputFactory(std::shared_ptr<InputEngine> input_engine_);
|
||||||
|
@ -54,16 +54,16 @@ public:
|
||||||
* - battery: Contains "battery"
|
* - battery: Contains "battery"
|
||||||
* - output: Contains "output"
|
* - output: Contains "output"
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "code": the code of the keyboard key to bind with the input
|
* - "code": the code of the keyboard key to bind with the input
|
||||||
* @param - "button": same as "code" but for controller buttons
|
* - "button": same as "code" but for controller buttons
|
||||||
* @param - "hat": similar as "button" but it's a group of hat buttons from SDL
|
* - "hat": similar as "button" but it's a group of hat buttons from SDL
|
||||||
* @param - "axis": the axis number of the axis to bind with the input
|
* - "axis": the axis number of the axis to bind with the input
|
||||||
* @param - "motion": the motion number of the motion to bind with the input
|
* - "motion": the motion number of the motion to bind with the input
|
||||||
* @param - "axis_x": same as axis but specifing horizontal direction
|
* - "axis_x": same as axis but specifying horizontal direction
|
||||||
* @param - "axis_y": same as axis but specifing vertical direction
|
* - "axis_y": same as axis but specifying vertical direction
|
||||||
* @param - "axis_z": same as axis but specifing forward direction
|
* - "axis_z": same as axis but specifying forward direction
|
||||||
* @param - "battery": Only used as a placeholder to set the input type
|
* - "battery": Only used as a placeholder to set the input type
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> Create(const Common::ParamPackage& params) override;
|
std::unique_ptr<Common::Input::InputDevice> Create(const Common::ParamPackage& params) override;
|
||||||
|
|
||||||
|
@ -71,14 +71,14 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a button device from the parameters given.
|
* Creates a button device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "code": the code of the keyboard key to bind with the input
|
* - "code": the code of the keyboard key to bind with the input
|
||||||
* @param - "button": same as "code" but for controller buttons
|
* - "button": same as "code" but for controller buttons
|
||||||
* @param - "toggle": press once to enable, press again to disable
|
* - "toggle": press once to enable, press again to disable
|
||||||
* @param - "inverted": inverts the output of the button
|
* - "inverted": inverts the output of the button
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateButtonDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateButtonDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -86,14 +86,14 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a hat button device from the parameters given.
|
* Creates a hat button device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "button": the controller hat id to bind with the input
|
* - "button": the controller hat id to bind with the input
|
||||||
* @param - "direction": the direction id to be detected
|
* - "direction": the direction id to be detected
|
||||||
* @param - "toggle": press once to enable, press again to disable
|
* - "toggle": press once to enable, press again to disable
|
||||||
* @param - "inverted": inverts the output of the button
|
* - "inverted": inverts the output of the button
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateHatButtonDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateHatButtonDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -101,19 +101,19 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a stick device from the parameters given.
|
* Creates a stick device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "axis_x": the controller horizontal axis id to bind with the input
|
* - "axis_x": the controller horizontal axis id to bind with the input
|
||||||
* @param - "axis_y": the controller vertical axis id to bind with the input
|
* - "axis_y": the controller vertical axis id to bind with the input
|
||||||
* @param - "deadzone": the mimimum required value to be detected
|
* - "deadzone": the minimum required value to be detected
|
||||||
* @param - "range": the maximum value required to reach 100%
|
* - "range": the maximum value required to reach 100%
|
||||||
* @param - "threshold": the mimimum required value to considered pressed
|
* - "threshold": the minimum required value to considered pressed
|
||||||
* @param - "offset_x": the amount of offset in the x axis
|
* - "offset_x": the amount of offset in the x axis
|
||||||
* @param - "offset_y": the amount of offset in the y axis
|
* - "offset_y": the amount of offset in the y axis
|
||||||
* @param - "invert_x": inverts the sign of the horizontal axis
|
* - "invert_x": inverts the sign of the horizontal axis
|
||||||
* @param - "invert_y": inverts the sign of the vertical axis
|
* - "invert_y": inverts the sign of the vertical axis
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateStickDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateStickDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -121,16 +121,16 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates an analog device from the parameters given.
|
* Creates an analog device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "axis": the controller axis id to bind with the input
|
* - "axis": the controller axis id to bind with the input
|
||||||
* @param - "deadzone": the mimimum required value to be detected
|
* - "deadzone": the minimum required value to be detected
|
||||||
* @param - "range": the maximum value required to reach 100%
|
* - "range": the maximum value required to reach 100%
|
||||||
* @param - "threshold": the mimimum required value to considered pressed
|
* - "threshold": the minimum required value to considered pressed
|
||||||
* @param - "offset": the amount of offset in the axis
|
* - "offset": the amount of offset in the axis
|
||||||
* @param - "invert": inverts the sign of the axis
|
* - "invert": inverts the sign of the axis
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateAnalogDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateAnalogDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -138,20 +138,20 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a trigger device from the parameters given.
|
* Creates a trigger device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "button": the controller hat id to bind with the input
|
* - "button": the controller hat id to bind with the input
|
||||||
* @param - "direction": the direction id to be detected
|
* - "direction": the direction id to be detected
|
||||||
* @param - "toggle": press once to enable, press again to disable
|
* - "toggle": press once to enable, press again to disable
|
||||||
* @param - "inverted": inverts the output of the button
|
* - "inverted": inverts the output of the button
|
||||||
* @param - "axis": the controller axis id to bind with the input
|
* - "axis": the controller axis id to bind with the input
|
||||||
* @param - "deadzone": the mimimum required value to be detected
|
* - "deadzone": the minimum required value to be detected
|
||||||
* @param - "range": the maximum value required to reach 100%
|
* - "range": the maximum value required to reach 100%
|
||||||
* @param - "threshold": the mimimum required value to considered pressed
|
* - "threshold": the minimum required value to considered pressed
|
||||||
* @param - "offset": the amount of offset in the axis
|
* - "offset": the amount of offset in the axis
|
||||||
* @param - "invert": inverts the sign of the axis
|
* - "invert": inverts the sign of the axis
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateTriggerDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateTriggerDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -159,23 +159,23 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a touch device from the parameters given.
|
* Creates a touch device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "button": the controller hat id to bind with the input
|
* - "button": the controller hat id to bind with the input
|
||||||
* @param - "direction": the direction id to be detected
|
* - "direction": the direction id to be detected
|
||||||
* @param - "toggle": press once to enable, press again to disable
|
* - "toggle": press once to enable, press again to disable
|
||||||
* @param - "inverted": inverts the output of the button
|
* - "inverted": inverts the output of the button
|
||||||
* @param - "axis_x": the controller horizontal axis id to bind with the input
|
* - "axis_x": the controller horizontal axis id to bind with the input
|
||||||
* @param - "axis_y": the controller vertical axis id to bind with the input
|
* - "axis_y": the controller vertical axis id to bind with the input
|
||||||
* @param - "deadzone": the mimimum required value to be detected
|
* - "deadzone": the minimum required value to be detected
|
||||||
* @param - "range": the maximum value required to reach 100%
|
* - "range": the maximum value required to reach 100%
|
||||||
* @param - "threshold": the mimimum required value to considered pressed
|
* - "threshold": the minimum required value to considered pressed
|
||||||
* @param - "offset_x": the amount of offset in the x axis
|
* - "offset_x": the amount of offset in the x axis
|
||||||
* @param - "offset_y": the amount of offset in the y axis
|
* - "offset_y": the amount of offset in the y axis
|
||||||
* @param - "invert_x": inverts the sign of the horizontal axis
|
* - "invert_x": inverts the sign of the horizontal axis
|
||||||
* @param - "invert_y": inverts the sign of the vertical axis
|
* - "invert_y": inverts the sign of the vertical axis
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateTouchDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateTouchDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -183,10 +183,10 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a battery device from the parameters given.
|
* Creates a battery device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateBatteryDevice(
|
std::unique_ptr<Common::Input::InputDevice> CreateBatteryDevice(
|
||||||
const Common::ParamPackage& params);
|
const Common::ParamPackage& params);
|
||||||
|
@ -194,21 +194,21 @@ private:
|
||||||
/**
|
/**
|
||||||
* Creates a motion device from the parameters given.
|
* Creates a motion device from the parameters given.
|
||||||
* @param params contains parameters for creating the device:
|
* @param params contains parameters for creating the device:
|
||||||
* @param - "axis_x": the controller horizontal axis id to bind with the input
|
* - "axis_x": the controller horizontal axis id to bind with the input
|
||||||
* @param - "axis_y": the controller vertical axis id to bind with the input
|
* - "axis_y": the controller vertical axis id to bind with the input
|
||||||
* @param - "axis_z": the controller fordward axis id to bind with the input
|
* - "axis_z": the controller forward axis id to bind with the input
|
||||||
* @param - "deadzone": the mimimum required value to be detected
|
* - "deadzone": the minimum required value to be detected
|
||||||
* @param - "range": the maximum value required to reach 100%
|
* - "range": the maximum value required to reach 100%
|
||||||
* @param - "offset_x": the amount of offset in the x axis
|
* - "offset_x": the amount of offset in the x axis
|
||||||
* @param - "offset_y": the amount of offset in the y axis
|
* - "offset_y": the amount of offset in the y axis
|
||||||
* @param - "offset_z": the amount of offset in the z axis
|
* - "offset_z": the amount of offset in the z axis
|
||||||
* @param - "invert_x": inverts the sign of the horizontal axis
|
* - "invert_x": inverts the sign of the horizontal axis
|
||||||
* @param - "invert_y": inverts the sign of the vertical axis
|
* - "invert_y": inverts the sign of the vertical axis
|
||||||
* @param - "invert_z": inverts the sign of the fordward axis
|
* - "invert_z": inverts the sign of the forward axis
|
||||||
* @param - "guid": text string for identifing controllers
|
* - "guid": text string for identifying controllers
|
||||||
* @param - "port": port of the connected device
|
* - "port": port of the connected device
|
||||||
* @param - "pad": slot of the connected controller
|
* - "pad": slot of the connected controller
|
||||||
* @return an unique input device with the parameters specified
|
* @returns a unique input device with the parameters specified
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Common::Input::InputDevice> CreateMotionDevice(Common::ParamPackage params);
|
std::unique_ptr<Common::Input::InputDevice> CreateMotionDevice(Common::ParamPackage params);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue