[Gambas-user] gb.joystick (and Where is my gbh3?)
Benoît Minisini
g4mba5 at gmail.com
Mon Feb 25 16:16:26 CET 2019
Le 25/02/2019 à 16:08, Cedron Dawg a écrit :
> I'm sorry. I just checked my email preferences and could not find a
> way to have it introduce the ">" lines. I guess I should top post
> from now on.
>
> [...snip...]
>
> Well, the in the Joystick model, you have to call the IOCTLs
> yourself. In the evdev model, it is hidden from you. So, in order
> to do it in Gambas, the functionality of evdev would in essence have
> to be replicated.
I don't know how evdev works. But it's usually opening a device file,
ioctl() on it, watching it. Opening and watching is already implemented
in Gambas. But not ioctl() that are device-specific.
Doing ioctl() in Gambas will anyway be boring, as you have to define all
the ioctl specific constants by hand.
But maybe a program could be written that would parse the kernel headers
to generate the constant definitions in Gambas...
>
> Can I assume you have a strong preference for components to be
> written in Gambas?
No, because it is usually harder with Gambas to deal with C structures
used by system calls. I told that only for people who are afraid to make
a component in C following the badly documented Gambas interpreter
interface.
--
Benoît Minisini
More information about the User
mailing list