MagickCore  7.0.11
option.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore option methods.
17 */
18 #ifndef MAGICKCORE_OPTION_H
19 #define MAGICKCORE_OPTION_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 typedef enum
26 {
109 } CommandOption;
110 
111 typedef enum
112 {
114  NoValidate = 0x00000,
116  CompareValidate = 0x00002,
117  CompositeValidate = 0x00004,
118  ConvertValidate = 0x00008,
122  IdentifyValidate = 0x00080,
124  MontageValidate = 0x00200,
125  StreamValidate = 0x00400,
126  AllValidate = 0x7fffffff
127 } ValidateType;
128 
129 /*
130  Flags to describe classes of image processing options.
131  These are used to determine how a option should be processed, and
132  avoid attempting to process all options in every way posible.
133 */
134 typedef enum
135 {
136  UndefinedOptionFlag = 0x0000, /* option flag is not in use */
137 
138  ImageInfoOptionFlag = 0x0001, /* Setting stored in ImageInfo */
139  DrawInfoOptionFlag = 0x0002, /* Setting stored in DrawInfo */
140  QuantizeInfoOptionFlag = 0x0004, /* Setting stored in QuantizeInfo */
141  GlobalOptionFlag = 0x0008, /* Global Setting or Control */
142  SettingOptionFlags = 0x000F, /* mask any setting option */
143 
144  NoImageOperatorFlag = 0x0010, /* Images not required operator */
145  SimpleOperatorFlag = 0x0020, /* Simple Image processing operator */
146  ListOperatorFlag = 0x0040, /* Multi-Image processing operator */
147  GenesisOptionFlag = 0x0080, /* MagickCommandGenesis() Only Option */
148 
149  SpecialOptionFlag = 0x0100, /* Operator with Special Requirements */
150  /* EG: for specific CLI commands */
151 
152  AlwaysInterpretArgsFlag = 0x0400, /* Always Interpret escapes in Args */
153  /* CF: "convert" compatibility mode */
154  NeverInterpretArgsFlag = 0x0800, /* Never Interpret escapes in Args */
155  /* EG: filename, or delayed escapes */
156 
157  NonMagickOptionFlag = 0x1000, /* Option not used by Magick Command */
158  FireOptionFlag = 0x2000, /* Convert operation seq firing point */
159  DeprecateOptionFlag = 0x4000, /* Deprecate option (no code) */
160  ReplacedOptionFlag = 0x8800 /* Replaced Option (but still works) */
161 
163 
164 typedef struct _OptionInfo
165 {
166  const char
168 
169  ssize_t
171  flags;
172 
175 } OptionInfo;
176 
177 
178 extern MagickExport char
180  *GetNextImageOption(const ImageInfo *),
181  *RemoveImageOption(ImageInfo *,const char *);
182 
183 extern MagickExport const char
184  *CommandOptionToMnemonic(const CommandOption,const ssize_t),
185  *GetImageOption(const ImageInfo *,const char *);
186 
189  DefineImageOption(ImageInfo *,const char *),
190  DeleteImageOption(ImageInfo *,const char *),
191  IsCommandOption(const char *),
192  IsOptionMember(const char *,const char *),
194  SetImageOption(ImageInfo *,const char *,const char *);
195 
196 extern MagickExport ssize_t
198  const char *),
199  ParseChannelOption(const char *),
200  ParsePixelChannelOption(const char *),
201  ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
202 
203 extern MagickExport void
205  ResetImageOptions(const ImageInfo *),
207 
208 extern MagickExport const OptionInfo
209  *GetCommandOptionInfo(const char *value);
210 
211 #if defined(__cplusplus) || defined(c_plusplus)
212 }
213 #endif
214 
215 #endif
MagickExport char * RemoveImageOption(ImageInfo *, const char *)
Definition: option.c:3207
CommandOptionFlags
Definition: option.h:134
MagickBooleanType stealth
Definition: option.h:174
MagickExport ssize_t ParsePixelChannelOption(const char *)
MagickExport void ResetImageOptionIterator(const ImageInfo *)
Definition: option.c:3283
MagickExport ssize_t ParseChannelOption(const char *)
MagickExport const OptionInfo * GetCommandOptionInfo(const char *value)
Definition: option.c:2608
MagickBooleanType
Definition: magick-type.h:169
MagickExport void ResetImageOptions(const ImageInfo *)
struct _OptionInfo OptionInfo
const char * mnemonic
Definition: option.h:167
MagickExport MagickBooleanType IsOptionMember(const char *, const char *)
ssize_t type
Definition: option.h:170
MagickExport const char * CommandOptionToMnemonic(const CommandOption, const ssize_t)
MagickExport ssize_t GetCommandOptionFlags(const CommandOption, const MagickBooleanType, const char *)
ssize_t flags
Definition: option.h:170
MagickExport MagickBooleanType DeleteImageOption(ImageInfo *, const char *)
MagickExport void DestroyImageOptions(ImageInfo *)
MagickExport const char * GetImageOption(const ImageInfo *, const char *)
Definition: option.c:2382
MagickExport MagickBooleanType IsCommandOption(const char *)
MagickExport MagickBooleanType ListCommandOptions(FILE *, const CommandOption, ExceptionInfo *)
MagickExport MagickBooleanType SetImageOption(ImageInfo *, const char *, const char *)
Definition: option.c:3322
MagickExport MagickBooleanType DefineImageOption(ImageInfo *, const char *)
MagickExport char ** GetCommandOptions(const CommandOption)
ValidateType
Definition: option.h:111
MagickExport char * GetNextImageOption(const ImageInfo *)
MagickExport ssize_t ParseCommandOption(const CommandOption, const MagickBooleanType, const char *)
Definition: option.c:3052
#define MagickExport
CommandOption
Definition: option.h:25
MagickExport MagickBooleanType CloneImageOptions(ImageInfo *, const ImageInfo *)