2024-08-29 07:01:51 +00:00
|
|
|
#define WORKAROUND_INNER_CLASS_DEFINITION_QAccessible__State
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QAccessibleApplication>
|
|
|
|
#include <QAccessibleInterface>
|
|
|
|
#include <QAccessibleObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QRect>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWindow>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qaccessibleobject.h"
|
|
|
|
#include "gen_qaccessibleobject.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QAccessibleObject_IsValid(const QAccessibleObject* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QObject* QAccessibleObject_Object(const QAccessibleObject* self) {
|
|
|
|
return self->object();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QAccessibleObject_Rect(const QAccessibleObject* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->rect();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QAccessibleObject_SetText(QAccessibleObject* self, uintptr_t t, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setText(static_cast<QAccessible::Text>(t), text_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, int x, int y) {
|
|
|
|
return self->childAt(static_cast<int>(x), static_cast<int>(y));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QAccessibleApplication* QAccessibleApplication_new() {
|
|
|
|
return new QAccessibleApplication();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self) {
|
|
|
|
return self->window();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAccessibleApplication_ChildCount(const QAccessibleApplication* self) {
|
|
|
|
return self->childCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAccessibleApplication_IndexOfChild(const QAccessibleApplication* self, QAccessibleInterface* param1) {
|
|
|
|
return self->indexOfChild(param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAccessibleInterface* QAccessibleApplication_FocusChild(const QAccessibleApplication* self) {
|
|
|
|
return self->focusChild();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAccessibleInterface* QAccessibleApplication_Parent(const QAccessibleApplication* self) {
|
|
|
|
return self->parent();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAccessibleInterface* QAccessibleApplication_Child(const QAccessibleApplication* self, int index) {
|
|
|
|
return self->child(static_cast<int>(index));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAccessibleApplication_Text(const QAccessibleApplication* self, uintptr_t t) {
|
|
|
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QAccessibleApplication_Role(const QAccessibleApplication* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QAccessible::Role _ret = self->role();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QAccessible::State _ret = self->state();
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QAccessible::State*>(new QAccessible::State(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAccessibleApplication_Delete(QAccessibleApplication* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|