From ripley at stats.ox.ac.uk  Wed Apr 20 20:31:28 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed Apr 20 20:31:38 2005
Subject: [Rd] Embedded R and x11
In-Reply-To: <200504201834.33320.thomas.friedrichsmeier@ruhr-uni-bochum.de>
References: <200504201834.33320.thomas.friedrichsmeier@ruhr-uni-bochum.de>
Message-ID: <Pine.LNX.4.61.0504201928350.32166@gannet.stats>

I think you are barking up the wrong tree.  If you want to use an 
event-driven sub-system you need to run an event loop.

There is a lot of new information in 2.1.0 on building a front-end.
Please read it.

On Wed, 20 Apr 2005, Thomas Friedrichsmeier wrote:

> I'm working on a frontend for R. I have R running in a separate thread in my
> application using Rf_initEmbeddedR, and I'm using R_tryEval to run commands
> in R (i.e. I don't run the mainloop).
> Everything works fine, except the x11-device: I can open x11-windows and paint
> to them alright from R. However, the x11-window does not respond to any
> events. E.g. clicking the close-button simply does not close the window and
> the contents in the window do not get refreshed when it was hidden by other
> windows.
> I figured that the reason for this might be, that R_ProcessEvents () and
> handleEvent () in devX11.c do not get called (of course I might be completely
> wrong?). So I tried calling R_ProcessEvents () manually, but I can't get that
> to link (unresolved symbol R_ProcessEvents).
> Any hints on how I can get this to work?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Embedded R and x11
Prof Brian Ripley