home *** CD-ROM | disk | FTP | other *** search
- /*
- * A Skeleton Enhanced Drawing Mode for ImageFX 2.0
- *
- */
-
- #include <exec/types.h>
- #include <scan/modall.h>
- #include <scan/drawinfo.h>
-
- /**********************************************************************\
-
- Library Vectors
-
- \**********************************************************************/
-
- /*
- * XDM_Attr:
- *
- * Return to ImageFX some information about the Drawing Mode (eg.
- * whether Options are needed, whether we work on greyscale or
- * color, etc.). Called when ImageFX first scans the drawing
- * mode directory.
- *
- */
- ULONG __saveds __asm XDM_Attr (register __a0 struct XDrawAttr *da)
- {
- da->Flags = 0;
- da->Priority = 0;
- return(0);
- }
-
- /*
- * XDM_Init:
- *
- * Initialize the drawing mode.
- *
- */
- int __saveds __asm XDM_Init (void)
- {
- return(1);
- }
-
- /*
- * XDM_Cleanup:
- *
- * Cleanup the drawing mode.
- *
- */
- void __saveds __asm XDM_Cleanup (void)
- {
- }
-
- /*
- * XDM_Begin:
- *
- * Prepare before a pixel affecting operation.
- *
- */
- int __saveds __asm XDM_Begin (register __a0 struct IDrawInfo *di)
- {
- return(1);
- }
-
- /*
- * XDM_End:
- *
- * Cleanup after a pixel affecting operation.
- *
- */
- void __saveds __asm XDM_End (register __a0 struct IDrawInfo *di)
- {
- }
-
- /*
- * XDM_Affect:
- *
- * Affect a block of pixels. We may also affect some of the
- * parameters of the IDrawInfo structure, such as the X & Y
- * location of the block of pixels.
- *
- */
- void __saveds __asm XDM_Affect (register __a0 struct IDrawInfo *di)
- {
- }
-
- /*
- * XDM_Options:
- *
- * Present a window to the user allowing him to adjust drawing mode
- * options. Arguments may optionally be passed from an Arexx command.
- * This function will only be called if the flag XDMF_AreOptions is
- * returned from XDM_Attr().
- *
- */
- int __saveds __asm XDM_Options (register __a0 LONG *args)
- {
- return(0);
- }
-
- /*
- * XDM_LoadPrefs:
- *
- * Set preferences according to information loaded from disk.
- *
- */
- int __saveds __asm XDM_LoadPrefs (register __a0 void *prefs)
- {
- return(1);
- }
-
- /*
- * XDM_SavePrefs:
- *
- * Request preferences settings that are about to be saved to disk.
- *
- */
- int __saveds __asm XDM_SavePrefs (register __a0 void *prefs)
- {
- return(1);
- }
-
-
- /**********************************************************************\
-
- Library Initialization Stuff
-
- \**********************************************************************/
-
- /*
- * This is the table of all the functions that can be called in this
- * module. The first four (Open, Close, Expunge, and Null) are reserved
- * for system use and MUST be specified in the order shown. The actual
- * functions are in the standard module startup code.
- */
- ULONG FuncTable[] = {
- /* These four MUST be present in this order */
- (ULONG) LibOpen,
- (ULONG) LibClose,
- (ULONG) LibExpunge,
- (ULONG) LibNull,
-
- /* Specific to the module */
- (ULONG) XDM_Attr,
- (ULONG) XDM_Begin,
- (ULONG) XDM_End,
- (ULONG) XDM_Affect,
- (ULONG) XDM_Options,
- (ULONG) XDM_LoadPrefs,
- (ULONG) XDM_SavePrefs,
- (ULONG) 0,
- (ULONG) 0,
- (ULONG) XDM_Init,
- (ULONG) XDM_Cleanup,
-
- /* End with -1L */
- (ULONG) -1L
- };
-
- /*
- * These are used by the standard module startup code.
- * LibraryName is the name of the library, and LibraryID is a short
- * description of the library. Both of these are largely irrelavent,
- * but they are included just for completeness.
- */
- UBYTE LibraryID[] = "$VER: Skeleton Extended Drawing Mode 2.0.0 (13.2.94)";
- UBYTE LibraryType = NT_XDRAWMODE;
-
- /*
- * This is called by the standard module startup code when Image Scan
- * first opens the module. Here we should fill in the NumGads,
- * NewGad, Language, and LangCount fields of the provided ModuleBase
- * structure if necessary.
- */
- long __asm UserOpen (register __a6 struct ModuleBase *modbase)
- {
- return(TRUE);
- }
-
- /*
- * This is called by the standard module startup code when Image Scan
- * closes the module. It should cleanup anything allocated or obtained
- * in the UserOpen() function.
- */
- long __asm UserClose (register __a6 struct ModuleBase *modbase)
- {
- return(TRUE);
- }
-
-