embed external program

36 views
Skip to first unread message

holm.h...@gmail.com

unread,
Jun 27, 2024, 2:46:25 AM (9 days ago) Jun 27
to fltk.general

Hello,

Would it be possible to embed an external program, ie. firefox, in a Fl_Window ?

Best regards
Håvard

Manolo

unread,
Jun 27, 2024, 4:05:57 AM (9 days ago) Jun 27
to fltk.general
I would believe the answer is no. But see fl_open_uri() at
which will open any URL in your default browser (FLTK version ≥ 1.3)

Ian MacArthur

unread,
Jun 27, 2024, 4:20:58 AM (9 days ago) Jun 27
to fltk.general
Like Manolo, I'm inclined towards "no" here.

That said, I do remember, at some point in the past, using some (I do not remember what) X11 app that could take a window handle, and using that to "embed" it in a FLTK window, using fl_xid() et al.
There's some discussion of this in the "Operating System Issues" section of the manual, though I do not know if that will help.
And I doubt Firefox supports it anyway...

Paul Moore

unread,
Jun 27, 2024, 8:40:33 AM (9 days ago) Jun 27
to fltkg...@googlegroups.com
What could be possible is to embed the UI engine of a web browser. This is how electron works (the UI engine behind vs code) it hosts the chrome rendering engine. Similarly Tauri  , a rust equivalent of electron.

Some UI toolkits have a standard 'web browser widget' to facilitate this. Here a gtk one https://www.webkitgtk.org/


From: fltkg...@googlegroups.com <fltkg...@googlegroups.com> on behalf of Manolo <manol...@gmail.com>
Sent: Thursday, June 27, 2024 1:05:57 AM
To: fltk.general <fltkg...@googlegroups.com>
Subject: [fltk.general] Re: embed external program
 
--
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/c2135f19-b0ed-4400-97be-2916c9e030ccn%40googlegroups.com.

Basile Starynkevitch

unread,
Jun 27, 2024, 12:53:37 PM (9 days ago) Jun 27
to fltkg...@googlegroups.com, Paul Moore


On 6/27/24 14:40, Paul Moore wrote:
What could be possible is to embed the UI engine of a web browser. This is how electron works (the UI engine behind vs code) it hosts the chrome rendering engine. Similarly Tauri  , a rust equivalent of electron.

Some UI toolkits have a standard 'web browser widget' to facilitate this. Here a gtk one https://www.webkitgtk.org/


I tend to believe it is doable (with FLTK 1.4 patched by you) on Linux with an X11 or Wayland display server. Since both X11 or Wayland protocols are enabling (with their usual extensions) boxed subwindows.

Technically both FLTK and GTK are open source and X11 and Wayland compatible. So in theory embedding GTK windows inside an FLTK one (or vice versa) is doable. Of course it would requires months of work.

Probably extending GNU emacs is much easier for that purpose. It has most of the code you need.

sadly I am not volunteering since I am already developing -without being funded yet- the RefPerSys inference engine (it uses FLTK) ; a possible approach might be to adapt extend sophisticated macroprocessors or code generators like GNU m4, GNU autoconf or https://logological.org/gpp to ease the generation of the glue code. Perhaps  having several processes communicating with e.g. JSONRPC might be easier.

Regards from near Paris in France

-- 
Basile STARYNKEVITCH             <bas...@starynkevitch.net>
8 rue de la Faïencerie, 92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/ -gives my mobile number +33 6 8501 ....
See/voir:   https://github.com/RefPerSys/RefPerSys

Mohammed

unread,
Jun 29, 2024, 7:09:58 PM (7 days ago) Jun 29
to fltkg...@googlegroups.com
I have a proof of concept for embedding a webview in an fltk application:

It works well on windows and macos. For linux, it works on KDE X11. However with gnome, mutter seems to fight for ownership of the gtk window. 

Sent from my iPhone

On 27 Jun 2024, at 19:53, Basile Starynkevitch <bas...@starynkevitch.net> wrote:


--
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.

Peter Gunn

unread,
Jul 1, 2024, 12:08:21 AM (5 days ago) Jul 1
to fltk.general
The Chromium embedded engine supports offscreen rendering which can then be copied to a FLTK widget. I posted some proof of concept code last year...
https://pastebin.com/mty6VDaJ

Less efficient than direct rendering but avoids a lot of integration headaches

-PG
Reply all
Reply to author
Forward
0 new messages