home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / M / MacPerl 4.13 source.sit / Perl Source ƒ / MacPerl / MPAppleEvents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-27  |  2.8 KB  |  108 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl                    -    Real Perl Application
  3. File        :    MPAppleEvents.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPAppleEvents.h,v $
  12. Revision 1.1  1994/02/27  23:02:47  neeri
  13. Initial revision
  14.  
  15. Revision 0.3  1993/08/28  00:00:00  neeri
  16. IssueFormatCommand
  17.  
  18. Revision 0.2  1993/05/30  00:00:00  neeri
  19. Support Console Windows
  20.  
  21. Revision 0.1  1993/05/29  00:00:00  neeri
  22. Compiles correctly
  23.  
  24. *********************************************************************/
  25.  
  26. #ifndef __MPAPPLEEVENTS__
  27. #define __MPAPPLEEVENTS__
  28.  
  29. #include <Types.h>
  30. #include <QuickDraw.h>
  31. #include <Packages.h>
  32. #include <GestaltEqu.h>
  33. #include <Editions.h>
  34. #include <Printing.h>
  35. #include <AppleEvents.h>
  36.  
  37. #ifndef __MPGLOBALS__
  38. #include <MPGlobals.h>
  39. #endif
  40.  
  41. enum {
  42.  
  43. ETX = 0x03, /* Enter key on keyboard or keypad */
  44. BS  = 0x08, /* Backspace key on keyboard       */
  45. HT  = 0x09, /* Tab key on keyboard             */
  46. CR  = 0x0D, /* Return key on keyboard          */
  47. ESC = 0x1B, /* Clear key on keypad             */
  48. FS  = 0x1C, /* Left arrow key on keypad        */
  49. GS  = 0x1D, /* Right arrow key on keypad       */
  50. RS  = 0x1E, /* Up arrow key on keypad          */
  51. US  = 0x1F  /* Down arrow key on keypad        */
  52. };
  53.  
  54. pascal Boolean AllSelected(TEHandle te);
  55. pascal void InitAppleEvents(void);
  56. pascal void DoAppleEvent(EventRecord theEvent);
  57.  
  58. #ifndef RUNTIME
  59. pascal OSErr MakeSelfAddress(AEAddressDesc *selfAddress);
  60. #endif
  61.  
  62. /*
  63.     Text Commands
  64. */
  65. pascal void IssueCutCommand(DPtr theDocument);
  66. pascal void IssueCopyCommand(DPtr theDocument);
  67. pascal void IssuePasteCommand(DPtr theDocument);
  68. pascal void IssueClearCommand(DPtr theDocument);
  69. pascal void IssueFormatCommand(DPtr theDocument);
  70.  
  71. /*
  72.     Window Commands
  73. */
  74.  
  75. pascal void IssueZoomCommand(WindowPtr whichWindow, short whichPart);
  76. pascal void IssueCloseCommand(WindowPtr whichWindow);
  77. pascal void IssueSizeWindow(WindowPtr whichWindow, short newHSize,short newVSize);
  78. pascal void IssueMoveWindow(WindowPtr whichWindow, Rect sizeRect);
  79. pascal void IssuePageSetupWindow(WindowPtr whichWindow, TPrint thePageSetup);
  80. pascal void IssueShowBorders(WindowPtr whichWindow, Boolean showBorders);
  81. pascal void IssuePrintWindow(WindowPtr whichWindow);
  82.  
  83. /*
  84.     Document Commands
  85. */
  86. pascal OSErr IssueAEOpenDoc(FSSpec myFSSpec);
  87. pascal void  IssueAENewWindow(void);
  88. pascal OSErr IssueSaveCommand(WindowPtr theWindow, FSSpecPtr where);
  89.  
  90. pascal OSErr IssueRevertCommand(WindowPtr theWindow);
  91. pascal OSErr IssueQuitCommand(void);
  92.  
  93. #ifndef RUNTIME
  94. pascal void IssueCreatePublisher(DPtr whichDoc);
  95. #endif
  96.  
  97. pascal void EnforceMemory(DPtr theDocument, TEHandle theHTE);
  98.  
  99. #ifndef RUNTIME
  100. /*
  101.     Recording of Keystrokes
  102. */
  103.  
  104. pascal void AddKeyToTypingBuffer(DPtr theDocument, char theKey);
  105. pascal void FlushAndRecordTypingBuffer(void);
  106. #endif
  107.  
  108. #endif