blob: a97c945c8dbd008f0e992cafc6c8afd469b43e8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
#ifndef __INKSCAPE_PYTHON_H__
#define __INKSCAPE_PYTHON_H__
/**
* Python Interpreter wrapper for Inkscape
*
* Authors:
* Bob Jamison <rjamison@titan.com>
*
* Copyright (C) 2004-2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "InkscapeInterpreter.h"
#include <glibmm.h>
namespace Inkscape
{
namespace Extension
{
namespace Script
{
class InkscapePython : public InkscapeInterpreter
{
public:
/**
* Constructor. Create and initialize python binding.
* Note that we will only actually start up the Python
* interpreter when there is a demand.
*/
InkscapePython()
{
}
/**
* Destructor
*/
virtual ~InkscapePython()
{
}
/**
* Overloaded from InkscapeInterpreter
*/
virtual bool interpretScript(const Glib::ustring &script,
Glib::ustring &output,
Glib::ustring &error);
virtual void writeStdOut(const Glib::ustring &txt)
{
stdOut.append(txt);
}
virtual void writeStdErr(const Glib::ustring &txt)
{
stdErr.append(txt);
}
private:
Glib::ustring stdOut;
Glib::ustring stdErr;
};
} // namespace Script
} // namespace Extension
} // namespace Inkscape
#endif /*__INKSCAPE_PYTHON_H__ */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
|