option.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore option methods.
00017 */
00018 #ifndef MAGICKCORE_OPTION_H
00019 #define MAGICKCORE_OPTION_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 typedef enum
00026 {
00027   MagickUndefinedOptions = -1,
00028   MagickAlignOptions = 0,
00029   MagickAlphaChannelOptions,
00030   MagickBooleanOptions,
00031   MagickCacheOptions,
00032   MagickChannelOptions,
00033   MagickClassOptions,
00034   MagickClipPathOptions,
00035   MagickCoderOptions,
00036   MagickColorOptions,
00037   MagickColorspaceOptions,
00038   MagickCommandOptions,
00039   MagickComplexOptions,
00040   MagickComplianceOptions,
00041   MagickComposeOptions,
00042   MagickCompressOptions,
00043   MagickConfigureOptions,
00044   MagickDataTypeOptions,
00045   MagickDebugOptions,
00046   MagickDecorateOptions,
00047   MagickDelegateOptions,
00048   MagickDirectionOptions,
00049   MagickDisposeOptions,
00050   MagickDistortOptions,
00051   MagickDitherOptions,
00052   MagickEndianOptions,
00053   MagickEvaluateOptions,
00054   MagickFillRuleOptions,
00055   MagickFilterOptions,
00056   MagickFontOptions,
00057   MagickFontsOptions,
00058   MagickFormatOptions,
00059   MagickFunctionOptions,
00060   MagickGradientOptions,
00061   MagickGravityOptions,
00062   MagickIntensityOptions,
00063   MagickIntentOptions,
00064   MagickInterlaceOptions,
00065   MagickInterpolateOptions,
00066   MagickKernelOptions,
00067   MagickLayerOptions,
00068   MagickLineCapOptions,
00069   MagickLineJoinOptions,
00070   MagickListOptions,
00071   MagickLocaleOptions,
00072   MagickLogEventOptions,
00073   MagickLogOptions,
00074   MagickMagicOptions,
00075   MagickMethodOptions,
00076   MagickMetricOptions,
00077   MagickMimeOptions,
00078   MagickModeOptions,
00079   MagickModuleOptions,
00080   MagickMorphologyOptions,
00081   MagickNoiseOptions,
00082   MagickOrientationOptions,
00083   MagickPixelChannelOptions,
00084   MagickPixelIntensityOptions,
00085   MagickPixelMaskOptions,
00086   MagickPixelTraitOptions,
00087   MagickPolicyOptions,
00088   MagickPolicyDomainOptions,
00089   MagickPolicyRightsOptions,
00090   MagickPreviewOptions,
00091   MagickPrimitiveOptions,
00092   MagickQuantumFormatOptions,
00093   MagickResolutionOptions,
00094   MagickResourceOptions,
00095   MagickSparseColorOptions,
00096   MagickStatisticOptions,
00097   MagickStorageOptions,
00098   MagickStretchOptions,
00099   MagickStyleOptions,
00100   MagickThresholdOptions,
00101   MagickTypeOptions,
00102   MagickValidateOptions,
00103   MagickVirtualPixelOptions,
00104   MagickWeightOptions,
00105   MagickAutoThresholdOptions,
00106   MagickToolOptions,
00107   MagickCLIOptions
00108 } CommandOption;
00109 
00110 typedef enum
00111 {
00112   UndefinedValidate,
00113   NoValidate = 0x00000,
00114   ColorspaceValidate = 0x00001,
00115   CompareValidate = 0x00002,
00116   CompositeValidate = 0x00004,
00117   ConvertValidate = 0x00008,
00118   FormatsDiskValidate = 0x00010,
00119   FormatsMapValidate = 0x00020,
00120   FormatsMemoryValidate = 0x00040,
00121   IdentifyValidate = 0x00080,
00122   ImportExportValidate = 0x00100,
00123   MontageValidate = 0x00200,
00124   StreamValidate = 0x00400,
00125   AllValidate = 0x7fffffff
00126 } ValidateType;
00127 
00128 /*
00129   Flags to describe classes of image processing options.
00130   These are used to determine how a option should be processed, and
00131   avoid attempting to process all options in every way posible.
00132 */
00133 typedef enum
00134 {
00135   UndefinedOptionFlag       = 0x0000,  /* option flag is not in use */
00136 
00137   ImageInfoOptionFlag       = 0x0001,  /* Setting stored in ImageInfo */
00138   DrawInfoOptionFlag        = 0x0002,  /* Setting stored in DrawInfo */
00139   QuantizeInfoOptionFlag    = 0x0004,  /* Setting stored in QuantizeInfo */
00140   GlobalOptionFlag          = 0x0008,  /* Global Setting or Control */
00141   SettingOptionFlags        = 0x000F,  /* mask any setting option */
00142 
00143   NoImageOperatorFlag       = 0x0010,  /* Images not required operator */
00144   SimpleOperatorFlag        = 0x0020,  /* Simple Image processing operator */
00145   ListOperatorFlag          = 0x0040,  /* Multi-Image processing operator */
00146   GenesisOptionFlag         = 0x0080,  /* MagickCommandGenesis() Only Option */
00147 
00148   SpecialOptionFlag         = 0x0100,  /* Operator with Special Requirements */
00149                                        /* EG: for specific CLI commands */
00150 
00151   AlwaysInterpretArgsFlag   = 0x0400,  /* Always Interpret escapes in Args */
00152                                        /* CF: "convert" compatibility mode */
00153   NeverInterpretArgsFlag    = 0x0800,  /* Never Interpret escapes in Args */
00154                                        /* EG: filename, or delayed escapes */
00155 
00156   NonMagickOptionFlag       = 0x1000,  /* Option not used by Magick Command */
00157   FireOptionFlag            = 0x2000,  /* Convert operation seq firing point */
00158   DeprecateOptionFlag       = 0x4000,  /* Deprecate option (no code) */
00159   ReplacedOptionFlag        = 0x8800   /* Replaced Option (but still works) */
00160 
00161 } CommandOptionFlags;
00162 
00163 typedef struct _OptionInfo
00164 {
00165   const char
00166     *mnemonic;
00167 
00168   ssize_t
00169     type,
00170     flags;
00171 
00172   MagickBooleanType
00173     stealth;
00174 } OptionInfo;
00175 
00176 
00177 extern MagickExport char
00178   **GetCommandOptions(const CommandOption),
00179   *GetNextImageOption(const ImageInfo *),
00180   *RemoveImageOption(ImageInfo *,const char *);
00181 
00182 extern MagickExport const char
00183   *CommandOptionToMnemonic(const CommandOption,const ssize_t),
00184   *GetImageOption(const ImageInfo *,const char *);
00185 
00186 extern MagickExport MagickBooleanType
00187   CloneImageOptions(ImageInfo *,const ImageInfo *),
00188   DefineImageOption(ImageInfo *,const char *),
00189   DeleteImageOption(ImageInfo *,const char *),
00190   IsCommandOption(const char *),
00191   IsOptionMember(const char *,const char *),
00192   ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *),
00193   SetImageOption(ImageInfo *,const char *,const char *);
00194 
00195 extern MagickExport ssize_t
00196   GetCommandOptionFlags(const CommandOption,const MagickBooleanType,
00197     const char *),
00198   ParseChannelOption(const char *),
00199   ParsePixelChannelOption(const char *),
00200   ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
00201 
00202 extern MagickExport void
00203   DestroyImageOptions(ImageInfo *),
00204   ResetImageOptions(const ImageInfo *),
00205   ResetImageOptionIterator(const ImageInfo *);
00206 
00207 extern MagickExport const OptionInfo
00208   *GetCommandOptionInfo(const char *value);
00209 
00210 #if defined(__cplusplus) || defined(c_plusplus)
00211 }
00212 #endif
00213 
00214 #endif

Generated on 12 Jun 2019 for MagickCore by  doxygen 1.6.1