diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-10-24 16:56:09 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-10-24 16:56:09 +1000 |
commit | 1a99b3c321f6456c79aeb402fb34f421d2349d04 (patch) | |
tree | d9f0ac7bb35965bf888dee8ced2b23a4707f8afa /include | |
parent | db9f4a367daff83729ed9f144623db46ba08c80b (diff) | |
download | uGFX-1a99b3c321f6456c79aeb402fb34f421d2349d04.tar.gz uGFX-1a99b3c321f6456c79aeb402fb34f421d2349d04.tar.bz2 uGFX-1a99b3c321f6456c79aeb402fb34f421d2349d04.zip |
New: ginputSetMouseDisplay() to allow the mouse to work with a non-default display.
Fix: Mouse orientation fixed to match the now corrected GDISP orientation.
Comment updates
Diffstat (limited to 'include')
-rw-r--r-- | include/ginput/mouse.h | 19 |
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); |