Code

r11676@tres: ted | 2006-05-05 21:45:20 -0700
[inkscape.git] / src / extension / script / InkscapePerl.cpp
1 /**
2  * Perl Interpreter wrapper for Inkscape
3  *
4  * Authors:
5  *   Bob Jamison <rjamison@titan.com>
6  *
7  * Copyright (C) 2004 Authors
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
11  
14 #include "InkscapePerl.h"
16 #include "EXTERN.h"
17 #include "perl.h"
18 #include "XSUB.h"
21 #include <stdio.h>
23 #include "inkscape_perl.pm.h"
25 /*
26  * Generated by SWIG
27  */
28 extern "C" int
29 InkscapePerlParseBuf(char *startupCodeBuf, char *codeBuf);
31 namespace Inkscape {
32 namespace Extension {
33 namespace Script {
36 /*
37  *
38  */
39 InkscapePerl::InkscapePerl()
40 {
41 }
43     
45 /*
46  *
47  */
48 InkscapePerl::~InkscapePerl()
49 {
51 }
53     
54     
57 bool InkscapePerl::interpretScript(Glib::ustring &script,
58                                  Glib::ustring &output,
59                                  Glib::ustring &error)
60 {
61     char *codeBuf = (char *)script.raw().c_str();
62     int ret = InkscapePerlParseBuf(inkscape_module_script, codeBuf);
63     if (!ret)
64         {
65         return false;
66         }
67     return true;
68 }
69     
74 }  // namespace Script
75 }  // namespace Extension
76 }  // namespace Inkscape
78 //#########################################################################
79 //# E N D    O F    F I L E
80 //#########################################################################