2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % M M OOO N N IIIII TTTTT OOO RRRR %
7 % MM MM O O NN N I T O O R R %
8 % M M M O O N N N I T O O RRRR %
9 % M M O O N NN I T O O R R %
10 % M M OOO N N IIIII T OOO R R %
13 % MagickCore Progress Monitor Methods %
20 % Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % https://www.imagemagick.org/script/license.php %
28 % Unless required by applicable law or agreed to in writing, software %
29 % distributed under the License is distributed on an "AS IS" BASIS, %
30 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31 % See the License for the specific language governing permissions and %
32 % limitations under the License. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 #include "MagickCore/studio.h"
44 #include "MagickCore/image.h"
45 #include "MagickCore/log.h"
46 #include "MagickCore/monitor.h"
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 % S e t I m a g e P r o g r e s s M o n i t o r %
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 % SetImageProgressMonitor() sets the image progress monitor to the specified
60 % method and returns the previous progress monitor if any. The progress
61 % monitor method looks like this:
63 % MagickBooleanType MagickProgressMonitor(const char *text,
64 % const MagickOffsetType offset,const MagickSizeType extent,
67 % If the progress monitor returns MagickFalse, the current operation is
70 % The format of the SetImageProgressMonitor method is:
72 % MagickProgressMonitor SetImageProgressMonitor(Image *image,
73 % const MagickProgressMonitor progress_monitor,void *client_data)
75 % A description of each parameter follows:
79 % o progress_monitor: Specifies a pointer to a method to monitor progress of
82 % o client_data: Specifies a pointer to any client data.
85 MagickExport MagickProgressMonitor SetImageProgressMonitor(Image *image,
86 const MagickProgressMonitor progress_monitor,void *client_data)
91 previous_monitor=image->progress_monitor;
92 image->progress_monitor=progress_monitor;
93 image->client_data=client_data;
94 return(previous_monitor);
98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102 % S e t I m a g e I n f o P r o g r e s s M o n i t o r %
106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 % SetImageInfoProgressMonitor() sets the image_info progress monitor to the
109 % specified method and returns the previous progress monitor if any. The
110 % progress monitor method looks like this:
112 % MagickBooleanType MagickProgressMonitor(const char *text,
113 % const MagickOffsetType offset,const MagickSizeType extent,
116 % If the progress monitor returns MagickFalse, the current operation is
119 % The format of the SetImageInfoProgressMonitor method is:
121 % MagickProgressMonitor SetImageInfoProgressMonitor(ImageInfo *image_info,
122 % const MagickProgressMonitor progress_monitor,void *client_data)
124 % A description of each parameter follows:
126 % o image_info: the image info.
128 % o progress_monitor: Specifies a pointer to a method to monitor progress of
129 % an image operation.
131 % o client_data: Specifies a pointer to any client data.
134 MagickExport MagickProgressMonitor SetImageInfoProgressMonitor(
135 ImageInfo *image_info,const MagickProgressMonitor progress_monitor,
138 MagickProgressMonitor
141 previous_monitor=image_info->progress_monitor;
142 image_info->progress_monitor=progress_monitor;
143 image_info->client_data=client_data;
144 return(previous_monitor);