miqt/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp

127 lines
5.0 KiB
C++
Raw Normal View History

2024-11-04 23:15:32 +13:00
#include <QCameraCaptureDestinationControl>
2024-11-19 19:29:06 +13:00
#include <QMediaControl>
2024-11-04 23:15:32 +13:00
#include <QMetaObject>
2024-11-19 19:29:06 +13:00
#include <QObject>
2024-11-04 23:15:32 +13:00
#include <QString>
#include <QByteArray>
#include <cstring>
#include <qcameracapturedestinationcontrol.h>
#include "gen_qcameracapturedestinationcontrol.h"
#ifdef __cplusplus
extern "C" {
#endif
2025-02-01 13:45:16 +13:00
void miqt_exec_callback_QCameraCaptureDestinationControl_captureDestinationChanged(intptr_t, int);
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-04 23:15:32 +13:00
2024-12-07 17:15:57 +13:00
void QCameraCaptureDestinationControl_virtbase(QCameraCaptureDestinationControl* src, QMediaControl** outptr_QMediaControl) {
*outptr_QMediaControl = static_cast<QMediaControl*>(src);
}
2025-02-01 13:45:16 +13:00
QMetaObject* QCameraCaptureDestinationControl_metaObject(const QCameraCaptureDestinationControl* self) {
2024-11-04 23:15:32 +13:00
return (QMetaObject*) self->metaObject();
}
2025-02-01 13:45:16 +13:00
void* QCameraCaptureDestinationControl_metacast(QCameraCaptureDestinationControl* self, const char* param1) {
2024-11-04 23:15:32 +13:00
return self->qt_metacast(param1);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_tr(const char* s) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::tr(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_trUtf8(const char* s) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::trUtf8(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
bool QCameraCaptureDestinationControl_isCaptureDestinationSupported(const QCameraCaptureDestinationControl* self, int destination) {
2024-11-04 23:15:32 +13:00
return self->isCaptureDestinationSupported(static_cast<QCameraImageCapture::CaptureDestinations>(destination));
}
2025-02-01 13:45:16 +13:00
int QCameraCaptureDestinationControl_captureDestination(const QCameraCaptureDestinationControl* self) {
2024-11-04 23:15:32 +13:00
QCameraImageCapture::CaptureDestinations _ret = self->captureDestination();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QCameraCaptureDestinationControl_setCaptureDestination(QCameraCaptureDestinationControl* self, int destination) {
2024-11-04 23:15:32 +13:00
self->setCaptureDestination(static_cast<QCameraImageCapture::CaptureDestinations>(destination));
}
2025-02-01 13:45:16 +13:00
void QCameraCaptureDestinationControl_captureDestinationChanged(QCameraCaptureDestinationControl* self, int destination) {
2024-11-04 23:15:32 +13:00
self->captureDestinationChanged(static_cast<QCameraImageCapture::CaptureDestinations>(destination));
}
2025-02-01 13:45:16 +13:00
void QCameraCaptureDestinationControl_connect_captureDestinationChanged(QCameraCaptureDestinationControl* self, intptr_t slot) {
2024-11-04 23:15:32 +13:00
QCameraCaptureDestinationControl::connect(self, static_cast<void (QCameraCaptureDestinationControl::*)(QCameraImageCapture::CaptureDestinations)>(&QCameraCaptureDestinationControl::captureDestinationChanged), self, [=](QCameraImageCapture::CaptureDestinations destination) {
QCameraImageCapture::CaptureDestinations destination_ret = destination;
int sigval1 = static_cast<int>(destination_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QCameraCaptureDestinationControl_captureDestinationChanged(slot, sigval1);
2024-11-04 23:15:32 +13:00
});
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_tr2(const char* s, const char* c) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::tr(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_tr3(const char* s, const char* c, int n) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::tr(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_trUtf82(const char* s, const char* c) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::trUtf8(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCameraCaptureDestinationControl_trUtf83(const char* s, const char* c, int n) {
2024-11-04 23:15:32 +13:00
QString _ret = QCameraCaptureDestinationControl::trUtf8(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
void QCameraCaptureDestinationControl_delete(QCameraCaptureDestinationControl* self) {
delete self;
2024-11-04 23:15:32 +13:00
}