1 #ifndef __INKSCAPE_SCRIPT_H__
2 #define __INKSCAPE_SCRIPT_H__
4 /**
5 * Inkscape Scripting container
6 *
7 * Authors:
8 * Bob Jamison <rjamison@titan.com>
9 *
10 * Copyright (C) 2004-2006 Bob Jamison
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 #include "config.h"
17 #include <glibmm.h>
19 namespace Inkscape {
20 namespace Extension {
21 namespace Script {
24 class InkscapeScript
25 {
26 public:
28 /**
29 * Which type of language?
30 */
31 typedef enum
32 {
33 PYTHON,
34 PERL
35 } ScriptLanguage;
37 /**
38 * Creates a generic script interpreter.
39 */
40 InkscapeScript();
42 /**
43 * Destructor
44 */
45 ~InkscapeScript();
47 /**
48 * Interprets the script in the 'script' buffer,
49 * storing the stdout output in 'output', and any
50 * error messages in 'error.' Language is one of the
51 * enumerated types in ScriptLanguage above.
52 */
53 bool interpretScript(const Glib::ustring &script,
54 Glib::ustring &output,
55 Glib::ustring &error,
56 ScriptLanguage language);
58 /**
59 * Interprets the script at the uri (file) named by 'uri',
60 * storing the stdout output in 'output', and any
61 * error messages in 'error.' Language is one of the
62 * enumerated types in ScriptLanguage above.
63 */
64 bool interpretUri(const Glib::ustring &uri,
65 Glib::ustring &output,
66 Glib::ustring &error,
67 ScriptLanguage language);
71 }; //class InkscapeScript
76 } // namespace Script
77 } // namespace Extension
78 } // namespace Inkscape
82 #endif /* __INKSCAPE_SCRIPT_H__ */
84 /*
85 Local Variables:
86 mode:c++
87 c-file-style:"stroustrup"
88 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
89 indent-tabs-mode:nil
90 fill-column:99
91 End:
92 */
93 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :