home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / lowramde.txt < prev    next >
Encoding:
Text File  |  1992-11-05  |  6.4 KB  |  180 lines

  1.  
  2. /*
  3.  *  C definitions for *all* of the toolbox global variables.
  4.  *  Variables are listed in the order in which they occur in memory.
  5.  *
  6.  *  Adapted from toolequ.text, the user interface toolbox equate file by
  7.  *    Doug Moen (watmath!watcgl!kdmoen)
  8.  *    University of Waterloo Computer Graphics Lab
  9.  *    June 1985
  10.  */
  11.  
  12.  
  13. #define toolVars ((Ptr)0x980)           /* base address of toolbox globals */
  14. #define toolEnd ((Ptr)0xAFC)    /* address of first byte past end */
  15.  
  16.  
  17. /*
  18.  *
  19.  * font manager globals
  20.  *
  21.  */
  22.  
  23. #define romFont0 (*(FontRec** *)0x980)  /* handle to rom-based system font */
  24. #define apFontID (*(short *)0x984)      /* family id of standard application font */
  25. #define gotStrike (*(char *)0x986)      /* boolean indicating if we've got the strike */
  26. #define fmDefaultSize (*(char *)0x987)  /* byte holding default size */
  27. #define curFMInput (*(FMInput *)0x988)  /* quickdraw fminput record */
  28. #define fMgrOutRec (*(FMOutput *)0x998) /* quickdraw fontoutput record */
  29. /*
  30.  * The next 2 variables constitute the 28 byte
  31.  * font characterization table for the current device.
  32.  */
  33. #define fmDotsPerInch (*(Point *)0x9B2) /* v,h dotsperinch of current device */
  34. #define fmStyleTab ((char *)0x9B6)      /* 24 byte style heuristic table */
  35. #define toolScratch ((char *)0x9CE)     /* 8 byte scratch area */
  36.  
  37.  
  38. /*
  39.  *
  40.  * window manager globals
  41.  *
  42.  */
  43.  
  44. #define windowList (*(WindowPeek *)0x9D6) /* z-ordered list of windows (nearest first) */
  45. #define saveUpdate (*(short *)0x9DA)    /* boolean enabling update accumulation */
  46. #define paintWhite (*(short *)0x9DC)    /* boolean enabling erasing newly drawn windows */
  47. #define wMgrPort (*(GrafPtr *)0x9DE)    /* grafport used by window manager */
  48. #define deskPort (*(GrafPtr *)0x9E2)    /* wide open port for use by applications */
  49. #define oldStructure (*(RgnHandle *)0x9E6) /* handle to saved structure region */
  50. #define oldContent (*(RgnHandle *)0x9EA) /* handle to saved content region */
  51. #define grayRgn (*(RgnHandle *)0x9EE)   /* handle of rounded gray desk region */
  52. #define saveVisRgn (*(RgnHandle *)0x9F2) /* handle of temporarily saved vis region */
  53. #define dragHook (*(ProcPtr *)0x9F6)    /* proc ptr to allow user control during dragging */
  54. #define tempRect (*(Rect *)0x9FA)       /* rectangle used as scratch by toolbox */
  55. #define oneOne (*(long *)0xA02) /* long constant /00010001 */
  56. #define minusOne (*(long *)0xA06)       /* long constant /ffffffff */
  57.  
  58.  
  59. /*
  60.  * general purpose bitmap for plotting bitmaps
  61.  */
  62.  
  63. #define iconBitMap (*(BitMap *)0xA0E)   /* bitmap used for plotting things */
  64.  
  65.  
  66. /*
  67.  *
  68.  * menu manager globals
  69.  *
  70.  */
  71.  
  72. #define MenuList (*(Handle *)0xA1C)     /* pointer to current menubar list structure */
  73. #define MBarEnable (*(short *)0xA20)    /* word for enabling menubar for deskorns */
  74. #define curDeKind (*(short *)0xA22)     /* kind of deactivated window */
  75. #define MenuFlash (*(short *)0xA24)     /* integer holding flash feedback count */
  76. #define TheMenu (*(short *)0xA26)       /* integer holding id of hilited menu */
  77. #define savedHandle (*(Handle *)0xA28)  /* handle of saved menubits */
  78. #define mrMacHook (*(ProcPtr *)0xA2C)   /* hook for mr. macintosh */
  79. #define MenuHook (*(ProcPtr *)0xA30)    /* hook for user control during menuselect */
  80.  
  81.  
  82. /*
  83.  *  control manager globals
  84.  */
  85.  
  86. #define dragPattern (*(Pattern *)0xA34) /* pattern dragthergn uses */
  87. #define deskPattern (*(Pattern *)0xA3C) /* pattern to paint the desk with */
  88. #define dragFlag (*(short *)0xA44)      /* implicit parameter to dragcontrol, 1 word */
  89. #define curDragAction (*(long *)0xA46)  /* implicit actionproc parameter */
  90.  
  91.  
  92. /*
  93.  *  floating point package globals
  94.  *  first 2 bytes: mode and flag bits
  95.  *  next 4 bytes: user trap address
  96.  */
  97.  
  98. #define fpState ((Ptr)0xA4A)    /* 6 bytes of floating point state */
  99. #define fpFlags (*(short *)0xA4A)
  100. #define fpTrap (*(ProcPtr *)0xA4C)
  101.  
  102.  
  103. /*
  104.  *
  105.  * resource manager globals
  106.  *
  107.  */
  108.  
  109. #define TopMapHndl (*(Handle *)0xA50)   /* handle to topmost map of list */
  110. #define SysMapHndl (*(Handle *)0xA54)   /* handle to system map */
  111. #define SysMap (*(short *)0xA58)        /* reference number of system map */
  112. #define CurMap (*(short *)0xA5A)        /* reference number of current map */
  113. #define ResReadOnly (*(short *)0xA5C)   /* readonly flag */
  114. #define ResLoad (*(short *)0xA5E)       /* auto-load feature */
  115. #define ResErr (*(short *)0xA60)        /* resource error code */
  116.  
  117.  
  118. /*
  119.  *
  120.  *  misc toolbox globals
  121.  *
  122.  */
  123.  
  124. #define taskLock (*(char *)0xA62)       /* flag to prevent re-entering systemtask */
  125. #define fScaleDisable (*(char *)0xA63)  /* flag to disable font scaling */
  126. #define curActivate (*(WindowPtr *)0xA64) /* window to receive activate event */
  127. #define curDeactive (*(WindowPtr *)0xA68) /* window to receive deactivate event */
  128. #define deskHook (*(ProcPtr *)0xA6C)    /* hook for painting the desk */
  129.  
  130. #define teDoText (*(ProcPtr *)0xA70)    /* text edit private hook */
  131. #define teRecal (*(ProcPtr *)0xA74)     /*  "" */
  132.  
  133. #define microSoft ((Ptr)0xA78)          /* 12 bytes for our friends in seattle */
  134. #define ghostWindow (*(WindowPtr *)0xA84) /* window that frontwindow ignores */
  135. #define closeOrnHook (*(ProcPtr *)0xA88) /* hook for closing desk ornaments */
  136.  
  137.  
  138. /*
  139.  *
  140.  * alert/dialog manager globals
  141.  *
  142.  */
  143.  
  144. #define RestProc (*(ProcPtr *)0xA8C)    /* address of restart failsafe procedure */
  145. #define saveProc (*(ProcPtr *)0xA90)    /* address of save failsafe procedure */
  146. #define saveSP (*(ProcPtr *)0xA94)      /* safe sp for restart or save */
  147. #define ANumber (*(short *)0xA98)       /* which alert is active? */
  148. #define ACount (*(short *)0xA9A)        /* how many times this alert called? */
  149. #define DABeeper (*(ProcPtr *)0xA9C)    /* beep routine */
  150. #define DAStrings ((Handle *)0xAA0)     /* array of 4 handles to ParamText strings */
  151.  
  152.  
  153. /*
  154.  *
  155.  * textedit globals
  156.  *
  157.  */
  158.  
  159. #define teScrpLength (*(long *)0xAB0)
  160. #define teScrpHandle (*(Handle *)0xAB4)
  161.  
  162.  
  163. /*
  164.  * application package dispatch table -- 8 longwords
  165.  */
  166.  
  167. #define appPacks ((Handle *)0xAB8)      /* handle to math code */
  168.  
  169.  
  170. /*
  171.  * misc stuff (last minute additions)
  172.  */
  173.  
  174. #define SysResName ((char *)0xAD8)      /* name of system file (20 bytes) */
  175. #define appParmHandle (*(Handle *)0xAEC) /* handle to hold application parameters */
  176. #define DSErrCode (*(short *)0xAF0)     /* last deep shit alert id */
  177. #define ResErrProc (*(ProcPtr *)0xAF2)  /* resource error proc. */
  178. #define teWdBreak (*(ProcPtr *)0xAF6)   /* default word break routine */
  179. #define DlgFont (*(short *)0xAFA)       /* default dialog font */
  180.