diff options
Diffstat (limited to 'src/ginput/ginput_dial.h')
-rw-r--r-- | src/ginput/ginput_dial.h | 106 |
1 files changed, 49 insertions, 57 deletions
diff --git a/src/ginput/ginput_dial.h b/src/ginput/ginput_dial.h index 77c1b05c..af93391e 100644 --- a/src/ginput/ginput_dial.h +++ b/src/ginput/ginput_dial.h @@ -44,67 +44,59 @@ typedef struct GEventDial_t { /* External declarations. */ /*===========================================================================*/ -#ifdef __cplusplus -extern "C" { -#endif - - /** - * @brief Create a dial input instance - * - * @param[in] instance The ID of the dial input instance (from 0 to 9999) - * - * @return The soure handle of the created dial instance - */ - GSourceHandle ginputGetDial(uint16_t instance); - - /** - * @brief Reset the value back to the hardware default - * - * @param[in] instance The ID of the dial input instance - */ - void ginputResetDialRange(uint16_t instance); +/** + * @brief Create a dial input instance + * + * @param[in] instance The ID of the dial input instance (from 0 to 9999) + * + * @return The soure handle of the created dial instance + */ +GSourceHandle ginputGetDial(uint16_t instance); - /** - * @brief Get the maximum value - * @details The readings are scaled to be 0 ... max. - * - * @param[in] instance The ID of the dial input instance - * - * @return The maximum value - */ - uint16_t ginputGetDialRange(uint16_t instance); +/** + * @brief Reset the value back to the hardware default + * + * @param[in] instance The ID of the dial input instance + */ +void ginputResetDialRange(uint16_t instance); - /** - * @brief Set the maximum value - * @details The readings are scaled to be 0 ... max. - * - * @param[in] instance The ID of the dial input instance - * @param[in] max The maximum value to be set - */ - void ginputSetDialRange(uint16_t instance, uint16_t max); +/** + * @brief Get the maximum value + * @details The readings are scaled to be 0 ... max. + * + * @param[in] instance The ID of the dial input instance + * + * @return The maximum value + */ +uint16_t ginputGetDialRange(uint16_t instance); - /** - * @brief Set the level change required before a dial even is generated (threshold) - * @note This is done after range scaling - * - * @param[in] instance The ID of the dial input instance - * @param[in] diff The amount of level changes - */ - void ginputSetDialSensitivity(uint16_t instance, uint16_t diff); - - /** - * @brief Get the current dial status - * - * @param[in] instance The ID of the dial input instance - * @param[in] pdial The dial event struct - * - * @return Returns FALSE on an error (eg invalid instance) - */ - bool_t ginputGetDialStatus(uint16_t instance, GEventDial *pdial); +/** + * @brief Set the maximum value + * @details The readings are scaled to be 0 ... max. + * + * @param[in] instance The ID of the dial input instance + * @param[in] max The maximum value to be set + */ +void ginputSetDialRange(uint16_t instance, uint16_t max); -#ifdef __cplusplus -} -#endif +/** + * @brief Set the level change required before a dial even is generated (threshold) + * @note This is done after range scaling + * + * @param[in] instance The ID of the dial input instance + * @param[in] diff The amount of level changes + */ +void ginputSetDialSensitivity(uint16_t instance, uint16_t diff); + +/** + * @brief Get the current dial status + * + * @param[in] instance The ID of the dial input instance + * @param[in] pdial The dial event struct + * + * @return Returns gFalse on an error (eg invalid instance) + */ +gBool ginputGetDialStatus(uint16_t instance, GEventDial *pdial); #endif /* GINPUT_NEED_DIAL */ |