/*
 * Scan 'C' Header File
 * Written by Thomas Krehbiel
 *
 * Command processing (Arexx).
 *
 */

#ifndef SCAN_CMD_H


#define CMD_Normal         (0x00)
#define CMD_NoRegion       (0x01)       /* does not work on regions */
#define CMD_NoRedraw       (0x02)       /* do not redraw screen after */
#define CMD_NoUndo         (0x04)       /* shouldn't save undo buffer */
#define CMD_NoBuffer       (0x08)       /* doesn't require a buffer */
                                        /* (implies NoUndo & NoRegion) */
#define CMD_NoBrush        (0x10)       /* Cannot be done on a brush */

#define CMD_NoNothing      (0xFF)

#define CMD_NewVirt        (0x100)      /* do NewVirtual() before render */
#define CMD_BrushOnly      (0x200)      /* only affects brushes */


enum CMD_Tags {

   CMD_Dummy = 0,

   CMD_Negative,
   CMD_Solarize,
   CMD_Posterize,
   CMD_FalseColor,
   CMD_Halftone,
   CMD_ConvertToGrey,
   CMD_ConvertToColor,

   CMD_Sharpen,
   CMD_EdgeEnhance,
   CMD_AntiAlias,
   CMD_RIP,
   CMD_RemoveFeature,
   CMD_ColorCorrect,
   CMD_DynamicRange,
   CMD_obsoleteMF,
   CMD_NTSCFilter,

   CMD_MotionBlur,
   CMD_ReliefMap,
   CMD_HorizFlip,
   CMD_VertFlip,
   CMD_EdgeDetect,

   CMD_MergeBuffers,

   CMD_NewBuffer,
   CMD_GrabBuffer,
   CMD_DelBuffer,
   CMD_ClearBuffer,
   CMD_CopyBuffer,
   CMD_SwapBuffers,
   CMD_KillSwapBuffer,
   CMD_CountColors,

   CMD_Rotate90,
   CMD_oops3,
   CMD_Rotate180,
   CMD_RotateAny,

   CMD_Roughen,
   CMD_Distort,
   CMD_Scroll,
   CMD_UserTransform,
   CMD_oops14,
   CMD_oops15,
   CMD_oops16,
   CMD_oops17,
   CMD_oops18,

   CMD_Red,
   CMD_Green,
   CMD_Blue,
   CMD_Brightness,
   CMD_Contrast,
   CMD_Gamma,

   CMD_LoadBuffer,
   CMD_SaveBuffer,
   CMD_LoadBufferCB,
   CMD_SaveBufferCB,
   CMD_LoadBrush,
   CMD_SaveBrush,
   CMD_LoadBrushCB,
   CMD_SaveBrushCB,

   CMD_Crop,

   CMD_PickupSwap,
   CMD_Convolve,
   CMD_BWToGrey,

   CMD_GetBrush,
   CMD_PutBrush,

   CMD_Scale,
   CMD_SmoothScale,

   CMD_LoadAlpha,
   CMD_EditAlpha,
   CMD_CopyToAlpha,
   CMD_CopyFromAlpha,
   CMD_DeleteAlpha,

   CMD_HorizMirror,
   CMD_VertMirror,

   CMD_Morph,

   CMD_Undo,

   CMD_BrushOutline,
   CMD_BrushTrim,
   CMD_BrushHandle,

   CMD_Limit,

   CMD_Zoom,
   CMD_Pan,
   CMD_Exact,

   CMD_OilTransfer,
   CMD_Fisheye,
   CMD_Disperse,
   CMD_Wave,

   CMD_ExpandRegion,
   CMD_ShrinkRegion,

   CMD_Xor,
   CMD_Add,
   CMD_Subtract,
   CMD_Matte,

   CMD_Blur,

   CMD_BrushTransparent,
   CMD_CropToSwap,

   CMD_Point,
   CMD_Line,
   CMD_Curve,
   CMD_Box,
   CMD_FilledBox,
   CMD_Oval,
   CMD_FilledOval,
   CMD_Poly,
   CMD_FilledPoly,
   CMD_Flood,
   CMD_FreeDot,
   CMD_FreeLine,
   CMD_FilledFree,
   CMD_Airbrush,
   CMD_Text,

   CMD_RawPoint,
   CMD_RawLine,
   CMD_RawCurve,
   CMD_RawBox,
   CMD_RawFilledBox,
   CMD_RawOval,
   CMD_RawFilledOval,
   CMD_RawPoly,
   CMD_RawFilledPoly,
   CMD_RawFlood,

   CMD_Balance,

   CMD_Map,

   CMD_BrushToSwap,

   CMD_UnsharpMask,

   CMD_BorderScale,

   CMD_SaveAlpha,
   CMD_CreateAlpha,

   CMD_LoadBufferAs,

   CMD_BrushStroke,

   CMD_LoadMAGIC,

   CMD_InvertRegion,

   CMD_Texture,
   CMD_ChangeColor,

   CMD_Shear,
   CMD_VideoFilter,
   CMD_MedianFilter,
   CMD_WaveDistort,
   CMD_Swirl,
   CMD_Pinch,
   CMD_Punch,
   CMD_PolarMosaic,
   CMD_Sphere,

   CMD_LAST
} ;

typedef BOOL (*CMDPTR)(struct Buffer *, ...);

/*
 * RXCMD - Used to define a table of Arexx commands that something
 *         recognizes.  The table is terminated with a NULL Keyword
 *         field.
 */

#define ArexxProto   struct RexxMsg *msg, LONG *args

#define ASTR(i)      ((char *)args[(i)])
#define ANUM(i)      (atol((char *)args[(i)]))

typedef struct {
   char       *Keyword;
   int       (*Code)(ArexxProto);
   char       *Template;
   long        Reserved[3];
} RXCMD;

#define MAX_ARGS     (24)

#define SCAN_CMD_H
#endif

