This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: X11, Tcl and Tk for Windows


Mark,

>   int idc = DefaultColormap (_pdisp, 0); // Failure here, or in
> subsequent call to XParseColor ()

Do these two calls indicate that you are trying to use a PseudoColor (e.g. 8 bit palletized color) visual? If so, then you need to be running Windows in 8 bit color mode or you can run in fullscreen mode with 8 bit color. This later one would be done via (XWin.exe -fullscreen -depth 8).

PseudoColor is not supported when the underlying display is not a pallete-based display.

Please correct me if I am totally off base.

Harold

Mark Horn wrote:

I am looking for Tcl/Tk v8.0 and a compatible version of Xlib, for a port of an application developed originally for a Unix platform. The application is a based transport simulator, and is written in C++ . The Tcl/Tk is there to provide the GUI, including a window within which X11 calls provide "real-time" graphics display of the behaviour of simulated objects (eg "real-time" movement of vehicles across a map).

At first sight Cygwin appears to provide what I need:

a. Include files for tcl and tk in usr/include and for X in X11R6/include/X11.
b. The X11 library at usr\X11R6\lib\libX11.a ... And the Tcl/Tk libraries tcl80.lib and tk80.lib


But when I link with the libraries mentioned in (b), the following sequence of code leads to failure in the X software. For brevity this code omits checks on call results, which are OK up to the last line.

_pint = Tcl_CreateInterp();
Tcl_Init (_pint);
_tk_mainwin = Tk_MainWindow (_pint);
_pdisp= Tk_Display (_tk_mainwin);
int idc = DefaultColormap (_pdisp, 0); // Failure here, or in subsequent call to XParseColor ()


I have also tried linking with libraries tcl84.lib , tk84.lib from the Tcl/Tk distribution at http://www.tcl.tk/software/ includes .. but in that case I get a failure in the call to Tcl_Init. I would appreciate advice on how to obtain a workable collection of the software libraries, or on some other way of overcoming these difficulties.

Mark Horn



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]