home *** CD-ROM | disk | FTP | other *** search
- unit Header;
-
- interface
-
- uses
- DefComp,
- {$IFC POWERPC}
- QuickDraw, Files;
- {$ELSEC}
- Dummy;
- {$ENDC}
-
-
- { File type of an extension: PLUG }
- { Creator of an extension: GKON }
- {}
- { Definition of an import extension: }
- { STR# number 1024 index 1 contains the name }
- { STR# number 1024 index 2 contains the file type of the graphic files }
- { PLUG number 1024 contains the 68K code resource for the import extension }
- {}
- { Definition of an export extension: }
- { STR# number 2048 index 1 contains the name }
- { STR# number 2048 index 2 contains the file type of the graphic files }
- { PLUG number 2048 contains the 68K code resource for the export extension }
- {}
- { Definition of an filter extension: }
- { STR# number 4096 index contains the name }
- { PLUG number 4096 contains the 68K code resource for the filter extension }
- {}
- { One extension can contain the import and export resources }
-
- type
- T_ColorTableArr = array[0..255] of RGBColor;
- T_ColorTablePtr = ^T_ColorTableArr;
-
- T_ImportRec = record
- version: Longint; { 1 }
-
- callKind: Longint; { 0 - all available, 1 - format was especially selected }
-
- progressProcPtr: ptr; { nil, if not function available }
- progressType: Longint; { 0-68K, 1-PPC }
-
- createVectorPict: Longint; { 0-no, 1-yes }
- vectorPictHdl: PicHandle;
-
- srcDataHdl: Handle;
- srcDataSize: Longint;
- srcFile: FSSpec;
-
- destDataHdl: Handle;
- destBitsPerPixel: Longint;
- destBytesPerLine: Longint;
- destWidth: Longint;
- destHeight: Longint;
- destDataSize: Longint; { in bytes }
- destColorTablePtr: T_ColorTablePtr; { preallocated for 256 colors, fill only the fields }
- destKindStr: str255;
- destFileType: ResType;
-
- success: Longint; { 0 - no, 1 - yes }
-
- commentHdl : Handle; { only if version >= 1 }
- end;
- T_ImportPtr = ^T_ImportRec;
-
- T_ExportRec = record
- version: Longint; { 1 }
-
- progressProcPtr: ptr; { nil, if not function available }
- progressType: Longint; { 0-68K, 1-PPC }
-
- srcDataPtr: ptr;
- srcBitsPerPixel: Longint;
- srcBytesPerLine: Longint;
- srcWidth: Longint;
- srcHeight: Longint;
- srcColorTablePtr: T_ColorTablePtr;
- srcDataSize: Longint; { in bytes }
-
- destFSSpecRec: FSSpec;
-
- success: Longint; { 0 - no, 1 - yes }
-
- commentHdl : Handle; { only if version >= 1 }
- end;
- T_ExportPtr = ^T_ExportRec;
-
- T_FilterRec = record
- version: Longint; { 1 }
-
- progressProcPtr: ptr; { nil, if not function available }
- progressType: Longint; { 0-68K, 1-PPC }
-
- srcDataHdl: Handle; { don't free !!! }
- srcBitsPerPixel: Longint;
- srcBytesPerLine: Longint;
- srcWidth: Longint;
- srcHeight: Longint;
- srcColorTablePtr: T_ColorTablePtr;
- srcDataSize: Longint; { in bytes }
-
- destDataHdl: Handle; { nil on entry }
- destBitsPerPixel: Longint;
- destBytesPerLine: Longint;
- destWidth: Longint;
- destHeight: LOngint;
- destColorTablePtr: T_ColorTablePtr;
- destDataSize: Longint; { in bytes }
-
- { if destDataHdl is nil on exit than the filter changes the srcData }
-
- success: Longint; { 0 - no, 1 - yes }
-
- commentHdl : Handle; { only if version >= 1 }
- end;
- T_FilterPtr = ^T_FilterRec;
-
- const
- C_SetTitle = 0;
- C_InitProgressBar = 1;
- C_SetProgressValue = 2;
- C_ClearProgressBar = 3;
-
- { prototype for progress function: }
- { procedure Progress(command:Longint; title:str255; percent:Longint);}
- { percent in the range 0..100 }
-
- implementation
-
- end.