/*
 * muscode.h
 * Declarations of the functions in muscode.a
 *  Musus Umbra, 1997
 */

#ifndef muscode_h
#define muscode_h

#include "Desklib:Event.h"		/* for the event_pollblock type */
#include "Desklib:Core.h"		/* for the os_error type */

/* Given a module's help string, determine it's version number.				*/
/* returns the (decimal) version number*100, or 0 if unable to determine	*/
extern int Module_VersionH( char *help_string );


/* Given a module's name (with %instantiation if necessary), determine its	*/
/* version number.															*/
/* returns the (decimal) version number*100, or -1 if an error occurs		*/
extern int Module_Version( char *module_name );


/* Given an object's full pathname, determine what it is.					*/
/* returns <0=error, 0=not found, 1=file, 2=directory, 3=image				*/
extern int Object_Type( char *pathname );

/* Given an object's full pathname, determine what type it is.				*/
/* returns -2=error, -1=not found, &1000=dir, &3000=untyped else filetype	*/
extern int File_Type( char *pathname );


/* Draw a 3d border on an otherwise auto-redraw window.						*/
/* intended to be registered with Event_Claim for Redraw requests			*/
extern BOOL Handler_Border( event_pollblock *pb, void *ref );

/* Create a directory (a la cdir)											*/
extern os_error *Make_Dir( char *name );

/* Copy a file																*/
extern os_error *Copy_File( char *dest, char *source );

/* Save a block of memory as a typed file									*/
extern os_error *Save_Typed( char *name, int filetype, void *block, int size );

/* Read a byte from the CMOS RAM 											*/
/* returns -1 if an error occurs											*/
extern int Read_CMOS( int address );

/* Write a byte to the CMOS RAM												*/
/* returns value, or -1 if an error occurs									*/
extern int Write_CMOS( int address, int value );

/* Read an OS variable														*/
/* returns NULL if the read fails, else the number of characters read		*/
extern int OSVar( char *buffer, int buffer_size, char *variable );

/* Read the size of the Wimp's toolsprites sprite area						*/
/* returns 0 if there is an error											*/
extern int ToolSprSize( void );

/* Set the Wimp screen mode :-)												*/
extern os_error *Wimp_SetMode( int mode );

/* issue an OS command														*/
extern os_error *OSCLI( char *command );

/* set an OS variable's value												*/
extern os_error *SetVarVal( char *variable, char *to );

/* Buffer will be "" is the desktop font is "System font", in which case	*/
/* *xpts and *ypts will be unchanged										*/
extern void GetWimpFont( char *buffer, int *xpts, int *ypts );

/* Is the Shift key pressed? */
extern int ShiftPressed( void );

/* Turn the hourglass off/on */
extern void Hourglass( int on );

/* Is the Aly key pressed? */
extern int AltDown( void );

/* Read (and set) the Next slot size */
extern int NextSlot( int newsize );


#endif
