kjsembed
binding_support.h
Go to the documentation of this file.
160#JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, 0, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\
172#JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, &TYPE::bindMethod, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\
386 QString KJSEMBED_EXPORT extractQString( KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue = QString() );
391 QString KJSEMBED_EXPORT extractQString( KJS::ExecState *exec, KJS::JSValue *value, const QString defaultValue = QString() );
402 QByteArray KJSEMBED_EXPORT extractQByteArray( KJS::ExecState *exec, const KJS::List &args, int idx, const QByteArray &defaultValue = QByteArray() );
407 QByteArray KJSEMBED_EXPORT extractQByteArray( KJS::ExecState *exec, KJS::JSValue *value, const QByteArray &defaultValue = QByteArray() );
416 inline T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue = T())
425 inline T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T())
438 inline T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue = T(0))
451 inline T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T(0))
465 inline T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue)
480 inline qint32 KJSEMBED_EXPORT extractInteger<qint32>(KJS::ExecState *exec, KJS::JSValue *value, qint32 defaultValue)
490 inline quint32 KJSEMBED_EXPORT extractInteger<quint32>(KJS::ExecState *exec, KJS::JSValue *value, quint32 defaultValue)
500 inline quint16 KJSEMBED_EXPORT extractInteger<quint16>(KJS::ExecState *exec, KJS::JSValue *value, quint16 defaultValue)
513 inline T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T(0))
527 int KJSEMBED_EXPORT extractInt( KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue = 0 );
531 int KJSEMBED_EXPORT extractInt( KJS::ExecState *exec, KJS::JSValue *value, int defaultValue = 0 );
541 double KJSEMBED_EXPORT extractDouble( KJS::ExecState *exec, const KJS::List &args, int idx, double defaultValue = 0 );
545 double KJSEMBED_EXPORT extractDouble( KJS::ExecState *exec, KJS::JSValue *value, double defaultValue = 0 );
555 float KJSEMBED_EXPORT extractFloat( KJS::ExecState *exec, const KJS::List &args, int idx, float defaultValue = 0 );
559 float KJSEMBED_EXPORT extractFloat( KJS::ExecState *exec, KJS::JSValue *value, float defaultValue = 0 );
569 bool KJSEMBED_EXPORT extractBool( KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue = false );
583 QDateTime KJSEMBED_EXPORT extractQDateTime( KJS::ExecState *exec, const KJS::List &args, int idx, const QDateTime &defaultValue = QDateTime() );
587 QDateTime KJSEMBED_EXPORT extractQDateTime( KJS::ExecState *exec, KJS::JSValue *value, const QDateTime &defaultValue = QDateTime() );
597 QDate KJSEMBED_EXPORT extractQDate( KJS::ExecState *exec, const KJS::List &args, int idx, const QDate &defaultValue = QDate() );
601 QDate KJSEMBED_EXPORT extractQDate( KJS::ExecState *exec, KJS::JSValue *value, const QDate &defaultValue = QDate() );
611 QTime KJSEMBED_EXPORT extractQTime( KJS::ExecState *exec, const KJS::List &args, int idx, const QTime &defaultValue = QTime() );
615 QTime KJSEMBED_EXPORT extractQTime( KJS::ExecState *exec, KJS::JSValue *value, const QTime &defaultValue = QTime() );
625 QStringList KJSEMBED_EXPORT extractQStringList( KJS::ExecState *exec, const KJS::List &args, int idx, const QStringList &defaultValue = QStringList() );
629 QStringList KJSEMBED_EXPORT extractQStringList( KJS::ExecState *exec, KJS::JSValue *value, const QStringList &defaultValue = QStringList() );
Definition: binding_support.h:248
bool implementsConstruct() const
Definition: binding_support.h:254
Definition: application.h:33
KJS::JSObject *(* callConstructor)(KJS::ExecState *, const KJS::List &)
Constructor signature.
Definition: binding_support.h:343
KJS::JSValue * createQByteArray(KJS::ExecState *exec, const QByteArray &value)
Create a new KJS::JSValue with the value of the QString.
Definition: binding_support.cpp:66
KJS::JSValue * createQDate(KJS::ExecState *exec, const QDate &value)
Create a new KJS::JSValue with the value of the QDate.
Definition: binding_support.cpp:205
KJS::JSValue * createQStringList(KJS::ExecState *exec, const QStringList &value)
Create a new KJS::JSValue with the value of the QStringList.
Definition: binding_support.cpp:243
QString KJSEMBED_EXPORT extractQString(KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue=QString())
Extracts a QString from an argument list.
Definition: binding_support.cpp:34
KJS::JSValue * createQTime(KJS::ExecState *exec, const QTime &value)
Create a new KJS::JSValue with the value of the QTime.
Definition: binding_support.cpp:224
KJS::JSObject *(* callBind)(KJS::ExecState *, PointerBase &)
Bind signature.
Definition: binding_support.h:335
KJS::JSValue * createBool(KJS::ExecState *exec, bool value)
Create a new KJS::JSValue with the value of the bool.
Definition: binding_support.cpp:167
int KJSEMBED_EXPORT extractInt(KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue=0)
Extracts an integer from an argument list.
Definition: binding_support.cpp:72
T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue)
Extract an integer from a value.
Definition: binding_support.h:465
bool KJSEMBED_EXPORT extractBool(KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue=false)
Extracts a bool from an argument list.
Definition: binding_support.cpp:149
quint16 KJSEMBED_EXPORT extractInteger< quint16 >(KJS::ExecState *exec, KJS::JSValue *value, quint16 defaultValue)
Definition: binding_support.h:500
KJS::JSValue * createQString(KJS::ExecState *exec, const QString &value)
Create a new KJS::JSValue with the value of the QString.
Definition: binding_support.cpp:88
QStringList KJSEMBED_EXPORT extractQStringList(KJS::ExecState *exec, const KJS::List &args, int idx, const QStringList &defaultValue=QStringList())
Extracts a QStringList from an argument list.
Definition: binding_support.cpp:231
T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue=T(0))
Extract a number from a value.
Definition: binding_support.h:438
QByteArray KJSEMBED_EXPORT extractQByteArray(KJS::ExecState *exec, const KJS::List &args, int idx, const QByteArray &defaultValue=QByteArray())
Extracts a QByteArray from an argument list.
Definition: binding_support.cpp:50
KJS::JSValue * createFloat(KJS::ExecState *exec, float value)
Create a new KJS::JSValue with the value of the float.
Definition: binding_support.cpp:142
T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue=T())
Definition: binding_support.h:416
KJS::JSValue * createDouble(KJS::ExecState *exec, double value)
Create a new KJS::JSValue with the value of the double.
Definition: binding_support.cpp:117
float KJSEMBED_EXPORT extractFloat(KJS::ExecState *exec, const KJS::List &args, int idx, float defaultValue=0)
Extracts a float from an argument list.
Definition: binding_support.cpp:124
qint32 KJSEMBED_EXPORT extractInteger< qint32 >(KJS::ExecState *exec, KJS::JSValue *value, qint32 defaultValue)
Definition: binding_support.h:480
KJS::JSValue * createInt(KJS::ExecState *exec, int value)
Create a new KJS::JSValue with the value of the integer.
Definition: binding_support.cpp:94
QTime KJSEMBED_EXPORT extractQTime(KJS::ExecState *exec, const KJS::List &args, int idx, const QTime &defaultValue=QTime())
Extracts a QTime from an argument list.
Definition: binding_support.cpp:212
QDate KJSEMBED_EXPORT extractQDate(KJS::ExecState *exec, const KJS::List &args, int idx, const QDate &defaultValue=QDate())
Extracts a QDate from an argument list.
Definition: binding_support.cpp:193
KJS::JSValue *(* callMethod)(KJS::ExecState *, KJS::JSObject *, const KJS::List &)
Method callback signature.
Definition: binding_support.h:289
KJS::JSValue * createQDateTime(KJS::ExecState *exec, const QDateTime &value)
Create a new KJS::JSValue with the value of the QDateTime.
Definition: binding_support.cpp:186
T * extractBindingImp(KJS::ExecState *exec, KJS::JSValue *val)
This will extract a binding implementation from a KJS::JSValue.
Definition: binding_support.h:268
quint32 KJSEMBED_EXPORT extractInteger< quint32 >(KJS::ExecState *exec, KJS::JSValue *value, quint32 defaultValue)
Definition: binding_support.h:490
QDateTime KJSEMBED_EXPORT extractQDateTime(KJS::ExecState *exec, const KJS::List &args, int idx, const QDateTime &defaultValue=QDateTime())
Extracts a QDateTime from an argument list.
Definition: binding_support.cpp:174
double KJSEMBED_EXPORT extractDouble(KJS::ExecState *exec, const KJS::List &args, int idx, double defaultValue=0)
Extracts a double from an argument list.
Definition: binding_support.cpp:100
JSObject * throwError(ExecState *e, ErrorType t, const QString &m)
Definition: binding_support.h:241
Definition: binding_support.h:346
const char * name
The constructor name as it will appear in Javascript.
Definition: binding_support.h:351
Definition: pointer.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.