If you are using Tcl 8.5, you are strongly encouraged to upgrade from
earlier releases. If you are still using 8.4, upgrading from 1.1 is
still recommended as several bugs have been fixed in addition to the
enhancements.
V2.0 changes
------------------
Major features since V1.1 include support for writing Windows services
in Tcl, interfaces to the MS Installer, clipboard and device
monitoring, Crypto/SSPI interfaces and power management. On the
downside, NT 4.0 support has
been dropped.
See http://twapi.magicsplat.com/versionhistory.html for a full list.
Need volunteers
---------------------
If you can run the TWAPI test scripts on Vista, please post back here.
I don't
have access to any Vista systems.
TWAPI Summary
--------------
The Tcl Windows API (TWAPI) 2.0 extension provides
access to over 450 functions in the Windows API
from within the Tcl scripting language. The extension
targets Windows 2000, Windows XP and Windows
2003, and is not supported on the Windows
95/98/ME platforms and NT 4.0. TWAPI is currently
untested on Vista.
Functions in the following areas are implemented:
* System functions including OS and CPU information,
shutdown and message formatting
* User and group management
* Security and resource access control
* Window management
* User input: generate key/mouse input and hotkeys
* Basic sound playback functions
* Windows services including services in Tcl
* Windows event log access
* Process and thread management
* Directory change monitoring
* Lan Manager and file and print shares
* Drive information, file system types etc.
* Network configuration and statistics
* Network connection monitoring and control
* Clipboard access and monitoring
* Console mode functions
* System performance data
* Window stations and desktops
* Internationalization
* Task scheduling
* Shell functions for shortcuts, themes, dialogs
* COM client support
* Crypto/SSPI support
* Power managment
* MS Installer interfaces
* Device monitoring
Great to see another version, I especially appreciate the
various monitoring functions and also expanded clipboard support.
Thanks,
Roy
Since you worked on some clipboard stuff, I don't suppose anything
there could be moved into the core to address the text-only
limitations Tk Windows clipboard handling currently does?
Jeff
The Clipboard API was one of the simplest interfaces. In fact, so
simple, I did not have to write any code for it, just passed a few
Win32 API's to SWIG which generated the wrappers. Taking a look at
tkWinClipboard.c, I would think it would be just a question of adding
tests to check for formats other than CF_UNICODETEXT / CF_TEXT.
I suspect you are looking for something more sophisticated than what
TWAPI implements. Note twapi does not do any formatting itself (e.g.
to decode html or bitmaps etc.) It punts on that and expects the
application code to do the hard work, treating the data itself as just
a binary blob and sticking it into the clipboard with the format
identifier given by the application.
/Ashok
Interesting. I'll have to checkout this code for NexTk's ntk.dll. For
a while now I've had a design idea of several ntk commands relating to
the Windows clipboard. I have a partial implementation that is
untested.
The idea is that it will work something like this:
set type [ntk-get-clipboard-type $winid]
switch -- $type {
image {
#This would translate the Windows clipboard contents to
#a megaimage buffer of RGBA bytes.
#It should also be portable so it should work with X11 too,
#so that we can work with tools like the Gimp.
set mbuf [ntk-get-clipboard-image $winid]
}
text {
#This uses the unicode text (if available).
set text [ntk-get-clipboard-text $winid]
}
none {
#empty clipboard
}
}
The X clipboard stuff is maddening. There are several ways of
implementing the X clipboard protocol. I can see now why X selection is
so broken with some toolkits, and others don't handle selections
well.
George