From: Rüdiger G. <rg...@r-...> - 2002-05-25 09:44:37
|
Hello, I don't want to flame or annoy anyone. I'm just curious I my post got through (I hope I made myself clear here. I'm not a native speaker) I posted a couple of questions 4 days ago ragarding some ideas for patches need for the tix port to Carbon-Tk. However I didn't get any response. Since its about changes to the Tk source I can't go on by myself. And at some points I supposes this changes need some discussion first. Hence, I repost the questuions here: -------------------------------------------------------------- I recently found some time to work on my tix port to Carbon/MacOS X. It turns out, that almost all open problems are in the Tk X11 emulation. Therefore I have some questions about this before submitting patches. 1) One major problem was XPutPixel() in tkMacOSXPutPixel.c (XPutPIxel is set to tkMacOSXXPutPixel in a #define statement in xutil.h via XImage ->put_pixel) Is this function ever called in Tk (I saw that it is assigned to XImage ->put_pixel). I think this function is broken. As far as I can read from the man page of XPutPixel on my Linux-System XPutPixel should write a pixel into the pixmap data stored in XImage->data. The current implementation of XPutPixel, however, assumes that XImage->data contains a Carbon GrafPort, which is not true if called from the tix code. I do have a fixed version for 32 bit depth image data. But it should surely be fixed for arbirary depth. 2) In XCopyArea() (in tkMacOSXDraw.c ) there is no support for TKP_CLIP_PIXMAP clipping mode. However tix uses pixmap clipping in its XPM-pixmap code. I have hack to work around by using the transparent mode of Carbon's CopyBits. However in this case all transparent pixel in XImage->data (which is the source drawable in this case) should be of the background colour set in XCopyArea(). In this case, it would be nice to have this color in a global variable (in case you change it) (BTW: the variable of the temporary background color in XCopyArea() is called blackColor but the color set is white ;-) ) Of source it would be more elegant to evaluate the clip_mask stored in clipPtr->value.pixmap. However I don't know how do this with Carbon. And I assume it would be relatively time consuming. 3) After all I do have a running tix. And I do have an ruinning minkowsky (which is the app I do the tix port for). However, I do realize that Tcl/Tk/Tix is much slower on MacOS X than on Linux (on the same box, an iceBook 500 Mhz). I found this really surprising. minkowsky is almost unusable for this reason. Any ideas? BTW: I recompiled everything with optimisation level 2. 4) There is a problem about pkgIndex.tcl-files. On Linux Tcl looks for this files on /usr/lib/*/pkgIndex.tcl. Hence it will find all extenstions pkgIndex.tcl files since they are normally installed on /usr/lib/extensionname However on MacOS X Tcl seem to look at .../Frameworks/Tcl.framework/Resources/Scripts/pkgIndex.tcl Hence you have either to add all extenstion thereto or the mechanism of finden pkgIndex.tcl files must be revisted on Mac OS X Tcl. Or did I mis something ? 5) What would be the appropriate place to install the Frameworks to? /System/Library/Frameworks or /Library/Frameworks -------------------------------------------------------------- BTW: I read in the mails something about Aqua-Tk. Does this mean the Tk port to Carbon or is this another native port to Mac OS X? Yours R"udiger Goetz -- R"udiger Goetz rg...@r-... WWW: http://www.r-goetz.de Mail send by a Mac running Linux (SuSE-PPC) |