mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-03 03:24:39 +00:00
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>
This commit is contained in:
parent
93c2a1628a
commit
098b837440
4 changed files with 89 additions and 0 deletions
|
|
@ -1410,4 +1410,28 @@ xf86EnableDevice(DeviceIntPtr dev)
|
|||
EnableDevice(dev, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Post a touch event with optional valuators. If this is the first touch in
|
||||
* the sequence, at least x & y valuators must be provided. The driver is
|
||||
* responsible for maintaining the correct event sequence (TouchBegin, TouchUpdate,
|
||||
* TouchEnd). Submitting an update or end event for a unregistered touchid will
|
||||
* result in errors.
|
||||
* Touch IDs may be reused by the driver but only after a TouchEnd has been
|
||||
* submitted for that touch ID.
|
||||
*
|
||||
* @param dev The device to post the event for
|
||||
* @param touchid The touchid of the current touch event. Must be an
|
||||
* existing ID for TouchUpdate or TouchEnd events
|
||||
* @param type One of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd
|
||||
* @param flags Flags for this event
|
||||
* @param The valuator mask with all valuators set for this event.
|
||||
*/
|
||||
void
|
||||
xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type,
|
||||
uint32_t flags, const ValuatorMask *mask)
|
||||
{
|
||||
|
||||
QueueTouchEvents(dev, type, touchid, flags, mask);
|
||||
}
|
||||
|
||||
/* end of xf86Xinput.c */
|
||||
|
|
|
|||
|
|
@ -141,6 +141,9 @@ extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_co
|
|||
const int *valuators);
|
||||
extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
|
||||
int is_down);
|
||||
extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
|
||||
uint16_t type, uint32_t flags,
|
||||
const ValuatorMask *mask);
|
||||
extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
|
||||
extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
|
||||
extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr options);
|
||||
|
|
|
|||
Loading…
Reference in a new issue