PIGetFileListSuite.h
Go to the documentation of this file.
00001 // ADOBE SYSTEMS INCORPORATED
00002 // Copyright  1993 - 2005 Adobe Systems Incorporated
00003 // All Rights Reserved
00004 //
00005 // NOTICE:  Adobe permits you to use, modify, and distribute this 
00006 // file in accordance with the terms of the Adobe license agreement
00007 // accompanying it.  If you have received this file from a source
00008 // other than Adobe, then your use, modification, or distribution
00009 // of it requires the prior written permission of Adobe.
00010 //-------------------------------------------------------------------
00080 #ifndef __PIGetFileListSuite__
00081 #define __PIGetFileListSuite__
00082 
00083 //-------------------------------------------------------------------------------
00084 //  Includes.
00085 //-------------------------------------------------------------------------------
00086 #include "PIGeneral.h"
00087 
00088 #if MSWindows && defined(__PSWorld__)
00089 #include "Files.h"
00090 #endif
00091 
00092 
00093 //-------------------------------------------------------------------------------
00094 //  C++ wrapper.
00095 //-------------------------------------------------------------------------------
00096 #ifdef __cplusplus
00097 extern "C" {
00098 #endif
00099 
00100 //-------------------------------------------------------------------------------
00101 //  UI GetFileList suite.
00102 //-------------------------------------------------------------------------------
00103 
00105 #define kPSGetFileListSuite             "Photoshop GetFileList Suite for Plug-ins"
00106 
00107 //-------------------------------------------------------------------------------
00108 //  
00109 //-------------------------------------------------------------------------------
00110 
00125 #if Macintosh && __LP64__
00126 typedef FSRef PIGetFileListHandleType;
00127 #else
00128 typedef FSSpec PIGetFileListHandleType;
00129 #endif
00130 
00131 typedef SPAPI SPErr (*GetFileHandleListProc) (PIActionDescriptor& des, PIGetFileListHandleType* fileSpec, bool recurse);
00132 
00136 typedef SPAPI SPErr (*GetXPlatFileHandleListProc) (PIActionDescriptor& des, XPlatFileSpec* fileSpec, bool recurse);
00137 
00146 typedef SPAPI SPErr (*GetBrowserNameListProc) (PIActionDescriptor& des);
00147 
00154 typedef SPAPI SPErr (*BrowseUrlWithIndexBrowserProc) (uint16 index, const char* url);
00155 
00160 typedef SPAPI SPErr (*BrowseUrlProc) (const char* url);
00161 
00169 typedef SPAPI SPErr (*GetBrowserFileSpecProc)(uint16 index, SPPlatformFileSpecification* fileSpec);
00170 typedef SPAPI SPErr (*GetXPlatBrowserFileSpecProc)(uint16 index, XPlatFileSpec* fileSpec);
00171 
00172 typedef SPAPI SPErr (*GetDefaultSystemScriptProc)(int16& script);
00173 
00174 typedef SPAPI SPErr (*HasDoubleByteInStringProc)(const char* charString, bool& hasDoubleByte);
00175 
00176 typedef SPAPI SPErr (*GetWebTemplateFolderSpecProc)(SPPlatformFileSpecification* fileSpec);
00177 typedef SPAPI SPErr (*GetXPlatWebTemplateFolderSpecProc)(XPlatFileSpec* fileSpec);
00178 
00179 typedef SPAPI SPErr (*GetWebTemplateListProc) (PIActionDescriptor& styleList, bool recurse);
00180 
00181 typedef SPAPI SPErr (*GetWindowsFileTypesProc) (char * fileTypeList, int32 bufferSize);
00182 
00183 typedef SPAPI SPErr (*GetMacFileTypesProc) (OSType * typeList, int32 &numTypes, int32 bufferSize);
00184 
00185 typedef SPAPI SPErr (*GetPresetsFolderSpecProc) (SPPlatformFileSpecification *fileSpec);
00186 typedef SPAPI SPErr (*GetXPlatPresetsFolderSpecProc) (XPlatFileSpec *fileSpec);
00187 
00188 typedef SPAPI SPErr (*InvalidateFileBrowserCacheProc) (const SPPlatformFileSpecification *fileSpec);
00189 typedef SPAPI SPErr (*InvalidateXPlatFileBrowserCacheProc) (const XPlatFileSpec *fileSpec);
00190 
00191 typedef SPAPI SPErr (*GetChewableFolderSpecProc) (SPPlatformFileSpecification *folderSpec);
00192 typedef SPAPI SPErr (*GetXPlatChewableFolderSpecProc) (XPlatFileSpec *folderSpec);
00193 
00194 typedef SPAPI SPErr (*GetChewableFreeSpaceProc) (int64& freeSpace);
00195 
00196 //-------------------------------------------------------------------------------
00197 //   GetFileList suite version 1.
00198 //-------------------------------------------------------------------------------
00199 
00200 #define kPSGetFileListSuiteVersion1     1    
00201 #define kPSGetFileListSuiteVersion2     2    
00202 #define kPSGetFileListSuiteVersion3     3    
00203 #define kPSGetFileListSuiteVersion4     4    
00204 #define kPSGetFileListSuiteVersion5     5    
00205 #define kPSGetFileListSuiteVersion6     6    
00206 #define kPSGetFileListSuiteVersion7     7    
00209 typedef struct 
00210     {
00211     GetFileHandleListProc           GetFileHandleList;          
00212     GetBrowserNameListProc          GetBrowserNameList;         
00213     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;  
00214     BrowseUrlProc                   BrowseUrl;                  
00215     GetBrowserFileSpecProc          GetBrowserFileSpec;         
00216     } PSGetFileListSuite1;
00217 
00219 typedef struct 
00220     {
00221     GetFileHandleListProc           GetFileHandleList;          
00222     GetBrowserNameListProc          GetBrowserNameList;         
00223     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;  
00224     BrowseUrlProc                   BrowseUrl;                  
00225     GetBrowserFileSpecProc          GetBrowserFileSpec;         
00226     GetDefaultSystemScriptProc      GetDefaultSystemScript;     
00227     } PSGetFileListSuite2;
00228 
00230 typedef struct 
00231     {
00232     GetFileHandleListProc           GetFileHandleList;          
00233     GetBrowserNameListProc          GetBrowserNameList;         
00234     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;  
00235     BrowseUrlProc                   BrowseUrl;                  
00236     GetBrowserFileSpecProc          GetBrowserFileSpec;         
00237     GetDefaultSystemScriptProc      GetDefaultSystemScript;     
00238     HasDoubleByteInStringProc       HasDoubleByteInString;      
00239     } PSGetFileListSuite3;
00240 
00242 typedef struct 
00243     {
00244     GetFileHandleListProc           GetFileHandleList;          
00245     GetBrowserNameListProc          GetBrowserNameList;         
00246     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;  
00247     BrowseUrlProc                   BrowseUrl;                  
00248     GetBrowserFileSpecProc          GetBrowserFileSpec;         
00249     GetDefaultSystemScriptProc      GetDefaultSystemScript;     
00250     HasDoubleByteInStringProc       HasDoubleByteInString;      
00251     GetWebTemplateFolderSpecProc    GetWebTemplateFolderSpec;   
00252     GetWebTemplateListProc          GetWebTemplateList;         
00253     } PSGetFileListSuite4;
00254 
00256 typedef struct 
00257 {
00258     GetFileHandleListProc           GetFileHandleList;           
00259     GetBrowserNameListProc          GetBrowserNameList;          
00260     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;   
00261     BrowseUrlProc                   BrowseUrl;                   
00262     GetBrowserFileSpecProc          GetBrowserFileSpec;          
00263     GetDefaultSystemScriptProc      GetDefaultSystemScript;      
00264     HasDoubleByteInStringProc       HasDoubleByteInString;       
00265     GetWebTemplateFolderSpecProc    GetWebTemplateFolderSpec;    
00266     GetWebTemplateListProc          GetWebTemplateList;          
00267     GetWindowsFileTypesProc         GetWindowsFileTypes;         
00268     GetMacFileTypesProc             GetMacFileTypes;             
00269     GetPresetsFolderSpecProc        GetPresetsFolderSpec;        
00270     InvalidateFileBrowserCacheProc  InvalidateFileBrowserCache;  
00271 } PSGetFileListSuite5;
00272 
00274 typedef struct 
00275 {
00276     GetFileHandleListProc           GetFileHandleList;           
00277     GetBrowserNameListProc          GetBrowserNameList;          
00278     BrowseUrlWithIndexBrowserProc   BrowseUrlWithIndexBrowser;   
00279     BrowseUrlProc                   BrowseUrl;                   
00280     GetBrowserFileSpecProc          GetBrowserFileSpec;          
00281     GetDefaultSystemScriptProc      GetDefaultSystemScript;      
00282     HasDoubleByteInStringProc       HasDoubleByteInString;       
00283     GetWebTemplateFolderSpecProc    GetWebTemplateFolderSpec;    
00284     GetWebTemplateListProc          GetWebTemplateList;          
00285     GetWindowsFileTypesProc         GetWindowsFileTypes;         
00286     GetMacFileTypesProc             GetMacFileTypes;             
00287     GetPresetsFolderSpecProc        GetPresetsFolderSpec;        
00288     InvalidateFileBrowserCacheProc  InvalidateFileBrowserCache;  
00289     GetChewableFolderSpecProc       GetChewableFolderSpec;       
00290     GetChewableFreeSpaceProc        GetChewableFreeSpace;        
00291 } PSGetFileListSuite6;
00292 
00294 typedef struct 
00295 {
00296     GetXPlatFileHandleListProc          GetXPlatFileHandleList;         
00297     GetBrowserNameListProc              GetBrowserNameList;             
00298     BrowseUrlWithIndexBrowserProc       BrowseUrlWithIndexBrowser;      
00299     BrowseUrlProc                       BrowseUrl;                      
00300     GetXPlatBrowserFileSpecProc         GetXPlatBrowserFileSpec;        
00301     GetDefaultSystemScriptProc          GetDefaultSystemScript;         
00302     HasDoubleByteInStringProc           HasDoubleByteInString;          
00303     GetXPlatWebTemplateFolderSpecProc   GetXPlatWebTemplateFolderSpec;  
00304     GetWebTemplateListProc              GetWebTemplateList;             
00305     GetWindowsFileTypesProc             GetWindowsFileTypes;            
00306     GetMacFileTypesProc                 GetMacFileTypes;                
00307     GetXPlatPresetsFolderSpecProc       GetXPlatPresetsFolderSpec;      
00308     InvalidateXPlatFileBrowserCacheProc InvalidateXPlatFileBrowserCache;
00309     GetXPlatChewableFolderSpecProc      GetXPlatChewableFolderSpec;     
00310     GetChewableFreeSpaceProc            GetChewableFreeSpace;           
00311 } PSGetFileListSuite7;
00312 
00313 //-------------------------------------------------------------------------------
00314 //  C++ wrapper.
00315 //-------------------------------------------------------------------------------
00316 #ifdef __cplusplus
00317 }
00318 #endif
00319 
00320 //-------------------------------------------------------------------------------
00321 #endif  // PIGetFileListSuite
00322