Hi,
A “Test” program is developed by PhAB.
I wrote the following another program( PWMTest.C) to bring “Test” to
front:
run by PWMTest -f
Compile it by cc -o PWMTest PWMTest.C -lphoton_s
I failed in this, who knows this? Thanks in advances!
Luckly it works by implementing PWMTest also by PhAB. However
what I want is a program like the following.
PWMTest.C:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/name.h>
#include <Pt.h>
void main( int argc, char* argv[] )
{
PhWindowEvent_t Event;
pid_t ProcessID = -1;
ProcessID = qnx_name_locate(0, “Test”, 0, 0 );
printf(“Test pid:%d\n”, ProcessID );
//memset( &Event, 0, sizeof( Event ) );
int c;
while( ( c = getopt( argc, argv, “cafbhdr” ) ) != -1 )
{
switch( c )
{
case( ‘c’ ):
Event.event_f = Ph_WM_CLOSE;
break;
case( ‘a’ ):
Event.event_f = Ph_WM_FOCUS;
break;
case( ‘f’ ):
Event.event_f = Ph_WM_TOFRONT;
break;
case( ‘b’ ):
Event.event_f = Ph_WM_TOBACK;
break;
case( ‘h’ ):
Event.event_f = Ph_WM_HIDE;
Event.event_state = Ph_WM_EVSTATE_HIDE;
break;
case( ‘d’ ):
Event.event_f = Ph_WM_BACKDROP;
break;
case( ‘r’ ):
Event.event_f = Ph_WM_RESTORE;
break;