2017-02-10 20:18:44 +03:00
|
|
|
// +build !minimal
|
|
|
|
|
|
|
|
#define protected public
|
|
|
|
#define private public
|
|
|
|
|
|
|
|
#include "speech.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
|
|
|
#include <QByteArray>
|
2017-03-20 20:33:55 +03:00
|
|
|
#include <QCamera>
|
|
|
|
#include <QCameraImageCapture>
|
|
|
|
#include <QDBusPendingCall>
|
|
|
|
#include <QDBusPendingCallWatcher>
|
|
|
|
#include <QExtensionFactory>
|
|
|
|
#include <QExtensionManager>
|
|
|
|
#include <QGraphicsObject>
|
|
|
|
#include <QGraphicsWidget>
|
|
|
|
#include <QLayout>
|
2017-02-10 20:18:44 +03:00
|
|
|
#include <QList>
|
|
|
|
#include <QLocale>
|
|
|
|
#include <QMap>
|
2017-03-20 20:33:55 +03:00
|
|
|
#include <QMediaPlaylist>
|
|
|
|
#include <QMediaRecorder>
|
2017-02-10 20:18:44 +03:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
2017-03-20 20:33:55 +03:00
|
|
|
#include <QOffscreenSurface>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintDeviceWindow>
|
|
|
|
#include <QPdfWriter>
|
|
|
|
#include <QQuickItem>
|
|
|
|
#include <QRadioData>
|
|
|
|
#include <QSignalSpy>
|
2017-02-10 20:18:44 +03:00
|
|
|
#include <QString>
|
|
|
|
#include <QTextToSpeech>
|
|
|
|
#include <QTextToSpeechPlugin>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QVector>
|
2017-03-20 20:33:55 +03:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QWindow>
|
2017-02-10 20:18:44 +03:00
|
|
|
|
|
|
|
class MyQTextToSpeech: public QTextToSpeech
|
|
|
|
{
|
|
|
|
public:
|
2017-04-05 18:13:51 +03:00
|
|
|
MyQTextToSpeech(QObject *parent = nullptr) : QTextToSpeech(parent) {};
|
|
|
|
MyQTextToSpeech(const QString &engine, QObject *parent = nullptr) : QTextToSpeech(engine, parent) {};
|
2017-02-10 20:18:44 +03:00
|
|
|
void Signal_LocaleChanged(const QLocale & locale) { callbackQTextToSpeech_LocaleChanged(this, const_cast<QLocale*>(&locale)); };
|
|
|
|
void pause() { callbackQTextToSpeech_Pause(this); };
|
|
|
|
void Signal_PitchChanged(double pitch) { callbackQTextToSpeech_PitchChanged(this, pitch); };
|
|
|
|
void Signal_RateChanged(double rate) { callbackQTextToSpeech_RateChanged(this, rate); };
|
|
|
|
void resume() { callbackQTextToSpeech_Resume(this); };
|
|
|
|
void say(const QString & text) { QByteArray t372ea0 = text.toUtf8(); QtSpeech_PackedString textPacked = { const_cast<char*>(t372ea0.prepend("WHITESPACE").constData()+10), t372ea0.size()-10 };callbackQTextToSpeech_Say(this, textPacked); };
|
|
|
|
void setLocale(const QLocale & locale) { callbackQTextToSpeech_SetLocale(this, const_cast<QLocale*>(&locale)); };
|
|
|
|
void setPitch(double pitch) { callbackQTextToSpeech_SetPitch(this, pitch); };
|
|
|
|
void setRate(double rate) { callbackQTextToSpeech_SetRate(this, rate); };
|
|
|
|
void setVolume(double volume) { callbackQTextToSpeech_SetVolume(this, volume); };
|
|
|
|
void Signal_StateChanged(QTextToSpeech::State state) { callbackQTextToSpeech_StateChanged(this, state); };
|
|
|
|
void stop() { callbackQTextToSpeech_Stop(this); };
|
|
|
|
void Signal_VolumeChanged(int volume) { callbackQTextToSpeech_VolumeChanged(this, volume); };
|
|
|
|
};
|
|
|
|
|
|
|
|
struct QtSpeech_PackedString QTextToSpeech_QTextToSpeech_AvailableEngines()
|
|
|
|
{
|
|
|
|
return ({ QByteArray tb1cc61 = QTextToSpeech::availableEngines().join("|").toUtf8(); QtSpeech_PackedString { const_cast<char*>(tb1cc61.prepend("WHITESPACE").constData()+10), tb1cc61.size()-10 }; });
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech_NewQTextToSpeech(void* parent)
|
|
|
|
{
|
2017-03-20 20:33:55 +03:00
|
|
|
if (dynamic_cast<QCameraImageCapture*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QCameraImageCapture*>(parent));
|
|
|
|
} else if (dynamic_cast<QDBusPendingCallWatcher*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QDBusPendingCallWatcher*>(parent));
|
|
|
|
} else if (dynamic_cast<QExtensionFactory*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QExtensionFactory*>(parent));
|
|
|
|
} else if (dynamic_cast<QExtensionManager*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QExtensionManager*>(parent));
|
|
|
|
} else if (dynamic_cast<QGraphicsObject*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QGraphicsObject*>(parent));
|
|
|
|
} else if (dynamic_cast<QGraphicsWidget*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QGraphicsWidget*>(parent));
|
|
|
|
} else if (dynamic_cast<QLayout*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QLayout*>(parent));
|
|
|
|
} else if (dynamic_cast<QMediaPlaylist*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QMediaPlaylist*>(parent));
|
|
|
|
} else if (dynamic_cast<QMediaRecorder*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QMediaRecorder*>(parent));
|
|
|
|
} else if (dynamic_cast<QOffscreenSurface*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QOffscreenSurface*>(parent));
|
|
|
|
} else if (dynamic_cast<QPaintDeviceWindow*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QPaintDeviceWindow*>(parent));
|
|
|
|
} else if (dynamic_cast<QPdfWriter*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QPdfWriter*>(parent));
|
|
|
|
} else if (dynamic_cast<QQuickItem*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QQuickItem*>(parent));
|
|
|
|
} else if (dynamic_cast<QRadioData*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QRadioData*>(parent));
|
|
|
|
} else if (dynamic_cast<QSignalSpy*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QSignalSpy*>(parent));
|
|
|
|
} else if (dynamic_cast<QWidget*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QWidget*>(parent));
|
|
|
|
} else if (dynamic_cast<QWindow*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(static_cast<QWindow*>(parent));
|
|
|
|
} else {
|
|
|
|
return new MyQTextToSpeech(static_cast<QObject*>(parent));
|
|
|
|
}
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech_NewQTextToSpeech2(char* engine, void* parent)
|
|
|
|
{
|
2017-03-20 20:33:55 +03:00
|
|
|
if (dynamic_cast<QCameraImageCapture*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QCameraImageCapture*>(parent));
|
|
|
|
} else if (dynamic_cast<QDBusPendingCallWatcher*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QDBusPendingCallWatcher*>(parent));
|
|
|
|
} else if (dynamic_cast<QExtensionFactory*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QExtensionFactory*>(parent));
|
|
|
|
} else if (dynamic_cast<QExtensionManager*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QExtensionManager*>(parent));
|
|
|
|
} else if (dynamic_cast<QGraphicsObject*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QGraphicsObject*>(parent));
|
|
|
|
} else if (dynamic_cast<QGraphicsWidget*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QGraphicsWidget*>(parent));
|
|
|
|
} else if (dynamic_cast<QLayout*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QLayout*>(parent));
|
|
|
|
} else if (dynamic_cast<QMediaPlaylist*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QMediaPlaylist*>(parent));
|
|
|
|
} else if (dynamic_cast<QMediaRecorder*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QMediaRecorder*>(parent));
|
|
|
|
} else if (dynamic_cast<QOffscreenSurface*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QOffscreenSurface*>(parent));
|
|
|
|
} else if (dynamic_cast<QPaintDeviceWindow*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QPaintDeviceWindow*>(parent));
|
|
|
|
} else if (dynamic_cast<QPdfWriter*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QPdfWriter*>(parent));
|
|
|
|
} else if (dynamic_cast<QQuickItem*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QQuickItem*>(parent));
|
|
|
|
} else if (dynamic_cast<QRadioData*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QRadioData*>(parent));
|
|
|
|
} else if (dynamic_cast<QSignalSpy*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QSignalSpy*>(parent));
|
|
|
|
} else if (dynamic_cast<QWidget*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QWidget*>(parent));
|
|
|
|
} else if (dynamic_cast<QWindow*>(static_cast<QObject*>(parent))) {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QWindow*>(parent));
|
|
|
|
} else {
|
|
|
|
return new MyQTextToSpeech(QString(engine), static_cast<QObject*>(parent));
|
|
|
|
}
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ConnectLocaleChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::connect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(const QLocale &)>(&QTextToSpeech::localeChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(const QLocale &)>(&MyQTextToSpeech::Signal_LocaleChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_DisconnectLocaleChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::disconnect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(const QLocale &)>(&QTextToSpeech::localeChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(const QLocale &)>(&MyQTextToSpeech::Signal_LocaleChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_LocaleChanged(void* ptr, void* locale)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeech*>(ptr)->localeChanged(*static_cast<QLocale*>(locale));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_Pause(void* ptr)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "pause");
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_PauseDefault(void* ptr)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::pause();
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ConnectPitchChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::connect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(double)>(&QTextToSpeech::pitchChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(double)>(&MyQTextToSpeech::Signal_PitchChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_DisconnectPitchChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::disconnect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(double)>(&QTextToSpeech::pitchChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(double)>(&MyQTextToSpeech::Signal_PitchChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_PitchChanged(void* ptr, double pitch)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeech*>(ptr)->pitchChanged(pitch);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ConnectRateChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::connect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(double)>(&QTextToSpeech::rateChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(double)>(&MyQTextToSpeech::Signal_RateChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_DisconnectRateChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::disconnect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(double)>(&QTextToSpeech::rateChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(double)>(&MyQTextToSpeech::Signal_RateChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_RateChanged(void* ptr, double rate)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeech*>(ptr)->rateChanged(rate);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_Resume(void* ptr)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "resume");
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ResumeDefault(void* ptr)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::resume();
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_Say(void* ptr, char* text)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "say", Q_ARG(QString, QString(text)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SayDefault(void* ptr, char* text)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::say(QString(text));
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetLocale(void* ptr, void* locale)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "setLocale", Q_ARG(QLocale, *static_cast<QLocale*>(locale)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetLocaleDefault(void* ptr, void* locale)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::setLocale(*static_cast<QLocale*>(locale));
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetPitch(void* ptr, double pitch)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "setPitch", Q_ARG(double, pitch));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetPitchDefault(void* ptr, double pitch)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::setPitch(pitch);
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetRate(void* ptr, double rate)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "setRate", Q_ARG(double, rate));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetRateDefault(void* ptr, double rate)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::setRate(rate);
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetVolume(void* ptr, double volume)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "setVolume", Q_ARG(double, volume));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_SetVolumeDefault(void* ptr, double volume)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::setVolume(volume);
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ConnectStateChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::connect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(QTextToSpeech::State)>(&QTextToSpeech::stateChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(QTextToSpeech::State)>(&MyQTextToSpeech::Signal_StateChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_DisconnectStateChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::disconnect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(QTextToSpeech::State)>(&QTextToSpeech::stateChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(QTextToSpeech::State)>(&MyQTextToSpeech::Signal_StateChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_StateChanged(void* ptr, long long state)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeech*>(ptr)->stateChanged(static_cast<QTextToSpeech::State>(state));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_Stop(void* ptr)
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(static_cast<QTextToSpeech*>(ptr), "stop");
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_StopDefault(void* ptr)
|
|
|
|
{
|
2017-02-15 19:48:35 +03:00
|
|
|
static_cast<QTextToSpeech*>(ptr)->QTextToSpeech::stop();
|
2017-02-10 20:18:44 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_ConnectVolumeChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::connect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(int)>(&QTextToSpeech::volumeChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(int)>(&MyQTextToSpeech::Signal_VolumeChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_DisconnectVolumeChanged(void* ptr)
|
|
|
|
{
|
|
|
|
QObject::disconnect(static_cast<QTextToSpeech*>(ptr), static_cast<void (QTextToSpeech::*)(int)>(&QTextToSpeech::volumeChanged), static_cast<MyQTextToSpeech*>(ptr), static_cast<void (MyQTextToSpeech::*)(int)>(&MyQTextToSpeech::Signal_VolumeChanged));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech_VolumeChanged(void* ptr, int volume)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeech*>(ptr)->volumeChanged(volume);
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech_Locale(void* ptr)
|
|
|
|
{
|
|
|
|
return new QLocale(static_cast<QTextToSpeech*>(ptr)->locale());
|
|
|
|
}
|
|
|
|
|
|
|
|
struct QtSpeech_PackedList QTextToSpeech_AvailableLocales(void* ptr)
|
|
|
|
{
|
|
|
|
return ({ QVector<QLocale>* tmpValue = new QVector<QLocale>(static_cast<QTextToSpeech*>(ptr)->availableLocales()); QtSpeech_PackedList { tmpValue, tmpValue->size() }; });
|
|
|
|
}
|
|
|
|
|
|
|
|
long long QTextToSpeech_State(void* ptr)
|
|
|
|
{
|
|
|
|
return static_cast<QTextToSpeech*>(ptr)->state();
|
|
|
|
}
|
|
|
|
|
|
|
|
double QTextToSpeech_Pitch(void* ptr)
|
|
|
|
{
|
|
|
|
return static_cast<QTextToSpeech*>(ptr)->pitch();
|
|
|
|
}
|
|
|
|
|
|
|
|
double QTextToSpeech_Rate(void* ptr)
|
|
|
|
{
|
|
|
|
return static_cast<QTextToSpeech*>(ptr)->rate();
|
|
|
|
}
|
|
|
|
|
|
|
|
double QTextToSpeech_Volume(void* ptr)
|
|
|
|
{
|
|
|
|
return static_cast<QTextToSpeech*>(ptr)->volume();
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech___availableLocales_atList(void* ptr, int i)
|
|
|
|
{
|
|
|
|
return new QLocale(static_cast<QVector<QLocale>*>(ptr)->at(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeech___availableLocales_setList(void* ptr, void* i)
|
|
|
|
{
|
|
|
|
static_cast<QVector<QLocale>*>(ptr)->append(*static_cast<QLocale*>(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech___availableLocales_newList(void* ptr)
|
|
|
|
{
|
|
|
|
return new QVector<QLocale>;
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeech___availableVoices_newList(void* ptr)
|
|
|
|
{
|
|
|
|
return new QVector<QVoice>;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyQTextToSpeechPlugin: public QTextToSpeechPlugin
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
~MyQTextToSpeechPlugin() { callbackQTextToSpeechPlugin_DestroyQTextToSpeechPlugin(this); };
|
|
|
|
};
|
|
|
|
|
|
|
|
void QTextToSpeechPlugin_DestroyQTextToSpeechPlugin(void* ptr)
|
|
|
|
{
|
|
|
|
static_cast<QTextToSpeechPlugin*>(ptr)->~QTextToSpeechPlugin();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeechPlugin_DestroyQTextToSpeechPluginDefault(void* ptr)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeechPlugin___createTextToSpeechEngine_parameters_atList(void* ptr, char* i)
|
|
|
|
{
|
|
|
|
return new QVariant(static_cast<QMap<QString, QVariant>*>(ptr)->value(QString(i)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeechPlugin___createTextToSpeechEngine_parameters_setList(void* ptr, char* key, void* i)
|
|
|
|
{
|
|
|
|
static_cast<QMap<QString, QVariant>*>(ptr)->insert(QString(key), *static_cast<QVariant*>(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeechPlugin___createTextToSpeechEngine_parameters_newList(void* ptr)
|
|
|
|
{
|
|
|
|
return new QMap<QString, QVariant>;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct QtSpeech_PackedList QTextToSpeechPlugin___createTextToSpeechEngine_keyList(void* ptr)
|
|
|
|
{
|
|
|
|
return ({ QList<QString>* tmpValue = new QList<QString>(static_cast<QMap<QString, QVariant>*>(ptr)->keys()); QtSpeech_PackedList { tmpValue, tmpValue->size() }; });
|
|
|
|
}
|
|
|
|
|
|
|
|
struct QtSpeech_PackedString QTextToSpeechPlugin_____createTextToSpeechEngine_keyList_atList(void* ptr, int i)
|
|
|
|
{
|
|
|
|
return ({ QByteArray t29def6 = static_cast<QList<QString>*>(ptr)->at(i).toUtf8(); QtSpeech_PackedString { const_cast<char*>(t29def6.prepend("WHITESPACE").constData()+10), t29def6.size()-10 }; });
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextToSpeechPlugin_____createTextToSpeechEngine_keyList_setList(void* ptr, char* i)
|
|
|
|
{
|
|
|
|
static_cast<QList<QString>*>(ptr)->append(QString(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QTextToSpeechPlugin_____createTextToSpeechEngine_keyList_newList(void* ptr)
|
|
|
|
{
|
|
|
|
return new QList<QString>;
|
|
|
|
}
|
|
|
|
|