home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Preview Module Definitions.
- *
- */
-
- #ifndef SCAN_PREV_H
-
-
- /*
- * Colors for the VM_Color() function. This is largely obsolete.
- */
- enum VM_Col
- {
- VCOL_COLOR = 0, /* 24-Bit Color */
- VCOL_GREY, /* 8-Bit Grey */
- VCOL_RED, /* 8-Bit Red */
- VCOL_GREEN, /* 8-Bit Green */
- VCOL_BLUE, /* 8-Bit Blue */
- VCOL_3BIT, /* Obsolete - do not use */
- VCOL_1BIT /* Obsolete - do not use */
- };
-
- /*
- * PreviewInfo:
- *
- * This structure is returned by the preview module function VM_Identification()
- * and provides ImageFX with details about the module and what it can or
- * cannot do. It also provides additional function vectors for expanded
- * capability. (Don't ask why I didn't just add more library vectors.)
- *
- * Most of the additions to this structure in 2.0 support windowed
- * previews.
- *
- */
- struct PreviewInfo
- {
- ULONG Flags; /* Various flags - see below */
-
- /*
- * All these callbacks must use __saveds and stack arguments.
- */
- int (*Open)
- (struct NewScreen *, struct Screen **, struct Window **);
- /* Custom open hook */
- int (*Close)
- (struct Screen *, struct Window *);
- /* Custom close hook */
-
- int (*obsolete1)(); /* (NOT USED) */
- int (*obsolete2)(); /* (NOT USED) */
- int (*obsolete3)(); /* (NOT USED) */
- int (*obsolete4)(); /* (NOT USED) */
- int (*obsolete5)(); /* (NOT USED) */
- int (*obsolete6)(); /* (NOT USED) */
-
- WORD AspectX, /* Horizontal pixel aspect ratio */
- AspectY; /* Vertical pixel aspect ratio */
-
- UBYTE GhostFrontPen, /* Ghosted area front pen (OBSOLETE) */
- GhostBackPen, /* Ghosted area back pen (OBSOLETE) */
- pad1,
- pad2;
-
- int (*obsolete7)(); /* (NOT USED) */
- int (*obsolete8)(); /* (NOT USED) */
- ULONG (*obsolete9)(); /* (NOT USED) */
-
- ULONG (*HandleMsg)
- (struct IntuiMessage *);
- /* (2.0) Handle preview window messages */
-
- ULONG AddIDCMP; /* (2.0) Additional IDCMP flags to be set
- for the preview window */
-
- /*
- * Currently, only the Draw#?() functions are called to draw AND erase.
- * This implies that these functions MUST do xor-style rendering.
- */
- int (*DrawLine)
- (struct Window *, int, int, int, int);
- /* (2.0) Draw a line on the preview */
- int (*EraseLine)(); /* (2.0) Erase a line from the preview (UNUSED) */
- int (*DrawBox)
- (struct Window *, int, int, int, int);
- /* (2.0) Draw a box on the preview */
- int (*EraseBox)(); /* (2.0) Erase a box from the preview (UNUSED) */
- int (*DrawOval)
- (struct Window *, int, int, int, int);
- /* (2.0) Draw an oval on the preview */
- int (*EraseOval)(); /* (2.0) Erase an oval from the preview (UNUSED) */
-
-
- int (*RenderThumb)
- (struct RastPort *, struct Buffer *, int, int);
- /* (2.0) Draw a preview thumbnail */
-
- int (*DrawMask)
- (struct Window *, struct Mask *);
- /* (2.0) Draw a mask outline */
- int (*CrawlMask)
- (struct Window *, struct Mask *);
- /* (2.0) Crawl a mask outline */
- int (*EraseMask)
- (struct Window *, struct Mask *);
- /* (2.0) Erase a mask outline */
-
- ULONG Reserved[19]; /* Reserved for future expansion */
- };
-
- #define VF_NODBUF 0x00001 /* Do not double-buffer preview */
- #define VF_FULLWIDTH 0x00002 /* Redraw full width only (eg. HAM) */
- #define VF_PRIVATE 0x00004 /* Private - do not touch ever! */
- #define VF_WORDALIGN 0x00008 /* All renders should be word-aligned */
- #define VF_NOBRUSH 0x00010 /* Preview can't support brushes */
- #define VF_NOSCANLINE 0x00020 /* No scanline rendering from scanners (2.0) */
-
- /* New for 2.0: */
- #define VF_WBPREVIEW 0x04000 /* Special flag that tells ImageFX to do
- * the following:
- * - activate the preview window
- * whenever possible
- * - always set the preview window
- * pointer to a crosshair
- * - never change the toolbox window
- * pointer
- * (2.0)
- */
-
- #define VF_EXTENDED 0x08000 /* An Extended Preview module
- containing additional palette
- handling functions (2.0) */
- #define VF_SIMPLEREFRESH 0x10000 /* Simple refresh thumbnail windows (2.0) */
-
- /*
- * Return codes from VM_xPalHandler():
- */
- enum
- {
- XPMSG_NewRegister = 1, /* selected a new register */
- XPMSG_NewRange, /* selected a new range (not used) */
- XPMSG_EditRegister, /* double-clicked a new register */
- };
-
-
- #define SCAN_PREV_H
- #endif
-