

                                    TWS
                               Release Notes


                                Release 4.1


                     Last minute information about the
                        TWS User Interface library




The organization of files was changed after the documentation was
already printed.  Both the shareware archive file and the distribution
disks have the TWS files in the following subdirectories:

    .\LIB\          The TWS object library
    .\INCLUDE\      TWS include files
    .\DOC\          ASCII documentation
    .\EXAMPLES\     Example programs source code and makefiles
    .\FONTS\        Font files
    .\ICONS\        Pixmap files for icons, etc.
    .\SOURCE\       TWS library source code (if purchased)

None of the shareware files are in self-extracting archives.  The source
code files are distributed in a self-extracting compressed archive
format so that the whole system will fit on a single diskette.


------------------------------------------------------------------------------
PORTING 4.0 TO 4.1
------------------------------------------------------------------------------
TWS release 4.1 contains a large number of changes from 4.0.  The most
significant of them, and their impact on your existing programs, are
outlined below:

Include files
Just about all programs will have to add the include file smfont.h.

SM_Init()
Do not pass argv and argc to SM_Init.  Instead, either pass the constant
for the graphics and mouse device, or pass (0,0) to use the devices
specified in the TWS.CFG file.  TWS no longer comes packaged with code
for user-selection of the desired graphics mode and pointer device.

SM_GetNextEvent
SM_ProcessEvent
Both of these now take a pointer to a static EventType variable as an
argument.  The new declarations are:

    EventType   event;

    SM_GetNextEvent(&event);
    SM_ProcessEvent(&event);

Event constants
The values for event constants have been changed, and there are a number
of new event types.  The EventType struct has been expanded
considerably.  You will want to read thoroughly the Events chapter in
the manual and look over the example programs.


------------------------------------------------------------------------------
DOCUMENTATION CHANGES
------------------------------------------------------------------------------
Gadget Redrawing when Changed
    In the past, whenever a visual aspect of a TWS gadget was modified,
    the gadget would be immediately redrawn if possible.  This has been
    modified for release 4.1.  A configuration parameter, autoredraw,
    controls whether window and gadget changes will be reflected
    immediately in the active window, or simply marked.  The application
    can force all changed gadgets to be redrawn by calling
    SM_RefreshGadgets().  A changed window can be updated by calling
    SM_DrawWindow().

Arguments to Generic Gadget Functions
    Most generic gadget functions take a specific gadget pointer, like a
    LabelType or ButtonType, *NOT* a pointer to a GadgetType as the
    documentation insists.  However, the following functions still pass
    or return generic GadgetType pointers:

        SM_AttachGadget
        SM_GetFocusGadget
        SM_GetGadgetSuperclass
        SM_GetGadgetType

    All other generic gadget functions' gadget arguments are now
    pointers to specific gadgets.


------------------------------------------------------------------------------
KNOWN BUGS
------------------------------------------------------------------------------
GR_DrawArray works only in 8-bit mode
    The graphics function GR_DrawArray draws very fast multi-color
    lines.  It uses 1 pixel image blocks to accomplish this, poking the
    values in the 'image' from the color array.  I haven't got all the
    pixel formats for all modes yet, so for now this feature only works
    on 8-bit (256 color) graphics modes.



