View topic - OpenKODE application on QNX

Page 1 of 1

OpenKODE application on QNX

PostPosted: Thu Jul 25, 2013 6:31 pm
by pvazharov
Hi guys,

I'm developing application for QNX which uses for ui OpenGL ES with OpenKODE. OpenKODE was the only windowing system that I was able to find for this QNX (Harman device).
The application shows the UI rendered with OpenGL ES, but the problem is that my event loop doesn't receive any event type different from KD_EVENT_WINDOWPROPERTY_CHANGE with pname member always zero.
This is the code for my event loop.

for(;;)
{
const KDEvent* evt = kdWaitEvent(0);
if (evt)
{
std::cout << "NEW EVENT " << evt->type << std::endl;
switch(evt->type)
{
case KD_EVENT_WINDOWPROPERTY_CHANGE:
{
std::cout << "NEW EVENT KD_EVENT_WINDOWPROPERTY_CHANGE. pname " << evt->data.windowproperty.pname << std::endl;
KDint32 param = -1;
KDint res = kdGetWindowPropertyiv(m_pWindow, evt->data.windowproperty.pname, &param);
std::cout << "res " << res << ". param " << param << ". err " << kdGetError() << std::endl;
}
break;
case KD_EVENT_WINDOW_CLOSE:
break;
default:
kdDefaultEvent(evt);
}
}
Draw();
}

and this is the code related to creation of my KD window and it seems to works correctly

m_pWindow = kdCreateWindow(m_eglDisplay, config, KD_NULL);
if(!m_pWindow)
{
return false;
}

EGLNativeWindowType wnd;
if(kdRealizeWindow(m_pWindow, &wnd) != 0)
{
return false;
}

Any ideas are appreciated. Thanks in advance.

Re: OpenKODE application on QNX

PostPosted: Fri Jul 26, 2013 2:20 am
by maschoen
Uh, what other types of events were you expecting? Mouse, Keyboard? I know that for Qt you have to set things up with the keyboard/mouse HID driver to receive events.

Re: OpenKODE application on QNX

PostPosted: Fri Jul 26, 2013 3:36 pm
by pvazharov
When I click on the screen the application receives KD_EVENT_WINDOWPROPERTY_CHANGE with pname member zero, too.
I expect to receive some events like - KD_EVENT_INPUT_POINTER. I saw two samples from http://community.qnx.com/sf/frs/do/view ... src_tar_gz and when I tried the code from them the application didn't receive any different event, too. The reason probably is something specific to the device, again.

Re: OpenKODE application on QNX

PostPosted: Mon Jul 29, 2013 8:46 pm
by koko
Make sure your devi-hid driver is started with following arguments:

/usr/photon/bin/devi-hid -Pr kbd mouse