VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPythonCommand.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00016 #ifndef vtkPythonCommand_h 00017 #define vtkPythonCommand_h 00018 00019 #include "vtkWrappingPythonCoreModule.h" // For export macro 00020 #include "vtkPython.h" 00021 #include "vtkCommand.h" 00022 00023 // To allow Python to use the vtkCommand features 00024 class VTKWRAPPINGPYTHONCORE_EXPORT vtkPythonCommand : public vtkCommand 00025 { 00026 public: 00027 vtkTypeMacro(vtkPythonCommand,vtkCommand); 00028 00029 static vtkPythonCommand *New() { return new vtkPythonCommand; }; 00030 00031 void SetObject(PyObject *o); 00032 void SetThreadState(PyThreadState *ts); 00033 void Execute(vtkObject *ptr, unsigned long eventtype, void *callData); 00034 00035 PyObject *obj; 00036 PyThreadState *ThreadState; 00037 protected: 00038 vtkPythonCommand(); 00039 ~vtkPythonCommand(); 00040 }; 00041 00042 #endif 00043 // VTK-HeaderTest-Exclude: vtkPythonCommand.h