home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.6 KB | 223 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLFileOp.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLFILEOP_H
- #define SLFILEOP_H
-
-
- // ----- OS Includes -----
-
- #ifndef FWFILESP_H
- #include "FWFileSp.h"
- #endif
-
- // ----- Foundation Includes -----
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- //----- Macintosh includes -----
-
- #if defined(FW_BUILD_MAC) && !defined(__TYPES__)
- #include <Types.h>
- #endif
-
- #if defined(FW_BUILD_MAC) && !defined(__FILES__)
- #include <Files.h>
- #endif
-
- #if defined(FW_BUILD_MAC) && !defined(__STANDARDFILE__)
- #include <StandardFile.h>
- #endif
-
- //========================================================================================
- // Extern C Methods
- //========================================================================================
-
- // Export or Import functions for CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import on
- #elif defined(FW_ODFLIB)
- #pragma export on
- #endif
-
- FW_EXTERN_C_BEGIN
-
-
- //========================================================================================
- // struct FW_COpenFileParameters - parameters for StandardGetFile (Mac) and GetOpenFileName (Windows)
- //========================================================================================
-
- struct FW_SOpenFileParameters;
- typedef FW_SOpenFileParameters* FW_HOpenFileParameters;
-
- struct FW_SOpenFileParameters
- {
- #ifdef FW_BUILD_MAC
- short fNumTypes;
- OSType fTypes[4];
- FileFilterProcPtr fFileFilterProc;
- #endif
-
- #ifdef FW_BUILD_WIN
- HWND fOwnerWindow; // [KVV] Windows-specific data type! Temporary!
- char* fFilterString;
- char fDefaultExt[4];
- #endif
-
- void* fReserved;
- };
-
-
- FW_PlatformError SL_API
- FW_OpenFileParameters_Construct(FW_HOpenFileParameters parameters);
-
- FW_PlatformError SL_API
- FW_OpenFileParameters_Destruct(FW_HOpenFileParameters parameters);
-
-
- #ifdef FW_BUILD_MAC
- FW_PlatformError SL_API
- FW_OpenFileParameters_MacSet(FW_HOpenFileParameters parameters,
- short numTypes,
- OSType* fileType,
- FileFilterProcPtr fileFilterProc);
-
- short SL_API
- FW_OpenFileParameters_MacCountTypes(FW_HOpenFileParameters parameters);
-
- FileFilterProcPtr SL_API
- FW_OpenFileParameters_MacGetFilterProc(FW_HOpenFileParameters parameters);
-
- OSType* SL_API
- FW_OpenFileParameters_MacGetTypes(FW_HOpenFileParameters parameters);
- #endif
-
- #ifdef FW_BUILD_WIN
- FW_PlatformError SL_API
- FW_OpenFileParameters_WinInit(FW_HOpenFileParameters parameters,
- FW_HString filterString,
- FW_HString defaultExt,
- HWND ownerWindow = NULL);
-
- FW_PlatformError SL_API
- FW_OpenFileParameters_WinSet(FW_HOpenFileParameters parameters,
- FW_HString filterString,
- FW_HString defaultExt);
-
- char* SL_API
- FW_OpenFileParameters_WinGetFilterString(FW_HOpenFileParameters parameters);
-
- char* SL_API
- FW_OpenFileParameters_WinGetDefaultExt(FW_HOpenFileParameters parameters);
-
- HWND SL_API
- FW_OpenFileParameters_WinGetOwnerWindow(FW_HOpenFileParameters parameters);
- #endif
-
-
-
- //========================================================================================
- // struct FW_SSaveFileParameters - parameters for StandardPutFile (Mac) and GetSaveFileName (Windows)
- //========================================================================================
-
- struct FW_SSaveFileParameters;
- typedef FW_SSaveFileParameters* FW_HSaveFileParameters;
- struct FW_SSaveFileParameters
- {
- #ifdef FW_BUILD_MAC
- FW_HString fSavePrompt;
- FW_HString fDefaultName;
- #endif
-
- #ifdef FW_BUILD_WIN
- HWND fOwnerWindow;
- char* fFilterString;
- char fDefaultExt[4];
- char* fDefaultName;
- #endif
- };
-
- FW_PlatformError SL_API
- FW_SaveFileParameters_Construct(FW_HSaveFileParameters parameters);
-
- FW_PlatformError SL_API
- FW_SaveFileParameters_Destruct(FW_HSaveFileParameters parameters);
-
-
- #ifdef FW_BUILD_MAC
- FW_PlatformError SL_API
- FW_SaveFileParameters_MacInit(FW_HSaveFileParameters parameters,
- FW_HString savePrompt,
- FW_HString defaultName);
-
- FW_HString SL_API
- FW_SaveFileParameters_MacGetSavePrompt(FW_HSaveFileParameters parameters);
-
- FW_HString SL_API
- FW_SaveFileParameters_MacGetDefaultName(FW_HSaveFileParameters parameters);
- #endif
-
- #ifdef FW_BUILD_WIN
- FW_PlatformError SL_API
- FW_SaveFileParameters_WinInit(FW_HSaveFileParameters parameters,
- FW_HString filterString,
- FW_HString defaultExt,
- FW_HString defaultName,
- HWND ownerWindow = NULL);
-
- FW_PlatformError SL_API
- FW_SaveFileParameters_WinSet(FW_HSaveFileParameters parameters,
- FW_HString filterString,
- FW_HString defaultExt,
- FW_HString defaultName);
-
- char* SL_API
- FW_SaveFileParameters_WinGetFilterString(FW_HSaveFileParameters parameters);
-
- char* SL_API
- FW_SaveFileParameters_WinGetDefaultExt(FW_HSaveFileParameters parameters);
-
- char* SL_API
- FW_SaveFileParameters_WinGetDefaultName(FW_HSaveFileParameters parameters);
-
- HWND SL_API
- FW_SaveFileParameters_WinGetOwnerWindow(FW_HSaveFileParameters parameters);
- #endif
-
-
- //========================================================================================
- // ChooseFile functions
- //========================================================================================
-
- FW_OFileSpecification* SL_API
- FW_ChooseFileToOpen(FW_HOpenFileParameters openFileParam);
-
- FW_OFileSpecification* SL_API
- FW_ChooseFileToSave(FW_HSaveFileParameters saveFileParam);
-
-
- FW_EXTERN_C_END
-
- // For CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import off
- #elif defined(FW_ODFLIB)
- #pragma export off
- #endif
-
- #endif
-