This is available as a gzipped tarfile suitable for people running Tk 8.* (almost everyone at the moment) over Unix/X.
This extension offers almost raw access to the X Shaped-Window extension. It is still very primitive, but does seem to work. Leaks memory with the 8.0a* series, but you shouldn't be using those versions anyway. Anyone using this should be aware that its behaviour is orthogonal to the resize behaviour of the windows to which it is applied. This can lead to some very odd effects. Still, it is very useful for understanding what the functionality of the extension actually does, given that the extension is one of the less documented parts of X...
If this extension fails to load, it is probably because the optional extension to the X server that is required by this code is not present. I have only ever encountered one server that did not support shaped windows though, and that was one built on top of MSWin3.1, so I was not all that surprised. |
This is available as a gzipped tarfile suitable for people running Tk 8.* (almost everyone at the moment) over Unix/X.
The next version of the shape extension. I have added support for a larger subset of the functionality of the XShape extension, as well as reorganising the command syntax to allow greater amounts of configurability while making the library easier to use. The same caveats apply to this version of the library as to the previous one.
The newly added functionality covers the following functions:
This is available as a gzipped tarfile suitable for people running Tk 8.* (almost everyone at the moment) over Unix/X.
Version 0.3 of the shape extension. This cleans up the syntax a bit, adds some demonstration programs, a configure script and a (proto-)manpage. There is still much to do, IMHO...
I now have an experimental version of this extension available (also as a Zip archive.) It should support both Unix/X and Windows, though it is not yet properly tested or packaged up. If you want support for grabbing shapes from photo images, you will need to apply a patch to Tk8.4a1.
If you want the extension to improve further (by more completely supporting Windows, being able to build on that platform, install properly anywhere, support Macs, etc.) then you should contact me or take the sources and do marvellous things with them...
Added documentation for part of the C API to the extension.
Improved the Windows
code a lot; the old code leaked, called wrong functions, and generally
made a complete mess of itself while not checking thoroughly for
errors. Also added more documentation for the C API to the extension.
Mostly done now; just Shape_RenderTextAsRectangles
and
Shape_CombineBitmap
left to implement...
Started work on adding some tests. Rationalised the API a bit too.
Now builds correctly on Solaris (well, on my workstation which runs Solaris...)
TkTrans is a competing work that is Windows-specific (though this apparently has problems on NT.) It was a major help in writing the Windows code to read the source to this, as it let me figure out what functions to call (though the architecture is quite different in all other respects.)
Tkdnd is the sort of extension that will find my work relevant and useful...
People wishing to understand the functioning of the X Nonrectangular Window Shape Extension Protocol (to give it its full name) are referred to the specification document from the X Consortium. (You will need this macro package to correctly format it with GROFF.)