00001 /* 00002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00003 % % 00004 % % 00005 % % 00006 % M M OOO N N IIIII TTTTT OOO RRRR % 00007 % MM MM O O NN N I T O O R R % 00008 % M M M O O N N N I T O O RRRR % 00009 % M M O O N NN I T O O R R % 00010 % M M OOO N N IIIII T OOO R R % 00011 % % 00012 % % 00013 % MagickCore Progress Monitor Methods % 00014 % % 00015 % Software Design % 00016 % John Cristy % 00017 % December 1995 % 00018 % % 00019 % % 00020 % Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization % 00021 % dedicated to making software imaging solutions freely available. % 00022 % % 00023 % You may not use this file except in compliance with the License. You may % 00024 % obtain a copy of the License at % 00025 % % 00026 % http://www.imagemagick.org/script/license.php % 00027 % % 00028 % Unless required by applicable law or agreed to in writing, software % 00029 % distributed under the License is distributed on an "AS IS" BASIS, % 00030 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % 00031 % See the License for the specific language governing permissions and % 00032 % limitations under the License. % 00033 % % 00034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00035 % 00036 % 00037 % 00038 */ 00039 00040 /* 00041 Include declarations. 00042 */ 00043 #include "magick/studio.h" 00044 #include "magick/image.h" 00045 #include "magick/log.h" 00046 #include "magick/monitor.h" 00047 00048 /* 00049 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00050 % % 00051 % % 00052 % % 00053 % S e t I m a g e P r o g r e s s M o n i t o r % 00054 % % 00055 % % 00056 % % 00057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00058 % 00059 % SetImageProgressMonitor() sets the image progress monitor to the specified 00060 % method and returns the previous progress monitor if any. The progress 00061 % monitor method looks like this: 00062 % 00063 % MagickBooleanType MagickProgressMonitor(const char *text, 00064 % const MagickOffsetType offset,const MagickSizeType extent, 00065 % void *client_data) 00066 % 00067 % If the progress monitor returns MagickFalse, the current operation is 00068 % interrupted. 00069 % 00070 % The format of the SetImageProgressMonitor method is: 00071 % 00072 % MagickProgressMonitor SetImageProgressMonitor(Image *image, 00073 % const MagickProgressMonitor progress_monitor,void *client_data) 00074 % 00075 % A description of each parameter follows: 00076 % 00077 % o image: the image. 00078 % 00079 % o progress_monitor: Specifies a pointer to a method to monitor progress of 00080 % an image operation. 00081 % 00082 % o client_data: Specifies a pointer to any client data. 00083 % 00084 */ 00085 MagickExport MagickProgressMonitor SetImageProgressMonitor(Image *image, 00086 const MagickProgressMonitor progress_monitor,void *client_data) 00087 { 00088 MagickProgressMonitor 00089 previous_monitor; 00090 00091 previous_monitor=image->progress_monitor; 00092 image->progress_monitor=progress_monitor; 00093 image->client_data=client_data; 00094 return(previous_monitor); 00095 } 00096 00097 /* 00098 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00099 % % 00100 % % 00101 % % 00102 % 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 % 00103 % % 00104 % % 00105 % % 00106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00107 % 00108 % SetImageInfoProgressMonitor() sets the image_info progress monitor to the 00109 % specified method and returns the previous progress monitor if any. The 00110 % progress monitor method looks like this: 00111 % 00112 % MagickBooleanType MagickProgressMonitor(const char *text, 00113 % const MagickOffsetType offset,const MagickSizeType extent, 00114 % void *client_data) 00115 % 00116 % If the progress monitor returns MagickFalse, the current operation is 00117 % interrupted. 00118 % 00119 % The format of the SetImageInfoProgressMonitor method is: 00120 % 00121 % MagickProgressMonitor SetImageInfoProgressMonitor(ImageInfo *image_info, 00122 % const MagickProgressMonitor progress_monitor,void *client_data) 00123 % 00124 % A description of each parameter follows: 00125 % 00126 % o image_info: the image info. 00127 % 00128 % o progress_monitor: Specifies a pointer to a method to monitor progress of 00129 % an image operation. 00130 % 00131 % o client_data: Specifies a pointer to any client data. 00132 % 00133 */ 00134 MagickExport MagickProgressMonitor SetImageInfoProgressMonitor( 00135 ImageInfo *image_info,const MagickProgressMonitor progress_monitor, 00136 void *client_data) 00137 { 00138 MagickProgressMonitor 00139 previous_monitor; 00140 00141 previous_monitor=image_info->progress_monitor; 00142 image_info->progress_monitor=progress_monitor; 00143 image_info->client_data=client_data; 00144 return(previous_monitor); 00145 }
1.6.1