home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / 第1特集Plug-in / Photoshop / Plug-in_Kit_2.5.1.sit / Plug-in_Kit_2.5.1 / Code / PIExport.h < prev    next >
Text File  |  1994-03-22  |  4KB  |  117 lines

  1. /*
  2.     File: PIExport.h
  3.  
  4.     Copyright 1990-91 by Thomas Knoll.    Copyright 1992 by Adobe Systems, Inc..
  5.     All rights reserved.
  6.  
  7.     This file describes version 4.0 of Photoshop's Export module interface.
  8. */
  9.  
  10. #ifndef __PIExport__
  11. #define __PIExport__
  12.  
  13. #include "PIGeneral.h"
  14.  
  15. /* Operation selectors */
  16.  
  17. #define exportSelectorAbout    0
  18. #define exportSelectorStart    1
  19. #define exportSelectorContinue 2
  20. #define exportSelectorFinish   3
  21. #define exportSelectorPrepare  4
  22.  
  23. /* Error return values. The plug-in module may also return standard Macintosh
  24.    operating system error codes, or report its own errors, in which case it
  25.    can return any positive integer. */
  26.  
  27. #define exportBadParameters -30200    /* "a problem with the export module interface" */
  28. #define exportBadMode        -30201    /* "the export module does not support <mode> images" */
  29.  
  30. #pragma options align=mac68k
  31.  
  32. typedef struct ExportRecord
  33.     {
  34.  
  35.     long                serialNumber;    /* Host's serial number, to allow
  36.                                            copy protected plug-in modules. */
  37.  
  38.     TestAbortProc        abortProc;        /* The plug-in module may call this no-argument
  39.                                            BOOLEAN function (using Pascal calling
  40.                                            conventions) several times a second during long
  41.                                            operations to allow the user to abort the operation.
  42.                                            If it returns TRUE, the operation should be aborted
  43.                                            (and a positive error code returned). */
  44.  
  45.     ProgressProc        progressProc;    /* The plug-in module may call this two-argument
  46.                                            procedure (using Pascal calling conventions)
  47.                                            periodically to update a progress indicator.
  48.                                            The first parameter (type LONGINT) is the number
  49.                                            of operations completed; the second (type LONGINT)
  50.                                            is the total number of operations. */
  51.  
  52.     long                maxData;        /* Maximum number of bytes that should be
  53.                                            requested at once (the plug-in should reduce
  54.                                            its requests by the size any large buffers
  55.                                            it allocates). The plug-in may reduce this
  56.                                            value in the exportSelectorPrepare routine. */
  57.  
  58.     short                imageMode;        /* Image mode */
  59.     Point                imageSize;        /* Size of image */
  60.     short                depth;            /* Bits per sample, currently will be 1 or 8 */
  61.     short                planes;         /* Samples per pixel */
  62.  
  63.     Fixed                imageHRes;        /* Pixels per inch */
  64.     Fixed                imageVRes;        /* Pixels per inch */
  65.  
  66.     LookUpTable            redLUT;         /* Red LUT, only used for Indexed Color images */
  67.     LookUpTable            greenLUT;        /* Green LUT, only used for Indexed Color images */
  68.     LookUpTable            blueLUT;        /* Blue LUT, only used for Indexed Color images */
  69.  
  70.     Rect                theRect;        /* Rectangle requested, set to empty rect when done */
  71.     short                loPlane;        /* First plane requested */
  72.     short                hiPlane;        /* Last plane requested */
  73.  
  74.     void *                data;            /* A pointer to the requested image data */
  75.     long                rowBytes;        /* Spacing between rows */
  76.  
  77.     Str255                 filename;        /* Document file name */
  78.     short                vRefNum;        /* Volume reference number, or zero if none */
  79.     Boolean             dirty;            /* Changes since last saved flag. The plug-in may clear
  80.                                            this field to prevent prompting the user when
  81.                                            closing the document. */
  82.  
  83.     Rect                selectBBox;     /* Bounding box of current selection, or an empty
  84.                                            rect if there is no current selection. */
  85.  
  86.     OSType                hostSig;        /* Creator code for host application */
  87.     HostProc            hostProc;        /* Host specific callback procedure */
  88.  
  89.     Handle                duotoneInfo;    /* Handle to duotone information. */
  90.  
  91.     short                thePlane;        /* Currently selected channel,
  92.                                            or -1 if a composite color channel,
  93.                                            or -2 if all channels. */
  94.  
  95.     PlugInMonitor        monitor;        /* Information on current monitor */
  96.  
  97.     void *                platformData;    /* Platform specific hook. */
  98.  
  99.     BufferProcs         *bufferProcs;    /* Host buffer maintenance procedures. */
  100.     
  101.     ResourceProcs         *resourceProcs;    /* Host plug-in resource procedures. */
  102.     
  103.     ProcessEventProc    processEvent;    /* Pass events to the application. */
  104.     
  105.     DisplayPixelsProc    displayPixels;    /* Display dithered pixels. */
  106.  
  107.     HandleProcs            *handleProcs;    /* Platform independent handle manipulation. */
  108.  
  109.     char                reserved [232]; /* Set to zero */
  110.  
  111.     }
  112. ExportRecord, *ExportRecordPtr;
  113.  
  114. #pragma options align=reset
  115.  
  116. #endif
  117.