home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / 1990 / 12 / cheapcom.h < prev    next >
Text File  |  1990-07-05  |  3KB  |  115 lines

  1. /*    
  2.     
  3.     CheapComm Header File
  4.     By Don Gaspar
  5.     
  6.     MOOSE, Inc. (Macintosh Object-Oriented Software Engineering)
  7.     10866 Northridge Square
  8.     Cupertino, CA 95014
  9.     (408)252-7576
  10.     
  11.     Tuesday, April 17, 1990
  12.  
  13. */
  14.  
  15. #define    _WaitNextEvent                        0xA860
  16. #define    _UnimplementedToolTrap    0xA89F
  17. #define    _CommToolboxTrap                0x8B
  18. #define    _UnimplementedOSTrap        0x9F
  19.  
  20. #define    kSysEnvironsVersion                1
  21.  
  22. #define    kOSEvent                                    app4Evt
  23. #define    kSuspendResumeMessage    1
  24. #define    kResumeMask                            1
  25.  
  26. #define    kMinHeap                                    300*1024
  27. #define    kMinSpace                                10*1024
  28. #define    kBufferSize                                1*1024
  29.  
  30. #define    kExtremeNeg                            -32768
  31. #define    kExtremePos                            32767-1
  32.  
  33. #define    kDefaultTermTool                    "3TTY"
  34. #define kDefaultFTTool                            "4Text"
  35. #define    kDefaultConnTool                    "5Modem"
  36.  
  37. #define    cVScrollBar                                11
  38. #define    cHScrollBar                                10
  39.  
  40. #define    rMenuBar                                    128
  41. #define    rAboutAlert                                128
  42. #define    rUserAlert                                    129
  43. #define    rWindow                                    1
  44.  
  45. #define    mApple                                        128
  46. #define    iAbout                                            1
  47.  
  48. #define    mFile                                            129
  49. #define    iNew                                            1
  50. #define    iOpen                                            2
  51. #define    iClose                                        4
  52. #define    iSave                                            5
  53. #define    iSaveAs                                        6
  54. #define    iRevert                                        7
  55. #define    iSendFile                                    9
  56. #define    iReceiveFile                                10
  57. #define    iOpenCapture                            12
  58. #define    iAppendCapture                        13
  59. #define    iPageSetup                                15
  60. #define    iPrint                                            16
  61. #define    iQuit                                            18
  62.  
  63. #define    mEdit                                            130
  64. #define    iUndo                                            1
  65. #define    iCut                                                3
  66. #define    iCopy                                            4
  67. #define    iPaste                                            5
  68. #define    iClear                                            6
  69. #define    iSelectAll                                    7
  70. #define    iFind                                            9
  71. #define    iFindAgain                                    10
  72. #define    iRecallLast                                12
  73. #define    iShowClip                                    14
  74.  
  75. #define    mSettings                                    131
  76. #define    iConnection                                1
  77. #define    iFileTransfer                                2
  78. #define    iTerminal                                    3
  79.  
  80. #define    mPhone                                    132
  81. #define    iOpenConn                                1
  82. #define    iHangUp                                    3
  83. #define    iBreak                                        4
  84. #define    iSendXON                                    5
  85. #define    iSendXOFF                                6
  86.  
  87. #define    kDITop                                0x0050
  88. #define    kDILeft                                0x0070
  89.  
  90. #define HiWrd(aLong)    (((aLong) >> 16) & 0xFFFF)
  91. #define LoWrd(aLong)    ((aLong) & 0xFFFF)
  92.  
  93. #define TopLeft(aRect)    (* (Point *) &(aRect).top)
  94. #define BotRight(aRect)    (* (Point *) &(aRect).bottom)
  95.  
  96.  
  97. extern void _DataInit();
  98.  
  99. /* Here are declarations for all of the C routines. In MPW 3.0 we can use
  100.    actual prototypes for parameter type checking. */
  101.     void EventLoop( void );
  102.     void DoEvent( EventRecord *event );
  103.     void AdjustCursor( Point mouse);
  104.     void DoUpdate( WindowPtr window );
  105.     void DoActivate( WindowPtr window, Boolean becomingActive );
  106.     void AdjustMenus( void );
  107.     void DoMenuCommand( long menuResult );
  108.     Boolean DoCloseWindow( WindowPtr window );
  109.     void Terminate( void );
  110.     void Initialize( void );
  111.     Boolean IsAppWindow( WindowPtr window );
  112.     Boolean IsDAWindow( WindowPtr window );
  113.     void AlertUser(char *msg, Boolean fatal);
  114.     pascal long    TermSendProc(Ptr thePtr,long  theSize,long  refCon, short flags);
  115.