Web Browser widget demo

161 views
Skip to first unread message

Peter Gunn

unread,
Aug 2, 2023, 2:28:24 PM8/2/23
to fltk.general
This is just proof-of-concept demo of embedding Chromium in a Fl_Widget using Chromium Embedded Framework (CEF) using offscreen rendering.


Basic idea is CEF renders webpage offscreen in BGRA buffer and widget converts to FLTK RGBA during draw(). The rest is mapping FLTK mouse and keyboard events to CEF events.

I have no plans to do anything with it. Just thought I'd share :-)

Thanks

PG

Peter Gunn

unread,
Aug 3, 2023, 3:33:38 AM8/3/23
to fltk.general
If you try it and get a crash with error "[0802/184157.621873:ERROR:icu_util.cc(240)] Invalid file descriptor to ICU data received." the following should fix it...

cp cef_binary_*/Resources/icudtl.dat cef_binary_*/Release/

Thanks

PG

Capture1.JPG
Capture2.JPG

Patrick Madueke

unread,
Aug 3, 2023, 8:01:50 AM8/3/23
to fltkg...@googlegroups.com
Thank you very much. I will try it when there is something I want to do with it.
Someone can also tell us the size after compilation.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d6ab5942-28ec-4375-97ca-79495f3ecc4cn%40googlegroups.com.

Peter Gunn

unread,
Aug 3, 2023, 3:52:16 PM8/3/23
to fltk.general
> Someone can also tell us the size after compilation. 

  Executable is 1.5MB as the Chromium part (libcef.so) is linked dynamically.  Unfortunately libcef.so which would need to be bundled with the app is 1.2GB!

Patrick Madueke

unread,
Aug 3, 2023, 9:39:49 PM8/3/23
to fltkg...@googlegroups.com
Thank you. From ~600MB to 1.2GB... 🤔

Peter Gunn

unread,
Aug 10, 2023, 2:24:01 AM8/10/23
to fltkg...@googlegroups.com
Just noticed that 80+% of that size is debug symbols. Stripping libcef.so reduces it from 1.2GB to 190MB. The stripped binary gzips to <80MB.

You received this message because you are subscribed to a topic in the Google Groups "fltk.general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fltkgeneral/pKo3lL2CPNs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/CA%2Bs6UqpKh_xT4e53LNyjzRPKg7JtiynSi2G_DxJZp5eCGeGVMQ%40mail.gmail.com.

Patrick Madueke

unread,
Aug 10, 2023, 7:03:48 AM8/10/23
to fltkg...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages