KJSEmbed
binding_support.h File Reference
#include <QtCore/QDate>
#include <QtCore/QStringList>
#include <kjsembed/kjseglobal.h>
#include <kjsembed/pointer.h>
#include <kjs/object.h>
#include <kdemacros.h>


Go to the source code of this file.
Define Documentation
| #define END_CTOR } |
Definition at line 166 of file binding_support.h.
| #define END_ENUM_LUT |
| #define END_METHOD_LUT |
| #define KJS_BINDING | ( | NAME | ) |
Value:
class NAME \ { \ public: \ static const KJSEmbed::Method p_methods[]; \ static const KJSEmbed::Method p_statics[]; \ static const KJSEmbed::Enumerator p_enums[]; \ static const KJSEmbed::Constructor p_constructor; \ static KJS::JSObject *ctorMethod( KJS::ExecState *exec, const KJS::List &args );\ static const KJSEmbed::Enumerator *enums() { return p_enums;} \ static const KJSEmbed::Method *methods() { return p_methods;} \ static const KJSEmbed::Method *statics() { return p_statics;} \ static const KJSEmbed::Constructor *constructor() { return &p_constructor;} \ static const KJS::JSObject *construct(KJS::ExecState *exec, const KJS::List &args)\ { return (*p_constructor.construct)(exec,args); } \ };
Definition at line 34 of file binding_support.h.
| #define KJSO_BINDING | ( | NAME, | |||
| TYPE, | |||||
| BASENAME | ) |
Value:
class KJSEMBED_EXPORT NAME : public BASENAME \ { \ public: \ NAME(KJS::ExecState *exec, TYPE * obj); \ static const KJSEmbed::Method p_methods[]; \ static const KJSEmbed::Method p_statics[]; \ static const KJSEmbed::Enumerator p_enums[]; \ static const KJSEmbed::Constructor p_constructor; \ static KJS::JSObject *bindMethod( KJS::ExecState *exec, PointerBase& ptrObj );\ static KJS::JSObject *ctorMethod( KJS::ExecState *exec, const KJS::List &args );\ static const KJSEmbed::Enumerator *enums() { return p_enums;} \ static const KJSEmbed::Method *methods() { return p_methods;} \ static const KJSEmbed::Method *statics() { return p_statics;} \ static const KJSEmbed::Constructor *constructor() { return &p_constructor;} \ };
Definition at line 51 of file binding_support.h.
| #define KJSO_BINDING_NOEXP | ( | NAME, | |||
| TYPE, | |||||
| BASENAME | ) |
Value:
class NAME : public BASENAME \ { \ public: \ NAME(KJS::ExecState *exec, TYPE * obj); \ static const KJSEmbed::Method p_methods[]; \ static const KJSEmbed::Method p_statics[]; \ static const KJSEmbed::Enumerator p_enums[]; \ static const KJSEmbed::Constructor p_constructor; \ static KJS::JSObject *bindMethod( KJS::ExecState *exec, PointerBase& ptrObj );\ static KJS::JSObject *ctorMethod( KJS::ExecState *exec, const KJS::List &args );\ static const KJSEmbed::Enumerator *enums() { return p_enums;} \ static const KJSEmbed::Method *methods() { return p_methods;} \ static const KJSEmbed::Method *statics() { return p_statics;} \ static const KJSEmbed::Constructor *constructor() { return &p_constructor;} \ };
Definition at line 69 of file binding_support.h.
| #define KJSO_END_BIND } |
Definition at line 188 of file binding_support.h.
| #define KJSO_END_BINDING_CTOR } |
Definition at line 110 of file binding_support.h.
| #define KJSO_END_CTOR } |
Definition at line 178 of file binding_support.h.
| #define KJSO_QOBJECT_BIND | ( | NAME, | |||
| TYPE | ) |
Value:
KJS::JSObject *NAME::bindMethod( KJS::ExecState *exec, PointerBase& ptrObj )\ {\ Q_UNUSED(exec);\ QObject* qobj = pointer_cast<QObject>(&ptrObj); \ if (! qobj ) \ return 0; \ TYPE* object = qobject_cast<TYPE*>(qobj); \ if (! object ) \ return 0; \ return new NAME(exec, object); \ }
Definition at line 205 of file binding_support.h.
| #define KJSO_QOBJECT_END_BIND } |
Definition at line 202 of file binding_support.h.
| #define KJSO_QOBJECT_START_BIND | ( | NAME, | |||
| TYPE | ) |
Value:
KJS::JSObject *NAME::bindMethod( KJS::ExecState *exec, PointerBase& ptrObj )\ {\ Q_UNUSED(exec);\ QObject* qobj = pointer_cast<QObject>(&ptrObj); \ if (! qobj ) \ return 0; \ TYPE* object = qobject_cast<TYPE*>(qobj); \ if (! object ) \ return 0; \
Definition at line 191 of file binding_support.h.
| #define KJSO_SIMPLE_BINDING_CTOR | ( | NAME, | |||
| TYPE, | |||||
| BASENAME | ) |
Value:
NAME::NAME(KJS::ExecState *exec, TYPE * obj) \ : BASENAME( exec, obj ) \ { \ StaticBinding::publish( exec, this, NAME::methods() ); \ }
Definition at line 113 of file binding_support.h.
| #define KJSO_START_BIND | ( | NAME, | |||
| TYPE | ) |
Value:
KJS::JSObject *NAME::bindMethod( KJS::ExecState *exec, PointerBase& ptrObj )\ {\ Q_UNUSED(exec);\ Q_UNUSED(ptrObj); \
Definition at line 182 of file binding_support.h.
| #define KJSO_START_BINDING_CTOR | ( | NAME, | |||
| TYPE, | |||||
| BASENAME | ) |
Value:
NAME::NAME(KJS::ExecState *exec, TYPE * obj) \ : BASENAME( exec, obj ) \ { \ StaticBinding::publish( exec, this, NAME::methods() );
Definition at line 104 of file binding_support.h.
| #define KJSO_START_CTOR | ( | TYPE, | |||
| JSNAME, | |||||
| ARGS | ) |
Value:
const Constructor TYPE::p_constructor = \ { \ #JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, &TYPE::bindMethod, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\ KJS::JSObject *TYPE::ctorMethod( KJS::ExecState *exec, const KJS::List &args )\ {\ Q_UNUSED(exec);\ Q_UNUSED(args);
Definition at line 169 of file binding_support.h.
| #define KJSO_VALUE_BIND | ( | NAME, | |||
| TYPE | ) |
Value:
KJS::JSObject *NAME::bindMethod( KJS::ExecState *exec, PointerBase& ptrObj )\ {\ Q_UNUSED(exec);\ TYPE* object = pointer_cast<TYPE>(&ptrObj); \ if (! object ) \ return 0; \ return new NAME(exec, *object); \ }
Definition at line 229 of file binding_support.h.
| #define KJSO_VALUE_BINDING | ( | NAME, | |||
| TYPE, | |||||
| BASENAME | ) |
Value:
class KJSEMBED_EXPORT NAME : public BASENAME \ { \ public: \ NAME(KJS::ExecState *exec, const TYPE & val ); \ NAME(KJS::ExecState *exec, const char *typeName ); \ static const KJSEmbed::Method p_methods[]; \ static const KJSEmbed::Method p_statics[]; \ static const KJSEmbed::Enumerator p_enums[]; \ static const KJSEmbed::Constructor p_constructor; \ static KJS::JSObject *bindMethod( KJS::ExecState *exec, PointerBase& ptrObj );\ static KJS::JSObject *ctorMethod( KJS::ExecState *exec, const KJS::List &args );\ static const KJSEmbed::Enumerator *enums() { return p_enums;} \ static const KJSEmbed::Method *methods() { return p_methods;} \ static const KJSEmbed::Method *statics() { return p_statics;} \ static const KJSEmbed::Constructor *constructor() { return &p_constructor;} \ };
Definition at line 86 of file binding_support.h.
| #define KJSO_VALUE_END_BIND } |
Definition at line 226 of file binding_support.h.
| #define KJSO_VALUE_START_BIND | ( | NAME, | |||
| TYPE | ) |
Value:
KJS::JSObject *NAME::bindMethod( KJS::ExecState *exec, PointerBase& ptrObj )\ {\ Q_UNUSED(exec);\ TYPE* object = pointer_cast<TYPE>(&ptrObj); \ if (! object ) \ return 0; \
Definition at line 218 of file binding_support.h.
| #define KJSV_SIMPLE_BINDING_CTOR | ( | NAME, | |||
| JSNAME, | |||||
| TYPE, | |||||
| BASENAME | ) |
Value:
NAME::NAME(KJS::ExecState *exec, const TYPE & value) \ : BASENAME( exec, #JSNAME , value ) \ { \ StaticBinding::publish( exec, this, NAME::methods() ); \ }
Definition at line 120 of file binding_support.h.
| #define NO_ENUMS | ( | TYPE | ) | const Enumerator TYPE::p_enums[] = {{0, 0 }}; |
Definition at line 147 of file binding_support.h.
| #define NO_METHODS | ( | TYPE | ) | const Method TYPE::p_methods[] = { {0, 0, 0, 0 } }; |
Definition at line 150 of file binding_support.h.
| #define NO_STATICS | ( | TYPE | ) | const Method TYPE::p_statics[] = { {0, 0, 0, 0 } }; |
Definition at line 153 of file binding_support.h.
| #define START_CTOR | ( | TYPE, | |||
| JSNAME, | |||||
| ARGS | ) |
Value:
const Constructor TYPE::p_constructor = \ { \ #JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, 0, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\ KJS::JSObject *TYPE::ctorMethod( KJS::ExecState *exec, const KJS::List &args )\ {\ Q_UNUSED(exec);\ Q_UNUSED(args);
Definition at line 157 of file binding_support.h.
| #define START_ENUM_LUT | ( | TYPE | ) |
| #define START_METHOD_LUT | ( | TYPE | ) |
| #define START_STATIC_METHOD_LUT | ( | TYPE | ) |
KDE 4.0 API Reference