ntxlib works on Windows 95

vischne@ibm.net vischne@ibm.net
Fri Jan 2 06:24:00 GMT 1998

>   vischne@ibm.net
>   Fri, 2 Jan 1998 02:23:35 GMT
>>   Sergey Okhapkin (sos@buggy.prospect.com.ru)
>>   Thu, 1 Jan 1998 14:54:57 +0300
>>vischne@ibm.net wrote:
>>> If you are not concerned about using your system as a remote X-server,
>>then ntxlib is one way to go.  If you want your system to act as an
>>> then the full X11R6 distribution, with a commercial X-server, is the way
>>to go.
>>Did you ever think about merging of libX11 and ntxlib? I.e. if environment
>>variable DISPLAY is not set, call ntxlib's gdi calls wrappers, and call X11
>>code otherwise?
I have used XFree86 on my Linux box for several years, but I never heard of
the Xnest program until you mentioned it.  After considering your suggestion,
it seems to me that the more practical approach is to rewrite part of libX11
to include ntxlib's Windows calls and use Xnest as the Windows X-server.

The reason I say this is that libX11 doesn't have a `main' entry point and
assumes, Unix-style, that the X-program calling libX11 will have a `main'.

ntxlib, on the other hand, uses WinMain to get hInstance, without which
you cannot generate Windows with CreateWindow calls.  WinMain gets
the argc and argv parameters and passes them to a call on main().

ntxlib also uses PeekMessage and GetMessage for getting the XEvents, so
it really is not practical to to have XInit check the environment variable
before calling ntxlib.

There is also the question of the Xinitrc and Xkeyboard initialization
files, and whether to use X-Fonts at all, or substitute Windows fonts.
A Windows libX11 that uses Xnest would probably not want to use the
xinit program to start Xnest.

This is not a trivial project, and it argues for leaving ntxlib as a toy
program for use in porting Tcl/Tk applications that only make one or two
calls on libX11.

The other approach is to get the XServer code and go about pretending that
the Windows display is a graphics card.  That way, ported X programs won't
need the Windows libraries to link, and WinMain in the X-Server needn't
call main in the user's programs.

For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list