summaryrefslogtreecommitdiff
path: root/dix/getevents.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-12-14 14:41:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-19 09:08:36 +1000
commit098b837440e40bbc485368ec9658e12efd6ef581 (patch)
tree9bb009032d2def1011fd2a2ff4093f33abfbec16 /dix/getevents.c
parent93c2a1628a9f6e7480d834bf55c080997fd18911 (diff)
Add the touch input API stubs
xf86PostTouchEvent is the driver API to submit touch events to the server. This API doesn't do anything yet though but now we can at least bump the API. For valuators, drivers should use the existing xf86InitValuatorAxisStruct function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'dix/getevents.c')
-rw-r--r--dix/getevents.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index d7d6c09ec..39f8ca7b6 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1632,6 +1632,54 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const Val
}
/**
+ * Generate internal events representing this touch event and enqueue them
+ * on the event queue.
+ *
+ * This function is not reentrant. Disable signals before calling.
+ *
+ * @param device The device to generate the event for
+ * @param type Event type, one of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd
+ * @param touchid Touch point ID
+ * @param flags Event modification flags
+ * @param mask Valuator mask for valuators present for this event.
+ */
+void
+QueueTouchEvents(DeviceIntPtr device, int type,
+ uint32_t ddx_touchid, int flags, const ValuatorMask *mask)
+{
+ int nevents;
+
+ nevents = GetTouchEvents(InputEventList, device, ddx_touchid, type, flags, mask);
+ queueEventList(device, InputEventList, nevents);
+}
+
+/**
+ * Get events for a touch. Generates a TouchBegin event if end is not set and
+ * the touch id is not active. Generates a TouchUpdate event if end is not set
+ * and the touch id is active. Generates a TouchEnd event if end is set and the
+ * touch id is active.
+ *
+ * events is not NULL-terminated; the return value is the number of events.
+ * The DDX is responsible for allocating the event structure in the first
+ * place via GetMaximumEventsNum(), and for freeing it.
+ *
+ * @param[out] events The list of events generated
+ * @param dev The device to generate the events for
+ * @param ddx_touchid The touch ID as assigned by the DDX
+ * @param type XI_TouchBegin, XI_TouchUpdate or XI_TouchEnd
+ * @param flags Event flags
+ * @param mask_in Valuator information for this event
+ */
+int
+GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
+ uint16_t type, uint32_t flags, const ValuatorMask *mask_in)
+{
+ return 0;
+}
+
+
+
+/**
* Synthesize a single motion event for the core pointer.
*
* Used in cursor functions, e.g. when cursor confinement changes, and we need