![]() |
SPHost.hGo to the documentation of this file.00001 /***********************************************************************/ 00002 /* */ 00003 /* SPHost.h */ 00004 /* */ 00005 /* ADOBE SYSTEMS INCORPORATED */ 00006 /* Copyright 1995-2007 Adobe Systems Incorporated. */ 00007 /* All Rights Reserved. */ 00008 /* */ 00009 /* NOTICE: Adobe permits you to use, modify, and distribute this file */ 00010 /* in accordance with the terms of the Adobe license agreement */ 00011 /* accompanying it. If you have received this file from a source other */ 00012 /* than Adobe, then your use, modification, or distribution of it */ 00013 /* requires the prior written permission of Adobe. */ 00014 /* */ 00015 /* Patents Pending */ 00016 /* */ 00017 /* */ 00018 /***********************************************************************/ 00019 00020 #ifndef __SPHost__ 00021 #define __SPHost__ 00022 00023 00024 /******************************************************************************* 00025 ** 00026 ** Imports 00027 ** 00028 **/ 00029 00030 #include "SPTypes.h" 00031 #include "SPAccess.h" 00032 #include "SPAdapts.h" 00033 #include "SPBasic.h" 00034 #include "SPBckDbg.h" 00035 #include "SPBlocks.h" 00036 #include "SPCaches.h" 00037 #include "SPFiles.h" 00038 #include "SPInterf.h" 00039 #include "SPPlugs.h" 00040 #include "SPProps.h" 00041 #include "SPRuntme.h" 00042 #include "SPStrngs.h" 00043 #include "SPSuites.h" 00044 00045 #include "SPHeaderBegin.h" 00046 00047 #ifdef __cplusplus 00048 extern "C" { 00049 #endif 00050 00051 00052 /******************************************************************************* 00053 ** 00054 ** Constants 00055 ** 00056 **/ 00057 00058 00059 // AJL 08/21/00 - Defining "RELEASE_PLUGINS_EARLY" causes the plugin system to detect 00060 // which plugins were flushed at the end of launch time, then flush those plugins 00061 // earlier in the launch process the next time around. This prevents Illustrator 00062 // from allocating gobs of memory on startup, then releasing it. Bad on a 64MB machine. 00063 #define RELEASE_PLUGINS_EARLY 00064 00065 00066 /* 00067 * The version number of the Sweet Pea host interface. You can compare it to the 00068 * version number that Sweet Pea was compiled with to determine that you are 00069 * running the version you think you are. See SPVersion() below. 00070 * 00071 * This number consists of a hi word which is the major version number reflecting 00072 * changes to the SP inteface, and a low word which is the minor revision number, 00073 * for instance indicating bug fixes. 00074 */ 00075 00076 #define kSPVersion 0x000B0002 // version 11.2 00077 00078 00079 /* 00080 * Options available to the host at init time. They are: 00081 * 00082 * kSPHostBlockDebugOption - block allocation debugging is enabled. See 00083 * SPBckDbg.h for details. 00084 * 00085 * Examples: 00086 * 00087 * SPInit( hostProcs, pluginsFolder, kSPHostNoOptions, error ); 00088 * // No debugging. 00089 * 00090 * SPInit( hostProcs, pluginsFolder, kSPHostBlockDebugOption, error ); 00091 * // Enable block debugging. 00092 */ 00093 00094 #define kSPHostNoOptions 0 00095 #define kSPHostBlockDebugOption (1<<0) 00096 00097 00098 /******************************************************************************* 00099 ** 00100 ** Functions 00101 ** 00102 **/ 00103 00104 /* 00105 * SPInit() initializes Sweet Pea. It is the first call made to Sweet Pea. It 00106 * initializes its suites and builds the list of application files. 00107 * 00108 * HostProcs points to a filled-in structure of host callbacks, as described 00109 * in SPRuntme.h. It may be NULL, in which case Sweet Pea uses its default 00110 * versions for all of the host callbacks. PluginFolder is the file spec of the 00111 * plug-ins folder. The contents of this folder are collected into the application 00112 * files list (see SPFiles.h). Options may be any of the host options described 00113 * above. 00114 */ 00115 SPErr SPInit( SPHostProcs *hostProcs, const SPPlatformFileReference *pluginFolder, ai::int32 options ); 00116 SPBoolean SPInited( void ); 00117 00118 /* 00119 * SPTerm() terminates Sweet Pea. Call this when your application quits. 00120 */ 00121 SPErr SPTerm( void ); 00122 00123 /* 00124 * SPStartupPlugins() scans the list of application files and builds the list 00125 * of plug-ins. It then starts them up, calling each in turn with a start up 00126 * message (see SPPlugs.h). Call this sometime after SPInit(). 00127 */ 00128 SPErr SPStartupPlugins( void ); 00129 00130 /* 00131 * SPShutdownPlugins() shuts down the plug-ins. It calls each in turn with a 00132 * shut down message (see SPPlugs.h). Call this when your application quits 00133 * before calling SPTerm(). 00134 */ 00135 SPErr SPShutdownPlugins( void ); 00136 00137 00138 #ifdef MAC_ENV 00139 /* 00140 * SPSetPPCLoadHeap() sets the destination heap of plug-in accesses on PowerPPC 00141 * Macintoshes. Plug-ins can load into the system heap or the application heap. 00142 */ 00143 typedef enum { 00144 kAppHeap = 0, 00145 kSysHeap 00146 } SPTargetHeap; 00147 00148 SPErr SPSetPPCLoadHeap( SPTargetHeap target ); 00149 00150 /* 00151 * SPSetHostBundleRef() lets sweet pea know the bundle ref of the host. 00152 */ 00153 SPErr SPSetHostBundleRef(CFBundleRef hostBundle); 00154 #endif 00155 00156 00157 /* 00158 * SPVersion() returns the version number of the Sweet Pea host interface (this 00159 * file) for which Sweet Pea was built. You can compare this to the constant 00160 * kSPVersion to make sure you're using the version you think you are. 00161 */ 00162 ai::uint32 SPVersion( void ); 00163 00164 00165 /******************************************************************************* 00166 ** 00167 ** Errors 00168 ** 00169 **/ 00170 00171 #include "SPErrorCodes.h" 00172 00173 #ifdef __cplusplus 00174 } 00175 #endif 00176 00177 #include "SPHeaderEnd.h" 00178 00179 #endif |
||||||
|
![]() |
|