2012-03-11 19:07:10 +00:00
|
|
|
#ifndef __PYTHON_SCRIPTING_H
|
|
|
|
#define __PYTHON_SCRIPTING_H
|
|
|
|
|
2012-08-02 07:47:30 +00:00
|
|
|
// undefs explained here: https://bugzilla.redhat.com/show_bug.cgi?id=427617
|
|
|
|
|
|
|
|
#ifdef _POSIX_C_SOURCE
|
|
|
|
#undef _POSIX_C_SOURCE
|
|
|
|
#endif
|
|
|
|
#ifdef _XOPEN_SOURCE
|
|
|
|
#undef _XOPEN_SOURCE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <Python.h>
|
|
|
|
#ifndef NO_WXPYTHON_EXTENSION_HEADERS
|
2012-08-02 17:24:53 +00:00
|
|
|
#ifdef KICAD_SCRIPTING_WXPYTHON
|
2012-08-02 07:47:30 +00:00
|
|
|
#include <wx/wxPython/wxPython.h>
|
|
|
|
#endif
|
2012-08-02 17:24:53 +00:00
|
|
|
#endif
|
2012-08-02 07:47:30 +00:00
|
|
|
|
2012-03-11 19:07:10 +00:00
|
|
|
|
2012-06-27 21:19:19 +00:00
|
|
|
/* Function pcbnewInitPythonScripting
|
|
|
|
* Initializes the Python engine inside pcbnew
|
|
|
|
*/
|
|
|
|
|
2012-08-02 07:47:30 +00:00
|
|
|
bool pcbnewInitPythonScripting();
|
|
|
|
void pcbnewFinishPythonScripting();
|
2012-03-11 19:07:10 +00:00
|
|
|
|
2012-08-02 17:24:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef KICAD_SCRIPTING_WXPYTHON
|
|
|
|
|
|
|
|
void RedirectStdio();
|
|
|
|
wxWindow* CreatePythonShellWindow(wxWindow* parent);
|
|
|
|
|
|
|
|
#define PY_BLOCK_THREADS(name) wxPyBlock_t name = wxPyBeginBlockThreads()
|
|
|
|
#define PY_UNBLOCK_THREADS(name) wxPyEndBlockThreads(name)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define PY_BLOCK_THREADS(name)
|
|
|
|
#define PY_UNBLOCK_THREADS(name)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2012-03-11 19:07:10 +00:00
|
|
|
#endif
|