This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Include X "instance" into source
- From: Alexander Gottwald <alexander dot gottwald at s1999 dot tu-chemnitz dot de>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 25 Sep 2002 15:47:50 +0200 (MEST)
- Subject: Re: Include X "instance" into source
- Reply-to: cygwin-xfree at cygwin dot com
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