2024-08-25 04:08:24 +00:00
# include <QEasingCurve>
2024-11-17 06:21:37 +00:00
# include <QList>
2024-08-25 04:08:24 +00:00
# include <QMetaObject>
# include <QObject>
# include <QString>
2024-08-29 07:01:51 +00:00
# include <QByteArray>
# include <cstring>
2024-08-25 04:08:24 +00:00
# include <QVariant>
# include <QVariantAnimation>
2024-10-16 05:07:56 +00:00
# include <qvariantanimation.h>
2024-08-29 07:01:51 +00:00
# include "gen_qvariantanimation.h"
2024-09-14 22:29:05 +00:00
# include "_cgo_export.h"
2024-08-25 04:08:24 +00:00
QVariantAnimation * QVariantAnimation_new ( ) {
return new QVariantAnimation ( ) ;
}
QVariantAnimation * QVariantAnimation_new2 ( QObject * parent ) {
return new QVariantAnimation ( parent ) ;
}
2024-09-11 05:41:09 +00:00
QMetaObject * QVariantAnimation_MetaObject ( const QVariantAnimation * self ) {
return ( QMetaObject * ) self - > metaObject ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-20 22:32:57 +00:00
void * QVariantAnimation_Metacast ( QVariantAnimation * self , const char * param1 ) {
return self - > qt_metacast ( param1 ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_Tr ( const char * s ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : tr ( s ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_TrUtf8 ( const char * s ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : trUtf8 ( s ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QVariant * QVariantAnimation_StartValue ( const QVariantAnimation * self ) {
2024-09-17 06:29:11 +00:00
return new QVariant ( self - > startValue ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_SetStartValue ( QVariantAnimation * self , QVariant * value ) {
self - > setStartValue ( * value ) ;
}
2024-09-11 05:41:09 +00:00
QVariant * QVariantAnimation_EndValue ( const QVariantAnimation * self ) {
2024-09-17 06:29:11 +00:00
return new QVariant ( self - > endValue ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_SetEndValue ( QVariantAnimation * self , QVariant * value ) {
self - > setEndValue ( * value ) ;
}
2024-09-11 05:41:09 +00:00
QVariant * QVariantAnimation_KeyValueAt ( const QVariantAnimation * self , double step ) {
2024-09-17 06:29:11 +00:00
return new QVariant ( self - > keyValueAt ( static_cast < qreal > ( step ) ) ) ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_SetKeyValueAt ( QVariantAnimation * self , double step , QVariant * value ) {
self - > setKeyValueAt ( static_cast < qreal > ( step ) , * value ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_map tuple of double and QVariant* */ QVariantAnimation_KeyValues ( const QVariantAnimation * self ) {
QVariantAnimation : : KeyValues _ret = self - > keyValues ( ) ;
// Convert QList<> from C++ memory to manually-managed C memory
struct miqt_map /* tuple of double and QVariant* */ * _arr = static_cast < struct miqt_map /* tuple of double and QVariant* */ * > ( malloc ( sizeof ( struct miqt_map /* tuple of double and QVariant* */ ) * _ret . length ( ) ) ) ;
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QPair < double , QVariant > _vv_ret = _ret [ i ] ;
// Convert QPair<> from C++ memory to manually-managed C memory
double * _vv_first_arr = static_cast < double * > ( malloc ( sizeof ( double ) ) ) ;
QVariant * * _vv_second_arr = static_cast < QVariant * * > ( malloc ( sizeof ( QVariant * ) ) ) ;
_vv_first_arr [ 0 ] = _vv_ret . first ;
_vv_second_arr [ 0 ] = new QVariant ( _vv_ret . second ) ;
struct miqt_map _vv_out ;
_vv_out . len = 1 ;
_vv_out . keys = static_cast < void * > ( _vv_first_arr ) ;
_vv_out . values = static_cast < void * > ( _vv_second_arr ) ;
_arr [ i ] = _vv_out ;
}
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
return _out ;
}
void QVariantAnimation_SetKeyValues ( QVariantAnimation * self , struct miqt_array /* of struct miqt_map tuple of double and QVariant* */ values ) {
QVariantAnimation : : KeyValues values_QList ;
values_QList . reserve ( values . len ) ;
struct miqt_map /* tuple of double and QVariant* */ * values_arr = static_cast < struct miqt_map /* tuple of double and QVariant* */ * > ( values . data ) ;
for ( size_t i = 0 ; i < values . len ; + + i ) {
QPair < double , QVariant > values_arr_i_QPair ;
double * values_arr_i_first_arr = static_cast < double * > ( values_arr [ i ] . keys ) ;
QVariant * * values_arr_i_second_arr = static_cast < QVariant * * > ( values_arr [ i ] . values ) ;
values_arr_i_QPair . first = static_cast < double > ( values_arr_i_first_arr [ 0 ] ) ;
values_arr_i_QPair . second = * ( values_arr_i_second_arr [ 0 ] ) ;
values_QList . push_back ( values_arr_i_QPair ) ;
}
self - > setKeyValues ( values_QList ) ;
}
2024-09-11 05:41:09 +00:00
QVariant * QVariantAnimation_CurrentValue ( const QVariantAnimation * self ) {
2024-09-17 06:29:11 +00:00
return new QVariant ( self - > currentValue ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
int QVariantAnimation_Duration ( const QVariantAnimation * self ) {
return self - > duration ( ) ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_SetDuration ( QVariantAnimation * self , int msecs ) {
self - > setDuration ( static_cast < int > ( msecs ) ) ;
}
2024-09-11 05:41:09 +00:00
QEasingCurve * QVariantAnimation_EasingCurve ( const QVariantAnimation * self ) {
2024-09-17 06:29:11 +00:00
return new QEasingCurve ( self - > easingCurve ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_SetEasingCurve ( QVariantAnimation * self , QEasingCurve * easing ) {
self - > setEasingCurve ( * easing ) ;
}
void QVariantAnimation_ValueChanged ( QVariantAnimation * self , QVariant * value ) {
self - > valueChanged ( * value ) ;
}
2024-10-13 06:06:06 +00:00
void QVariantAnimation_connect_ValueChanged ( QVariantAnimation * self , intptr_t slot ) {
2024-08-25 04:08:24 +00:00
QVariantAnimation : : connect ( self , static_cast < void ( QVariantAnimation : : * ) ( const QVariant & ) > ( & QVariantAnimation : : valueChanged ) , self , [ = ] ( const QVariant & value ) {
2024-09-14 22:29:05 +00:00
const QVariant & value_ret = value ;
// Cast returned reference into pointer
QVariant * sigval1 = const_cast < QVariant * > ( & value_ret ) ;
miqt_exec_callback_QVariantAnimation_ValueChanged ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_Tr2 ( const char * s , const char * c ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : tr ( s , c ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_Tr3 ( const char * s , const char * c , int n ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : tr ( s , c , static_cast < int > ( n ) ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_TrUtf82 ( const char * s , const char * c ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : trUtf8 ( s , c ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QVariantAnimation_TrUtf83 ( const char * s , const char * c , int n ) {
2024-09-14 22:29:05 +00:00
QString _ret = QVariantAnimation : : trUtf8 ( s , c , static_cast < int > ( n ) ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
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 ;
2024-08-25 04:08:24 +00:00
}
void QVariantAnimation_Delete ( QVariantAnimation * self ) {
delete self ;
}