@DATABASE "xbm.datatype.guide"
@$VER: XBM_DT.guide 1.09 (15.8.1999)
@AUTHOR "Deok-Min Yun"

@NODE Main "XBM DataType Documentation"

@{JCENTER}
This is the documentation for XBM DataType Release 1.09.

The XBM DataType is ©1997-1999 by Deok-Min Yun.


@{B}Table of Contents@{UB}

@{" Introduction     " link Introduction}
@{" What's New?      " link WhatsNew}
@{" Legal Stuff      " link LegalStuff}
@{" MUI              " link MUI}
@{" Requirements     " link Requirements}
@{" How to Install   " link Installation}
@{" How To Use       " link Usage}
@{" Revision History " link History}
@{" Things To Do     " link ToDo}
@{" Preferences      " link Prefs}
@{" Acknowledgements " link Acknowledgements}
@{" Author           " link Author}
@{JLEFT}

@ENDNODE

@NODE Introduction
@{B}Introduction@{UB}

@{U}Description@{UU}

XBM DataType is a picture datatype for displaying and saving XBM
pictures under Amiga OS Release 3.0 or better.

The following is an excerpt from XBM specification.


                      XBM - X BitMap Format


XBM is a native file format of The X Window System and is used for
storing cursor and icon bitmaps that are used in the X GUI.  XBM files
are quite different in that they are actually C language source files
that are created to be read by a C compiler rather than a graphical
display program.

XBM was created by the X Consortium as part of the X Window System.
Refer to the /bitmaps directory of the X Window distribution for
examples of XBM files.


@{U}Features@{UU}

- DTWM_RAW DTM_WRITE support (can use DTConvert to convert back to XBM).
- Transparency support for web browsers, etc.
- Preferences for background colour and foreground colour settings.
- Compatible with IPrefs (no need for FastIPrefs).
- Compatible with MultiView with stack size of 4096 bytes.

@ENDNODE

@NODE WhatsNew

@{B}What's new?@{UB}

 - Fixed the (un)installer scripts (thanks to Mike Carter
   for reporting this).
 - Changed the version numbering for the package.
 - Fixed the infinite loop problem with the descriptor when used normal
   text file with CR (thanks to Sebastian Bauer and Rolf Max Rotvel for
   reporting this).

@ENDNODE

@NODE LegalStuff
@{B}Legal Stuff@{UB}

@{U}Copyright@{UU}

This program is Freeware.  You can do whatever you want with this
software.  It is permitted to include this program into another package
as long as all the documentation and utilities are also included.
Before re-distributing this package, please contact the @{"Author" link Author}.


@{U}Disclaimer@{UU}

This program is provided "AS IS" without warranty of any kind.  The
author assumes no responsibility or liability whatsoever for any damage
or data loss caused by using this program.

@ENDNODE

@NODE MUI

                          This application uses


                        MUI - MagicUserInterface

                (c) Copyright 1992-97 by Stefan Stuntz


MUI is a system to generate and maintain graphical user interfaces. With
the  aid  of  a  preferences program, the user of an application has the
ability to customize the outfit according to his personal taste.

MUI is distributed as shareware. To obtain a complete package containing
lots of examples and more information about registration please look for
a  file  called  "muiXXusr.lha"  (XX means the latest version number) on
your local bulletin boards or on public domain disks.

          If you want to register directly, feel free to send


                         DM 30.-  or  US$ 20.-

                                  to

                             Stefan Stuntz
                        Eduard-Spranger-Straße 7
                             80935 München
                                GERMANY



             Support and online registration is available at

                          http://www.sasg.com/

@ENDNODE

@NODE Requirements
@{B}Requirements@{UB}

- Workbench 3.0 or better.
- Any Amiga with more than 2 colours (really?).
- MUI for the preferences editor (optional).

@ENDNODE

@NODE Installation
@{B}How to Install@{UB}

You have two ways to install the XBM DataType.  One way is by using the
supplied installer script.  Just double-click the 'Install_XBM_DT' icon
from Workbench or execute it from CLI (e.g.  'Execute Install_XBM_DT').

The other way is to install it manually by hand.  The following
procedure is for the manual installation.

1) Copy the file 'Classes/DataTypes/xbm.datatype' to
   'SYS:Classes/DataTypes/'.

2) Copy the file 'Devs/DataTypes/XBM' and 'Devs/DataTypes/XBM.info' to
   'DEVS:DataTypes/'.

3) If you have installed previous versions of XBM DataType or AMS
   package, delete (or backup) the file 'DEVS:DataTypes/X-Bitmap' and
   'DEVS:DataTypes/X-Bitmap.info'.  You better reboot Amiga after this.

4) If you haven't installed XBM DataType before, you can activate it by
   double-clicking on its icon in 'DEVS:DataTypes/' directory or do
   'AddDataTypes REFRESH' from CLI.

5) Copy the file 'Prefs/XBMPrefs' and 'Prefs/XBMPrefs.info' to anywhere
   you want.  You could copy these files to 'SYS:Prefs/' but it is not
   mandatory.


I have included the 'Uninstall_XBM_DT' just in case somebody might want
to uninstall it from the hard drive.  Just double-click on the icon to
perform the uninstallation.

@ENDNODE

@NODE Usage
@{B}How To Use@{UB}

There are a lot of softwares that support DataType system on Amiga.  The
XBM DataType will work with most of these softwares if not all.  For a
simple viewing purpose, the MultiView program supplied with Workbench
3.0 or better should be enough.  Please consult your Workbench manual
for how to use MultiView.

@ENDNODE

@NODE History
@{B}> : Changed      + : Added        - : Removed      ! : Fixed    * : Misc.@{UB}

*** Release 1.09 ***

 4-Jun-1999: ! Fixed the (un)installer scripts (thanks to Mike Carter
               for reporting this).
             > Changed the version numbering for the package.

   --- XBM (Descriptor) V40.4 ---

26-Jul-1999: ! Fixed the infinite loop problem with the descriptor
               when used normal text file with CR (thanks to Sebastian
               Bauer and Rolf Max Rotvel for reporting this).


*** Release 1.08 ***

   --- xbm.datatype V43.9 ---

23-May-1999: + Added a support for the CR separated lines.

   --- XBM (Descriptor) V40.3 ---

23-May-1999: + Updated to support CR separated lines.


*** Release 1.07 ***

   --- xbm.datatype V43.8 ---

20-Nov-1998: ! Fixed an enforcer hit with the encoder.  It wasn't 
               checking for a delimiter being null.
             ! Fixed an enforcer hit with the decoder.  It was trying
               to set a hot spot with null (thanks to Luca Longone for
               reporting this).


*** Release 1.06 ***

 7-Aug-1998: + Added a preferences editor.
17-Apr-1998: + Uninstaller script.

   --- xbm.datatype V43.7 ---

 2-Aug-1998: + Added support for a hotspot.
 1-Aug-1998: > Optimised memory copying a bit.
30-Jul-1998: > Cleaned up the code.
             ! BMF_STANDARD wasn't set when using pre-V43 interface.
             > Changed to use AsyncIO routines.
             ! Fixed object name handling which could have caused problems.

   --- XBMPrefs V1.0 ---

11-Aug-1998: + Added a checking routine to create subdirectories if
               they are missing.
10-Aug-1998: + Added an option for default settings.
 9-Aug-1998: + Added saving a preset file.
             + Added preferences for background colour and foreground
               colour.
 8-Aug-1998: + Added an ASL requester for opening a preset file.
 7-Aug-1998: * Colorfield.mui and Coloradjust.mui are used and works
               even though it's buggy at times.
             + Added saving and using preference settings.
 4-Aug-1998: * Started coding.


*** Release 1.05 ***

   --- xbm.datatype V43.6 ---

21-Mar-1998: > Changed RAW saving routine to use simple buffering in order to
               speed up a bit.
10-Mar-1998: > Changed the aspect ratio code again. Now it's 5:4 for 640 x 512
               or 320 x 256 pictures.
             ! New ratio code caused some pictures to crash (width or height
               became 0 instead of 1).
             ! Fixed a bug with return code. This caused DTConvert reporting
               unsuccessful conversion even though the file was converted
               correctly (thanks to Francis Labrie for reporting this).


*** Release 1.04 ***

 4-Mar-1998: > Installer script was changed to offer backup options.

   --- xbm.datatype V43.5 ---

 6-Mar-1998: > Changed the code for aspect ratio. It will now try to open a
               screen with 4:3 ratio.
             ! Some big images (for XBM pictures) were being displayed
               incorrectly due to overwriting to the memory (thanks to Maik
               Solf for reporting this). As a result, memory usage is
               decreased.

   --- XBM (Descriptor) V40.2 ---

 4-Mar-1998: > Replaced DataType descriptor file. '.XBM' extension is no
               longer required. DataType filtering (e.g. file requester for
               WBPattern) could be slowed down because of this. Web counters
               using XBM pictures can be shown without renaming.


*** Release 1.03 ***

27-Feb-1998: + Simple installer script.

   --- xbm.datatype V43.4 ---

27-Feb-1998: ! Name of the image was sometimes not present.
             + Support for DTWM_RAW DTM_WRITE (now you can use DTConvert).


*** Release 1.02 ***

   --- xbm.datatype V43.3 ---

 6-Feb-1998: ! Reduced the stack usage further in order for XBM picture to be
               used as Workbench background.
 1-Feb-1998: ! Stack usage is reduced. It was causing MultiView to crash
               (thanks to Martin Kluge for reporting this).


*** Release 1.01 ***

20-Jan-1998: + New e-mail address at MailExcite.

   --- xbm.datatype V43.2 ---

27-Jan-1998: + Transparency support. It currently only works with IBrowse. I
               tested against demo versions of VoyagerNG 2.88 and AWeb 3.1 and
               found out that they both don't support transparency for
               DataType pictures. Thanks to Andreas Kleinert for his comment
               about this in his akPNG-DT.


*** Release 1 ***

26-Dec-1997: * First Aminet upload.

@ENDNODE

@NODE ToDo
@{B}To do list@{UB}

- Use of standard installer script.


*** xbm.datatype ***

- Name of the image should have been saved in DTA_ObjName instead of
  DTA_ObjAnnotation. This was due to the temporary file handling of
  IBrowse.
- Converting HAM colour images to XBM might not show correct image (needs
  further processing).
- XBM files with 'short' data types are not tested.


*** XBMPrefs ***

- An option for saving icons.
- A bug-free MUI custom class for a gradient slider gadget and a color
  wheel gadget.
- Non-MUI version?
- Test button.

@ENDNODE

@NODE Prefs
@{B}Preferences@{UB}

@{U}How To Configure@{UU}

Beginning with V43.7, XBM DataType supports preferences for background
and foreground colours.  To change the preferences you have to use the
supplied 'XBMPrefs' utility as the preferences file is in binary format.

It will create or modify the preferences file, xbm.prefs, in
ENV:Classes/DataTypes/ and ENVARC:Classes/DataTypes.


@{U}Format of The Preferences File@{UU}

If you want to make your own version of preferences program for XBM
DataType or create a utility to configure multiple datatype preferences,
refer to the following as a guideline.

xbm.prefs is an IFF-PREF file containing a PRHD chunk and an XBDT chunk.
Please refer to Amiga ROM Kernal Reference Manual 3rd Edition
(Addison-Wesley, 1992) for further information about IFF-PREF files,
PRHD chunk, etc.

The XBDT chunk consists of its ID name, chunk size, and chunk data.
ID name has 4 bytes and is a collection of four characters 'X', 'B',
'D', 'T'.  Chunk size has 4 bytes (a long word) and is the size of the
chunk data which is always 6.  Chunk data is just an XbmDTPrefs
structure as shown below.

struct XbmDTPrefs {
  struct ColorRegister BG;
  struct ColorRegister FG;
};

ColorRegister structure is defined as the following,

struct ColorRegister {
  UBYTE red, green, blue;
};

@ENDNODE

@NODE Acknowledgements
@{B}Acknowledgements@{UB}

Andreas R. Kleinert  : For his C-V43 DataTypes example code.
Roland 'Gizzy' Mainz : For DTypesLib example code using DTWM_RAW
                       DTM_WRITE.
Erik Engdahl         : For MacPICT2 DataType descriptor code.
David Junod          : For the original XBM DataType.
Stefan Stuntz        : For MUI (Magic User Interface).
Martin Taillefer     : For AsyncIO.
Magnus Holmgren      : For updating AsyncIO.
Phil Vedovatti       : For NewIcons.
You                  : For using this software.

@ENDNODE

@NODE Author
@{B}Author@{UB}

Name   : Deok-Min Yun
E-Mail : dmyun@excite.com
         dmyun@rocketmail.com
         dmyun@hotmail.com
WWW    : http://members.tripod.com/~dmyun/
         http://www.geocities.com/SiliconValley/Horizon/7576/

@ENDNODE
