[comp.sys.acorn] Haswin now on Newcastle info server

Albert.Koelmans@newcastle.ac.uk (Albert Koelmans) (02/05/91)

A  powerful library of wimp/graphics routines called 'haswin' is now
available from the Newcastle info server. Here is some basic information:

--------------------------------------------------------------------------

        The HASWIN library provides a comprehensive set of routines
designed to simplify the writing of complex WIMP based programs.  The
Archimedes WIMP, running under RISCOS requires some complex programming
techniques in order to realise its full potential.  The HASWIN routines
simplify user programs by hiding all the complex data structures and
programming required.

        HASWIN consists of one file at ANSI C source code level and an
object code library file.  The source file, an include file called haswin.h,
provides all the routine and data structure definitions required, and
includes any other files as needed.  The Object code library file, haswin.o,
contains the actual routines.  Nearly all of these routines and data
structures are given header definitions in the include file, but some data
structures and routines in "haswin.o" are used internally by HASWIN and are
therefore not defined.  These routines will not be explained here.  The
Object code file was created using the following programs:

                Norcroft RISC OS ARM C vsn 3.00 [Jul 12 1989]
                (HASWIN has been sucessfully compiler using:
                 "Norcroft ARM C (with debugger support) 2.01A Jul 14 1988")
                libfile: library file library tool
                objlib: object file library tool

        HASWIN provides and maintains the Archimedes screen by replacing the
physical screen and WIMP system with its own routines.  Programs should
allow HASWIN to provide all access to the screen environment and should not
call any of the Arthur, RISCOS or WIMP routines directly.  The HASWIN
routines generally follow the guidelines in the Application Notes for WIMP
programmers on pages 1300-1330 of Volume III of the RISC OS Programmer's
Reference Manual.  Therefore a "standard" user interface is provided by all
HASWIN programs that usually behaves exactly the way a user expects if he
is used to using the Application programs provided by Acorn themselves.  Any
differences between the user interface provided by HASWIN applications and
that of Acorn derived programs is usually due to HASWIN providing
considerably more functions.  HASWIN can therefore be considered as
providing a superset of the user interface provided by the routines in the
"RISC_OSLib" library supplied with Release III of the Acornsoft ANSI C
compiler, and used by Acorn derived code written in C.  The "RISC_OSLib"
library does, however, cover the drawing of text within windows, copying
the contents of windows, and dialogue boxes.  HASWIN does not cover these
issues since it is designed to provide the programmer only with windows,
icons, menus, pointers and carets.  What these things mean, or contain, is
the concern of the programmer alone.  HASWIN does, however, provide simple
text and graphics overlays to a window with simple routines to allow user
data to be put into a window and then automatically redrawn by HASWIN as the
window scrolls and moves.

        To a programmer the screen appears to be made up of a number of
data structures representing windows, icons, menus, carets and the mouse
pointer.  The user program tells the HASWIN library how these items are
related and HASWIN deals with everything, only returning to the user
program when its intervention is required.  In order to do this HASWIN
has to take some of the C identifier and pre-processor namespaces for its
own use.  Since the namespaces are very large this is not considered a
problem.  Of course it is the responsibility of the programmer to prevent
namespace clashes with HASWIN.

        The HASWIN library is divided into groups of routines, each of which
deals with one of the elements that form a Window Environment.  Each of
these groups has an information file associated with it.  The groups (and
information files) are as follows:
        carets, drawing, files, fonts, icons, the kernel, memory management,
        menus, palettes, pointers, polling, ram transfers, setting up,
        sprites, templates, text, windows.

---------------------------------------------------------------------------

This library was written and contributed by Howard Shaw.

To retrieve a file a file from the archive, send a message to 
info-server@newcastle.ac.uk with the following content:

line-limit 1000
request: sources
topic: archimedes filename
request: end

where filename is replaced by the name of the file that you want.
A filename of 'index' will send you the latest index file.




JANET:  Albert.Koelmans@uk.ac.newcastle
UUCP:   ...!ukc!newcastle.ac.uk!Albert.Koelmans
Computing Laboratory, University of Newcastle upon Tyne,
Newcastle upon Tyne, NE1 7RU, UK (telephone +44 091-2228155,fax 2228232)