Re: X+Performer

New Message Reply Date view Thread view Subject view Author view

Dirk Reiners (reiners++at++ecrc.de)
Thu, 2 Jul 1998 11:21:29 -0600


On Jun 29, 6:39pm, Stefan Jahn wrote:
> Subject: X+Performer
> Hello pfPeople,
> i recently got some experiences with combining X11/Motif and
> Performer. For this a new process has been forked. All the callbacks
are
> able to read and write date within the shared arena. But the problem
is
> the other way around. How can I the Motif widgets make use of the
same
> shared arena ? Or is there any other way accessing the widgets from
the
> performer process ? My rather bad solution to this is a timed request
> every 2 seconds from the X process looking for changes within the
shared
> arena of the performer process and then updating the widgets
according the
> variables. But I am not happy with it.
>
> Thanks in advance.
>
>-- End of excerpt from Stefan Jahn

There is no safe way to access Widgets from another thread/process,
you'll have to setup your own handling in the interface thread, just
the way you do it now. But having a busy wait, even if only every 2
seconds is a bad solution, which also gives bad responsiveness.

One idea would be to open a pipe between the two processes, add the
pipe's fd to X's select set (XtAppAddInput) and send commands down that
pipe.

But as you have most of the dirty work already done, you could use a
signal handler (see man XtAppAddSignal) and signal your interface
process when the data in the shared arena has changed. Should be simple
enough.

Hope it helps

        Dirk

-- 
-- Dirk Reiners                 reiners++at++ecrc.de, reiners++at++igd.fhg.de  
-- ZGDV - AR Group                   http://www.igd.fhg.de/~reiners
-- Arabellastr. 17 (ECRC)             
-- D-81925 Muenchen                  All standard disclaimers apply. 
-- Truth is stranger than fiction because fiction has to make sense. 
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:39 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.