Include X "instance" into source

Alexander Gottwald alexander.gottwald@s1999.tu-chemnitz.de
Wed Sep 25 09:03:00 GMT 2002


On Wed, 25 Sep 2002, Francois Liot wrote:

> Hello,
>  
> Unfortunatelly, I suppose my question has nothing new, but I didn't found the answer anywhere.

It is at least completely new to me.

>  
> I know that running X application though Cygwin is really easy
> (with something like that :
> SET DISPLAY=127.0.0.1:0.0
> start /B XWin -unixkill -winkill -screen 0 800 600 -depth 16
> call something.exe )
>  
> My question is :
> Does it exist a "best practice" documentation about embedding X server directly into windows binaries ?
> Some docs (included required sources) that explain how to impact the source code :
>  
> Ideally something like that...
>  
> Begining of the application :
>                     #include <embeddedXserver.h> 
>                     int xdisplay;
>                     int xcolordepth;
>                     int xwidth;
>                     int xheight;
>                     + launchX(..)
>  
> All the sources :
> When Xfunctions are found, change them by embeddedXfunctions
>  
> End of the application :
>                     kill/close X(..)

I've never seen such a thing. neither for linux nor for windows or cygwin.
And rethinking the structure of the xserver it would need an extra thread 
and would still require piping all requests through the X11 message queue.

So IMO the best solution is to start the separate Xserver binary from your
program via system("/usr/X11R6/bin/XWin.exe") and use standard X11 calls
to communicate with it.

bye
	ago
BTW: With the current code it is not possible to embed the Xserver window
inside another program window.
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723



More information about the Cygwin-xfree mailing list