This commit is contained in:
2026-04-29 23:35:40 +02:00
parent 8165ee20cc
commit be980dbffd
9 changed files with 163 additions and 48 deletions
+17 -1
View File
@@ -35,9 +35,21 @@ int main(int argc, char *argv[])
setenv("LD_LIBRARY_PATH", loc.c_str(), true);
#endif
rkt_webview_init(__FUNCTION__);
int context = rkt_webview_new_context("", nullptr);
rkt_webview_set_loglevel(rkt_webview_loglevel_t::log_debug);
const char *icon_file = "../../resource/rktplayer.png";
FILE *f = fopen(icon_file, "rb");
if (f == nullptr) {
WARN1("Cannot find icon file %s\n", icon_file);
} else {
fclose(f);
}
int tray_wv = rkt_webview_tray_create(icon_file, "This is a test tray icon");
INFO1("tray_wv = %d\n", tray_wv);
rkt_webview_register_evt_callback(evt_cb);
int wv = rkt_webview_create(context, 0);
@@ -60,7 +72,9 @@ int main(int argc, char *argv[])
rkt_webview_free_data(d);
}
#ifdef _WIN32
Sleep(30000);
Sleep(15000);
rkt_webview_tray_show_message(tray_wv, "This is a title", "This is a message to display<br><b>Hopefully</b> it does display.");
Sleep(15000);
#else
sleep(30
);
@@ -73,5 +87,7 @@ int main(int argc, char *argv[])
d = rkt_webview_info();
rkt_webview_free_data(d);
rkt_webview_close(tray_wv);
rkt_webview_cleanup();
}