home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d952 / machv.lha / MachV / programmer.lha / headers / mach.h next >
C/C++ Source or Header  |  1993-12-17  |  20KB  |  490 lines

  1. #ifndef MACH_H
  2. #define MACH_H
  3.  
  4. /* $Log:    mach.h,v $
  5.  * Revision 37.002  93/10/14  08:48:00  Brian
  6.  * Release 5.0.
  7.  *
  8.  *
  9.  */
  10.  
  11. #include <ctype.h>
  12. #include <devices/input.h>
  13. #include <devices/inputevent.h>
  14. #include <dos/datetime.h>
  15. #include <exec/types.h>
  16. #include <exec/libraries.h>
  17. #include <exec/memory.h>
  18. #include <exec/ports.h>
  19. #include <exec/semaphores.h>
  20.  
  21.  
  22. /* Clock Types */
  23.  
  24. #define CLOCK_ONLY            0    /* hh:mm:ss */
  25. #define CLOCK_PLUSMEMORY    1    /* Chip xxxx Fast xxxxx   hh:mm:ss */
  26. #define CLOCK_MEMORYONLY    2    /* Chip xxxx Fast xxxxx */
  27. #define CLOCK_PLUSDATE        3    /* 03-16-93   hh:mm:ss */
  28. #define CLOCK_COORDS        4    /* xxx  yyy */
  29. #define CLOCK_COMMANDBAR    5    /* gadgets only! */
  30.  
  31. #define CLOCK_BORDER_RIGHT    0    /* size gadget uses border on right. Normal */
  32. #define CLOCK_BORDER_BOTTOM    1    /* size gadget uses bottom border */
  33. #define CLOCK_BORDERLESS    2    /* no border at all! */
  34.  
  35. #define KEYTASK    "KeyTask"        /* task name for "Select A Hotkey" */
  36. #define MACHV_REXX "MACHV_REXX"
  37.  
  38. #define UNKEYED                128    /* index for unkeyed macros */
  39. #define MAXKEYS                128    /* keycodes 0-127. 128 is unkeyed */
  40. #define MAX_CFG_TITLE        80    /* configuration title length */
  41. #define MAX_LIST_TITLE        15    /* list window title */
  42. #define MAX_LIST_STRINGBUF    14    /* string gadget under list gadget */
  43. #define MAX_MACRO_NAME        MAX_LIST_STRINGBUF    
  44. #define MAX_DIR_NAME        80    /* path to MachV.prefs */
  45. #define MAX_FILE_NAME        31    /* MachV.prefs */
  46. #define MAX_PASTE_APPEND    7    /* pasting prepend and append text */
  47. #define MAX_ALARM_COMMAND    80    /* length of command for CLK_ALARM to use */
  48. #define MAX_SETMACH_PATH    40    /* path to find SetMachV */
  49. #define MAX_CUSTOM_MESSAGE  30  /* largest message for the clock. inc. \0 */
  50.  
  51. #define MAX_VARIABLE        80    /* number of chars for ml_Variable */
  52. #define MAX_VARNAME            40    /* number of chars for ml_VarName */
  53.  
  54. #define MAX_AREXX_RESULT    80    /* max length of results returned */
  55.  
  56. #define MAX_NO_LAYERS        10    /* number of window titles to NOT layer */
  57.  
  58. #define DEFAULTS_SIZE        41    /* sizeof default cfg */
  59.  
  60. #define GAD_NOPOS             -1    /* clock gadget has no position yet */
  61.  
  62. /* The following are set in ml_GeneralEvent and then MachV is signaled.
  63.    Some must be send with PutMsg(). These are noted below. */
  64.  
  65. #define GE_BBLANK                0    /* blank the screen */
  66. #define GE_BUNBLANK                1    /* unblank it */
  67. #define GE_BBEEP                2    /* tell MachV to beep */
  68. #define GE_BKILLCLOCK            3    /* kill the clock */
  69. #define GE_BRUNCLOCK            4    /* run it */
  70. #define GE_BADDCONFIG            5    /* add new configuration. Use PutMsg() */
  71. #define GE_BDELCONFIG            6    /* del configuration. Use PutMsg() */
  72. #define GE_BSAVECONFIG            7    /* save configuration. Use PutMsg() */
  73. #define GE_BLOADCONFIG            8    /* load configuration. Use PutMsg() */
  74. #define GE_BSET_VARIABLE        9    /* set variable ml_VarName to ml_Variable */
  75. #define GE_BUPDATESETMACH        10    /* tell MachV to send update msg to interface */
  76. #define GE_BLOADBEEP            11    /* load a beep sound file. pathname in */
  77.                                     /* ml_BeepFileName */
  78. #define GE_BSCREENUP            12    /* tell MachV to tell interface to come */
  79.                                     /* to front and scroll up. */
  80. #define GE_BABORTPRINT            13    /* abort printing */
  81. #define GE_BDISPLAYTIME            14    /* display time (or message) in clock */
  82. #define GE_BFREEGADGETS            15    /* free clock gadgets */
  83. #define GE_BSET_MOUSE_PORT        16    /* set mouse port. port in mc_MousePort */
  84. #define GE_BNEWCONFIG            17    /* tell MachV to switch configurations */
  85. #define GE_BPRINTCLIP            18    /* print clipboard */
  86. #define GE_BUPDATE_PATTERNS        19    /* tell MachV to update its StringPatterns */
  87. #define GE_BTRACE                20    /* toggle tracing */
  88. #define GE_BNEW_WINDOW            21    /* tell MachV a new window is active */
  89. #define GE_BHOTKEY                22    /* tell MachV to do a hotkey */
  90. #define GE_BDO_VAR                23    /* set variable ml_VarName to ml_Variable */
  91.                                     /* Use PutMsg(). \0 as first char gets it. */
  92.                                     /* -1 as 1st char deletes the variable. */
  93.  
  94.            /* general event signals */
  95.  
  96. #define GE_BLANK                (1 << GE_BBLANK)
  97. #define GE_UNBLANK              (1 << GE_BUNBLANK)
  98. #define GE_BEEP                 (1 << GE_BBEEP)
  99. #define GE_KILLCLOCK            (1 << GE_BKILLCLOCK)
  100. #define GE_RUNCLOCK             (1 << GE_BRUNCLOCK)
  101. #define GE_ADDCONFIG            (1 << GE_BADDCONFIG)
  102. #define GE_DELCONFIG            (1 << GE_BDELCONFIG)
  103. #define GE_SAVECONFIG           (1 << GE_BSAVECONFIG)
  104. #define GE_LOADCONFIG           (1 << GE_BLOADCONFIG)
  105. #define GE_SET_VARIABLE         (1 << GE_BSET_VARIABLE)
  106. #define GE_UPDATESETMACH        (1 << GE_BUPDATESETMACH)
  107. #define GE_LOADBEEP             (1 << GE_BLOADBEEP)
  108. #define GE_SCREENUP             (1 << GE_BSCREENUP)
  109. #define GE_ABORTPRINT           (1 << GE_BABORTPRINT)
  110. #define GE_DISPLAYTIME          (1 << GE_BDISPLAYTIME)
  111. #define GE_FREEGADGETS          (1 << GE_BFREEGADGETS)
  112. #define GE_SET_MOUSE_PORT       (1 << GE_BSET_MOUSE_PORT)
  113. #define GE_NEWCONFIG            (1 << GE_BNEWCONFIG)
  114. #define GE_PRINTCLIP            (1 << GE_BPRINTCLIP)
  115. #define GE_UPDATE_PATTERNS      (1 << GE_BUPDATE_PATTERNS)
  116. #define GE_TRACE                (1 << GE_BTRACE)
  117. #define GE_NEW_WINDOW           (1 << GE_BNEW_WINDOW)
  118. #define GE_HOTKEY               (1 << GE_BHOTKEY)
  119. #define GE_DO_VAR               (1 << GE_BDO_VAR)
  120.  
  121. /* These are set in ml_MouseEvents and then MachV is signaled. The handler */
  122. /* usually is the only one that needs to set these. */
  123.  
  124. #define ME_BSUN            0    /* activate window under mouse */
  125. #define ME_BKEYSUN        1    /* activate window under mouse caused by keystroke */
  126. #define ME_BCLICKTF        2    /* move window under mouse to front */
  127. #define ME_BCYCLE        3    /* move window or screen under mouse to back */
  128. #define ME_BMOUSEOFF    4    /* turn mouse pointer off */
  129.  
  130. #define ME_SUN            (1 << ME_BSUN)
  131. #define ME_KEYSUN        (1 << ME_BKEYSUN)
  132. #define ME_CLICKTF        (1 << ME_BCLICKTF)
  133. #define ME_CYCLE        (1 << ME_BCYCLE)
  134. #define ME_MOUSEOFF        (1 << ME_BMOUSEOFF)
  135.  
  136.  
  137. /* SetMachV's screen flags. Set in ml_ScreenFlags  */
  138.  
  139. #define SF_WB            1        /* Open on Workbench */
  140. #define SF_CUSTOM        2        /* Open on custom screen */
  141. #define SF_LACE            4        /* Use interlaced custom screen */
  142. #define SF_SCROLL        8        /* Scroll up from bottom */
  143. #define SF_TITLEBAR        0x10    /* Show titlebar */
  144.  
  145.  
  146. /* ml_Trace flags. Set in ml_Trace */
  147.  
  148. #define TRACE_SERIAL  1
  149. #define TRACE_CONSOLE 2
  150.  
  151.  
  152. /* used to wakeup tasks or interface */
  153.  
  154. #define SIG_WAKEUP        SIGBREAKF_CTRL_F 
  155.  
  156.     /* mc_Flag flags */
  157.  
  158. #define MC_BSUNMOUSE        0        /* can sun? */
  159. #define MC_BKEYACTIVATE        1        /* do key activate? */
  160. #define MC_BMOUSETOMENU        2        /* allow mouse to menu? */
  161. #define MC_BMENU_WRAP        3        /* let mouse wrap around menus? */
  162. #define MC_BWINDOWCYCLE        4        /* window cycling? */
  163. #define MC_BAUTO_POPTOP     5        /* auto pop to front? */
  164. #define MC_BKEYCLICK        6        /* key clicking? */
  165. #define MC_BCLOCK            7        /* clock on? */
  166. #define MC_BVERTICALCLOCK    8        /* vertical clock? */
  167. #define MC_BCLOCKTOPWINDOW    9        /* clock can pop to top window? */
  168. #define MC_BCLOCKFLOAT        10        /* clock can float when screen scrolls? */
  169. #define MC_BCLOCK_GADGETS    11        /* clock has gadgets? */
  170. #define MC_BCLOCK_SECONDS    12        /* clock has seconds? */
  171. #define MC_BMETER            13        /* meter on? */
  172. #define MC_BSPLINES         14        /* splines blanking? */
  173. #define MC_BQUICKBLANK        15        /* quick blanking on? */
  174. #define MC_BSPEAKMESSAGES    16        /* speak messages? */
  175. #define MC_BDEBUG            17        /* debug mode? */
  176. #define MC_BBUTTONSWAP        18        /* swap left and right mouse buttons? */
  177. #define MC_BHOLDQUALS        19        /* hold qualifiers? */
  178. #define MC_BHOTKEYENABLED    20        /* hotkeys enabled? */
  179. #define MC_BSEND_UPKEYS      21        /* send up key after each down key? */
  180. #define MC_BNOCAPSLOCK      22        /* disabled caps lock key? */
  181. #define MC_BCLIP_REMOVELF    23        /* remove lf? */
  182. #define MC_BCLIP_CRLF        24        /* lf to crlf? */
  183. #define MC_BFREEZEVERT        25        /* no vertical movements? */
  184. #define MC_BFREEZEHORZ        26        /* no horz movements */
  185. #define MC_BKEYSOFF            27        /* no keys? */
  186. //#define MC_BBORDERLESS        28        /* no border? */
  187. //#define MC_BBORDERBOTTOM    29        /* border bottom */
  188.  
  189. #define MC_SUNMOUSE            (1 << MC_BSUNMOUSE)
  190. #define MC_KEYACTIVATE        (1 << MC_BKEYACTIVATE)
  191. #define MC_MOUSETOMENU        (1 << MC_BMOUSETOMENU)
  192. #define MC_MENU_WRAP        (1 << MC_BMENU_WRAP)
  193. #define MC_WINDOWCYCLE        (1 << MC_BWINDOWCYCLE)
  194. #define MC_AUTO_POPTOP         (1 << MC_BAUTO_POPTOP)
  195. #define MC_KEYCLICK            (1 << MC_BKEYCLICK)
  196. #define MC_CLOCK            (1 << MC_BCLOCK)
  197. #define MC_VERTICALCLOCK    (1 << MC_BVERTICALCLOCK)
  198. #define MC_CLOCKTOPWINDOW    (1 << MC_BCLOCKTOPWINDOW)
  199. #define MC_CLOCKFLOAT        (1 << MC_BCLOCKFLOAT)
  200. #define MC_CLOCK_GADGETS    (1 << MC_BCLOCK_GADGETS)
  201. #define MC_CLOCK_SECONDS    (1 << MC_BCLOCK_SECONDS)
  202. #define MC_METER            (1 << MC_BMETER)
  203. #define MC_SPLINES            (1 << MC_BSPLINES)
  204. #define MC_QUICKBLANK        (1 << MC_BQUICKBLANK)
  205. #define MC_SPEAKMESSAGES    (1 << MC_BSPEAKMESSAGES)
  206. #define MC_DEBUG            (1 << MC_BDEBUG)
  207. #define MC_BUTTONSWAP        (1 << MC_BBUTTONSWAP)
  208. #define MC_HOLDQUALS        (1 << MC_BHOLDQUALS)
  209. #define MC_HOTKEYENABLED    (1 << MC_BHOTKEYENABLED)
  210. #define MC_SEND_UPKEYS         (1 << MC_BSEND_UPKEYS)
  211. #define MC_NOCAPSLOCK        (1 << MC_BNOCAPSLOCK)
  212. #define MC_CLIP_REMOVELF    (1 << MC_BCLIP_REMOVELF)
  213. #define MC_CLIP_CRLF        (1 << MC_BCLIP_CRLF)
  214. #define MC_FREEZEVERT        (1 << MC_BFREEZEVERT)
  215. #define MC_FREEZEHORZ        (1 << MC_BFREEZEHORZ)
  216. #define MC_KEYSOFF            (1 << MC_BKEYSOFF)
  217. //#define MC_BORDERLESS        (1 << MC_BBORDERLESS)
  218. //#define MC_BORDERBOTTOM        (1 << MC_BBORDERBOTTOM)
  219.  
  220. /* Macro mo_Flags. These control action of individual macros */
  221.  
  222. #define MFLG_BAUTOEXEC        0    /* auto executing macro */
  223. #define MFLG_BGLOBAL        1    /* accessible from all configurations? */
  224. #define MFLG_BNONRECURSE    2    /* non-recursive */
  225. #define MFLG_BGADGET        3    /* has a gadget in the clock */
  226. #define MFLG_BRELATIVE        4    /* mouse moves relative to window le/te */
  227. #define MFLG_BTEMP            5    /* temporary? do not save */
  228. #define MFLG_BDISABLED        6    /* disabled? key passed through */
  229. #define MFLG_BWRITEPROT        7    /* write protected. cannot record over it */
  230. #define MFLG_BSUPPRESS_MSG    8    /* do not show Executing Macro */
  231. #define MFLG_BRESUME        9    /* macro resume execution */
  232. #define MFLG_BCOUNTDOWN        10    /* counting down (for "Later" alarms)  */
  233. #define MFLG_BREXXMACRO        11    /* macro came from arexx */
  234. #define MFLG_BWAIT_WINDOW    12    /* macro is waiting for a window */
  235. #define MFLG_BRECURSE          13    /* recursive. execute again */
  236. #define MFLG_BRESERVED2        14    /*  */
  237. #define MFLG_BRESERVED3        15    /*  */
  238. #define MFLG_BRESERVED4        16    /*  */
  239.  
  240. #define MFLG_AUTOEXEC        (1 << MFLG_BAUTOEXEC)
  241. #define MFLG_GLOBAL            (1 << MFLG_BGLOBAL)
  242. #define MFLG_NONRECURSE        (1 << MFLG_BNONRECURSE)
  243. #define MFLG_GADGET            (1 << MFLG_BGADGET)
  244. #define MFLG_RELATIVE        (1 << MFLG_BRELATIVE)
  245. #define MFLG_TEMP            (1 << MFLG_BTEMP)
  246. #define MFLG_DISABLED        (1 << MFLG_BDISABLED)
  247. #define MFLG_WRITEPROT        (1 << MFLG_BWRITEPROT)
  248. #define MFLG_SUPPRESS_MSG    (1 << MFLG_BSUPPRESS_MSG)
  249. #define MFLG_MACRO_TOGGLE    (1 << MFLG_BMACRO_TOGGLE)
  250. #define MFLG_RESUME            (1 << MFLG_BRESUME)
  251. #define MFLG_COUNTDOWN        (1 << MFLG_BCOUNTDOWN)
  252. #define MFLG_REXXMACRO        (1 << MFLG_BREXXMACRO)
  253. #define MFLG_WAIT_WINDOW    (1 << MFLG_BWAIT_WINDOW)
  254. #define MFLG_RECURSE        (1 << MFLG_BRECURSE)
  255.  
  256. /* Macro mo_Link.ln_Type */
  257.  
  258. #define NT_MACRO_SOLO       250        /* only executes when no others are waiting */
  259. #define NT_MACRO_RESUMEING    251        /* macro is resumeing execution */
  260. #define NT_MACRO_READY        252        /* ready to execute */
  261. #define NT_MACRO_RUNNING    253        /* is currently running */
  262. #define NT_MACRO_WAITING    254        /* is waiting */
  263.  
  264. /* ml_MachForbid Flags */
  265.  
  266. #define MF_NOHANDLER        0x8000    /* forbid all handler action */
  267.  
  268. /* Interface sends these mm_Commands to MachV.
  269.    mm_SubCommands are the general and mouse events listed above,
  270.    that is, GE_RUNCLOCK, GE_LOADCONFIG, ME_MOUSEOFF etc. 
  271. */
  272.  
  273. #define MACHV_GENERAL_EVENT    1
  274. #define MACHV_MOUSE_EVENT    2
  275.  
  276. /* MachV sends these mm_Commands to the interface */
  277.  
  278. #define IFACE_GOTKEY        1    /* if "KeyTask" is running and user clicked */
  279.                                 /* on clock gadget */
  280. #define IFACE_SCREENUP        2    /* interface screen front and up */
  281. #define IFACE_UPDATE        4    /* update interface gadgets */
  282. #define IFACE_DEBUG            8    /* debug msg. display malfunctioning hotkey */
  283.  
  284. /* with IFACE_UPDATE command, these mm_SubCommands */
  285.  
  286. #define UPDATE_CLIP_WINDOW    0x1
  287. #define UPDATE_CLOCK_WINDOW    0x2
  288. #define UPDATE_MFEAT_WINDOW    0x4
  289. #define UPDATE_MISC_WINDOW    0x8
  290. #define UPDATE_FLAGS_WINDOW    0x10
  291. #define UPDATE_MACROS        0x20
  292. #define UPDATE_ALL            0x40
  293.  
  294. /* CodeLetterTable is an array of IECODEs and the ascii letter used to 
  295.    represent it. E = ESC, D = Del, u = up arrow etc. Numerics are special
  296.    in that they change with the keyboard in use. When MachV is first run,
  297.    these are setup.
  298. */
  299.  
  300. #define CT_FIRST_NUMERIC    24    /* index into ml_CLTable 1st numeric */
  301. #define CT_LAST_NUMERIC        41    /* index for ml_CLTable last numeric */
  302.  
  303.  
  304. /* all locale text. ml_AppStrings will point to these */
  305.  
  306. #ifndef STRINGARRAY
  307. struct AppString
  308. {
  309.     LONG   as_ID;
  310.     STRPTR as_Str;
  311. };
  312. #endif
  313.  
  314. /* message to and from interface */
  315.  
  316. struct MachMessage {
  317.     struct Message    mm_Msg;
  318.     UWORD        mm_Command;        /* MACHV_GENERAL_EVENT, MACHV_MOUSE_EVENT, */
  319.                                 /* or IFACE_ command */
  320.     ULONG        mm_SubCommand;    /* the GE_ or ME_ event, or UPDATE_ command */
  321.     UWORD        mm_Code;        /* debug keycode */
  322.     UWORD        mm_Qualifier;    /* its qualifier */
  323.     UWORD        mm_MacroPos;    /* position in macro of error */
  324. };
  325.  
  326.  
  327. struct TaskInfo {
  328.   struct Task    *Task;
  329.   long           Sig;
  330. };
  331.  
  332. /* string and its wildcard pattern */
  333.  
  334. struct StringPattern {
  335.   char *sp_String;
  336.   STRPTR sp_Pattern;
  337. };
  338.  
  339. /* code and letter table. see above */
  340.  
  341. struct Code_Letter_Table {UBYTE  code;char letter;};
  342.  
  343. /* qualifier and letter table */
  344.  
  345. struct Qual_Letter_Table {UWORD  code;UWORD letter;};
  346.  
  347. /* Every macro has this struct */
  348.  
  349. struct MacroObject {
  350.   struct Node    mo_Link;        /* for key and execution list linking */
  351.   UWORD          mo_Position;    /* ordinal position (also long aligns) */
  352.   long           mo_Size;        /* size of macro (including \0) */
  353.   char            *mo_Macro;        /* the macro string! */
  354.   char          *mo_ResumePos;    /* position in macro to resume at */
  355.   APTR          *mo_Owner;        /* config owner or ARexx message ptr */
  356.   char           mo_Name[MAX_MACRO_NAME]; /* mo_Link.ln_Name points here */
  357.   UWORD          mo_Flags;        /* see MFLG_ above */
  358.   UWORD          mo_Qual;        /* hotkey qualifier for this macro */
  359.   UWORD          mo_Code;        /* hotkey code */
  360.   WORD           mo_ExeCnt;        /* number of times this macro has executed */
  361.   WORD           mo_DelayCnt;    /* how long to delay before re-executing */
  362.   BYTE             mo_ErrorCode;    /* this macro's error code */
  363.   WORD           mo_LE;            /* only relevant when MFLG_GADGET is set. */
  364.   WORD           mo_TE;            /*   " */
  365.   UWORD          mo_GID;        /* (mo_Code << 8) | mo_Qual */
  366. };
  367.  
  368. /* every configuration has one of these structs */
  369.  
  370. struct MachCfg {
  371.   struct Node         mc_Link;
  372.   struct List         mc_Hotkeys[MAXKEYS+1]; /* the configs hotkeys */
  373.   struct Gadget        *mc_CustomGadgets; /* list of gadgets for clock */
  374.   char  mc_Title[MAX_CFG_TITLE]; /* to match window, screen or program name */
  375.   char  mc_Append[MAX_PASTE_APPEND+1];  /* text to append when pasting*/
  376.   char  mc_Prepend[MAX_PASTE_APPEND+1]; /* text to prepend */
  377.   char  mc_ClockFont[MAX_FILE_NAME]; /* null for default font */
  378.   ULONG mc_Clocksignature;    /* signature using leftedge, topedge, type etc. */
  379.   WORD  mc_Cost;            /* clock meter cost or time in minutes */
  380.   WORD  mc_Position;        /* ordinal number of configuration. */
  381.   WORD  mc_Registered;        /* 43 for registered version 4.3 */
  382.   WORD  mc_Accel;            /* acceleration -9 to 9 */
  383.   WORD  mc_Threshold;        /* acceleration threshold 0 to 9 */
  384.   WORD  mc_Clickstofront;    /* number of clicks required */
  385.   WORD  mc_Clockle;            /* clock left edge */
  386.   WORD  mc_Clockte;
  387.   WORD  mc_Clockwidth;
  388.   WORD  mc_Clockheight;
  389.   WORD  mc_Altle;            /* alternate (zoomed) left edge */
  390.   WORD  mc_Altte;
  391.   WORD  mc_Altwidth;
  392.   WORD  mc_Altheight;
  393.   WORD  mc_Timele;            /* left edge for time */
  394.   WORD  mc_Timete;            /* top edge for time */
  395.   WORD  mc_Timetext;        /* time pen for clock */
  396.   WORD  mc_Timeback;        /* background pen */
  397.   WORD  mc_Datedelay;        /* delay in seconds to show date */
  398.   WORD  mc_Lowmem;            /* low memory alert in kbytes */
  399.   WORD  mc_Hours;            /* 12 or 24 */
  400.   WORD  mc_Rate;            /* rate for meter */
  401.   WORD  mc_Blankdelay;        /* delay in seconds */
  402.   WORD  mc_Blanklevel;        /* 0 to 15 */
  403.   WORD  mc_Mouseoffdelay;    /* delay in seconds */
  404.   WORD  mc_Normalpriority;    /* -127 to 127 */
  405.   WORD  mc_Playbackpriority;
  406.   WORD  mc_Playdelay;        /* delay between mouse moves during playback in 50ths */
  407.   WORD  mc_Buffersize;        /* buffer size when recording */
  408.   WORD  mc_Chardelay;        /* delay in 50ths of sec. when pasting*/
  409.   WORD  mc_Linedelay;
  410.   UWORD mc_MMB;                /* qualifiers to substitute for mmb */
  411.   WORD  mc_MousePort;        /* 0 or 1 */
  412.   WORD  mc_BeepVolume;        /* 0-64 */
  413.   WORD  mc_KeyClickVolume;    /* 0-64 */
  414.   WORD  mc_Clocktype;          /* CLOCK_ONLY, CLOCK_PLUSMEMORY etc. */
  415.   WORD  mc_ClockBorder;      /* CLOCK_BORDERLESS, CLOCK_BORDER_RIGHT etc. */
  416.   WORD  mc_DateFormat;         /* FORMAT_DOS, FORMAT_INT, FORMAT_USA, FORMAT_CDN */
  417.   WORD  mc_DateSeparator;    /* -, /, . etc. */
  418.   WORD  mc_NextLE;  /* left edge for next gadget to be added */
  419.   WORD  mc_NextTE;
  420.   WORD  mc_Pad;     /* ensure longword alignment from mc_Registered! */
  421.   ULONG mc_Flags;    /* sunmouse, cycle, clock on, etc */
  422.   struct StringPattern mc_SunWindows;    /* for windows that this will work in */
  423.   struct StringPattern mc_KeyActWindows;
  424.   struct StringPattern mc_AutoPopWindows;
  425.   struct StringPattern mc_CycleWindows;
  426.   struct StringPattern mc_MTMWindows;
  427.   struct StringPattern mc_MenuWrapWindows;
  428.   struct StringPattern mc_ClickWindows;
  429.   struct StringPattern mc_ClockScreens;
  430. };
  431.  
  432. /* the library base. Everything is accessible from here */
  433.  
  434. struct MachLibrary {
  435.   struct       Library ml_Lib;
  436.   ULONG        ml_SegList;
  437.   ULONG        ml_Flags;
  438.   APTR         ml_ExecBase;
  439.   struct SignalSemaphore ml_BaseSemaphore; /* Semaphore to Obtain/Release */
  440.   struct List         ml_ConfigHead;     /* The first configuration */
  441.   struct MachCfg     *ml_CurConfig;        /* The current configuration */
  442.   struct List       *ml_MacroQueue;     /* Macros executing or waiting. */
  443.   struct MsgPort    *ml_MsgPort;        /* MachV receives msgs here */
  444.   struct Window     *ml_ClockWindow;    /* NULL if no clock */
  445.   struct Window     *ml_InterfaceWindow;/* Pointer to interface window. */
  446.   struct Window     *ml_ListWindow;        /* List window pointer if open */
  447.   struct MsgPort    *ml_Interface_Port;    /* Interface receives msgs here */
  448.   struct TaskInfo    ml_MachV_Task;        /* MachV itself! */
  449.   struct TaskInfo    ml_Interface_Task;    /* User interface task */
  450.   struct Task       *ml_List_Task;        /* Task spawned by mach.library */
  451.   struct Task       *ml_ScrCloseTask;    /* Task currently closing a screen */
  452.   struct AppString  *ml_AppStrings;        /* All text (localized) */
  453.   struct Code_Letter_Table *ml_CLTable;    /* iecodes and their letters */
  454.   char *ml_ListSelection;                /* last list selection */
  455.   char *ml_TempMacroBuffer;            /* ptr to recording buffer */
  456.   char *ml_Variable;                /* ptr to buffer MAX_VARIABLE in len */
  457.   char *ml_VarName;                    /* ptr to name of variable */
  458.   char *ml_RegName;                    /* ptr to registered users name/num */
  459.   char *ml_Interface_Path;            /* path to interface */
  460.   char  ml_PrefsDirName[MAX_DIR_NAME];  /* path to prefs */
  461.   char  ml_PrefsFileName[MAX_FILE_NAME];/* name of pref file */
  462.   char  ml_BeepFileName[MAX_DIR_NAME+MAX_FILE_NAME];
  463.   char  ml_AlarmCommand[MAX_ALARM_COMMAND]; /* default echo >speak: */
  464.   ULONG ml_MouseEvent;        /* MachV mouse events */
  465.   ULONG ml_GeneralEvent;    /* MachV other events */
  466.   ULONG ml_ReqKeyQual;        /* -1 = request key/qualifier from MachV */
  467.   UWORD ml_GVF_Flags;        /* Flags for env variables. def = GVF_LOCAL_ONLY */
  468.   WORD  ml_MachForbid;        /* Forbid the handler from doing anything! */
  469.   WORD  ml_Recording;        /* Currently recording a macro. */
  470.   WORD  ml_SuspendAll;        /* Suspend MachV */
  471.   WORD  ml_HandlerPri;        /* priority of interrupt handler */
  472.   UWORD ml_Trace;            /* Trace options. TRACE_SERIAL or TRACE_CONSOLE */
  473.   UWORD ml_ScreenFlags;        /* SetMachV screen types desired */
  474.   char *ml_TodaysDate;      /* e.g. 03-25-93 (updated every second) */
  475.   char *ml_TodaysTime;      /* e.g. 17:45:29 (updated every second) */
  476.   WORD  ml_Smle;            /* Left/Top edges of SetMachV windows */
  477.   WORD  ml_Smte;
  478.   WORD  ml_Cliple;
  479.   WORD  ml_Clipte;
  480.   WORD  ml_Mfeatle;
  481.   WORD  ml_Mfeatte;
  482.   WORD  ml_Cfeatle;
  483.   WORD  ml_Cfeatte;
  484.   WORD  ml_Miscle;
  485.   WORD  ml_Miscte;
  486. };
  487.  
  488. #endif
  489.  
  490.