home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / OSAGeneric.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  3.9 KB  |  119 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OSAGeneric.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __OSAGENERIC__
  18. #define __OSAGENERIC__
  19.  
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __APPLEEVENTS__
  27. #include <AppleEvents.h>
  28. #endif
  29. /*    #include <Types.h>                                            */
  30. /*    #include <Memory.h>                                            */
  31. /*        #include <MixedMode.h>                                    */
  32. /*    #include <OSUtils.h>                                        */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <Quickdraw.h>                                    */
  35. /*            #include <QuickdrawText.h>                            */
  36. /*    #include <EPPC.h>                                            */
  37. /*        #include <PPCToolbox.h>                                    */
  38. /*            #include <AppleTalk.h>                                */
  39. /*        #include <Processes.h>                                    */
  40. /*            #include <Files.h>                                    */
  41. /*    #include <Notification.h>                                    */
  42.  
  43. #ifndef __OSA__
  44. #include <OSA.h>
  45. #endif
  46. /*    #include <AEObjects.h>                                        */
  47. /*    #include <Components.h>                                        */
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52.  
  53. #if GENERATINGPOWERPC
  54. #pragma options align=mac68k
  55. #endif
  56.  
  57. #ifdef __CFM68K__
  58. #pragma lib_export on
  59. #endif
  60.  
  61. /*     NOTE:    This interface defines a "generic scripting component."
  62.             The Generic Scripting Component allows automatic dispatch to a
  63.             specific scripting component that conforms to the OSA interface.
  64.             This component supports OSA, by calling AppleScript or some other 
  65.             scripting component.  Additionally it provides access to the default
  66.             and the user-prefered scripting component.
  67. */
  68.  
  69. enum {
  70. /* Component version this header file describes */
  71.     kGenericComponentVersion    = 0x0100
  72. };
  73.  
  74. enum {
  75.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  76.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  77.     kGSSSelectGetScriptingComponent = 0x1003,
  78.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  79.     kGSSSelectGenericToRealID    = 0x1005,
  80.     kGSSSelectRealToGenericID    = 0x1006,
  81.     kGSSSelectOutOfRange        = 0x1007
  82. };
  83.  
  84. typedef OSType ScriptingComponentSelector;
  85.  
  86. typedef OSAID GenericID;
  87.  
  88. /* get and set the default scripting component */
  89. extern pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  90.  FIVEWORDINLINE(0x2F3C, 4, 0x1001, 0x7000, 0xA82A);
  91. extern pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  92.  FIVEWORDINLINE(0x2F3C, 4, 0x1002, 0x7000, 0xA82A);
  93. /* get a scripting component instance from its subtype code */
  94. extern pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  95.  FIVEWORDINLINE(0x2F3C, 8, 0x1003, 0x7000, 0xA82A);
  96. /* get a scripting component selector (subType) from a stored script */
  97. extern pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  98.  FIVEWORDINLINE(0x2F3C, 8, 0x1004, 0x7000, 0xA82A);
  99. /* get a real component instance and script id from a generic id */
  100. extern pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  101.  FIVEWORDINLINE(0x2F3C, 8, 0x1005, 0x7000, 0xA82A);
  102. /* get a generic id from a real component instance and script id */
  103. extern pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  104.  FIVEWORDINLINE(0x2F3C, 8, 0x1006, 0x7000, 0xA82A);
  105.  
  106. #ifdef __CFM68K__
  107. #pragma lib_export off
  108. #endif
  109.  
  110. #if GENERATINGPOWERPC
  111. #pragma options align=reset
  112. #endif
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117.  
  118. #endif /* __OSAGENERIC__ */
  119.