home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 408.lha / MyMenu_v1.1 / sources / MyMenu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-04  |  1.2 KB  |  54 lines

  1. /* Copyright (c) Darin Johnson, 1989 */
  2.  
  3. /* MyMenu.h                        */
  4. /* Modified by John Baker, 1990    */
  5.  
  6. #define VERSION "MyMenu v1.1"
  7.  
  8. #define MYMENU_NAME "MyMenu"
  9. #define WBPORT_NAME "MyMenu-WBPort"
  10.  
  11. #define DO_WB
  12. /* #define DO_PATH    - should work but not tested */
  13. /* #define DO_AREXX     - future plans... */
  14.  
  15. #define SEPARATE 23    /* distance between menus */  /***** WAS 32 *****/
  16. #define STACK 4096    /* 2048 is too small */
  17.  
  18. struct ext_MenuItem {
  19.   struct MenuItem MenuItem;
  20.   struct ext_MenuItem *next_item;
  21.   ULONG id;
  22.   char *cmd;
  23.   char *args;
  24.   char type;
  25. };
  26.  
  27. struct Path {
  28.   struct Path *path_Next;
  29.   BPTR path_Lock;
  30. };
  31.  
  32. /* would declare whole thing 'volatile' if allowed */
  33. struct MMData {
  34.   struct MsgPort port;
  35.   struct ext_MenuItem *item_list;
  36.   struct Menu *my_menu, *prev_menu, *WBMenu;
  37.   struct Window *WBWindow;
  38.   struct Task *handler_task, *parent_task;
  39.   USHORT parent_sig, handler_sig;
  40.   char error_code;
  41.   long segment;    /* defined as long, since Manx is picky */
  42.   struct Path *CLI_path;        /* copy of CLI path */
  43. };
  44.  
  45. extern struct MMData *MM;
  46. extern struct ext_MenuItem *add_menu();
  47.  
  48. /* error codes */
  49. #define ERR_OK        0
  50. #define ERR_LIB        1
  51. #define ERR_WIN        2
  52. #define ERR_MON        3
  53. #define ERR_WB_OPEN    4
  54.