home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 3 / MacMania 3.toast / Tools&Utilities / Workshop v1.0 / Externals / •Code for Externals / ModuleFunctions.c < prev    next >
Encoding:
Text File  |  1994-07-18  |  3.6 KB  |  131 lines  |  [TEXT/MMCC]

  1. /******************************************************************************
  2.     File:        ModuleFunctions.c
  3.  
  4.     Contains:    This file contains the the code to perform the actions of the
  5.                 External Module.
  6.  
  7.     Written by:    Brian Powell
  8.  
  9.     Copyright:    © 1994 by Brian Powell, all rights reserved.
  10.  
  11.  ******************************************************************************/
  12.  
  13. // Include Files
  14. #include "WorkshopModule.h"
  15.  
  16. /******************************************************************************
  17.  * ModuleInit
  18.  *
  19.  * Image Workshop is initializing.  This is your chance to initialize your
  20.  * module for anything you may need.
  21.  *
  22.  * data1: NULL
  23.  * data2: NULL
  24.  ******************************************************************************/
  25.  
  26. short ModuleInit(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  27. {
  28.     short    error = 0;
  29.     
  30.     return (error);
  31. }
  32.  
  33. /******************************************************************************
  34.  * ModuleRead
  35.  *
  36.  * If your module is a reader, then this code is called to read and create the
  37.  * new image.
  38.  *
  39.  * data1: StandardFileReply *, This is the file to load
  40.  * data2: Boolean *, Whether or not you should create a new image, or merely a
  41.  *            new layer.
  42.  ******************************************************************************/
  43.  
  44. short ModuleRead(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  45. {
  46.     short    error = 0;
  47.     
  48.     return (error);
  49. }
  50.  
  51. /******************************************************************************
  52.  * ModuleSave
  53.  *
  54.  * If your module saves files, then this code is called to save the image.
  55.  *
  56.  * data1: SFReply *, File to save into
  57.  * data2: NULL
  58.  ******************************************************************************/
  59.  
  60. short ModuleSave(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  61. {
  62.     short    error = 0;
  63.     
  64.     return (error);
  65. }
  66.  
  67. /******************************************************************************
  68.  * ModuleExecute
  69.  *
  70.  * If you have a general module, whenever your module is selected by the user,
  71.  * this code is called to execute.
  72.  *
  73.  * data1: NULL
  74.  * data2: NULL
  75.  ******************************************************************************/
  76.  
  77. short ModuleExecute(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  78. {
  79.     short    error = 0;
  80.  
  81.     return (error);
  82. }
  83.  
  84. /******************************************************************************
  85.  * ModuleDispose
  86.  *
  87.  * Image Workshop is quitting.  Do any disposal items you need to.
  88.  *
  89.  * data1: NULL
  90.  * data2: NULL
  91.  ******************************************************************************/
  92.  
  93. short ModuleDispose(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  94. {
  95.     short    error = 0;
  96.     
  97.     return (error);
  98. }
  99.  
  100. /******************************************************************************
  101.  * ModuleProcessTask
  102.  *
  103.  * Your task needs processing.  Do an iteration, and let control back.
  104.  *
  105.  * data1:    long*.  Return the percentage complete your function is (0-100).
  106.  * data2:    long*.    The maximum number of ticks you'll allow between calls.
  107.  ******************************************************************************/
  108.  
  109. short ModuleProcessTask(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  110. {
  111.     short    error = 0;
  112.     
  113.     return (error);
  114. }
  115.  
  116. /******************************************************************************
  117.  * ModuleCancelTask
  118.  *
  119.  * The user canceled your task.
  120.  *
  121.  * data1: NULL
  122.  * data2: NULL
  123.  ******************************************************************************/
  124.  
  125. short ModuleCancelTask(ExternalProcPtrs functions, Ptr data1, Ptr data2, Handle *myData)
  126. {
  127.     short    error = 0;
  128.     
  129.     return (error);
  130. }
  131.