# Module : SALOME
# $Header$
-SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs
+SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event
if ENABLE_SALOMEOBJECT
SUBDIRS += OBJECT
if ENABLE_QXGRAPHVIEWER
SUBDIRS += QxGraph
endif
-SUBDIRS += Event LightApp ResExporter
+SUBDIRS += LightApp ResExporter
if GUI_ENABLE_CORBA
SUBDIRS += TOOLSGUI Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT
MOC_FILES= PyInterp_Watcher_moc.cxx
nodist_libPyInterp_la_SOURCES= $(MOC_FILES)
-libPyInterp_la_CPPFLAGS= $(PYTHON_INCLUDES) $(QT_INCLUDES)
-libPyInterp_la_LDFLAGS= $(PYTHON_LIBS) $(QT_MT_LIBS)
+libPyInterp_la_CPPFLAGS= $(PYTHON_INCLUDES) $(QT_INCLUDES) \
+ -I$(srcdir)/../Event
+libPyInterp_la_LDFLAGS= $(PYTHON_LIBS) $(QT_MT_LIBS) ../Event/libEvent.la
#include "PyInterp_Dispatcher.h" // !!! WARNING !!! THIS INCLUDE MUST BE THE VERY FIRST !!!
#include "PyInterp_Interp.h"
#include "PyInterp_Watcher.h"
+#include <SALOME_Event.h>
#include <QObject>
#include <QCoreApplication>
+class PyInterp_ExecuteEvent: public SALOME_Event
+{
+public:
+ PyInterp_Request* myRequest;
+ PyInterp_ExecuteEvent( PyInterp_Request* r )
+ : myRequest( r ) {}
+ virtual void Execute()
+ {
+ myRequest->execute();
+ }
+};
+
using namespace std;
PyInterp_Dispatcher* PyInterp_Dispatcher::myInstance = 0;
void PyInterp_Request::safeExecute()
{
- execute();
+ ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
}
void PyInterp_Request::Destroy( PyInterp_Request* request )
{
if ( getInterp() ){
PyLockWrapper aLock = getInterp()->GetLockWrapper();
- execute();
+ ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
}
}
class PyInterp_Interp;
class PyInterp_Watcher;
class PyInterp_Dispatcher;
+class PyInterp_ExecuteEvent;
class PYINTERP_EXPORT PyInterp_Request
{
friend class PyInterp_Dispatcher;
+ friend class PyInterp_ExecuteEvent;
PyInterp_Request();
PyInterp_Request( const PyInterp_Request& );