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