Photon without widgets

I’m trying to write some photon code, but in a way that doesn’t ever touch the photon widget library (like, all raw regions, raw events and raw drawing, etc).

My first challenge so far is making a simple window. The test program right now does little more than call PhAttach(…), PhRegionOpen(…), and then sleeps for a bit, and calls PhDetach(…) and goes away.

If I pass NULL as the fourth argument of PhRegionOpen, it gives me a happy-fun region. If I start trying to pass a PhWindowInfo_t pointer in the fourth argument, it just returns ‘0’ to me, and no region or window is created.

It’s kinda hard to tell if this is even the proper way to do it, this stuff seems to be entirely undocumented at the moment.


So what’s the secret recipie?


Cheers - Tony :slight_smile:


Tony Mantler | Proud ---- Days since the last
QNX Consulting | of our | 27 |
tony@astra.mb.ca | Record ---- “Gerbil Incident”

You want to use PhWindowOpen instead of PhRegionOpen. Keep in mind by writing an application this way that you are going to have handle all of the stuff that the photon widget library handles on your own. Not that it’s not possible but it can cause problems. I’ll see if I can come up with an example and place it in the Knowledge Base. If you don’t see something in the Knowledge Base by Thursday or Friday of next week then ping this thread.

Regards
Rodney

Previously, Tony Mantler wrote in qdn.public.qnxrtp.photon:

I’m trying to write some photon code, but in a way that doesn’t ever touch the photon widget library (like, all raw regions, raw events and raw drawing, etc).

My first challenge so far is making a simple window. The test program right now does little more than call PhAttach(…), PhRegionOpen(…), and then sleeps for a bit, and calls PhDetach(…) and goes away.

If I pass NULL as the fourth argument of PhRegionOpen, it gives me a happy-fun region. If I start trying to pass a PhWindowInfo_t pointer in the fourth argument, it just returns ‘0’ to me, and no region or window is created.

It’s kinda hard to tell if this is even the proper way to do it, this stuff seems to be entirely undocumented at the moment.


So what’s the secret recipie?


Cheers - Tony > :slight_smile:


Tony Mantler | Proud ---- Days since the last
QNX Consulting | of our | 27 |
tony@astra.mb.ca > | Record ---- “Gerbil Incident”