summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4cd1ea)
raw | patch | inline | side by side (parent: f4cd1ea)
author | ishmal <ishmal@users.sourceforge.net> | |
Mon, 10 Mar 2008 02:40:46 +0000 (02:40 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Mon, 10 Mar 2008 02:40:46 +0000 (02:40 +0000) |
src/extension/script/InkscapeScript.cpp | patch | blob | history | |
src/extension/script/InkscapeScript.h | patch | blob | history |
index 806eb7b314fceaee4042e471ac0cff152b725c4e..3007df39f47e37d462c89fb1bd7321007995d954 100644 (file)
* Authors:
* Bob Jamison <rjamison@titan.com>
*
- * Copyright (C) 2004 Authors
+ * Copyright (C) 2004-2008 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+
#include "InkscapeScript.h"
#include <bind/javabind.h>
-namespace Inkscape {
-namespace Extension {
-namespace Script {
+
+
+namespace Inkscape
+{
+namespace Extension
+{
+namespace Script
+{
typedef Inkscape::Bind::Value Value;
+
/**
*
*/
{
g_warning("interpretScript: unable to start JVM\n");
return false;
- }
- std::vector<Value> parms;
- Value retval;
- Value parm;
- parm.setString(langname);
- parms.push_back(parm);
- parm.setString(script);
- parms.push_back(parm);
+ }
+ std::vector<Value> parms;
+ Value retval;
+ Value parm;
+ parm.setString(langname);
+ parms.push_back(parm);
+ parm.setString(script);
+ parms.push_back(parm);
bool ret = binder->callStatic(Value::BIND_BOOLEAN,
- "org/inkscape/cmn/ScriptRunner",
+ "org/inkscape/cmn/ScriptRunner",
"run",
"(Ljava/lang/String;Ljava/lang/String;)Z",
parms,
if (!ret)
{
g_warning("interpretScript: failed\n");
- return false;
- }
+ return false;
+ }
return true;
}
{
g_warning("interpretFile: unable to start JVM\n");
return false;
- }
- std::vector<Value> parms;
- Value retval;
- Value parm;
- parm.setString(langname);
- parms.push_back(parm);
- parm.setString(fname);
- parms.push_back(parm);
+ }
+ std::vector<Value> parms;
+ Value retval;
+ Value parm;
+ parm.setString(langname);
+ parms.push_back(parm);
+ parm.setString(fname);
+ parms.push_back(parm);
bool ret = binder->callStatic(Value::BIND_BOOLEAN,
- "org/inkscape/cmn/ScriptRunner",
+ "org/inkscape/cmn/ScriptRunner",
"runFile",
"(Ljava/lang/String;Ljava/lang/String;)Z",
parms,
if (!ret)
{
g_warning("interpretFile: failed\n");
- return false;
- }
+ return false;
+ }
return true;
}
index b6334fde1eca19c733e667a37cf55f81fdc2f196..98508e4e645ce56c8120536c90add9dd2602ae1c 100644 (file)
* Authors:
* Bob Jamison <rjamison@titan.com>
*
- * Copyright (C) 2004-2006 Bob Jamison
+ * Copyright (C) 2004-2008 Bob Jamison
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glibmm.h>
-namespace Inkscape {
-namespace Extension {
-namespace Script {
+namespace Inkscape
+{
+namespace Extension
+{
+namespace Script
+{
+
+/**
+ * This class is used to run scripts, either from a file or buffer
+ */
class InkscapeScript
{
public: