File indexing completed on 2025-01-18 10:01:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef MAGICKCORE_MONITOR_H
0019 #define MAGICKCORE_MONITOR_H
0020
0021 #if defined(__cplusplus) || defined(c_plusplus)
0022 extern "C" {
0023 #endif
0024
0025 typedef MagickBooleanType
0026 (*MagickProgressMonitor)(const char *,const MagickOffsetType,
0027 const MagickSizeType,void *);
0028
0029 MagickExport MagickBooleanType
0030 SetImageProgress(const Image *,const char *,const MagickOffsetType,
0031 const MagickSizeType);
0032
0033 MagickExport MagickProgressMonitor
0034 SetImageProgressMonitor(Image *,const MagickProgressMonitor,void *),
0035 SetImageInfoProgressMonitor(ImageInfo *,const MagickProgressMonitor,void *);
0036
0037 static inline MagickBooleanType QuantumTick(const MagickOffsetType offset,
0038 const MagickSizeType span)
0039 {
0040 if (span <= 100)
0041 return(MagickTrue);
0042 if (offset == (MagickOffsetType) (span-1))
0043 return(MagickTrue);
0044 if ((offset % (MagickOffsetType) (span/100)) == 0)
0045 return(MagickTrue);
0046 return(MagickFalse);
0047 }
0048
0049 #if defined(__cplusplus) || defined(c_plusplus)
0050 }
0051 #endif
0052
0053 #endif