[Y-devel] Widget set progress
Mark Thomas mark at www.y-windows.org
Sat Apr 17 18:08:11 BST 2004
I was thinking of two interfaces to pointer-type objects:
1) The Simple Pointer Interface
This is provided by a set of methods in the Widget class that subclasses
can override to handle particular event types, i.e.:
widgetPointerButtonDown (..., buttonId)
widgetPointerButtonUp (..., buttonId)
widgetPointerClick (..., buttonId)
widgetPointerMotion (..., int32_t x, int32_t y)
And provide some global features for probing the current pointer status:
pointerGetPosition (...)
pointerGetButtonState (buttonId)
Here the button IDs are logical buttons, i.e. 0 corresponds to the primary
pointer button (left on my mouse, maybe another button for other people).
This would handle 95% of applications' needs.
2) The Detailed Input Device Interface
This would be a way of probing and getting notification for a series of
input devices, one that talks in terms of button and axes. We might want
to look to how linux handles generic pointer devices to see what we should
and shouldn't do.
Applications that specifically want information like pressure and tilt can
look through this interface.
To tie these together, input drivers should actually generate only
detailed input device events, and some part of the Y server should
monitor these events and generate the corresponding simple events.
This part of the server would need to be configurable (and would
presumably be the place to provide things like button ID and axis
remapping).
Regards,
Mark.
--
|| Mark Thomas
|| efaref.net
||
|| "I'm so cool you can store meat in me." - Zaphod
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved