Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Using input devices in GF OpenGL ES applications without Photon: (8 Items)
   
Using input devices in GF OpenGL ES applications without Photon  
As far as I understand there is no legal way to use input devices like keyboard and mouse in GF application without 
photon.

I've found gfi_* interface in GF headers, but it is not documented. Also exist libhiddi and its headers, which looks a 
bit better than gfi_* interface, but there is no documentation also.

Interface declared in sys/hiddi.h is very obscured to find out what I must do to handle keyboards and mice.

Utility hidview does exactly what I need when -a or -A command line option is specified. Maybe it is possible to open 
hidview source files if there is no hiddi documentation available ?
Re: Using input devices in GF OpenGL ES applications without Photon  
Hi Mike,

Actually, the gfi_xxxx() calls are the legal method to use input in a GF application.  You are correct, there is no 
documentation.

io-graphics in Photon uses those calls to move the mouse around for Photon, but it is really not a good example for the 
calls.  There is a PR filed to provide proper documentation, since these calls were a last minute addition to the QNX 
SDP 6.4.0 release.  For your reference, it is PR 55985.

Hopefully, someone will suggest a nice contained example shortly.

Kind Regards,
-Derek
Re: Using input devices in GF OpenGL ES applications without Photon  
Mike, I was also completely wrong about io-graphics usage of these gfi_xxxx() calls.  It only uses the documented 
gf_cursor_xxxx() calls, since it receives all it's input events via Photon that were received directly from the devi-
xxxx drivers.  

My apologies, I had not consumed enough caffeine yet :)

They plan is to publicize a new documented API based on an open standard (OpenKODE) for QNX SDP 6.4.1.  There is still 
ongoing work, but this is the execution plan.

-Derek
Re: Using input devices in GF OpenGL ES applications without Photon  
Thank you, Derek. Maybe it is possible to get hidview sources for now, until work on OpenKODE is not finished ? Looks 
like hidview doesn't contain any of the military secrets, etc :) It even will be enough to see how to connect to 
libhiddi and read raw events from all devices (part of source, which works when running hidview -a).
Re: Using input devices in GF OpenGL ES applications without Photon  
Do you still want this hidview source, (I would have to find it) or are you doing OK with the gf_cursor_xxxx() calls?

-Derek
Re: Using input devices in GF OpenGL ES applications without Photon  
> Do you still want this hidview source, (I would have to find it) 

Oh, Cool. Yes, I still need the source :) Thanks, Derek.

> or are you 
> doing OK with the gf_cursor_xxxx() calls?

I still can't show the cursor on the screen (without moving cursor, since I can't get mouse events) ...
Re: Using input devices in GF OpenGL ES applications without Photon  
Here is the source for hidview from trunk as of today.  It is pretty low level, and there is no guaranteed stuff will 
not change in the future (as-is warranty).

Regards,
-Derek

P.S.  Regarding the no display of the cursor until you move it, I will follow up in the other thread (we have too many 
cursor threads at the moment).
Attachment: Compressed file hidview_trunk.zip 71.67 KB
Re: Using input devices in GF OpenGL ES applications without Photon  
Thank you. Code looks pretty good and understandable.