gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need a direction to XInput support in NSEvent.


From: Banlu Kemiyatorn
Subject: Re: Need a direction to XInput support in NSEvent.
Date: Fri, 30 Jan 2004 19:16:49 +0700

Adam Fedor wrote:


On Thursday, January 29, 2004, at 12:54 PM, Banlu Kemiyatorn wrote:

On 2004-01-29 22:40:33 +0700 Adam Fedor <address@hidden> wrote:

I was talking about overloading the meaning of delta[XYZ] to mean instead tiltX, tiltY, rotation (for example). For instance, you could set the event type to NSOtherMouse, use the buttonNumber field to specify the device id or perhaps there should be some consistent mapping between the buttonNumber and the type of device (we don't currently set or use buttonNumber).


Is that mean normal app won't be able to use the device as a traditional mouse if it ignore NSOtherMouse? I am thinking of splitting the event into a status event one and follow by the actual mouse event one but I think that's unnecessarily complex. And what if the device want to use the other mouse button? Use flags on buttonNumber?

An alternative would be to define your own special event sub-type under the NSAppKitEvent or NSSystemEvent type. As an absolute last resort we could define a new event type with it's own ivars and init method - but that would potentially make things incompatible with MacOS X


Last time I checked it, almost a year ago, in OSX it involved a Carbon structure
and I cannot see any good reason to follow that.


Except I don't see another way to do it. It appears that in Carbon, it's a separate event and there is a service 'Ink" which automatically converts the event to something the App can handle (unless it's turned off). Perhaps we should do something similar, maybe via a GSTabletEvent class?

Hmmm. Like subclassing NSEvent to GSTabletEvent with -angleX -angleY -angleZ -deviceNumber and -isTabletEvent? It is important to study xinput in details before starting the implementation. There are other related issues like if the xinput is changing its configuration (eg. remapping event axis) or deviceNumber and deviceName mapping which may raise a requirement in addition information in GSTabletEvent. BTW, I think a name Tablet is not a very generic name for addition devices in future.

id.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail





reply via email to

[Prev in Thread] Current Thread [Next in Thread]