[Gambas-user] gb.joystick (and Where is my gbh3?)
Benoît Minisini
g4mba5 at gmail.com
Mon Feb 25 18:50:52 CET 2019
Le 25/02/2019 à 17:46, Cedron Dawg a écrit :
> 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
>
If it's more generic, and it's the offical way of dealing with inputs
libevdev seems a better choice.
I think then that the best solution is doing a "gb.input" (or something
like that) component with:
- A part written in C that implements all needed utilities functions
based on libevdev.
- A part written in Gambas that implements the actual public interface
in a clean, easy and beautiful way. This interface will make the
difference between a joystick, a keyboard, a mouse, etc. so that the
user does not have to handle the evdev way of seeing devices.
Note: yes, a component can have both a C and a gambas part.
Regards,
--
Benoît Minisini
More information about the User
mailing list