home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / misc / imagefx_sdk / include / scan / prev.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-18  |  5.5 KB  |  151 lines

  1. /*
  2.  * ImageFX Development Header File
  3.  * Copyright © 1991-1995 Nova Design, Inc.
  4.  * Written by Thomas Krehbiel
  5.  *
  6.  * Preview Module Definitions.
  7.  *
  8.  */
  9.  
  10. #ifndef SCAN_PREV_H
  11.  
  12.  
  13. /*
  14.  * Colors for the VM_Color() function.  This is largely obsolete.
  15.  */
  16. enum VM_Col
  17. {
  18.    VCOL_COLOR = 0,      /* 24-Bit Color */
  19.    VCOL_GREY,           /* 8-Bit Grey */
  20.    VCOL_RED,            /* 8-Bit Red */
  21.    VCOL_GREEN,          /* 8-Bit Green */
  22.    VCOL_BLUE,           /* 8-Bit Blue */
  23.    VCOL_3BIT,           /* Obsolete - do not use */
  24.    VCOL_1BIT            /* Obsolete - do not use */
  25. };
  26.  
  27. /*
  28.  * PreviewInfo:
  29.  *
  30.  * This structure is returned by the preview module function VM_Identification()
  31.  * and provides ImageFX with details about the module and what it can or
  32.  * cannot do.  It also provides additional function vectors for expanded
  33.  * capability.  (Don't ask why I didn't just add more library vectors.)
  34.  *
  35.  * Most of the additions to this structure in 2.0 support windowed
  36.  * previews.
  37.  *
  38.  */
  39. struct PreviewInfo
  40. {
  41.    ULONG       Flags;         /* Various flags - see below */
  42.  
  43.    /*
  44.     * All these callbacks must use __saveds and stack arguments.
  45.     */
  46.    int       (*Open)
  47.                (struct NewScreen *, struct Screen **, struct Window **);
  48.                               /* Custom open hook */
  49.    int       (*Close)
  50.                (struct Screen *, struct Window *);
  51.                               /* Custom close hook */
  52.  
  53.    int       (*obsolete1)();  /* (NOT USED) */
  54.    int       (*obsolete2)();  /* (NOT USED) */
  55.    int       (*obsolete3)();  /* (NOT USED) */
  56.    int       (*obsolete4)();  /* (NOT USED) */
  57.    int       (*obsolete5)();  /* (NOT USED) */
  58.    int       (*obsolete6)();  /* (NOT USED) */
  59.  
  60.    WORD        AspectX,       /* Horizontal pixel aspect ratio */
  61.                AspectY;       /* Vertical pixel aspect ratio */
  62.  
  63.    UBYTE       GhostFrontPen, /* Ghosted area front pen (OBSOLETE) */
  64.                GhostBackPen,  /* Ghosted area back pen (OBSOLETE) */
  65.                pad1,
  66.                pad2;
  67.  
  68.    int       (*obsolete7)();  /* (NOT USED) */
  69.    int       (*obsolete8)();  /* (NOT USED) */
  70.    ULONG     (*obsolete9)();  /* (NOT USED) */
  71.  
  72.    ULONG     (*HandleMsg)
  73.                (struct IntuiMessage *);
  74.                               /* (2.0) Handle preview window messages */
  75.  
  76.    ULONG       AddIDCMP;      /* (2.0) Additional IDCMP flags to be set
  77.                                  for the preview window */
  78.  
  79.    /*
  80.     * Currently, only the Draw#?() functions are called to draw AND erase.
  81.     * This implies that these functions MUST do xor-style rendering.
  82.     */
  83.    int       (*DrawLine)
  84.                (struct Window *, int, int, int, int);
  85.                               /* (2.0) Draw a line on the preview */
  86.    int       (*EraseLine)();  /* (2.0) Erase a line from the preview (UNUSED) */
  87.    int       (*DrawBox)
  88.                (struct Window *, int, int, int, int);
  89.                               /* (2.0) Draw a box on the preview */
  90.    int       (*EraseBox)();   /* (2.0) Erase a box from the preview (UNUSED) */
  91.    int       (*DrawOval)
  92.                (struct Window *, int, int, int,  int);
  93.                               /* (2.0) Draw an oval on the preview */
  94.    int       (*EraseOval)();  /* (2.0) Erase an oval from the preview (UNUSED) */
  95.  
  96.  
  97.    int       (*RenderThumb)
  98.                (struct RastPort *, struct Buffer *, int, int);
  99.                               /* (2.0) Draw a preview thumbnail */
  100.  
  101.    int       (*DrawMask)
  102.                (struct Window *, struct Mask *);
  103.                               /* (2.0) Draw a mask outline */
  104.    int       (*CrawlMask)
  105.                (struct Window *, struct Mask *);
  106.                               /* (2.0) Crawl a mask outline */
  107.    int       (*EraseMask)
  108.                (struct Window *, struct Mask *);
  109.                               /* (2.0) Erase a mask outline */
  110.  
  111.    ULONG       Reserved[19];  /* Reserved for future expansion */
  112. };
  113.  
  114. #define VF_NODBUF          0x00001  /* Do not double-buffer preview */
  115. #define VF_FULLWIDTH       0x00002  /* Redraw full width only (eg. HAM) */
  116. #define VF_PRIVATE         0x00004  /* Private - do not touch ever! */
  117. #define VF_WORDALIGN       0x00008  /* All renders should be word-aligned */
  118. #define VF_NOBRUSH         0x00010  /* Preview can't support brushes */
  119. #define VF_NOSCANLINE      0x00020  /* No scanline rendering from scanners (2.0) */
  120.  
  121. /* New for 2.0: */
  122. #define VF_WBPREVIEW       0x04000  /* Special flag that tells ImageFX to do
  123.                                      * the following:
  124.                                      *    - activate the preview window
  125.                                      *      whenever possible
  126.                                      *    - always set the preview window
  127.                                      *      pointer to a crosshair
  128.                                      *    - never change the toolbox window
  129.                                      *      pointer
  130.                                      * (2.0)
  131.                                      */
  132.  
  133. #define VF_EXTENDED        0x08000  /* An Extended Preview module
  134.                                        containing additional palette
  135.                                        handling functions (2.0) */
  136. #define VF_SIMPLEREFRESH   0x10000  /* Simple refresh thumbnail windows (2.0) */
  137.  
  138. /*
  139.  * Return codes from VM_xPalHandler():
  140.  */
  141. enum
  142. {
  143.    XPMSG_NewRegister = 1,        /* selected a new register */
  144.    XPMSG_NewRange,               /* selected a new range (not used) */
  145.    XPMSG_EditRegister,           /* double-clicked a new register */
  146. };
  147.  
  148.  
  149. #define SCAN_PREV_H
  150. #endif
  151.