2024-08-25 04:08:24 +00:00
|
|
|
#include <QDesktopServices>
|
|
|
|
#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 <QUrl>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qdesktopservices.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qdesktopservices.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
bool QDesktopServices_OpenUrl(QUrl* url) {
|
|
|
|
return QDesktopServices::openUrl(*url);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QDesktopServices_SetUrlHandler(struct miqt_string scheme, QObject* receiver, const char* method) {
|
|
|
|
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
QDesktopServices::setUrlHandler(scheme_QString, receiver, method);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme) {
|
|
|
|
QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
QDesktopServices::unsetUrlHandler(scheme_QString);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QDesktopServices*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|