[fpc-pascal] Xlib Threads

Michael Schnell mschnell at lumino.de
Mon Apr 28 09:35:05 CEST 2014


On 04/26/2014 10:07 PM, Graeme Geldenhuys wrote:
> And it just surprises me what features Xlib / X11 has

X11 originally has been designed to work in a client-server way via 
TCP-IP. Using a hardware "X-Terminal" and a Unix box without any 
graphical hardware. :-)

If in Lazarus, it would be possible to switch to native X11support (via 
"CustomDrawn" or via the LCL-variant of "fpGUI") by just switching the 
"LCL Widget Type" project option (IMHO sadly now deeply hidden in 
"Additions and Overrides") appropriately and a - say - "GTK" project 
would simply work as expected after the switch, there would be a great 
way to create a small executable for embedded use with a remote GUI.

OTOH the "wrong" client<->server layout of X11 makes "attaching" from a 
remote site to such a (already running) project not as easy as it 
should. Here "NX" instead of X11 would be a more convenient choice (no 
idea how this could be accomplished).

The most convenient "GUI remoteing" choice would be decent support for a 
browser based "Web-GUI" (similar to the - now seemingly dead - 
"ExtPascal" approach), that emulates the LCL widgets via Java script 
code. Here we could have as well embedded devices (with built-in web 
server similar to "fp-web") or "CGI" programs behind a web server (via 
FCGI or ISAPI)  (also similar to "fp-web").

As "CustomDrawn" is more mature, and "WebSockets" (for spontaneous 
Host->Browser events) is supported by all Browsers, right now, I suppose 
a rather small set of basic JavaScript generated Widgets might suffice 
to allow for a rather decent emulation of a real LCL based GUI to be 
shown in a Browser. Based on "CustomDrawn" and "fp-web", the appropriate 
"LCL Widget Type" seems to be doable.

-Michael



More information about the fpc-pascal mailing list