From e642edb4e182cad5aa2b109b3baf23cacc903084 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 24 Oct 2013 18:33:40 +1000 Subject: Store the display locally within the mouse structure. Add ginputGetMouseDisplay() --- include/ginput/mouse.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/ginput') diff --git a/include/ginput/mouse.h b/include/ginput/mouse.h index f13379c3..aa9864a9 100644 --- a/include/ginput/mouse.h +++ b/include/ginput/mouse.h @@ -56,6 +56,7 @@ typedef struct GEventMouse_t { GMETA_MOUSE_CXTCLICK = 8 // For mice - The right button has just been depressed // For touch - a long press has just occurred } meta; + GDisplay * display; // The display this mouse is currently associated with. } GEventMouse; // Mouse/Touch Listen Flags - passed to geventAddSourceToListener() @@ -106,6 +107,15 @@ extern "C" { */ void ginputSetMouseDisplay(uint16_t instance, GDisplay *g); + /** + * @brief Get the display currently associated with the mouse + * @return A pointer to the display + * + * @param[in] instance The ID of the mouse input instance + * @param[in] g The GDisplay to which this mouse belongs + */ + GDisplay *ginputGetMouseDisplay(uint16_t instance); + /** * @brief Get the current mouse position and button status * @note Unlinke a listener event, this status cannot record meta events such as -- cgit v1.2.3