Events for racket-webview-qt

This commit is contained in:
2026-04-10 22:07:03 +02:00
parent ef3883ed15
commit 82f58bc24b

View File

@@ -8,6 +8,11 @@
#endif #endif
#include "utils.h" #include "utils.h"
void evt_cb(int n)
{
fprintf(stderr, "events waiting: %d\n", n);
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
std::string me = argv[0]; std::string me = argv[0];
@@ -31,6 +36,7 @@ int main(int argc, char *argv[])
#endif #endif
int context = rkt_webview_new_context("", nullptr); int context = rkt_webview_new_context("", nullptr);
rkt_webview_register_evt_callback(evt_cb);
int wv = rkt_webview_create(context, 0); int wv = rkt_webview_create(context, 0);
rkt_webview_set_title(wv, "Hi there, this is a title!"); rkt_webview_set_title(wv, "Hi there, this is a title!");