home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / MacPerl5 / MPAppleEvents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-17  |  2.9 KB  |  105 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. #ifdef EVIL_USELESS_EDITIONS
  34. #include <Editions.h>
  35. #endif
  36. #include <Printing.h>
  37. #include <AppleEvents.h>
  38. #include <Processes.h>
  39.  
  40. #ifndef __MPGLOBALS__
  41. #include <MPGlobals.h>
  42. #endif
  43.  
  44. enum {
  45.  
  46. ETX = 0x03, /* Enter key on keyboard or keypad */
  47. BS  = 0x08, /* Backspace key on keyboard       */
  48. HT  = 0x09, /* Tab key on keyboard             */
  49. CR  = 0x0D, /* Return key on keyboard          */
  50. ESC = 0x1B, /* Clear key on keypad             */
  51. FS  = 0x1C, /* Left arrow key on keypad        */
  52. GS  = 0x1D, /* Right arrow key on keypad       */
  53. RS  = 0x1E, /* Up arrow key on keypad          */
  54. US  = 0x1F  /* Down arrow key on keypad        */
  55. };
  56.  
  57. pascal Boolean AllSelected(TEHandle te);
  58. pascal void InitAppleEvents(void);
  59. pascal void DoAppleEvent(EventRecord theEvent);
  60. pascal OSErr MakeSelfAddress(AEAddressDesc *selfAddress);
  61. pascal OSErr MakeSelfPSN(ProcessSerialNumber *selfPSN);
  62.  
  63. /*
  64.     Text Commands
  65. */
  66. pascal void IssueCutCommand(DPtr theDocument);
  67. pascal void IssueCopyCommand(DPtr theDocument);
  68. pascal void IssuePasteCommand(DPtr theDocument);
  69. pascal void IssueClearCommand(DPtr theDocument);
  70. pascal void IssueFormatCommand(DPtr theDocument);
  71.  
  72. /*
  73.     Window Commands
  74. */
  75.  
  76. pascal void IssueZoomCommand(WindowPtr whichWindow, short whichPart);
  77. pascal void IssueCloseCommand(WindowPtr whichWindow);
  78. pascal void IssueSizeWindow(WindowPtr whichWindow, short newHSize,short newVSize);
  79. pascal void IssueMoveWindow(WindowPtr whichWindow, Rect sizeRect);
  80. pascal void IssuePageSetupWindow(WindowPtr whichWindow, TPrint thePageSetup);
  81. pascal void IssueShowBorders(WindowPtr whichWindow, Boolean showBorders);
  82. pascal void IssuePrintWindow(WindowPtr whichWindow);
  83.  
  84. /*
  85.     Document Commands
  86. */
  87.  
  88. pascal OSErr IssueJumpCommand(FSSpec * file, WindowPtr win, short line);
  89. pascal OSErr IssueAEOpenDoc(FSSpec myFSSpec);
  90. pascal void  IssueAENewWindow(void);
  91. pascal OSErr IssueSaveCommand(DPtr theDocument, FSSpecPtr where);
  92. pascal OSErr IssueRevertCommand(WindowPtr theWindow);
  93. pascal OSErr IssueQuitCommand(void);
  94. pascal void IssueCreatePublisher(DPtr whichDoc);
  95.  
  96. pascal void EnforceMemory(DPtr theDocument, TEHandle theHTE);
  97.  
  98. /*
  99.     Recording of Keystrokes
  100. */
  101.  
  102. pascal void AddKeyToTypingBuffer(DPtr theDocument, char theKey);
  103. pascal void FlushAndRecordTypingBuffer(void);
  104.  
  105. #endif