aboutsummaryrefslogtreecommitdiffstats
path: root/include/ginput
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-24 18:33:40 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-24 18:33:40 +1000
commite642edb4e182cad5aa2b109b3baf23cacc903084 (patch)
tree1578a4b1dbc2f689119368411701c3bc66956df3 /include/ginput
parent1a99b3c321f6456c79aeb402fb34f421d2349d04 (diff)
downloaduGFX-e642edb4e182cad5aa2b109b3baf23cacc903084.tar.gz
uGFX-e642edb4e182cad5aa2b109b3baf23cacc903084.tar.bz2
uGFX-e642edb4e182cad5aa2b109b3baf23cacc903084.zip
Store the display locally within the mouse structure.
Add ginputGetMouseDisplay()
Diffstat (limited to 'include/ginput')
-rw-r--r--include/ginput/mouse.h10
1 files changed, 10 insertions, 0 deletions
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()
@@ -107,6 +108,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
* "CLICK".