2024-08-29 07:01:51 +00:00
|
|
|
#include <QEvent>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QGesture>
|
|
|
|
#include <QGestureRecognizer>
|
|
|
|
#include <QObject>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qgesturerecognizer.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qgesturerecognizer.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
class MiqtVirtualQGestureRecognizer : public virtual QGestureRecognizer {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQGestureRecognizer(): QGestureRecognizer() {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQGestureRecognizer() = default;
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Create = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QGesture* create(QObject* target) override {
|
|
|
|
if (handle__Create == 0) {
|
|
|
|
return QGestureRecognizer::create(target);
|
|
|
|
}
|
|
|
|
|
|
|
|
QObject* sigval1 = target;
|
|
|
|
|
|
|
|
QGesture* callback_return_value = miqt_exec_callback_QGestureRecognizer_Create(this, handle__Create, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QGesture* virtualbase_Create(QObject* target) {
|
|
|
|
|
|
|
|
return QGestureRecognizer::create(target);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Recognize = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QGestureRecognizer::Result recognize(QGesture* state, QObject* watched, QEvent* event) override {
|
|
|
|
if (handle__Recognize == 0) {
|
|
|
|
return QGestureRecognizer::Result(); // Pure virtual, there is no base we can call
|
|
|
|
}
|
|
|
|
|
|
|
|
QGesture* sigval1 = state;
|
|
|
|
QObject* sigval2 = watched;
|
|
|
|
QEvent* sigval3 = event;
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QGestureRecognizer_Recognize(this, handle__Recognize, sigval1, sigval2, sigval3);
|
|
|
|
|
|
|
|
return static_cast<QGestureRecognizer::Result>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Reset = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void reset(QGesture* state) override {
|
|
|
|
if (handle__Reset == 0) {
|
|
|
|
QGestureRecognizer::reset(state);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QGesture* sigval1 = state;
|
|
|
|
|
|
|
|
miqt_exec_callback_QGestureRecognizer_Reset(this, handle__Reset, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_Reset(QGesture* state) {
|
|
|
|
|
|
|
|
QGestureRecognizer::reset(state);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer) {
|
|
|
|
MiqtVirtualQGestureRecognizer* ret = new MiqtVirtualQGestureRecognizer();
|
|
|
|
*outptr_QGestureRecognizer = ret;
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target) {
|
|
|
|
return self->create(target);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
int QGestureRecognizer_Recognize(QGestureRecognizer* self, QGesture* state, QObject* watched, QEvent* event) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QGestureRecognizer::Result _ret = self->recognize(state, watched, event);
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QGestureRecognizer_Reset(QGestureRecognizer* self, QGesture* state) {
|
|
|
|
self->reset(state);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QGestureRecognizer_RegisterRecognizer(QGestureRecognizer* recognizer) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::GestureType _ret = QGestureRecognizer::registerRecognizer(recognizer);
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QGestureRecognizer_UnregisterRecognizer(int typeVal) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QGestureRecognizer::unregisterRecognizer(static_cast<Qt::GestureType>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecognizer* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
void QGestureRecognizer_override_virtual_Create(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQGestureRecognizer*>( (QGestureRecognizer*)(self) )->handle__Create = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QGesture* QGestureRecognizer_virtualbase_Create(void* self, QObject* target) {
|
|
|
|
return ( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Create(target);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGestureRecognizer_override_virtual_Recognize(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQGestureRecognizer*>( (QGestureRecognizer*)(self) )->handle__Recognize = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGestureRecognizer_override_virtual_Reset(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQGestureRecognizer*>( (QGestureRecognizer*)(self) )->handle__Reset = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QGestureRecognizer_virtualbase_Reset(void* self, QGesture* state) {
|
|
|
|
( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Reset(state);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
2024-11-23 06:34:52 +00:00
|
|
|
delete dynamic_cast<MiqtVirtualQGestureRecognizer*>( self );
|
2024-11-19 06:29:06 +00:00
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|