aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/ginput_toggle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ginput/ginput_toggle.h')
-rw-r--r--src/ginput/ginput_toggle.h60
1 files changed, 26 insertions, 34 deletions
diff --git a/src/ginput/ginput_toggle.h b/src/ginput/ginput_toggle.h
index 7d028301..a8719db6 100644
--- a/src/ginput/ginput_toggle.h
+++ b/src/ginput/ginput_toggle.h
@@ -48,7 +48,7 @@
typedef struct GEventToggle_t {
GEventType type; // The type of this event (GEVENT_TOGGLE)
uint16_t instance; // The toggle instance
- bool_t on; // True if the toggle/button is on
+ gBool on; // True if the toggle/button is on
} GEventToggle;
// Toggle Listen Flags - passed to geventAddSourceToListener()
@@ -59,40 +59,32 @@ typedef struct GEventToggle_t {
/* External declarations. */
/*===========================================================================*/
-#ifdef __cplusplus
-extern "C" {
-#endif
+/**
+ * @brief Create a toggle input instance
+ *
+ * @param[in] instance The ID of the toggle input instance (from 0 to 9999)
+ *
+ * @return The source handle of the created instance
+ */
+GSourceHandle ginputGetToggle(uint16_t instance);
- /**
- * @brief Create a toggle input instance
- *
- * @param[in] instance The ID of the toggle input instance (from 0 to 9999)
- *
- * @return The source handle of the created instance
- */
- GSourceHandle ginputGetToggle(uint16_t instance);
-
- /**
- * @brief Can be used to invert the sense of a toggle
- *
- * @param[in] instance The ID of the toggle input instance
- * @param[in] invert If TRUE, will be inverted
- */
- void ginputInvertToggle(uint16_t instance, bool_t invert);
-
- /**
- * @brief Get the current toggle status
- *
- * @param[in] instance The ID of the toggle input instance
- * @param[in] ptoggle The toggle event struct
- *
- * @return Returns FALSE on an error (eg invalid instance)
- */
- bool_t ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle);
-
-#ifdef __cplusplus
-}
-#endif
+/**
+ * @brief Can be used to invert the sense of a toggle
+ *
+ * @param[in] instance The ID of the toggle input instance
+ * @param[in] invert If gTrue, will be inverted
+ */
+void ginputInvertToggle(uint16_t instance, gBool invert);
+
+/**
+ * @brief Get the current toggle status
+ *
+ * @param[in] instance The ID of the toggle input instance
+ * @param[in] ptoggle The toggle event struct
+ *
+ * @return Returns gFalse on an error (eg invalid instance)
+ */
+gBool ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle);
#endif /* GINPUT_NEED_TOGGLE */