miqt/qt/gen_qwhatsthis.cpp
Jacek Sieka a0c6344ecd Avoid dependency on exported go header
The expected type of the callback is already known from the AST - this
change reduces dependency on cgo specifics and makes the generated C ABI
entirely cgo-independent - in particular, there is no need to include
`_cgo_export.h` any more.
2025-01-07 12:55:40 +01:00

62 lines
1.2 KiB
C++

#include <QAction>
#include <QObject>
#include <QPoint>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QWhatsThis>
#include <QWidget>
#include <qwhatsthis.h>
#include "gen_qwhatsthis.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
void QWhatsThis_EnterWhatsThisMode() {
QWhatsThis::enterWhatsThisMode();
}
bool QWhatsThis_InWhatsThisMode() {
return QWhatsThis::inWhatsThisMode();
}
void QWhatsThis_LeaveWhatsThisMode() {
QWhatsThis::leaveWhatsThisMode();
}
void QWhatsThis_ShowText(QPoint* pos, struct miqt_string text) {
QString text_QString = QString::fromUtf8(text.data, text.len);
QWhatsThis::showText(*pos, text_QString);
}
void QWhatsThis_HideText() {
QWhatsThis::hideText();
}
QAction* QWhatsThis_CreateAction() {
return QWhatsThis::createAction();
}
void QWhatsThis_ShowText3(QPoint* pos, struct miqt_string text, QWidget* w) {
QString text_QString = QString::fromUtf8(text.data, text.len);
QWhatsThis::showText(*pos, text_QString, w);
}
QAction* QWhatsThis_CreateAction1(QObject* parent) {
return QWhatsThis::createAction(parent);
}
void QWhatsThis_Delete(QWhatsThis* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWhatsThis*>( self );
} else {
delete self;
}
}