Version 7 of ntk

Updated 2007-12-19 15:43:50 by LV

A new extension called ntk is being written for Win32 and X11. Ntk is going to replace the Tk layer currently used by NexTk and the megaimagetk widget.

The code is hosted here: http://megapkg.googlecode.com/svn/trunk/csrc/ntk/

Ntk (.dll/.so) provides:

  • event handling for Win32 and X11 that evaluates Tcl-side callbacks.
  • fast megaimage display using XShm and DBE with X11
  • selection control (copy/paste)
  • the ability to create system windows to host NexTk windows.
  • window destruction
  • window movement/resize requests

NEWS George Peter Staplin Dec 19, 2007 - Ntk works much better in Windows. I'm using CreateDIBSection() for the bitmap, which has removed some indirection and improved performance.

I added XShm pixmap support to remove a little indirection in the cases where XShm pixmaps are available. The XShmPutImage path is still valid too. I reimplemented some of the double-buffering code that uses the X DBE extension.

The keyboard input for Win32 could use some improvement/polish. I'm not sure it works yet. I also need to test the selection and write a widget that allows for copying/pasting the selection. I also plan to add the ability to NexTk to copy and paste graphics (as megaimage buffers), and sounds.

The X11 code for selection is also not quite right yet. Who would have thought it would be so difficult to copy text in X11? Well apparently Keith Packard did. He wrote about paper about it here: http://keithp.com/~keithp/talks/selection.ps and in PDF form: http://www.msu.edu/~huntharo/xwin/docs/xwindows/selection.pdf

For more info, see NexTK.