kjsembed
static_binding.cpp
Go to the documentation of this file.
34 : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()),
41 KJS::JSValue *StaticBinding::callAsFunction( KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args )
60 void StaticBinding::publish( KJS::ExecState *exec, KJS::JSObject *object, const Method *methods )
65 object->put(exec, methods[idx].name, new StaticBinding(exec, &methods[idx]), methods[idx].flags);
71 : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()),
96 KJS::JSObject *StaticConstructor::add( KJS::ExecState *exec, KJS::JSObject *object, const Constructor *constructor )
130 KJS::JSObject* StaticConstructor::bind(KJS::ExecState* exec, const QString& className, PointerBase& objPtr)
140 KJS::JSObject *StaticConstructor::construct( KJS::ExecState *exec, KJS::JSObject *parent, const KJS::UString &className, const KJS::List &args )
152 return KJS::throwError( exec, KJS::TypeError, toUString(QString("Cannot create %1 objects from javascript.").arg(toQString(className)) ));
KJS::JSValue * callAsFunction(KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args)
Executes the callback for this method.
Definition: static_binding.cpp:41
static void publish(KJS::ExecState *exec, KJS::JSObject *object, const Method *methods)
Publishes an array of Methods to an object.
Definition: static_binding.cpp:60
KJS::JSObject * construct(KJS::ExecState *exec, const KJS::List &args)
Calls the callback that will in turn create a new instance of this object with the arguments passed i...
Definition: static_binding.cpp:79
Definition: pointer.h:31
static KJS::JSObject * add(KJS::ExecState *exec, KJS::JSObject *object, const Constructor *constructor)
Add the constructor to an object.
Definition: static_binding.cpp:96
StaticConstructor(KJS::ExecState *exec, const Constructor *constructor)
Create a new constructor.
Definition: static_binding.cpp:70
KJS::JSObject *(* callBind)(KJS::ExecState *, PointerBase &)
Bind signature.
Definition: binding_support.h:335
Definition: binding_support.h:345
const char * name
The constructor name as it will appear in Javascript.
Definition: binding_support.h:351
void setDefaultValue(KJS::JSValue *value)
Definition: static_binding.cpp:84
static KJS::JSObject * bind(KJS::ExecState *exec, const QString &className, PointerBase &objPtr)
Definition: static_binding.cpp:130
Definition: variant_binding.cpp:130
StaticBinding(KJS::ExecState *exec, const Method *method)
Create a new method.
Definition: static_binding.cpp:33
KJS::JSValue * defaultValue(KJS::ExecState *exec, KJS::JSType hint) const
Definition: static_binding.cpp:89
static const Method * methods(const KJS::UString &className)
Definition: static_binding.cpp:120
const Constructor * m_constructor
Definition: static_binding.h:124
static QHash< QString, const Constructor * > g_ctorHash
Definition: static_binding.cpp:28
JSObject * throwError(ExecState *e, ErrorType t, const QString &m)
Definition: binding_support.h:241
static const Constructor * constructor(const KJS::UString &className)
Definition: static_binding.cpp:125
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.