2024-11-26 06:55:18 +00:00
|
|
|
#include <QScriptContext>
|
|
|
|
#include <QScriptEngine>
|
|
|
|
#include <QScriptValue>
|
|
|
|
#include <QScriptable>
|
|
|
|
#include <qscriptable.h>
|
|
|
|
#include "gen_qscriptable.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-11-26 06:55:18 +00:00
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QScriptable* QScriptable_new() {
|
|
|
|
return new QScriptable();
|
2024-11-26 06:55:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QScriptEngine* QScriptable_Engine(const QScriptable* self) {
|
|
|
|
return self->engine();
|
|
|
|
}
|
|
|
|
|
|
|
|
QScriptContext* QScriptable_Context(const QScriptable* self) {
|
|
|
|
return self->context();
|
|
|
|
}
|
|
|
|
|
|
|
|
QScriptValue* QScriptable_ThisObject(const QScriptable* self) {
|
|
|
|
return new QScriptValue(self->thisObject());
|
|
|
|
}
|
|
|
|
|
|
|
|
int QScriptable_ArgumentCount(const QScriptable* self) {
|
|
|
|
return self->argumentCount();
|
|
|
|
}
|
|
|
|
|
|
|
|
QScriptValue* QScriptable_Argument(const QScriptable* self, int index) {
|
|
|
|
return new QScriptValue(self->argument(static_cast<int>(index)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScriptable_Delete(QScriptable* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QScriptable*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|