[Kst] kdeextragear-2/kst/kst/extensions/js
George Staikos
staikos at kde.org
Tue Apr 19 03:57:36 CEST 2005
CVS commit by staikos:
add bindings for pluginmodule - roughly complete
A bind_pluginio.cpp 1.1 [GPL (v2+)]
A bind_pluginio.h 1.1 [GPL (v2+)]
A bind_pluginiocollection.cpp 1.1 [GPL (v2+)]
A bind_pluginiocollection.h 1.1 [GPL (v2+)]
M +3 -1 Makefile.am 1.37
M +1 -0 bind_extension.cpp 1.2
M +69 -0 bind_pluginmodule.cpp 1.2
M +10 -0 bind_pluginmodule.h 1.2
--- kdeextragear-2/kst/kst/extensions/js/Makefile.am #1.36:1.37
@@ -71,5 +71,7 @@
bind_pluginmanager.cpp \
bind_pluginmodule.cpp \
- bind_pluginmodulecollection.cpp
+ bind_pluginmodulecollection.cpp \
+ bind_pluginio.cpp \
+ bind_pluginiocollection.cpp
--- kdeextragear-2/kst/kst/extensions/js/bind_extension.cpp #1.1:1.2
@@ -184,4 +184,5 @@ KJS::Value KstBindExtension::unload(KJS:
ExtensionMgr::self()->setEnabled(_d, false);
ExtensionMgr::self()->updateExtensions();
+ return KJS::Undefined();
}
--- kdeextragear-2/kst/kst/extensions/js/bind_pluginmodule.cpp #1.1:1.2
@@ -17,4 +17,5 @@
#include "bind_pluginmodule.h"
+#include "bind_pluginiocollection.h"
#include <kdebug.h>
@@ -57,4 +58,14 @@ static PluginModuleBindings pluginModule
static PluginModuleProperties pluginModuleProperties[] = {
+ { "usesLocalData", 0L, &KstBindPluginModule::usesLocalData },
+ { "isFit", 0L, &KstBindPluginModule::isFit },
+ { "isFilter", 0L, &KstBindPluginModule::isFilter },
+ { "name", 0L, &KstBindPluginModule::name },
+ { "readableName", 0L, &KstBindPluginModule::readableName },
+ { "author", 0L, &KstBindPluginModule::author },
+ { "description", 0L, &KstBindPluginModule::description },
+ { "version", 0L, &KstBindPluginModule::version },
+ { "inputs", 0L, &KstBindPluginModule::inputs },
+ { "outputs", 0L, &KstBindPluginModule::outputs },
{ 0L, 0L, 0L }
};
@@ -142,3 +153,61 @@ void KstBindPluginModule::addBindings(KJ
+KJS::Value KstBindPluginModule::usesLocalData(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::Boolean(_d._localdata);
+}
+
+
+KJS::Value KstBindPluginModule::isFit(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::Boolean(_d._isFit);
+}
+
+
+KJS::Value KstBindPluginModule::isFilter(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::Boolean(_d._isFilter);
+}
+
+
+KJS::Value KstBindPluginModule::name(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::String(_d._name);
+}
+
+
+KJS::Value KstBindPluginModule::readableName(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::String(_d._readableName);
+}
+
+
+KJS::Value KstBindPluginModule::author(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::String(_d._author);
+}
+
+
+KJS::Value KstBindPluginModule::description(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::String(_d._description);
+}
+
+
+KJS::Value KstBindPluginModule::version(KJS::ExecState *exec) const {
+ Q_UNUSED(exec)
+ return KJS::String(_d._version);
+}
+
+
+KJS::Value KstBindPluginModule::inputs(KJS::ExecState *exec) const {
+ return KJS::Object(new KstBindPluginIOCollection(exec, _d._inputs, true));
+}
+
+
+KJS::Value KstBindPluginModule::outputs(KJS::ExecState *exec) const {
+ return KJS::Object(new KstBindPluginIOCollection(exec, _d._outputs, false));
+}
+
+
// vim: ts=2 sw=2 et
--- kdeextragear-2/kst/kst/extensions/js/bind_pluginmodule.h #1.1:1.2
@@ -42,4 +42,14 @@ class KstBindPluginModule : public KstBi
// KJS::Value xmlFile(KJS::ExecState *exec) const;
// KJS::Value libraryFile(KJS::ExecState *exec) const;
+ KJS::Value usesLocalData(KJS::ExecState *exec) const;
+ KJS::Value isFit(KJS::ExecState *exec) const;
+ KJS::Value isFilter(KJS::ExecState *exec) const;
+ KJS::Value name(KJS::ExecState *exec) const;
+ KJS::Value readableName(KJS::ExecState *exec) const;
+ KJS::Value author(KJS::ExecState *exec) const;
+ KJS::Value description(KJS::ExecState *exec) const;
+ KJS::Value version(KJS::ExecState *exec) const;
+ KJS::Value inputs(KJS::ExecState *exec) const;
+ KJS::Value outputs(KJS::ExecState *exec) const;
protected:
More information about the Kst
mailing list