Better profile support, only 1 web server per context, multiple windows per context

This commit is contained in:
2026-03-12 00:23:27 +01:00
parent 7d234bc834
commit d99c5a1725
13 changed files with 314 additions and 168 deletions

View File

@@ -26,8 +26,11 @@ class RKTWEBVIEW_QT_EXPORT Rktwebview_qt : public QObject
private:
QApplication *_app;
rktwebview_t _current_handle;
int _context_counter;
QHash<int, QWebEngineProfile *> _contexts;
QHash<int, WebviewWindow *> _views;
QHash<int, event_cb_t> _view_js_callbacks;
QHash<int, event_cb_t> _view_js_callbacks;
QTimer _process_events;
@@ -64,7 +67,8 @@ public:
public:
int nextHandle();
public:
int rktWebViewCreate(int parent, event_cb_t js_evt_cb, const char *optional_server_cert_pem);
rkt_wv_context_t newContext(const char *boilerplate_js, const char *optional_server_cert_pem);
int rktWebViewCreate(rkt_wv_context_t context, rktwebview_t parent, event_cb_t js_evt_cb);
void rktWebViewClose(int wv);
void rktSetOUToken(rktwebview_t wv, const char *ou_token);
void rktQuit();
@@ -110,6 +114,7 @@ public:
public:
Rktwebview_qt(Rktwebview_qt **handler);
~Rktwebview_qt();
};