home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / misc / imagefx_sdk / sas / examples / xstyle / skeleton.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-24  |  4.7 KB  |  223 lines

  1. /*
  2.  * A Skeleton Enhanced Drawing Mode for ImageFX 2.0
  3.  *
  4.  */
  5.  
  6. #include <exec/types.h>
  7. #include <scan/modall.h>
  8. #include <scan/drawinfo.h>
  9. #include "common.h"
  10.  
  11. /**********************************************************************\
  12.  
  13.                                 Library Vectors
  14.  
  15. \**********************************************************************/
  16.  
  17. /*
  18.  * XDM_Attr:
  19.  *
  20.  * Return to ImageFX some information about the Drawing Style (eg.
  21.  * whether Options are needed, whether we work on greyscale or
  22.  * color, etc.).  Called when ImageFX first scans the drawing
  23.  * style directory.
  24.  *
  25.  */
  26. ULONG __saveds __asm XDS_Attr (register __a0 struct XDrawAttr *attr)
  27. {
  28.    return(0);
  29. }
  30.  
  31. /*
  32.  * XDS_Begin:
  33.  *
  34.  * Prepare before a pixel affecting operation.
  35.  *
  36.  */
  37. int __saveds __asm XDS_Begin (register __a0 struct IDrawInfo *di)
  38. {
  39.    return(1);
  40. }
  41.  
  42. /*
  43.  * XDS_End:
  44.  *
  45.  * Cleanup after a pixel affecting operation.
  46.  *
  47.  */
  48. void __saveds __asm XDS_End (register __a0 struct IDrawInfo *di)
  49. {
  50. }
  51.  
  52. /*
  53.  * XDS_Get:
  54.  *
  55.  *
  56.  */
  57. int __saveds __asm XDS_Get (register __a0 struct IDrawInfo *di)
  58. {
  59.    return(1);
  60. }
  61.  
  62. /*
  63.  * XDS_Put:
  64.  *
  65.  *
  66.  */
  67. int __saveds __asm XDS_Put (register __a0 struct IDrawInfo *di)
  68. {
  69.    return(1);
  70. }
  71.  
  72. /*
  73.  * XDS_Options:
  74.  *
  75.  * Present a window to the user allowing him to adjust drawing style
  76.  * options.  Arguments may optionally be passed from an Arexx command.
  77.  *
  78.  */
  79. int __saveds __asm XDS_Options (register __a0 LONG *args)
  80. {
  81.    return(0);
  82. }
  83.  
  84. /*
  85.  * XDS_LoadPrefs:
  86.  *
  87.  * Set preferences according to information loaded from disk.
  88.  *
  89.  */
  90. int __saveds __asm XDS_LoadPrefs (register __a0 void *prefs)
  91. {
  92.    return(1);
  93. }
  94.  
  95. /*
  96.  * XDS_SavePrefs:
  97.  *
  98.  * Request preferences settings that are about to be saved to disk.
  99.  *
  100.  */
  101. int __saveds __asm XDS_SavePrefs (register __a0 void *prefs)
  102. {
  103.    return(1);
  104. }
  105.  
  106. /*
  107.  * XDS_HandleMButton:
  108.  *
  109.  * Handle a mousebutton event from the main window.
  110.  *
  111.  */
  112. int __saveds __asm XDS_HandleMButton (register __a0 struct IntuiMessage *msg)
  113. {
  114.    return(0);
  115. }
  116.  
  117. /*
  118.  * XDS_HandleMMove:
  119.  *
  120.  * Handle a mousemove event from the main window.
  121.  *
  122.  */
  123. int __saveds __asm XDS_HandleMMove (register __a0 struct IntuiMessage *msg)
  124. {
  125.    return(0);
  126. }
  127.  
  128. int __saveds __asm XDS_Init (void)
  129. {
  130.    return(1);
  131. }
  132.  
  133. void __saveds __asm XDS_Cleanup (void)
  134. {
  135. }
  136.  
  137. void __saveds __asm XDS_Redraw (register __d0 int left,
  138.                                 register __d1 int top,
  139.                                 register __d2 int right,
  140.                                 register __d3 int bottom)
  141. {
  142. }
  143.  
  144. BOOL __saveds __asm XDS_SaveUndo (register __a0 struct Buffer *buf,
  145.                                   register __d0 int left,
  146.                                   register __d1 int top,
  147.                                   register __d2 int w,
  148.                                   register __d3 int h)
  149. {
  150.    return(FALSE);
  151. }
  152.  
  153.  
  154. /**********************************************************************\
  155.  
  156.                          Library Initialization Stuff
  157.  
  158. \**********************************************************************/
  159.  
  160. /*
  161.  * This is the table of all the functions that can be called in this
  162.  * module.  The first four (Open, Close, Expunge, and Null) are reserved
  163.  * for system use and MUST be specified in the order shown.  The actual
  164.  * functions are in the standard module startup code.
  165.  */
  166. ULONG FuncTable[] = {
  167.    /* These four MUST be present in this order */
  168.    (ULONG) LibOpen,
  169.    (ULONG) LibClose,
  170.    (ULONG) LibExpunge,
  171.    (ULONG) LibNull,
  172.  
  173.    /* Specific to the module */
  174.    (ULONG) XDS_Attr,
  175.    (ULONG) XDS_Begin,
  176.    (ULONG) XDS_End,
  177.    (ULONG) XDS_Get,
  178.    (ULONG) XDS_Put,
  179.    (ULONG) XDS_Options,
  180.    (ULONG) XDS_LoadPrefs,
  181.    (ULONG) XDS_SavePrefs,
  182.    (ULONG) XDS_HandleMButton,
  183.    (ULONG) XDS_HandleMMove,
  184.    (ULONG) XDS_Init,
  185.    (ULONG) XDS_Cleanup,
  186.    (ULONG) XDS_Redraw,
  187.    (ULONG) XDS_SaveUndo,
  188.  
  189.    /* End with -1L */
  190.    (ULONG) -1L
  191. };
  192.  
  193. /*
  194.  * These are used by the standard module startup code.
  195.  * LibraryName is the name of the library, and LibraryID is a short
  196.  * description of the library.  Both of these are largely irrelavent,
  197.  * but they are included just for completeness.
  198.  */
  199. UBYTE LibraryID[]    = "$VER: Skeleton Extended Drawing Style 2.0.0 (13.2.94)";
  200. UBYTE LibraryType    = NT_XDRAWSTYLE;
  201.  
  202. /*
  203.  * This is called by the standard module startup code when Image Scan
  204.  * first opens the module.  Here we should fill in the NumGads,
  205.  * NewGad, Language, and LangCount fields of the provided ModuleBase
  206.  * structure if necessary.
  207.  */
  208. long  __asm UserOpen (register __a6 struct ModuleBase *modbase)
  209. {
  210.    return(TRUE);
  211. }
  212.  
  213. /*
  214.  * This is called by the standard module startup code when Image Scan
  215.  * closes the module.  It should cleanup anything allocated or obtained
  216.  * in the UserOpen() function.
  217.  */
  218. long  __asm UserClose (register __a6 struct ModuleBase *modbase)
  219. {
  220.    return(TRUE);
  221. }
  222.  
  223.