home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Thumbnail Preview Window Definitions.
- *
- */
-
- #ifndef SCAN_PREVINFO_H
-
-
- /*
- * Tags passed to DoPreviewWindow() function:
- *
- */
- enum
- {
-
- DPW_Title = 1, /* Title of requester */
- DPW_HelpNode, /* Help text node */
-
- DPW_OkayGadget, /* Provide Okay gadget */
- DPW_CancelGadget, /* Provide Cancel gadget */
- DPW_LoadGadget, /* Provide Load gadget */
- DPW_SaveGadget, /* Provide Save gadget */
- DPW_DefaultsGadget, /* Provide "Defaults" gadget */
-
- DPW_Activate, /* ID of first string gadget to activate */
- DPW_NewGads, /* Caller's NewGads */
- DPW_Text, /* Text array for caller's gadgets */
-
- DPW_MainBuf, /* Buffer user is working on */
-
- DPW_TopPreview, /* Called to make preview for top area */
- DPW_BottomPreview, /* Called to make preview for bottom area */
- DPW_Affect, /* Called to do operation on the buffer */
-
- DPW_Init, /* Caller's initialize function */
- DPW_Cleanup, /* Caller's cleanup function */
- DPW_Load, /* Called when Load hit */
- DPW_Save, /* Called when Save hit */
- DPW_Defaults, /* Called when Defaults hit */
- DPW_PreInit, /* Called before gadgets added */
-
- DPW_MouseMove, /* Function to call on MOUSEMOVE's */
- DPW_MouseButton, /* Function to call on MOUSEBUTTON's */
-
- DPW_Dimensions, /* Struct to fill in with window dimensions */
- DPW_UserWidth, /* User requires this much width */
- DPW_UserHeight, /* User requires this much height */
-
- DPW_PrevInfo, /* Request pointer to the PrevInfo struct */
-
- /* These must be specified AFTER a DPW_Text tag: */
- DPW_OkayGadgetID, /* Provide Okay gadget */
- DPW_CancelGadgetID, /* Provide Cancel gadget */
- DPW_LoadGadgetID, /* Provide Load gadget */
- DPW_SaveGadgetID, /* Provide Save gadget */
- DPW_DefaultsGadgetID, /* Provide "Defaults" gadget */
- DPW_TitleID, /* Index of title into TextArray */
-
- DPW_Separation, /* Pixels to put between the thumbnails */
-
- DPW_Noisy, /* Receive input from preview screen */
-
- DPW_PreviewInit, /* Called after top preview is rendered:
- __stdargs (*)(struct Window *, struct PrevInfo *, int, int); */
-
- };
-
- #define DPW_Seperation DPW_Separation
-
- /*
- * Gadget ID's for the standard gadgets:
- */
- #define ID_POkay (9001)
- #define ID_PCancel (9002)
- #define ID_PPreview (9003)
- #define ID_PLoad (9004)
- #define ID_PSave (9005)
- #define ID_PDefaults (9006)
-
-
- /*
- * PrevDimensions:
- *
- * Structure that is filled out with a DPW_Dimensions tag.
- */
- struct PrevDimensions
- {
-
- WORD Width, Height; /* Window width/height */
-
- WORD BeforeBLE, /* Size of area set aside for */
- BeforeBTE, /* the "before" thumbnail */
- BeforeBW, /* The "Border" */
- BeforeBH;
-
- WORD BeforeLE, /* Actual position of the */
- BeforeTE, /* "before" thumbnail */
- BeforeW,
- BeforeH;
-
- WORD AfterBLE, /* Size of area set aside for */
- AfterBTE, /* the "after" thumbnail */
- AfterBW, /* The "Border" */
- AfterBH;
-
- WORD AfterLE, /* Actual position of the */
- AfterTE, /* "after" thumbnail */
- AfterW,
- AfterH;
-
- WORD UWidth, UHeight; /* User area width/height */
- WORD ULeft, UTop; /* User area left/top */
-
- LONG reserved[8];
-
- };
-
-
- /*
- * PrevInfo:
- *
- * Information about a preview thumbnail. All of this information
- * should be considered READ ONLY.
- *
- */
- struct PrevInfo
- {
-
- struct Buffer *Buffer; /* Small representation of the
- original buffer to preview */
- UBYTE *Rendered; /* 8-bit chunky rendered image of
- the original buffer, for writing
- to the display */
- WORD RWidth, /* Rendered pixel width/height */
- RHeight;
- UBYTE Palette[768]; /* Palette for the 8-bit chunky
- rendering, and for the subsequent
- "after" image rendering */
- UWORD Colors; /* Total number of colors in the palette */
- UWORD Offset; /* Offset to start of palette */
-
- struct BitMap *BM; /* Temp BM/RP for WritePixelArray */
- struct RastPort RP;
-
- WORD NWidth, /* Size of area dedicated to thumbnail */
- NHeight; /* (actual nail may be smaller) */
-
- UBYTE pad1;
- UBYTE pad2[3];
- ULONG pad3[2];
- ULONG pad4[2];
-
- ULONG pad5[8];
- ULONG pad6[8];
-
- int (*AffectCode)(struct Buffer *);
-
- APTR PreviewSpecific; /* Preview-specific information */
-
- ULONG reserved[15];
-
- };
-
-
- /*
- * Flags for CreatePreview() function:
- */
- #define PIF_NORENDER (0x0001) /* Don't render in CreatePreview */
- #define PIF_NOPALETTE (0x0002) /* Don't render a palette */
-
-
- #ifdef SCANPRIVATE
-
- /*
- * Tags passed to CreatePreviewTags(): (NOT IMPLEMENTED, SPECULATIVE)
- */
- enum {
-
- CRP_Width = 1, /* Thumbnail width */
- CRP_Height, /* Thumbnail height */
- CRP_SourceBuffer, /* Source Buffer struct */
-
- };
-
- #endif
-
- #define SCAN_PREVINFO_H
- #endif
-