events in evdev.c

Chuck Robey chuckr at telenix.org
Sun Sep 21 10:21:59 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sascha Hlusiak wrote:
>>> Your argument would make sense if X didn't go to painful lengths to
>>> maintain an abstract input driver API/ABI that allowed for arbitrary
>>> drivers.
>> confused.  I was saying that the evdev wasn't as good an example of how to
>> write a driver than the joystick was.  
>
> The joystick driver itself maintains an abstract input layer which IMO belongs 
> into the server, not the driver. What's left then is nothing more than the 
> evdev driver. I really don't see where the joystick driver is superior in 
> driver design other that it provides backends for 3 interfaces.
> 
>> I was, in my mind, really 
>> concentrating on the keysym business, which is not compilable outside of
>> Linux.  
> keysyms are totally X11 and application side and very much cross-platform.

You say evdev's keysym code is totally X11?  Well, evdev.c's keysym code brings
in linux's input.h, which isn't cross-platform, isn't purely X11.  That's one
big reason that I couldn't figure out what evdev.c was doing.  I don't say it
isn't nice code, only that I couldn't learn keysyms from it, because it used too
many defines I couldn't figure out, stuff that wasn't X11 only.  I /could/ do
that with joystick.  That's true, isn't it?

My point was, that if evdev was that good an example, then it should have
limited itself to code that was portable.  Joystick did, although it did resort
to using 3 different code files to do it, still, it did.

I'm amused that I like joystick better than you do, and /you're/ the author.
Well, we each are allowed our opinions, and you're well-spoken enough.

> 
>> Where did you see the opposite?  Maybe, the fact that we're talking about
>> Linux events versus Xorg events versus the non-existence of FreeBSD
>> user-mode events is what confused things?
> I think you confuse something here. We never talked about Xorg events here.
> 
> And something similar to the Linux events (as in evdev) do exist in FreeBSD, 
> it's just no 1:1 mapping. And even if they didn't; what's your point? That 
> the evdev driver should not exist then, just because other platforms don't 
> provide such an interface?

You've said that before, I don't really want to disagree, but could you point to
the actual interface you're talking about?  I might be wrong, it doesn't seem
all that event-ish to me, and I'd like to see what you mean.  I mean, FreeBSD
doesn't call out of the kernel, you have to call into it and query (from a
user-mode viewpoint).  Or, were you talking about their internal interface,
stuff that you'd see in a FreeBSD kernel driver?  That, I'd agree with,
certainly.  Give me something I can look at, ok?

(stuff like this last paragraph, that's why I'd wanted this to be a private
email.  We shouldn't discuss FreeBSD in a Xorg list, I'd be embarrassed if
someone complained about that, they'd be right).

> 
> 
> - Sascha

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjWgrcACgkQz62J6PPcoOkugwCcDy5LeCaIYfmbCzPRoFc16xSp
zYkAn3QJD/9X+2DwwzUOHk2IG9x2dwnE
=DOmN
-----END PGP SIGNATURE-----



More information about the xorg mailing list