ORCA-C/bin/Libraries/ORCACDefs/toollib.h

1 line
7.2 KiB
C
Raw Normal View History

/* * * ToolLib.h - Interface file for functions contained in * ToolLib library. These functions can be used by * programs that are to be operated as tools under the * APW shell on the Apple IIgs. * * Copyright Apple Computer, Inc. 1989 * All rights reserved * * Author: Greg Branche * */ #ifndef __ToolLib__ #define __ToolLib__ /************************************************************ <<< CursorCtl - Cursor Control Routines >>> This file contains: InitCursorCtl(delaycount) - Init CursorCtl to set the spin delay RotateCursor(counter) - Sequence through cursor frames for counter mod delay SpinCursor(increment) - Sequence mod delay incrementing internal counter Hide_Cursor() - Hide the current cursor Show_Cursor() - Show the cursor ************************************************************/ extern pascal void InitCursorCtl(/* delaycount */);/* unsigned long delaycount; Initialize the CursorCtl unit. This should be called once prior to calling any of the other CursorCtl routines. If delaycount = 0, then the default delay value of 32 will be used. Ensure that the value being passed as delaycount is 32-bits in size (long) */ extern pascal void Show_Cursor();/* This function removes the default inverse space cursor from the screen and replaces it with the first frame of the animated cursor. It then outputs a backspace so that any subsequent characters will automatically overwrite the cursor character. */ extern pascal void RotateCursor(/* counter */);/* unsigned long counter; RotateCursor is called to rotate the "I am active" "spinning wheel" cursor. The next cursor ("frame") is used when (counter MOD delaycount) (as specified in the InitCursorCtl call) = 0 (counter is some kind of incrementing or decrementing index maintained by the caller). A positive counter sequences forward through the cursors (e.g., it rotates the cursor "clockwise"), and a negative cursor sequences through the cursors backwards (e.g., it rotates the cursor counterclockwise). */ extern pascal void SpinCursor(/* increment */);/* unsigned short increment; SpinCursor is similar in function to RotateCursor, except that instead of passing a counter, an increment is passed and added to a counter maintained here. SpinCursor is provided for those users who do not happen to have a convenient counter handy but still want to use the spinning cursor. A positive increment sequences forward through the cursors (rotating the cursor clockwise), and a negative increment sequences backward through the cursors (rotating the cursor counterclockwise). A zero value for the increment resets the counter to zero. Note, it is the increment, and not the value of the counter that determines the sequencing direction of the cursor (and hence the spin direction of the cursor). */ extern pascal void Hide_Cursor();/* Hides the current character of the spinning cursor. Use this routine when you wish to revert to the standard inverse space cursor. */ /************************************************************ ErrMgr.h - //GS equivalent of the MPW Error Manager ************************************************************/ extern void InitErrMgr(/* toolErrFilename, sysErrFilename, showToolErrNbrs */); /* char *toolErrFilename; char *sysErrFilename; boolean showToolErrNbrs; Initializes the error manager. If toolErrFilename is not null, this will open the resource fork of that file to allow access to tool-specific error messages. If sysErrFilename is not null, this will open the resource fork of that file instead of the standard APW error message file. If showToolErrNbrs is TRUE, then any call to GetSysErrText will show the decimal and hexadecimal error number in parentheses after the text of the error message. If this is false, all that GetSysErrText will provide is the text of the message. To use the error manager, your tool must start up the Resource Manager prior to calling InitErrMgr. This function will NOT do it for you. */ extern void CloseErrMgr(); /* This s