home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / source / browser / browser.hqx / Browser / go.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-05  |  2.9 KB  |  136 lines

  1. #define NDEBUG            /* I'm building a production copy -- ctm */
  2.  
  3. #include <stdio.h>
  4. #include "iconcontrol.h"
  5.  
  6. enum
  7.   {
  8.     new_folder_menuid = 1,
  9.     open_menuid,
  10.     print_menuid,
  11.     close_menuid,
  12.     save_menuid,
  13.     unused,
  14.     delete_menuid,
  15.     duplicate_menuid,
  16.     get_info_menuid,
  17.     rename_menuid,
  18.     send_to_hotband_menuid,
  19.     unused_2,
  20.     check_for_disk_menuid,
  21.     eject_menuid,
  22.     unused_3,
  23.     format_menuid,
  24.     unused_4,
  25.     quit_menuid
  26.   };
  27.  
  28. #define    MAXDRIVENUM        15
  29. #define DIRBIT            (1 << 4)
  30. #define    ICONTABLESIZE    91
  31. #define SIGARRAYSIZE    41
  32. #define TEXTEDITORPOS    (SIGARRAYSIZE)
  33. #define HOTBANDRESID    200
  34. #define ABOUTDIALOG        201
  35. #define BANDARRAYSIZE    50
  36. #define CREATOR            'GOGO'
  37. #define GOMBARID        128
  38. #define FIRSTMENU        300
  39. #define FILEMENU        301
  40. #define EDITMENU        302
  41. #define VIEWMENU        303
  42. #define SCROLLBARWIDTH    16
  43. #define SCROLLSPEED        9
  44. #define    DEFAULTEDITORSTRINGID    201
  45.  
  46. #define COPYCURSORID        128
  47. #define    MOVECURSORID        129
  48.  
  49. #define    GONAME                "\pgo.appl"
  50. #define GOSAVEFILE            "godata.sav"
  51. #define GOBACKUPFILE        "godata.bak"
  52. #define HELPER_FILE_NAME    ((StringPtr) "\psystem.ard")
  53.  
  54. #define NELEM(x) (sizeof(x) / sizeof((x)[0]))
  55.  
  56. enum actions
  57.   {
  58.     LAUNCH,
  59.     OPENDIR,
  60.     LAUNCHCREATOR,
  61.     OPENDA,
  62.     NOACTION
  63.   };
  64.  
  65.  
  66. typedef struct
  67.   {
  68.     short localid;
  69.     short resid;
  70.   }
  71. identry;
  72.  
  73. typedef struct
  74.   {
  75.     OSType filetype;
  76.     short band;
  77.     short action;
  78.     short iconid;
  79.     icontableentry **iconh;
  80.   }
  81. typeinfo;
  82.  
  83. typedef struct _applist
  84.   {
  85.     short vrefnum;
  86.     long parid;
  87.     Str255 name;
  88.     OSType sig;
  89.     struct _applist **next;
  90.   }
  91. applist;
  92.  
  93. extern applist **sigowners[TEXTEDITORPOS + 1];
  94. extern typeinfo typearray[];
  95.  
  96. /* used to determine if a control is an icon control */
  97. extern Handle g_iconcdefproc;
  98.  
  99. /* someday more than one item may be selected so make g_selection look like a handle */
  100. extern ControlHandle (**g_selection)[];
  101.      
  102. /* time until screensaver kicks in in sixtieths of seconds */
  103. extern long g_screensavetime;
  104.      
  105. extern long g_lastclick;
  106.  
  107. /* Pointer to the "hotband", the special window at the top of the screen */
  108. extern DialogPtr g_hotband;
  109.  
  110. extern icontableentry **icontable[ICONTABLESIZE];
  111. extern short g_currentband;
  112. extern short g_done;
  113. extern TEHandle g_currenttitle;
  114. extern short g_helper_file_rn;
  115.  
  116. extern CCrsrHandle g_movecursor, g_copycursor;
  117.  
  118. extern int executor_p (void); /* returns 1 iff running under Executor */
  119.  
  120. /*
  121.  * Fun Executor trickery (kids, we are trained professionals; don't try this at home)
  122.  *
  123.  * unixcd is needed because under Executor, we could be traversing a mount point.
  124.  * When that happens, Executor needs to internally "mount" the new filesystem and we need
  125.  * to update our vrefnum.
  126.  *
  127.  * NOTE: this code will cause any version of Executor prior to 1.99m to crash.
  128.  */
  129.  
  130. pascal OSErr unixmount (CInfoPBRec * cpbp) =
  131. {
  132.   0x2078, 0x0058, 0x2068, 0x0020, 0x4e90
  133. };
  134.  
  135. #define flush_screen_writes() do { EventRecord evt; GetNextEvent (0, &evt); } while (0)
  136.