[Y-devel] Widget set progress

Kris Van Hees aedil-y-devel at alchar.org
Sat Apr 17 18:13:30 BST 2004


I agree we need to generalize, but perhaps not too far (yet).  If we implement
something that is easily extensible, we ought to be safe.  Say you build an
exchange (using my previous message to this list as base):

- Client requests which input devices exist
- Server responds with pair list (id, type) where type defines things like
  keyboard, pointing device, ...
- Client requests configuration for each input device (by id)
- Server responds for a given input device what the configuration is (device
  type specific), using a mechanism similar to the following high level example:

        1. Number of characteristics
        2. For each characteristic:
                2.a Id
                2.b Type of characteristic (switch, axis, ...)
                2.c Size of type specific data (can be 0)
                2.d Type specific data (if any)

The general idea is that you can always define new device types along the way,
and define type specific data where needed.  Right now this could implement
nothing more than 2 and 3 button mice, and it would be very easy to add mice
with a mouse wheel later, and so on...  It doesn't lock us in to a specific
set of input elements for a device.  If an application doesn't know how to do
deal with a certain device type yet, still no problem.  It just won't be able
to use it.

If you want to abstract the characteristics more in a way where you do not
have to deal with new ones being added (which I'd actually prefer), you can
just stick to discrete and continuous (along with a range), since everything
will fall in one of those two categories.  In that case 2.b can only have two
values.

        Kris

On Fri, Apr 16, 2004 at 10:21:02PM +0200, Thorsten Wilms wrote:
<< Skipping down to the relevant portion. >>
> Trying to generalize:
> Pointing devices can have:
> - n (at least 1) buttons (up/down)
> - pressure for some or all buttons (the tip of a pen would have to be considered
>   a button)
> - options, like with the pen that can be turned around. Not restricted to 2 states.
>   There might be a need for an OptionChanged Event, if something needs to watch an
>   option.
> - 2 main axes, but any number additional axes (a controler could come with an extra
>   trackball or joystick or whatever, so I don't see an upper limit)
>  
> Tabletts can come with several pens, each one tied to a certain tool (or tools
> for using both ends) -> (Pointing) Device IDs
>  
> Then there's velocity, not only for the main axes.
> Basicaly ther should be a mapping system for every input all attached devices
> provide. And a minimal set of things to map 2 (basic mouse usage), as well
> additinal sets for common 2d, 3d and audio setups. 'Things to map to' leading
> to what kind of events should be send to apps/widgets.
>  
> Would it help to think of pressure as axis, with 0 meaning button not pressed at
> all?
>  
> It should be possible to do things like attaching 2 mice to the pc. Use one
> as pointing device, use the other to control some values (many possibilites
> in multimedia use).
>  
> Maybe the same system could be used to deal with stuff like midi-controlers/
> fader boxes (being no pointing devices, but having buttons and channels(=axes)).



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved