;
; wimp.sh
;
; Starting and ending of Wimp tasks
;
;  1994-1998 Straylight
;

;----- Licensing note -------------------------------------------------------
;
; This file is part of Straylight's Sapphire library.
;
; Sapphire is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2, or (at your option)
; any later version.
;
; Sapphire is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with Sapphire.  If not, write to the Free Software Foundation,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;----- Overview -------------------------------------------------------------
;
; Functions provided:
;
;  wimp_init
;  wimp_taskHandle
;  wimp_version
;  wimp_strWidth

		[	:LNOT::DEF:wimp__dfn
		GBLL	wimp__dfn

; --- wimp_init ---
;
; On entry:	R0 == pointer to application name
;
; On exit:	--
;
; Use:		Initialises the WindowManager, and stores away useful
;		snippets of information, like the task handle we've been
;		given.  It also registers an exit handler so that the Wimp
;		gets closed down.

		IMPORT	wimp_init

; --- wimp_taskHandle ---
;
; On entry:	--
;
; On exit:	R0 == the application's task handle
;
; Use:		Returns the application's task handle.

		IMPORT	wimp_taskHandle

; --- wimp_version ---
;
; On entry:	--
;
; On exit:	R0 == the WIMP's version number (may not be the one the
;		      client asked for)
;
; Use:		Returns the WindowManager's version number.

		IMPORT	wimp_version

; --- wimp_strWidth ---
;
; On entry:	R0 == pointer to a string
;
; On exit:	R0 == width of the string in OS units
;
; Use:		Returns the width of a string, as it would be displayed in
;		an icon (i.e. taking into account things like the current
;		desktop font etc.)  The width is exact, so if you want to
;		e.g. draw a box round it, you'll have to add on a little
;		clearance at each end.  8 OS units seems to be a good size
;		for the clearance (so the total width you'd use is given by
;		wimp_strWidth(string)+16, because it has two ends).

		IMPORT	wimp_strWidth

		]

;----- That's all, folks ----------------------------------------------------

		END
