Asynchronous messages, file dialogs and call/cc stuff

This commit is contained in:
2026-03-12 17:08:20 +01:00
parent d99c5a1725
commit 2cbf6fb98b
11 changed files with 363 additions and 199 deletions

View File

@@ -13,6 +13,7 @@
#include <QQueue>
#include <QTimer>
#include <QEventLoop>
#include <QFileDialog>
class WebViewQt;
@@ -57,7 +58,8 @@ private:
void handleCommandEvent(CommandEvent *e);
void processCommand(Command *cmd);
// QObject interface
result_t fileDlg(rktwebview_t w, const char *title, const char *base, const char *filters, QFileDialog::FileMode mode, QFileDialog::AcceptMode am, QString evt_ok, QString evt_cancel);
protected:
void customEvent(QEvent *event);
@@ -89,11 +91,12 @@ public:
result_t rktShowNormalWindow(rktwebview_t w);
window_state_t rktWindowState(rktwebview_t w);
rkt_data_t *rktChooseDir(rktwebview_t w, const char *title, const char *base_dir);
rkt_data_t *rktFileOpen(rktwebview_t w, const char *title, const char *base_dir, const char *permitted_exts);
rkt_data_t *rktFileSave(rktwebview_t w, const char *title, const char *base_dir, const char *permitted_exts);
result_t rktChooseDir(rktwebview_t w, const char *title, const char *base_dir);
result_t rktFileOpen(rktwebview_t w, const char *title, const char *base_dir, const char *permitted_exts);
result_t rktFileSave(rktwebview_t w, const char *title, const char *base_dir, const char *permitted_exts);
result_t rktWindowSetTitle(rktwebview_t wv, const char *title);
result_t rktMessageBox(rktwebview_t w, const char *title, const char *message, const char *submessage, rkt_messagetype_t type);
bool rktValid(rktwebview_t wv);