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-08-29 07:01:51 +00:00
|
|
|
#include "qdesktopservices.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qdesktopservices.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QDesktopServices_OpenUrl(QUrl* url) {
|
|
|
|
return QDesktopServices::openUrl(*url);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDesktopServices_SetUrlHandler(const char* scheme, size_t scheme_Strlen, QObject* receiver, const char* method) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString scheme_QString = QString::fromUtf8(scheme, scheme_Strlen);
|
|
|
|
QDesktopServices::setUrlHandler(scheme_QString, receiver, method);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopServices_UnsetUrlHandler(const char* scheme, size_t scheme_Strlen) {
|
|
|
|
QString scheme_QString = QString::fromUtf8(scheme, scheme_Strlen);
|
|
|
|
QDesktopServices::unsetUrlHandler(scheme_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopServices_Delete(QDesktopServices* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|