From 179fa413b047bede6e32109e2ce82437c5fb8d34 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 16 Jan 2006 02:36:01 +0000 Subject: moving trunk for module inkscape (bzr r1) --- src/extension/script/InkscapePerl.cpp | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/extension/script/InkscapePerl.cpp (limited to 'src/extension/script/InkscapePerl.cpp') diff --git a/src/extension/script/InkscapePerl.cpp b/src/extension/script/InkscapePerl.cpp new file mode 100644 index 000000000..7b3c3c1a5 --- /dev/null +++ b/src/extension/script/InkscapePerl.cpp @@ -0,0 +1,80 @@ +/** + * Perl Interpreter wrapper for Inkscape + * + * Authors: + * Bob Jamison + * + * Copyright (C) 2004 Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + + + +#include "InkscapePerl.h" + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + + +#include + +#include "inkscape_perl.pm.h" + +/* + * Generated by SWIG + */ +extern "C" int +InkscapePerlParseBuf(char *startupCodeBuf, char *codeBuf); + +namespace Inkscape { +namespace Extension { +namespace Script { + + +/* + * + */ +InkscapePerl::InkscapePerl() +{ +} + + + +/* + * + */ +InkscapePerl::~InkscapePerl() +{ + +} + + + + + +bool InkscapePerl::interpretScript(Glib::ustring &script, + Glib::ustring &output, + Glib::ustring &error) +{ + char *codeBuf = (char *)script.raw().c_str(); + int ret = InkscapePerlParseBuf(inkscape_module_script, codeBuf); + if (!ret) + { + return false; + } + return true; +} + + + + + +} // namespace Script +} // namespace Extension +} // namespace Inkscape + +//######################################################################### +//# E N D O F F I L E +//######################################################################### -- cgit v1.2.3