This commit is contained in:
2026-03-02 23:10:29 +01:00
parent 07004097e9
commit 25ca1ec4a4
24 changed files with 1054 additions and 31 deletions

View File

@@ -5,12 +5,19 @@ int main()
{
rkt_webview_t *wv = rkt_create_webview();
result_t r = rkt_webview_navigate(wv, "https://wikipedia.org");
rkt_webview_t *wv1 = nullptr;
//result_t r = rkt_set_html(wv, "<html><head><title>He daar!</title></head><body><h1>He daar!</h1></body>");
printf("Navigate: result = %d\n", r);
int i = 0;
while(rkt_webview_valid(wv)) {
printf("Waiting...\n");
printf("Waiting...%d\n", i);
#ifdef USE_WIN_THREADS
Sleep(1000);
#endif
#ifdef USE_PTHREADS
usleep(1000 * 1000);
#endif
i += 1;
if (i > 5) {
item_t item = rkt_webview_call_js(wv, "{ window.location = 'https://dijkewijk.nl'; return 42; }");
@@ -20,6 +27,11 @@ int main()
printf("%d, %s\n", item1.context, item1.data);
rkt_webview_destroy_item(item1);
}
if (i == 16) {
wv1 = rkt_create_webview();
result_t r = rkt_webview_navigate(wv, "https://www.cs.cmu.edu/afs/cs/academic/class/15492-f07/www/pthreads.html");
}
}
return 0;
}