home *** CD-ROM | disk | FTP | other *** search
- /*
- * ToolManager.h V1.3
- *
- * main include file
- *
- * (c) 1991 by Stefan Becker
- *
- */
- #include <exec/types.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <exec/libraries.h>
- #include <exec/memory.h>
- #include <dos/dos.h>
- #include <dos/dostags.h>
- #include <intuition/intuition.h>
- #include <workbench/icon.h>
- #include <workbench/startup.h>
- #include <workbench/workbench.h>
- #include <libraries/asl.h>
-
- /* Prototypes for system functions */
- #include <clib/asl_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/gadtools_protos.h>
- #include <clib/graphics_protos.h>
- #include <clib/icon_protos.h>
- #include <clib/intuition_protos.h>
- #include <clib/wb_protos.h>
-
- /* Version number & dates */
- #define TM_VERSION "1.3"
- #define TM_CRYEAR "1991"
- #define TM_DATE "13.03.1991"
-
- /* Entry for tool list */
- struct ToolNode {
- struct Node tn_Node;
- BPTR tn_DirLock;
- char *tn_RealName;
- struct AppMenuItem *tn_MenuItem;
- ULONG tn_ID;
- BOOL tn_CLI;
- };
-
- /* Prototypes for library functions */
- void NewList(struct List *);
- struct ToolNode *GetHead(struct List *);
- struct ToolNode *GetSucc(struct ToolNode *);
-
- /* Prototypes for program functions */
- /* config.c */
- void SetConfigFileName(char *);
- BOOL ScanConfigLine(char *, BPTR);
- void BuildConfigLine(struct ToolNode *, char *);
- void ReadConfigFile(BPTR);
- BOOL WriteConfigFile(struct Window *w);
- /* mainloop.c */
- void mainloop(void);
- /* starttools.c */
- BOOL StartCLITool(struct AppMessage *, struct ToolNode *,char *);
- BOOL StartWBTool(struct AppMessage *, struct ToolNode *, char *);
- /* toollist.c */
- BOOL WBAddToolNode(struct WBArg *, int);
- BOOL AddToolNode(BPTR, char *, char *, BOOL);
- void RemToolNode(struct ToolNode *tn);
- void RemoveTools(void);
- /* toolmanager.c */
- void cleanup(int);
- /* window.c */
- ULONG OpenStatusWindow(void);
- void CloseStatusWindow(void);
- BOOL HandleWindowEvent(void);
- void RefreshStatusWindow(void);
- void AttachToolList(void);
- void DetachToolList(void);
-
- /* Global variables */
- extern struct MsgPort *MyMP;
- extern struct List ToolList;
- extern UWORD ToolCount;
- extern ULONG wbactive;
- extern char MyName[];
- extern UBYTE WindowTitle[];
- extern struct DiskObject *MyIcon;
- extern LONG IconXPos,IconYPos;
- extern BOOL ShowIcon;
- extern struct AppIcon *MyAppIcon;
-
- /* Global defines */
- #define BUFLEN 100 /* Buffer length for one config line */
- #define NAMELEN 256 /* Buffer length for a file name */
-