home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1999 May / Software of the Month - Ultimate Collection Shareware 261.iso / mac / Business / YellowEdit / Yellow Extension Toolkit / YE proto.h < prev    next >
Encoding:
Text File  |  1998-09-11  |  3.1 KB  |  85 lines  |  [TEXT/CWIE]

  1. //ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  2. //    YELLOW EXTENSION TOOLKIT
  3. //    File Name:    YE proto.h
  4. //    ⌐ 1998 by Rocco Moliterno    
  5. //ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  6.  
  7. #pragma once
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. #define kYellowExtensionType    'ExRo'    
  14. #define kYellowExtensionCreator '/RoW'    
  15. #define kYellowCodeResTypePPC    'YeEx'    
  16. #define kYellowCodeResType68k    'Ye68'    
  17. #define kYellowCodeResID         128
  18.         
  19.  
  20. #if PRAGMA_ALIGN_SUPPORTED
  21. #pragma options align=mac68k
  22. #endif
  23.  
  24. enum{
  25.     yellowSignature=FOUR_CHAR_CODE('yllw')
  26. };
  27.  
  28. typedef FourCharCode YESignature;
  29.  
  30. struct YEBlockRec{
  31.     YESignature  signature;      // <--> Sanity: the signature of calling application.
  32.                                  //      The extension should also set this field with the signature
  33.                                  //      of supported application!
  34.             
  35.     WEReference  sWaste;         // -->  from caller.It contains also a pointer to the related 
  36.                                  //      window you may retrieve it through WEGetInfo call. 
  37.     TEHandle     sText;          // -->  from caller
  38.     ListRef      sList;          // -->  from caller
  39.     AliasHandle  sFile;          // -->  from caller
  40.     
  41. //The following parameters are returned by extension
  42.     Boolean      rNew;           // <-- asks the calling application to create a new instance
  43.                                  //     in order to use following parameters.
  44.     Handle         rText;          // <-- this handle may contain a TEXT.
  45.                                                                   
  46.     Handle         rStyles;        // <-- this handle may contain a style.
  47.                                                                   
  48.     Handle         rSoup;          // <-- this handle may contain a SOUP. 
  49.                                  //     SOUPs are WASTE-related resources containing object as: 
  50.                                  //     PICTs, sounds, movies and more.
  51.  
  52.     ListRef      rList;          // <-- this handle may contain a *NEW* List
  53.                                  
  54.     AliasHandle  rFile;          // <-- this handle may contain a *NEW* AliasHandle
  55. };
  56. typedef struct YEBlockRec YEBlockRec,*YEBlockPtr,**YEBlockHandle;
  57.  
  58. //------------------------NOTE
  59. // YellowEdit treats returned parameters, if valids, as follows:
  60. // rNew    = create a new window.
  61. // rList   = will be disposed.
  62. // rText   = will be inserted with rStyles and rSoup.
  63. // rStyles = if rText isn't valid will be used to replace the current style.
  64. // rSoup   = if rText isn't valid will be used to replace the current SOUP.
  65. // rFile   = try to read it.
  66. //----------------------------------------------------------------------------
  67. // Remember, your extension may perform what it wants,
  68. // so, if your extension doesn't cooperate directly with YellowEdit (or with whatever application
  69. // calls it) but performs some its own work, you may completely ignore any field of above! Anyway,
  70. // in this case, would be better changing the signature field: if you set it, in example,
  71. // as '????', then YellowEdit neither try to analyze the returned data.
  72.  
  73. enum {    
  74.     uppYellowEntryProcInfo = kPascalStackBased   
  75.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(YEBlockPtr)))
  76. };
  77.  
  78. #if PRAGMA_ALIGN_SUPPORTED
  79. #pragma options align=reset
  80. #endif
  81.  
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85.