github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/utility.h (about)

     1  /*
     2    Copyright (C) 2003 - 2020 GraphicsMagick Group
     3    Copyright (C) 2002 ImageMagick Studio
     4    Copyright 1991-1999 E. I. du Pont de Nemours and Company
     5  
     6    This program is covered by multiple licenses, which are described in
     7    Copyright.txt. You should have received a copy of Copyright.txt with this
     8    package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
     9  
    10    GraphicsMagick Utility Methods.
    11  */
    12  #ifndef _MAGICK_UTILITY_H
    13  #define _MAGICK_UTILITY_H
    14  
    15  #if defined(__cplusplus) || defined(c_plusplus)
    16  extern "C" {
    17  #endif
    18  
    19  /*
    20    Enum declarations.
    21  */
    22  typedef enum
    23  {
    24    RootPath,
    25    HeadPath,
    26    TailPath,
    27    BasePath,
    28    ExtensionPath,
    29    MagickPath,
    30    SubImagePath,
    31    FullPath
    32  } PathType;
    33  
    34  /*
    35    Typedef declarations.
    36  */
    37  typedef struct _TokenInfo
    38  {
    39    int
    40      state;
    41  
    42    unsigned int
    43      flag;
    44  
    45    long
    46      offset;
    47  
    48    char
    49      quote;
    50  } TokenInfo;
    51  
    52  /*
    53    Utilities methods.
    54  */
    55  
    56  #undef ARG_NOT_USED
    57  #define ARG_NOT_USED(arg) (void) arg
    58  
    59  /*
    60    A callback function which behaves similar to strlcpy() except which
    61    optionally translates text while it is copied and always returns
    62    the number of characters which were actually copied rather than
    63    the number of characters which were available to copy.
    64  */
    65  typedef size_t
    66    (*MagickTextTranslate)(char *dst, const char *src, const size_t size);
    67  
    68  extern MagickExport char
    69    *AcquireString(const char *),
    70    *AllocateString(const char *),
    71    *Base64Encode(const unsigned char *,const size_t,size_t *),
    72    *EscapeString(const char *,const char),
    73    *GetPageGeometry(const char *),
    74    **ListFiles(const char *,const char *,long *),
    75    **StringToArgv(const char *,int *),
    76    **StringToList(const char *),
    77    *TranslateText(const ImageInfo *,Image *,const char *),
    78    *TranslateTextEx(const ImageInfo *,Image *,const char *,MagickTextTranslate);
    79  
    80  extern MagickExport const char
    81    *GetClientFilename(void) MAGICK_FUNC_CONST,
    82    *GetClientName(void) MAGICK_FUNC_CONST,
    83    *GetClientPath(void) MAGICK_FUNC_CONST,
    84    *SetClientFilename(const char *),
    85    *SetClientName(const char *),
    86    *SetClientPath(const char *);
    87  
    88  extern MagickExport double
    89    StringToDouble(const char *,const double);
    90  
    91  extern MagickExport int
    92    GetGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
    93    GlobExpression(const char *,const char *) MAGICK_FUNC_PURE,
    94    LocaleNCompare(const char *,const char *,const size_t) MAGICK_FUNC_PURE,
    95    LocaleCompare(const char *,const char *) MAGICK_FUNC_PURE,
    96    GetMagickDimension(const char *str,double *width,double *height,double *xoff,double *yoff),
    97    GetMagickGeometry(const char *geometry,long *x,long *y,unsigned long *width,
    98      unsigned long *height),
    99    MagickRandReentrant(unsigned int *seed) MAGICK_FUNC_DEPRECATED,
   100    MagickSpawnVP(const unsigned int verbose, const char *file, char *const argv[]),
   101    SystemCommand(const unsigned int,const char *),
   102    Tokenizer(TokenInfo *,unsigned,char *,size_t,char *,char *,char *,char *,
   103      char,char *,int *,char *);
   104  
   105  extern MagickExport unsigned int
   106    MagickRandNewSeed(void) MAGICK_FUNC_DEPRECATED;
   107  
   108  extern MagickExport unsigned char
   109    *Base64Decode(const char *, size_t *);
   110  
   111  extern MagickExport MagickPassFail
   112    CloneString(char **,const char *),
   113    ConcatenateString(char **,const char *),
   114    ExpandFilenames(int *,char ***),
   115    GetExecutionPath(char *),
   116    GetExecutionPathUsingName(char *),
   117    MagickCreateDirectoryPath(const char *dir,ExceptionInfo *exception);
   118  
   119  extern MagickExport MagickBool
   120    IsAccessible(const char *),
   121    IsAccessibleNoLogging(const char *),
   122    IsAccessibleAndNotEmpty(const char *),
   123    IsGeometry(const char *),
   124    IsGlob(const char *) MAGICK_FUNC_PURE,
   125    IsWriteable(const char *),
   126    MagickSceneFileName(char *filename,const char* filename_template,
   127      const char* scene_template,const MagickBool force,unsigned long scene),
   128    SubstituteString(char **buffer,const char *search,const char *replace);
   129  
   130  extern MagickExport unsigned long
   131    MultilineCensus(const char *) MAGICK_FUNC_PURE;
   132  
   133  extern MagickExport void
   134    AppendImageFormat(const char *,char *),
   135    DefineClientName(const char *),
   136    DefineClientPathAndName(const char *),
   137    ExpandFilename(char *),
   138    FormatSize(const magick_int64_t size,char *format),
   139    GetPathComponent(const char *,PathType,char *),
   140    GetToken(const char *,char **,char *) MAGICK_FUNC_DEPRECATED,
   141    LocaleLower(char *),
   142    LocaleUpper(char *),
   143    Strip(char *),
   144    SetGeometry(const Image *,RectangleInfo *);
   145  
   146  extern MagickExport void
   147    FormatString(char *string,const char *format,...) MAGICK_ATTRIBUTE((__format__ (__printf__,2,3))),
   148    FormatStringList(char *string,const char *format,va_list operands) MAGICK_ATTRIBUTE((__format__ (__printf__,2,0))),
   149    MagickFormatString(char *string,const size_t length,const char *format,...) MAGICK_ATTRIBUTE((__format__ (__printf__,3,4))),
   150    MagickFormatStringList(char *string,const size_t length,const char *format,va_list operands) MAGICK_ATTRIBUTE((__format__ (__printf__,3,0)));
   151  
   152  extern MagickExport magick_int64_t
   153    MagickSizeStrToInt64(const char *str,const unsigned int kilo);
   154  
   155  extern MagickExport size_t
   156    MagickGetToken(const char *start,char **end,char *token,
   157                   const size_t buffer_length),
   158    MagickStripSpacesFromString(char *string),
   159    MagickStrlCat(char *dst, const char *src, const size_t size) MAGICK_FUNC_NONNULL,
   160    MagickStrlCpy(char *dst, const char *src, const size_t size) MAGICK_FUNC_NONNULL,
   161    MagickStrlCpyTrunc(char *dst, const char *src, const size_t size) MAGICK_FUNC_NONNULL;
   162  
   163  #if defined(MAGICK_IMPLEMENTATION)
   164  #  include "magick/utility-private.h"
   165  #endif /* defined(MAGICK_IMPLEMENTATION) */
   166  
   167  #if defined(__cplusplus) || defined(c_plusplus)
   168  }
   169  #endif
   170  
   171  #endif
   172  
   173  /*
   174   * Local Variables:
   175   * mode: c
   176   * c-basic-offset: 2
   177   * fill-column: 78
   178   * End:
   179   */