aboutsummaryrefslogtreecommitdiffstats
path: root/include/ginput/mouse.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ginput/mouse.h')
-rw-r--r--include/ginput/mouse.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/ginput/mouse.h b/include/ginput/mouse.h
index 93537329..f13379c3 100644
--- a/include/ginput/mouse.h
+++ b/include/ginput/mouse.h
@@ -84,7 +84,8 @@ extern "C" {
/**
* @brief Creates an instance of a mouse and returns the Source handler
- * @note hack: if the instance is 9999, no calibration will be performed!
+ * @note HACK: if the instance is 9999, it is treated as instance 0 except
+ * that no calibration will be performed!
*
* @param[in] instance The ID of the mouse input instance (from 0 to 9999)
*
@@ -93,6 +94,19 @@ extern "C" {
GSourceHandle ginputGetMouse(uint16_t instance);
/**
+ * @brief Assign the display associated with the mouse
+ * @note This only needs to be called if the mouse is associated with a display
+ * other than the current default display. It must be called before
+ * @p ginputGetMouse() if the new display is to be used during the calibration
+ * process. Other than calibration the display is used for range checking,
+ * and may also be used to display a mouse pointer.
+ *
+ * @param[in] instance The ID of the mouse input instance
+ * @param[in] g The GDisplay to which this mouse belongs
+ */
+ void ginputSetMouseDisplay(uint16_t instance, GDisplay *g);
+
+ /**
* @brief Get the current mouse position and button status
* @note Unlinke a listener event, this status cannot record meta events such as
* "CLICK".
@@ -129,12 +143,11 @@ extern "C" {
* as the gdispGetMouse() routine may attempt to fetch calibration data and perform a startup calibration if there is no way to get it.
* If this is called after gdispGetMouse() has been called and the driver requires calibration storage, it will immediately save the
* data is has already obtained.
- * The 'requireFree' parameter indicates if the fetch buffer must be free()'d to deallocate the buffer provided by the Fetch routine.
*
* @param[in] instance The ID of the mouse input instance
* @param[in] fnsave The routine to save the data
* @param[in] fnload The routine to restore the data
- * @param[in] requireFree ToDo
+ * @param[in] requireFree TRUE if the buffer returned by the load function must be freed by the mouse code.
*/
void ginputSetMouseCalibrationRoutines(uint16_t instance, GMouseCalibrationSaveRoutine fnsave, GMouseCalibrationLoadRoutine fnload, bool_t requireFree);