MagickCore  6.7.5
option.h
Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2012 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.
00006   obtain a copy of the License at
00007   
00008     http://www.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   MagickAlphaOptions,
00030   MagickBooleanOptions,
00031   MagickChannelOptions,
00032   MagickClassOptions,
00033   MagickClipPathOptions,
00034   MagickCoderOptions,
00035   MagickColorOptions,
00036   MagickColorspaceOptions,
00037   MagickCommandOptions,
00038   MagickComposeOptions,
00039   MagickCompressOptions,
00040   MagickConfigureOptions,
00041   MagickDataTypeOptions,
00042   MagickDebugOptions,
00043   MagickDecorateOptions,
00044   MagickDelegateOptions,
00045   MagickDirectionOptions,
00046   MagickDisposeOptions,
00047   MagickDistortOptions,
00048   MagickDitherOptions,
00049   MagickEndianOptions,
00050   MagickEvaluateOptions,
00051   MagickFillRuleOptions,
00052   MagickFilterOptions,
00053   MagickFontOptions,
00054   MagickFontsOptions,
00055   MagickFormatOptions,
00056   MagickFunctionOptions,
00057   MagickGravityOptions,
00058   MagickIntentOptions,
00059   MagickInterlaceOptions,
00060   MagickInterpolateOptions,
00061   MagickKernelOptions,
00062   MagickLayerOptions,
00063   MagickLineCapOptions,
00064   MagickLineJoinOptions,
00065   MagickListOptions,
00066   MagickLocaleOptions,
00067   MagickLogEventOptions,
00068   MagickLogOptions,
00069   MagickMagicOptions,
00070   MagickMethodOptions,
00071   MagickMetricOptions,
00072   MagickMimeOptions,
00073   MagickModeOptions,
00074   MagickModuleOptions,
00075   MagickMorphologyOptions,
00076   MagickNoiseOptions,
00077   MagickOrientationOptions,
00078   MagickPixelChannelOptions,
00079   MagickPixelTraitOptions,
00080   MagickPolicyOptions,
00081   MagickPolicyDomainOptions,
00082   MagickPolicyRightsOptions,
00083   MagickPreviewOptions,
00084   MagickPrimitiveOptions,
00085   MagickQuantumFormatOptions,
00086   MagickResolutionOptions,
00087   MagickResourceOptions,
00088   MagickSparseColorOptions,
00089   MagickStatisticOptions,
00090   MagickStorageOptions,
00091   MagickStretchOptions,
00092   MagickStyleOptions,
00093   MagickThresholdOptions,
00094   MagickTypeOptions,
00095   MagickValidateOptions,
00096   MagickVirtualPixelOptions
00097 } CommandOption;
00098 
00099 typedef enum
00100 {
00101   UndefinedValidate,
00102   NoValidate = 0x00000,
00103   CompareValidate = 0x00001,
00104   CompositeValidate = 0x00002,
00105   ConvertValidate = 0x00004,
00106   FormatsInMemoryValidate = 0x00008,
00107   FormatsOnDiskValidate = 0x00010,
00108   IdentifyValidate = 0x00020,
00109   ImportExportValidate = 0x00040,
00110   MontageValidate = 0x00080,
00111   StreamValidate = 0x00100,
00112   AllValidate = 0x7fffffff
00113 } ValidateType;
00114 
00115 typedef struct _OptionInfo
00116 {
00117   const char
00118     *mnemonic;
00119 
00120   ssize_t
00121     type,
00122     flags;
00123 
00124   MagickBooleanType
00125     stealth;
00126 } OptionInfo;
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   allow use to avoid attempting to process each option in every way posible.
00132 */
00133 typedef enum
00134 {
00135   UndefinedOptionFlag       = 0x0000,  /* option flag is not in use */
00136 
00137   ImageInfoOptionFlag       = 0x0001,  /* Setting for ImageInfo */
00138   DrawInfoOptionFlag        = 0x0002,  /* Setting for DrawInfo */
00139   QuantizeInfoOptionFlag    = 0x0004,  /* Setting for QuantizeInfo */
00140   GlobalOptionFlag          = 0x0008,  /* Setting for Global Option */
00141   SettingOptionFlags        = 0x000F,  /* mask for all setting options */
00142 
00143   SimpleOperatorOptionFlag  = 0x0010,  /* Simple Image processing operator */
00144   ListOperatorOptionFlag    = 0x0020,  /* Multi-Image processing operator */
00145   SpecialOptionFlag         = 0x0040,  /* Special handled Option */
00146   GenesisOptionFlag         = 0x0080,  /* Genesis Command Wrapper Option  */
00147 
00148   NonConvertOptionFlag      = 0x1000,  /* Option not used by Convert/Magick */
00149   FireOptionFlag            = 0x4000,  /* Convert operation seq firing point */
00150   DeprecateOptionFlag       = 0x8000   /* Deprecate option, give warning */
00151 
00152 } CommandOptionFlags;
00153 
00154 
00155 extern MagickExport char
00156   **GetCommandOptions(const CommandOption),
00157   *GetNextImageOption(const ImageInfo *),
00158   *RemoveImageOption(ImageInfo *,const char *);
00159 
00160 extern MagickExport const char
00161   *CommandOptionToMnemonic(const CommandOption,const ssize_t),
00162   *GetImageOption(const ImageInfo *,const char *);
00163 
00164 extern MagickExport MagickBooleanType
00165   CloneImageOptions(ImageInfo *,const ImageInfo *),
00166   DefineImageOption(ImageInfo *,const char *),
00167   DeleteImageOption(ImageInfo *,const char *),
00168   IsCommandOption(const char *),
00169   ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *),
00170   SetImageOption(ImageInfo *,const char *,const char *);
00171 
00172 extern MagickExport ssize_t
00173   GetCommandOptionFlags(const CommandOption,const MagickBooleanType,
00174     const char *),
00175   ParseChannelOption(const char *),
00176   ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
00177 
00178 extern MagickExport void
00179   DestroyImageOptions(ImageInfo *),
00180   ResetImageOptions(const ImageInfo *),
00181   ResetImageOptionIterator(const ImageInfo *);
00182 
00183 #if defined(__cplusplus) || defined(c_plusplus)
00184 }
00185 #endif
00186 
00187 #endif