[Gambas-user] gb.joystick (and Where is my gbh3?)
Cedron Dawg
cedron at exede.net
Mon Feb 25 17:46:14 CET 2019
Here is my console evdev demonstation .c program. It is not exhaustive of evdev capability, but enough to run my game, once incorporated.
Actually, I am considering writing an library .h reader that will write starter gb.component code. Of course, I'll do it in Gambas.
Enjoy,
Ced
==============================================================
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
----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evdev_test.c
Type: text/x-c++src
Size: 9304 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190225/056967f7/attachment.c>
More information about the User
mailing list