home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / misc / imagefx_sdk / include / scan / cmd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-19  |  4.3 KB  |  262 lines

  1. /*
  2.  * ImageFX Development Header File
  3.  * Copyright © 1991-1995 Nova Design, Inc.
  4.  * Written by Thomas Krehbiel
  5.  *
  6.  * Command Processing And Arexx Structures
  7.  *
  8.  */
  9.  
  10. #ifndef SCAN_CMD_H
  11.  
  12.  
  13. /*
  14.  * The following information is used internally:
  15.  *
  16.  */
  17.  
  18. #ifdef SCANPRIVATE
  19.  
  20. #define CMD_Normal         (0x00)
  21. #define CMD_NoRegion       (0x01)       /* does not work on regions */
  22. #define CMD_NoRedraw       (0x02)       /* do not redraw screen after */
  23. #define CMD_NoUndo         (0x04)       /* shouldn't save undo buffer */
  24. #define CMD_NoBuffer       (0x08)       /* doesn't require a buffer */
  25.                                         /* (implies NoUndo & NoRegion) */
  26. #define CMD_NoBrush        (0x10)       /* Cannot be done on a brush */
  27.  
  28. #define CMD_NoNothing      (0xFF)
  29.  
  30. #define CMD_NewVirt        (0x100)      /* do NewVirtual() before render */
  31. #define CMD_BrushOnly      (0x200)      /* only affects brushes */
  32.  
  33.  
  34. enum CMD_Tags {
  35.  
  36.    CMD_Dummy = 0,
  37.  
  38.    CMD_Negative,
  39.    CMD_Solarize,
  40.    CMD_Posterize,
  41.    CMD_FalseColor,
  42.    CMD_Halftone,
  43.    CMD_ConvertToGrey,
  44.    CMD_ConvertToColor,
  45.  
  46.    CMD_Sharpen,
  47.    CMD_EdgeEnhance,
  48.    CMD_AntiAlias,
  49.    CMD_RIP,
  50.    CMD_RemoveFeature,
  51.    CMD_ColorCorrect,
  52.    CMD_DynamicRange,
  53.    CMD_obsoleteMF,
  54.    CMD_NTSCFilter,
  55.  
  56.    CMD_MotionBlur,
  57.    CMD_ReliefMap,
  58.    CMD_HorizFlip,
  59.    CMD_VertFlip,
  60.    CMD_EdgeDetect,
  61.  
  62.    CMD_MergeBuffers,
  63.  
  64.    CMD_NewBuffer,
  65.    CMD_GrabBuffer,
  66.    CMD_DelBuffer,
  67.    CMD_ClearBuffer,
  68.    CMD_CopyBuffer,
  69.    CMD_SwapBuffers,
  70.    CMD_KillSwapBuffer,
  71.    CMD_CountColors,
  72.  
  73.    CMD_Rotate90,
  74.    CMD_oops3,
  75.    CMD_Rotate180,
  76.    CMD_RotateAny,
  77.  
  78.    CMD_Roughen,
  79.    CMD_Distort,
  80.    CMD_Scroll,
  81.    CMD_UserTransform,
  82.    CMD_oops14,
  83.    CMD_oops15,
  84.    CMD_oops16,
  85.    CMD_oops17,
  86.    CMD_oops18,
  87.  
  88.    CMD_Red,
  89.    CMD_Green,
  90.    CMD_Blue,
  91.    CMD_Brightness,
  92.    CMD_Contrast,
  93.    CMD_Gamma,
  94.  
  95.    CMD_LoadBuffer,
  96.    CMD_SaveBuffer,
  97.    CMD_LoadBufferCB,
  98.    CMD_SaveBufferCB,
  99.    CMD_LoadBrush,
  100.    CMD_SaveBrush,
  101.    CMD_LoadBrushCB,
  102.    CMD_SaveBrushCB,
  103.  
  104.    CMD_Crop,
  105.  
  106.    CMD_PickupSwap,
  107.    CMD_Convolve,
  108.    CMD_BWToGrey,
  109.  
  110.    CMD_GetBrush,
  111.    CMD_PutBrush,
  112.  
  113.    CMD_Scale,
  114.    CMD_SmoothScale,
  115.  
  116.    CMD_LoadAlpha,
  117.    CMD_EditAlpha,
  118.    CMD_CopyToAlpha,
  119.    CMD_CopyFromAlpha,
  120.    CMD_DeleteAlpha,
  121.  
  122.    CMD_HorizMirror,
  123.    CMD_VertMirror,
  124.  
  125.    CMD_Morph,
  126.  
  127.    CMD_Undo,
  128.  
  129.    CMD_BrushOutline,
  130.    CMD_BrushTrim,
  131.    CMD_BrushHandle,
  132.  
  133.    CMD_Limit,
  134.  
  135.    CMD_Zoom,
  136.    CMD_Pan,
  137.    CMD_Exact,
  138.  
  139.    CMD_OilTransfer,
  140.    CMD_Fisheye,
  141.    CMD_Disperse,
  142.    CMD_Wave,
  143.  
  144.    CMD_ExpandRegion,
  145.    CMD_ShrinkRegion,
  146.  
  147.    CMD_Xor,
  148.    CMD_Add,
  149.    CMD_Subtract,
  150.    CMD_Matte,
  151.  
  152.    CMD_Blur,
  153.  
  154.    CMD_BrushTransparent,
  155.    CMD_CropToSwap,
  156.  
  157.    CMD_Point,
  158.    CMD_Line,
  159.    CMD_Curve,
  160.    CMD_Box,
  161.    CMD_FilledBox,
  162.    CMD_Oval,
  163.    CMD_FilledOval,
  164.    CMD_Poly,
  165.    CMD_FilledPoly,
  166.    CMD_Flood,
  167.    CMD_FreeDot,
  168.    CMD_FreeLine,
  169.    CMD_FilledFree,
  170.    CMD_Airbrush,
  171.    CMD_Text,
  172.  
  173.    CMD_RawPoint,
  174.    CMD_RawLine,
  175.    CMD_RawCurve,
  176.    CMD_RawBox,
  177.    CMD_RawFilledBox,
  178.    CMD_RawOval,
  179.    CMD_RawFilledOval,
  180.    CMD_RawPoly,
  181.    CMD_RawFilledPoly,
  182.    CMD_RawFlood,
  183.  
  184.    CMD_Balance,
  185.  
  186.    CMD_Map,
  187.  
  188.    CMD_BrushToSwap,
  189.  
  190.    CMD_UnsharpMask,
  191.  
  192.    CMD_BorderScale,
  193.  
  194.    CMD_SaveAlpha,
  195.    CMD_CreateAlpha,
  196.  
  197.    CMD_LoadBufferAs,
  198.  
  199.    CMD_BrushStroke,
  200.  
  201.    CMD_LoadMAGIC,
  202.  
  203.    CMD_InvertRegion,
  204.  
  205.    CMD_Texture,
  206.    CMD_ChangeColor,
  207.  
  208.    CMD_Shear,
  209.    CMD_VideoFilter,
  210.    CMD_MedianFilter,
  211.    CMD_WaveDistort,
  212.    CMD_Swirl,
  213.    CMD_Pinch,
  214.    CMD_Punch,
  215.    CMD_PolarMosaic,
  216.    CMD_Sphere,
  217.  
  218.    CMD_PickupRegion,
  219.  
  220.    CMD_LAST
  221. };
  222.  
  223. typedef BOOL (*CMDPTR)(struct Buffer *, ...);
  224.  
  225. #endif
  226.  
  227.  
  228. /*
  229.  * A handy way to define the prototype for the function vector in RXCMD.
  230.  */
  231. #define ArexxProto   struct RexxMsg *msg, LONG *args
  232.  
  233. /*
  234.  * RXCMD:
  235.  *
  236.  * Defines an Arexx command, arguments, and a handler vector.
  237.  * This structure is used to define Arexx commands for ImageFX modules.
  238.  * (It's also used internally for command processing.)
  239.  *
  240.  */
  241. typedef struct
  242. {
  243.    char       *Keyword;                /* name of command */
  244.    int       (*Code)(ArexxProto);      /* function to handle the command */
  245.    char       *Template;               /* argument template */
  246.    long        Reserved[3];
  247. } RXCMD;
  248.  
  249. /*
  250.  * Handle macros for parsing arguments.
  251.  */
  252. #define ASTR(i)      ((char *)args[(i)])
  253. #define ANUM(i)      (atol((char *)args[(i)]))
  254.  
  255. /*
  256.  * The maximum number of arguments ImageFX can parse per command.
  257.  */
  258. #define MAX_ARGS     (24)
  259.  
  260. #define SCAN_CMD_H
  261. #endif
  262.