home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 492.lha / ToolManager_v1.3 / src / ToolManager.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-06  |  2.5 KB  |  95 lines

  1. /*
  2.  * ToolManager.h   V1.3
  3.  *
  4.  * main include file
  5.  *
  6.  * (c) 1991 by Stefan Becker
  7.  *
  8.  */
  9. #include <exec/types.h>
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <string.h>
  13. #include <exec/libraries.h>
  14. #include <exec/memory.h>
  15. #include <dos/dos.h>
  16. #include <dos/dostags.h>
  17. #include <intuition/intuition.h>
  18. #include <workbench/icon.h>
  19. #include <workbench/startup.h>
  20. #include <workbench/workbench.h>
  21. #include <libraries/asl.h>
  22.  
  23. /* Prototypes for system functions */
  24. #include <clib/asl_protos.h>
  25. #include <clib/dos_protos.h>
  26. #include <clib/exec_protos.h>
  27. #include <clib/gadtools_protos.h>
  28. #include <clib/graphics_protos.h>
  29. #include <clib/icon_protos.h>
  30. #include <clib/intuition_protos.h>
  31. #include <clib/wb_protos.h>
  32.  
  33. /* Version number & dates */
  34. #define TM_VERSION "1.3"
  35. #define TM_CRYEAR "1991"
  36. #define TM_DATE "13.03.1991"
  37.  
  38. /* Entry for tool list */
  39. struct ToolNode {
  40.                  struct Node tn_Node;
  41.                  BPTR tn_DirLock;
  42.                  char *tn_RealName;
  43.                  struct AppMenuItem *tn_MenuItem;
  44.                  ULONG tn_ID;
  45.                  BOOL tn_CLI;
  46.                 };
  47.  
  48. /* Prototypes for library functions */
  49. void NewList(struct List *);
  50. struct ToolNode *GetHead(struct List *);
  51. struct ToolNode *GetSucc(struct ToolNode *);
  52.  
  53. /* Prototypes for program functions */
  54. /* config.c */
  55. void SetConfigFileName(char *);
  56. BOOL ScanConfigLine(char *, BPTR);
  57. void BuildConfigLine(struct ToolNode *, char *);
  58. void ReadConfigFile(BPTR);
  59. BOOL WriteConfigFile(struct Window *w);
  60. /* mainloop.c */
  61. void mainloop(void);
  62. /* starttools.c */
  63. BOOL StartCLITool(struct AppMessage *, struct ToolNode *,char *);
  64. BOOL StartWBTool(struct AppMessage *, struct ToolNode *, char *);
  65. /* toollist.c */
  66. BOOL WBAddToolNode(struct WBArg *, int);
  67. BOOL AddToolNode(BPTR, char *, char *, BOOL);
  68. void RemToolNode(struct ToolNode *tn);
  69. void RemoveTools(void);
  70. /* toolmanager.c */
  71. void cleanup(int);
  72. /* window.c */
  73. ULONG OpenStatusWindow(void);
  74. void CloseStatusWindow(void);
  75. BOOL HandleWindowEvent(void);
  76. void RefreshStatusWindow(void);
  77. void AttachToolList(void);
  78. void DetachToolList(void);
  79.  
  80. /* Global variables */
  81. extern struct MsgPort *MyMP;
  82. extern struct List ToolList;
  83. extern UWORD ToolCount;
  84. extern ULONG wbactive;
  85. extern char MyName[];
  86. extern UBYTE WindowTitle[];
  87. extern struct DiskObject *MyIcon;
  88. extern LONG IconXPos,IconYPos;
  89. extern BOOL ShowIcon;
  90. extern struct AppIcon *MyAppIcon;
  91.  
  92. /* Global defines */
  93. #define BUFLEN  100  /* Buffer length for one config line */
  94. #define NAMELEN 256  /* Buffer length for a file name */
  95.