2024-08-29 07:01:51 +00:00
# define WORKAROUND_INNER_CLASS_DEFINITION_QAccessible__State
2024-11-19 06:29:06 +00:00
# include <QAccessibleActionInterface>
2024-08-25 04:08:24 +00:00
# include <QAccessibleInterface>
2024-11-19 06:29:06 +00:00
# include <QAccessibleObject>
2024-08-25 04:08:24 +00:00
# include <QAccessibleWidget>
# include <QColor>
# include <QList>
# include <QRect>
# include <QString>
2024-08-29 07:01:51 +00:00
# include <QByteArray>
# include <cstring>
# include <QWidget>
2024-08-25 04:08:24 +00:00
# include <QWindow>
2024-10-16 05:07:56 +00:00
# include <qaccessiblewidget.h>
2024-08-29 07:01:51 +00:00
# include "gen_qaccessiblewidget.h"
2024-09-14 22:29:05 +00:00
# include "_cgo_export.h"
2024-08-25 04:08:24 +00:00
2024-11-19 06:29:06 +00:00
void QAccessibleWidget_new ( QWidget * o , QAccessibleWidget * * outptr_QAccessibleWidget , QAccessibleObject * * outptr_QAccessibleObject , QAccessibleInterface * * outptr_QAccessibleInterface , QAccessibleActionInterface * * outptr_QAccessibleActionInterface ) {
QAccessibleWidget * ret = new QAccessibleWidget ( o ) ;
* outptr_QAccessibleWidget = ret ;
* outptr_QAccessibleObject = static_cast < QAccessibleObject * > ( ret ) ;
* outptr_QAccessibleInterface = static_cast < QAccessibleInterface * > ( ret ) ;
* outptr_QAccessibleActionInterface = static_cast < QAccessibleActionInterface * > ( ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-19 06:29:06 +00:00
void QAccessibleWidget_new2 ( QWidget * o , int r , QAccessibleWidget * * outptr_QAccessibleWidget , QAccessibleObject * * outptr_QAccessibleObject , QAccessibleInterface * * outptr_QAccessibleInterface , QAccessibleActionInterface * * outptr_QAccessibleActionInterface ) {
QAccessibleWidget * ret = new QAccessibleWidget ( o , static_cast < QAccessible : : Role > ( r ) ) ;
* outptr_QAccessibleWidget = ret ;
* outptr_QAccessibleObject = static_cast < QAccessibleObject * > ( ret ) ;
* outptr_QAccessibleInterface = static_cast < QAccessibleInterface * > ( ret ) ;
* outptr_QAccessibleActionInterface = static_cast < QAccessibleActionInterface * > ( ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-19 06:29:06 +00:00
void QAccessibleWidget_new3 ( QWidget * o , int r , struct miqt_string name , QAccessibleWidget * * outptr_QAccessibleWidget , QAccessibleObject * * outptr_QAccessibleObject , QAccessibleInterface * * outptr_QAccessibleInterface , QAccessibleActionInterface * * outptr_QAccessibleActionInterface ) {
2024-10-18 23:53:33 +00:00
QString name_QString = QString : : fromUtf8 ( name . data , name . len ) ;
2024-11-19 06:29:06 +00:00
QAccessibleWidget * ret = new QAccessibleWidget ( o , static_cast < QAccessible : : Role > ( r ) , name_QString ) ;
* outptr_QAccessibleWidget = ret ;
* outptr_QAccessibleObject = static_cast < QAccessibleObject * > ( ret ) ;
* outptr_QAccessibleInterface = static_cast < QAccessibleInterface * > ( ret ) ;
* outptr_QAccessibleActionInterface = static_cast < QAccessibleActionInterface * > ( ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
bool QAccessibleWidget_IsValid ( const QAccessibleWidget * self ) {
return self - > isValid ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QWindow * QAccessibleWidget_Window ( const QAccessibleWidget * self ) {
return self - > window ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
int QAccessibleWidget_ChildCount ( const QAccessibleWidget * self ) {
return self - > childCount ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
int QAccessibleWidget_IndexOfChild ( const QAccessibleWidget * self , QAccessibleInterface * child ) {
return self - > indexOfChild ( child ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-19 06:29:06 +00:00
struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations ( const QAccessibleWidget * self , int match ) {
QVector < QPair < QAccessibleInterface * , QAccessible : : Relation > > _ret = self - > relations ( static_cast < QAccessible : : Relation > ( match ) ) ;
2024-11-17 06:21:37 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast < struct miqt_map /* tuple of QAccessibleInterface* and int */ * > ( malloc ( sizeof ( struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret . length ( ) ) ) ;
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QPair < QAccessibleInterface * , QFlags < QAccessible : : RelationFlag > > _vv_ret = _ret [ i ] ;
// Convert QPair<> from C++ memory to manually-managed C memory
QAccessibleInterface * * _vv_first_arr = static_cast < QAccessibleInterface * * > ( malloc ( sizeof ( QAccessibleInterface * ) ) ) ;
int * _vv_second_arr = static_cast < int * > ( malloc ( sizeof ( int ) ) ) ;
_vv_first_arr [ 0 ] = _vv_ret . first ;
QFlags < QAccessible : : RelationFlag > _vv_second_ret = _vv_ret . second ;
_vv_second_arr [ 0 ] = static_cast < int > ( _vv_second_ret ) ;
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 ;
}
2024-09-11 05:41:09 +00:00
QAccessibleInterface * QAccessibleWidget_FocusChild ( const QAccessibleWidget * self ) {
return self - > focusChild ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QRect * QAccessibleWidget_Rect ( const QAccessibleWidget * self ) {
2024-09-17 06:29:11 +00:00
return new QRect ( self - > rect ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QAccessibleInterface * QAccessibleWidget_Parent ( const QAccessibleWidget * self ) {
return self - > parent ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QAccessibleInterface * QAccessibleWidget_Child ( const QAccessibleWidget * self , int index ) {
return self - > child ( static_cast < int > ( index ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QAccessibleWidget_Text ( const QAccessibleWidget * self , int t ) {
2024-09-14 22:29:05 +00:00
QString _ret = self - > text ( static_cast < QAccessible : : Text > ( t ) ) ;
2024-08-29 07:01:51 +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-29 07:01:51 +00:00
}
2024-09-18 00:12:02 +00:00
int QAccessibleWidget_Role ( const QAccessibleWidget * self ) {
2024-09-14 22:29:05 +00:00
QAccessible : : Role _ret = self - > role ( ) ;
2024-09-18 00:12:02 +00:00
return static_cast < int > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
QAccessible__State * QAccessibleWidget_State ( const QAccessibleWidget * self ) {
2024-09-17 06:29:11 +00:00
return new QAccessible : : State ( self - > state ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QColor * QAccessibleWidget_ForegroundColor ( const QAccessibleWidget * self ) {
2024-09-17 06:29:11 +00:00
return new QColor ( self - > foregroundColor ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QColor * QAccessibleWidget_BackgroundColor ( const QAccessibleWidget * self ) {
2024-09-17 06:29:11 +00:00
return new QColor ( self - > backgroundColor ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-20 22:32:57 +00:00
void * QAccessibleWidget_InterfaceCast ( QAccessibleWidget * self , int t ) {
return self - > interface_cast ( static_cast < QAccessible : : InterfaceType > ( t ) ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QAccessibleWidget_ActionNames ( const QAccessibleWidget * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > actionNames ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
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 _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QAccessibleWidget_DoAction ( QAccessibleWidget * self , struct miqt_string actionName ) {
QString actionName_QString = QString : : fromUtf8 ( actionName . data , actionName . len ) ;
2024-08-25 04:08:24 +00:00
self - > doAction ( actionName_QString ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QAccessibleWidget_KeyBindingsForAction ( const QAccessibleWidget * self , struct miqt_string actionName ) {
2024-10-18 23:53:33 +00:00
QString actionName_QString = QString : : fromUtf8 ( actionName . data , actionName . len ) ;
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > keyBindingsForAction ( actionName_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
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 _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}