Lines Matching full:windows
105 #define MaxColors MagickMin((ssize_t) windows->visual_info->colormap_size,256L)
1789 % XResourceInfo *resource_info,XWindows *windows,Image *image,
1799 % o windows: Specifies a pointer to a XWindows structure.
1806 XResourceInfo *resource_info,XWindows *windows,Image *image, in XAnnotateEditImage() argument
1908 (void) CloneString(&windows->command.name,"Annotate"); in XAnnotateEditImage()
1909 windows->command.data=4; in XAnnotateEditImage()
1910 (void) XCommandWidget(display,windows,AnnotateMenu,(XEvent *) NULL); in XAnnotateEditImage()
1911 (void) XMapRaised(display,windows->command.id); in XAnnotateEditImage()
1912 XClientMessage(display,windows->image.id,windows->im_protocols, in XAnnotateEditImage()
1913 windows->im_update_widget,CurrentTime); in XAnnotateEditImage()
1917 XQueryPosition(display,windows->image.id,&x,&y); in XAnnotateEditImage()
1918 (void) XSelectInput(display,windows->image.id, in XAnnotateEditImage()
1919 windows->image.attributes.event_mask | PointerMotionMask); in XAnnotateEditImage()
1921 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XAnnotateEditImage()
1925 if (windows->info.mapped != MagickFalse ) in XAnnotateEditImage()
1931 x+windows->image.x,y+windows->image.y); in XAnnotateEditImage()
1932 XInfoWidget(display,windows,text); in XAnnotateEditImage()
1937 XScreenEvent(display,windows,&event,exception); in XAnnotateEditImage()
1938 if (event.xany.window == windows->command.id) in XAnnotateEditImage()
1943 id=XCommandWidget(display,windows,AnnotateMenu,&event); in XAnnotateEditImage()
1944 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XAnnotateEditImage()
1967 font_number=XMenuWidget(display,windows,AnnotateMenu[id], in XAnnotateEditImage()
1980 XFontBrowserWidget(display,windows,"Select",font_name); in XAnnotateEditImage()
1991 XNoticeWidget(display,windows,"Unable to load font:", in XAnnotateEditImage()
2012 pen_number=XMenuWidget(display,windows,AnnotateMenu[id], in XAnnotateEditImage()
2029 XColorBrowserWidget(display,windows,"Select",color_name); in XAnnotateEditImage()
2036 (void) XParseColor(display,windows->map_info->colormap, in XAnnotateEditImage()
2038 XBestPixel(display,windows->map_info->colormap,(XColor *) NULL, in XAnnotateEditImage()
2040 windows->pixel_info->pen_colors[pen_number]=color; in XAnnotateEditImage()
2057 pen_number=XMenuWidget(display,windows,AnnotateMenu[id], in XAnnotateEditImage()
2074 XColorBrowserWidget(display,windows,"Select",color_name); in XAnnotateEditImage()
2081 (void) XParseColor(display,windows->map_info->colormap, in XAnnotateEditImage()
2083 XBestPixel(display,windows->map_info->colormap,(XColor *) NULL, in XAnnotateEditImage()
2085 windows->pixel_info->pen_colors[pen_number]=color; in XAnnotateEditImage()
2115 entry=XMenuWidget(display,windows,AnnotateMenu[id],RotateMenu, in XAnnotateEditImage()
2124 (void) XDialogWidget(display,windows,"OK","Enter rotation angle:", in XAnnotateEditImage()
2133 XTextViewWidget(display,resource_info,windows,MagickFalse, in XAnnotateEditImage()
2157 if (event.xbutton.window != windows->image.id) in XAnnotateEditImage()
2173 if (event.xkey.window != windows->image.id) in XAnnotateEditImage()
2195 XTextViewWidget(display,resource_info,windows,MagickFalse, in XAnnotateEditImage()
2214 if (windows->info.mapped != MagickFalse ) in XAnnotateEditImage()
2216 if ((x < (int) (windows->info.x+windows->info.width)) && in XAnnotateEditImage()
2217 (y < (int) (windows->info.y+windows->info.height))) in XAnnotateEditImage()
2218 (void) XWithdrawWindow(display,windows->info.id, in XAnnotateEditImage()
2219 windows->info.screen); in XAnnotateEditImage()
2222 if ((x > (int) (windows->info.x+windows->info.width)) || in XAnnotateEditImage()
2223 (y > (int) (windows->info.y+windows->info.height))) in XAnnotateEditImage()
2224 (void) XMapWindow(display,windows->info.id); in XAnnotateEditImage()
2231 (void) XSelectInput(display,windows->image.id, in XAnnotateEditImage()
2232 windows->image.attributes.event_mask); in XAnnotateEditImage()
2233 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XAnnotateEditImage()
2242 XNoticeWidget(display,windows,"Unable to load font:", in XAnnotateEditImage()
2244 font_info=windows->font_info; in XAnnotateEditImage()
2246 if ((x+font_info->max_bounds.width) >= (int) windows->image.width) in XAnnotateEditImage()
2247 x=(int) windows->image.width-font_info->max_bounds.width; in XAnnotateEditImage()
2250 if (((int) font_info->max_bounds.width > (int) windows->image.width) || in XAnnotateEditImage()
2251 ((font_info->ascent+font_info->descent) >= (int) windows->image.height)) in XAnnotateEditImage()
2273 windows->image.width/MagickMax((ssize_t) font_info->min_bounds.width,1)+2UL, in XAnnotateEditImage()
2281 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XAnnotateEditImage()
2282 annotate_context=windows->image.annotate_context; in XAnnotateEditImage()
2285 windows->pixel_info->pen_colors[box_id].pixel); in XAnnotateEditImage()
2287 windows->pixel_info->pen_colors[pen_id].pixel); in XAnnotateEditImage()
2291 (void) CloneString(&windows->command.name,"Text"); in XAnnotateEditImage()
2292 windows->command.data=0; in XAnnotateEditImage()
2293 (void) XCommandWidget(display,windows,TextMenu,(XEvent *) NULL); in XAnnotateEditImage()
2295 (void) XDrawString(display,windows->image.id,annotate_context,x,y,"_",1); in XAnnotateEditImage()
2306 (void) XDrawString(display,windows->image.id,annotate_context,x,y,"_",1); in XAnnotateEditImage()
2310 XScreenEvent(display,windows,&event,exception); in XAnnotateEditImage()
2311 if (event.xany.window == windows->command.id) in XAnnotateEditImage()
2317 windows->pixel_info->background_color.pixel); in XAnnotateEditImage()
2319 windows->pixel_info->foreground_color.pixel); in XAnnotateEditImage()
2320 id=XCommandWidget(display,windows,AnnotateMenu,&event); in XAnnotateEditImage()
2322 windows->pixel_info->pen_colors[box_id].pixel); in XAnnotateEditImage()
2324 windows->pixel_info->pen_colors[pen_id].pixel); in XAnnotateEditImage()
2331 XTextViewWidget(display,resource_info,windows,MagickFalse, in XAnnotateEditImage()
2333 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XAnnotateEditImage()
2343 XRefreshWindow(display,&windows->image,&text_event); in XAnnotateEditImage()
2357 (void) XClearArea(display,windows->image.id,x,text_event.xexpose.y, in XAnnotateEditImage()
2360 XRefreshWindow(display,&windows->image,&text_event); in XAnnotateEditImage()
2365 if (event.xbutton.window != windows->image.id) in XAnnotateEditImage()
2373 windows->image.id,CurrentTime); in XAnnotateEditImage()
2388 XRefreshWindow(display,&windows->image,(XEvent *) NULL); in XAnnotateEditImage()
2393 (void) XDrawString(display,windows->image.id,annotate_context, in XAnnotateEditImage()
2397 (void) XDrawImageString(display,windows->image.id, in XAnnotateEditImage()
2402 (void) XDrawString(display,windows->image.id,annotate_context, in XAnnotateEditImage()
2412 if (event.xkey.window != windows->image.id) in XAnnotateEditImage()
2464 XRefreshWindow(display,&windows->image,&text_event); in XAnnotateEditImage()
2482 XRefreshWindow(display,&windows->image,&text_event); in XAnnotateEditImage()
2494 XRefreshWindow(display,&windows->image,&text_event); in XAnnotateEditImage()
2509 (void) XDrawString(display,windows->image.id,annotate_context, in XAnnotateEditImage()
2512 (void) XDrawImageString(display,windows->image.id, in XAnnotateEditImage()
2516 if ((x+font_info->max_bounds.width) < (int) windows->image.width) in XAnnotateEditImage()
2547 windows->image.width/MagickMax((ssize_t) in XAnnotateEditImage()
2552 if (annotate_info->y > (int) windows->image.height) in XAnnotateEditImage()
2610 (void) XDrawString(display,windows->image.id,annotate_context, in XAnnotateEditImage()
2614 if ((x+font_info->max_bounds.width) < (int) windows->image.width) in XAnnotateEditImage()
2642 windows->image.width/MagickMax((ssize_t) in XAnnotateEditImage()
2647 if (annotate_info->y > (int) windows->image.height) in XAnnotateEditImage()
2669 if (windows->image.crop_geometry != (char *) NULL) in XAnnotateEditImage()
2670 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XAnnotateEditImage()
2674 XSetCursorState(display,windows,MagickTrue); in XAnnotateEditImage()
2675 XCheckRefreshWindows(display,windows); in XAnnotateEditImage()
2693 windows->pixel_info->box_color=windows->pixel_info->pen_colors[box_id]; in XAnnotateEditImage()
2694 if (windows->pixel_info->colors != 0) in XAnnotateEditImage()
2695 for (i=0; i < (ssize_t) windows->pixel_info->colors; i++) in XAnnotateEditImage()
2696 if (windows->pixel_info->pixels[i] == in XAnnotateEditImage()
2697 windows->pixel_info->pen_colors[box_id].pixel) in XAnnotateEditImage()
2699 windows->pixel_info->box_index=(unsigned short) i; in XAnnotateEditImage()
2702 windows->pixel_info->pen_color=windows->pixel_info->pen_colors[pen_id]; in XAnnotateEditImage()
2703 if (windows->pixel_info->colors != 0) in XAnnotateEditImage()
2704 for (i=0; i < (ssize_t) windows->pixel_info->colors; i++) in XAnnotateEditImage()
2705 if (windows->pixel_info->pixels[i] == in XAnnotateEditImage()
2706 windows->pixel_info->pen_colors[pen_id].pixel) in XAnnotateEditImage()
2708 windows->pixel_info->pen_index=(unsigned short) i; in XAnnotateEditImage()
2715 width*(annotate_info->x+windows->image.x)/windows->image.ximage->width; in XAnnotateEditImage()
2717 windows->image.y)/windows->image.ximage->height; in XAnnotateEditImage()
2719 "%ux%u%+d%+d",width*annotate_info->width/windows->image.ximage->width, in XAnnotateEditImage()
2720 height*annotate_info->height/windows->image.ximage->height, in XAnnotateEditImage()
2725 status=XAnnotateImage(display,windows->pixel_info,annotate_info,image, in XAnnotateEditImage()
2738 windows->pixel_info->foreground_color.pixel); in XAnnotateEditImage()
2740 windows->pixel_info->background_color.pixel); in XAnnotateEditImage()
2741 (void) XSetFont(display,annotate_context,windows->font_info->fid); in XAnnotateEditImage()
2742 XSetCursorState(display,windows,MagickFalse); in XAnnotateEditImage()
2747 XConfigureImageColormap(display,resource_info,windows,image,exception); in XAnnotateEditImage()
2748 (void) XConfigureImage(display,resource_info,windows,image,exception); in XAnnotateEditImage()
2768 % XResourceInfo *resource_info,XWindows *windows,Image **image,
2778 % o windows: Specifies a pointer to a XWindows structure.
2786 XResourceInfo *resource_info,XWindows *windows,Image **image, in XBackgroundImage() argument
2803 status=XDialogWidget(display,windows,"Background", in XBackgroundImage()
2807 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XBackgroundImage()
2809 XInfoWidget(display,windows,BackgroundImageTag); in XBackgroundImage()
2810 XSetCursorState(display,windows,MagickTrue); in XBackgroundImage()
2811 XCheckRefreshWindows(display,windows); in XBackgroundImage()
2818 XClientMessage(display,windows->image.id,windows->im_protocols, in XBackgroundImage()
2819 windows->im_retain_colors,CurrentTime); in XBackgroundImage()
2820 XSetCursorState(display,windows,MagickFalse); in XBackgroundImage()
2821 (void) XMagickCommand(display,resource_info,windows,UndoCommand,image, in XBackgroundImage()
2842 % XWindows *windows,Image **image,ExceptionInfo *exception)
2851 % o windows: Specifies a pointer to a XWindows structure.
2859 XResourceInfo *resource_info,XWindows *windows,Image **image, in XChopImage() argument
2921 (void) CloneString(&windows->command.name,"Chop"); in XChopImage()
2922 windows->command.data=1; in XChopImage()
2923 (void) XCommandWidget(display,windows,ChopMenu,(XEvent *) NULL); in XChopImage()
2924 (void) XMapRaised(display,windows->command.id); in XChopImage()
2925 XClientMessage(display,windows->image.id,windows->im_protocols, in XChopImage()
2926 windows->im_update_widget,CurrentTime); in XChopImage()
2930 XQueryPosition(display,windows->image.id,&x,&y); in XChopImage()
2931 (void) XSelectInput(display,windows->image.id, in XChopImage()
2932 windows->image.attributes.event_mask | PointerMotionMask); in XChopImage()
2937 if (windows->info.mapped != MagickFalse ) in XChopImage()
2943 x+windows->image.x,y+windows->image.y); in XChopImage()
2944 XInfoWidget(display,windows,text); in XChopImage()
2949 XScreenEvent(display,windows,&event,exception); in XChopImage()
2950 if (event.xany.window == windows->command.id) in XChopImage()
2955 id=XCommandWidget(display,windows,ChopMenu,&event); in XChopImage()
2976 id=XMenuWidget(display,windows,ChopMenu[id],Directions,command); in XChopImage()
2983 XTextViewWidget(display,resource_info,windows,MagickFalse, in XChopImage()
3007 if (event.xbutton.window != windows->image.id) in XChopImage()
3031 if (event.xkey.window != windows->image.id) in XChopImage()
3053 (void) XSetFunction(display,windows->image.highlight_context, in XChopImage()
3055 XTextViewWidget(display,resource_info,windows,MagickFalse, in XChopImage()
3057 (void) XSetFunction(display,windows->image.highlight_context, in XChopImage()
3076 if (windows->info.mapped != MagickFalse ) in XChopImage()
3078 if ((x < (int) (windows->info.x+windows->info.width)) && in XChopImage()
3079 (y < (int) (windows->info.y+windows->info.height))) in XChopImage()
3080 (void) XWithdrawWindow(display,windows->info.id, in XChopImage()
3081 windows->info.screen); in XChopImage()
3084 if ((x > (int) (windows->info.x+windows->info.width)) || in XChopImage()
3085 (y > (int) (windows->info.y+windows->info.height))) in XChopImage()
3086 (void) XMapWindow(display,windows->info.id); in XChopImage()
3090 (void) XSelectInput(display,windows->image.id, in XChopImage()
3091 windows->image.attributes.event_mask); in XChopImage()
3092 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XChopImage()
3103 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XChopImage()
3112 if (windows->info.mapped == MagickFalse) in XChopImage()
3113 (void) XMapWindow(display,windows->info.id); in XChopImage()
3117 XInfoWidget(display,windows,text); in XChopImage()
3118 XHighlightLine(display,windows->image.id, in XChopImage()
3119 windows->image.highlight_context,&segment_info); in XChopImage()
3122 if (windows->info.mapped != MagickFalse ) in XChopImage()
3123 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XChopImage()
3127 XScreenEvent(display,windows,&event,exception); in XChopImage()
3129 XHighlightLine(display,windows->image.id, in XChopImage()
3130 windows->image.highlight_context,&segment_info); in XChopImage()
3165 if (segment_info.x2 > windows->image.ximage->width) in XChopImage()
3166 segment_info.x2=windows->image.ximage->width; in XChopImage()
3170 if (segment_info.y2 > windows->image.ximage->height) in XChopImage()
3171 segment_info.y2=windows->image.ximage->height; in XChopImage()
3181 chop_info.x=(ssize_t) windows->image.x+segment_info.x1; in XChopImage()
3187 chop_info.x=(ssize_t) windows->image.x+segment_info.x2; in XChopImage()
3195 chop_info.y=(ssize_t) windows->image.y+segment_info.y1; in XChopImage()
3199 chop_info.y=(ssize_t) windows->image.y+segment_info.y2; in XChopImage()
3203 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XChopImage()
3204 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XChopImage()
3210 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XChopImage()
3212 XSetCursorState(display,windows,MagickTrue); in XChopImage()
3213 XCheckRefreshWindows(display,windows); in XChopImage()
3214 windows->image.window_changes.width=windows->image.ximage->width- in XChopImage()
3216 windows->image.window_changes.height=windows->image.ximage->height- in XChopImage()
3222 if (windows->image.crop_geometry != (char *) NULL) in XChopImage()
3223 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XChopImage()
3224 scale_factor=(double) width/windows->image.ximage->width; in XChopImage()
3228 scale_factor=(double) height/windows->image.ximage->height; in XChopImage()
3236 XSetCursorState(display,windows,MagickFalse); in XChopImage()
3244 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XChopImage()
3245 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XChopImage()
3266 % XResourceInfo *resource_info,XWindows *windows,Image **image,
3276 % o windows: Specifies a pointer to a XWindows structure.
3284 XResourceInfo *resource_info,XWindows *windows,Image **image, in XColorEditImage() argument
3358 (void) CloneString(&windows->command.name,"Color Edit"); in XColorEditImage()
3359 windows->command.data=4; in XColorEditImage()
3360 (void) XCommandWidget(display,windows,ColorEditMenu,(XEvent *) NULL); in XColorEditImage()
3361 (void) XMapRaised(display,windows->command.id); in XColorEditImage()
3362 XClientMessage(display,windows->image.id,windows->im_protocols, in XColorEditImage()
3363 windows->im_update_widget,CurrentTime); in XColorEditImage()
3367 cursor=XMakeCursor(display,windows->image.id,windows->map_info->colormap, in XColorEditImage()
3369 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XColorEditImage()
3373 XQueryPosition(display,windows->image.id,&x,&y); in XColorEditImage()
3374 (void) XSelectInput(display,windows->image.id, in XColorEditImage()
3375 windows->image.attributes.event_mask | PointerMotionMask); in XColorEditImage()
3379 if (windows->info.mapped != MagickFalse ) in XColorEditImage()
3385 x+windows->image.x,y+windows->image.y); in XColorEditImage()
3386 XInfoWidget(display,windows,text); in XColorEditImage()
3391 XScreenEvent(display,windows,&event,exception); in XColorEditImage()
3392 if (event.xany.window == windows->command.id) in XColorEditImage()
3397 id=XCommandWidget(display,windows,ColorEditMenu,&event); in XColorEditImage()
3400 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XColorEditImage()
3416 entry=XMenuWidget(display,windows,ColorEditMenu[id], in XColorEditImage()
3442 pen_number=XMenuWidget(display,windows,ColorEditMenu[id], in XColorEditImage()
3455 XColorBrowserWidget(display,windows,"Select",color_name); in XColorEditImage()
3462 (void) XParseColor(display,windows->map_info->colormap, in XColorEditImage()
3464 XBestPixel(display,windows->map_info->colormap,(XColor *) NULL, in XColorEditImage()
3466 windows->pixel_info->pen_colors[pen_number]=color; in XColorEditImage()
3488 pen_number=XMenuWidget(display,windows,ColorEditMenu[id], in XColorEditImage()
3501 XColorBrowserWidget(display,windows,"Select",color_name); in XColorEditImage()
3508 (void) XParseColor(display,windows->map_info->colormap, in XColorEditImage()
3532 entry=XMenuWidget(display,windows,ColorEditMenu[id],FuzzMenu, in XColorEditImage()
3543 (void) XDialogWidget(display,windows,"Ok", in XColorEditImage()
3554 (void) XMagickCommand(display,resource_info,windows,UndoCommand, in XColorEditImage()
3561 XTextViewWidget(display,resource_info,windows,MagickFalse, in XColorEditImage()
3575 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XColorEditImage()
3584 if ((event.xbutton.window != windows->image.id) && in XColorEditImage()
3585 (event.xbutton.window != windows->magnify.id)) in XColorEditImage()
3592 (void) XMagickCommand(display,resource_info,windows, in XColorEditImage()
3601 if ((event.xbutton.window != windows->image.id) && in XColorEditImage()
3602 (event.xbutton.window != windows->magnify.id)) in XColorEditImage()
3609 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XColorEditImage()
3610 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XColorEditImage()
3611 XInfoWidget(display,windows,text); in XColorEditImage()
3612 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XColorEditImage()
3623 if (event.xkey.window == windows->magnify.id) in XColorEditImage()
3628 window=windows->magnify.id; in XColorEditImage()
3631 if (event.xkey.window != windows->image.id) in XColorEditImage()
3652 XTextViewWidget(display,resource_info,windows,MagickFalse, in XColorEditImage()
3671 if (windows->info.mapped != MagickFalse ) in XColorEditImage()
3673 if ((x < (int) (windows->info.x+windows->info.width)) && in XColorEditImage()
3674 (y < (int) (windows->info.y+windows->info.height))) in XColorEditImage()
3675 (void) XWithdrawWindow(display,windows->info.id, in XColorEditImage()
3676 windows->info.screen); in XColorEditImage()
3679 if ((x > (int) (windows->info.x+windows->info.width)) || in XColorEditImage()
3680 (y > (int) (windows->info.y+windows->info.height))) in XColorEditImage()
3681 (void) XMapWindow(display,windows->info.id); in XColorEditImage()
3687 if (event.xany.window == windows->magnify.id) in XColorEditImage()
3689 x=windows->magnify.x-windows->image.x; in XColorEditImage()
3690 y=windows->magnify.y-windows->image.y; in XColorEditImage()
3706 (void) XClearArea(display,windows->image.id,x_offset,y_offset,1,1, in XColorEditImage()
3708 color=windows->pixel_info->pen_colors[pen_id]; in XColorEditImage()
3709 XPutPixel(windows->image.ximage,x_offset,y_offset,color.pixel); in XColorEditImage()
3714 if (windows->image.crop_geometry != (char *) NULL) in XColorEditImage()
3715 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XColorEditImage()
3718 (width*(windows->image.x+x_offset)/windows->image.ximage->width+x); in XColorEditImage()
3720 (height*(windows->image.y+y_offset)/windows->image.ximage->height+y); in XColorEditImage()
3864 (void) XSelectInput(display,windows->image.id, in XColorEditImage()
3865 windows->image.attributes.event_mask); in XColorEditImage()
3866 XSetCursorState(display,windows,MagickFalse); in XColorEditImage()
3889 % XResourceInfo *resource_info,XWindows *windows,Image *image,
3899 % o windows: Specifies a pointer to a XWindows structure.
3907 XResourceInfo *resource_info,XWindows *windows,Image *image, in XCompositeImage() argument
3974 XFileBrowserWidget(display,windows,"Composite",filename); in XCompositeImage()
3980 XSetCursorState(display,windows,MagickTrue); in XCompositeImage()
3981 XCheckRefreshWindows(display,windows); in XCompositeImage()
3986 XSetCursorState(display,windows,MagickFalse); in XCompositeImage()
3992 (void) CloneString(&windows->command.name,"Composite"); in XCompositeImage()
3993 windows->command.data=1; in XCompositeImage()
3994 (void) XCommandWidget(display,windows,CompositeMenu,(XEvent *) NULL); in XCompositeImage()
3995 (void) XMapRaised(display,windows->command.id); in XCompositeImage()
3996 XClientMessage(display,windows->image.id,windows->im_protocols, in XCompositeImage()
3997 windows->im_update_widget,CurrentTime); in XCompositeImage()
4001 XQueryPosition(display,windows->image.id,&x,&y); in XCompositeImage()
4002 (void) XSelectInput(display,windows->image.id, in XCompositeImage()
4003 windows->image.attributes.event_mask | PointerMotionMask); in XCompositeImage()
4004 composite_info.x=(ssize_t) windows->image.x+x; in XCompositeImage()
4005 composite_info.y=(ssize_t) windows->image.y+y; in XCompositeImage()
4009 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XCompositeImage()
4014 if (windows->info.mapped != MagickFalse ) in XCompositeImage()
4021 XInfoWidget(display,windows,text); in XCompositeImage()
4024 highlight_info.x=composite_info.x-windows->image.x; in XCompositeImage()
4025 highlight_info.y=composite_info.y-windows->image.y; in XCompositeImage()
4026 XHighlightRectangle(display,windows->image.id, in XCompositeImage()
4027 windows->image.highlight_context,&highlight_info); in XCompositeImage()
4031 XScreenEvent(display,windows,&event,exception); in XCompositeImage()
4032 XHighlightRectangle(display,windows->image.id, in XCompositeImage()
4033 windows->image.highlight_context,&highlight_info); in XCompositeImage()
4034 if (event.xany.window == windows->command.id) in XCompositeImage()
4039 id=XCommandWidget(display,windows,CompositeMenu,&event); in XCompositeImage()
4056 entry=XMenuWidget(display,windows,CompositeMenu[id], in XCompositeImage()
4072 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4074 (void) XDialogWidget(display,windows,"Dissolve", in XCompositeImage()
4076 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4089 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4091 (void) XDialogWidget(display,windows,"Displace", in XCompositeImage()
4093 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4102 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4104 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCompositeImage()
4106 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4134 if (event.xbutton.window != windows->image.id) in XCompositeImage()
4141 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XCompositeImage()
4142 composite_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XCompositeImage()
4143 composite_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XCompositeImage()
4154 if (event.xbutton.window != windows->image.id) in XCompositeImage()
4161 composite_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XCompositeImage()
4162 composite_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XCompositeImage()
4180 if (event.xkey.window != windows->image.id) in XCompositeImage()
4207 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4209 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCompositeImage()
4211 (void) XSetFunction(display,windows->image.highlight_context, in XCompositeImage()
4230 if (windows->info.mapped != MagickFalse ) in XCompositeImage()
4232 if ((x < (int) (windows->info.x+windows->info.width)) && in XCompositeImage()
4233 (y < (int) (windows->info.y+windows->info.height))) in XCompositeImage()
4234 (void) XWithdrawWindow(display,windows->info.id, in XCompositeImage()
4235 windows->info.screen); in XCompositeImage()
4238 if ((x > (int) (windows->info.x+windows->info.width)) || in XCompositeImage()
4239 (y > (int) (windows->info.y+windows->info.height))) in XCompositeImage()
4240 (void) XMapWindow(display,windows->info.id); in XCompositeImage()
4241 composite_info.x=(ssize_t) windows->image.x+x; in XCompositeImage()
4242 composite_info.y=(ssize_t) windows->image.y+y; in XCompositeImage()
4254 (void) XSelectInput(display,windows->image.id, in XCompositeImage()
4255 windows->image.attributes.event_mask); in XCompositeImage()
4256 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XCompositeImage()
4257 XSetCursorState(display,windows,MagickFalse); in XCompositeImage()
4264 XSetCursorState(display,windows,MagickTrue); in XCompositeImage()
4265 XCheckRefreshWindows(display,windows); in XCompositeImage()
4270 if (windows->image.crop_geometry != (char *) NULL) in XCompositeImage()
4271 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XCompositeImage()
4272 scale_factor=(double) width/windows->image.ximage->width; in XCompositeImage()
4276 scale_factor=(double) height/windows->image.ximage->height; in XCompositeImage()
4294 XSetCursorState(display,windows,MagickFalse); in XCompositeImage()
4351 XSetCursorState(display,windows,MagickFalse); in XCompositeImage()
4355 XConfigureImageColormap(display,resource_info,windows,image,exception); in XCompositeImage()
4356 (void) XConfigureImage(display,resource_info,windows,image,exception); in XCompositeImage()
4377 % XResourceInfo *resource_info,XWindows *windows,Image *image,
4387 % o windows: Specifies a pointer to a XWindows structure.
4397 XResourceInfo *resource_info,XWindows *windows,Image *image, in XConfigureImage() argument
4424 width=(unsigned int) windows->image.window_changes.width; in XConfigureImage()
4425 height=(unsigned int) windows->image.window_changes.height; in XConfigureImage()
4428 "Configure Image: %dx%d=>%.20gx%.20g",windows->image.ximage->width, in XConfigureImage()
4429 windows->image.ximage->height,(double) width,(double) height); in XConfigureImage()
4437 XSetCursorState(display,windows,MagickTrue); in XConfigureImage()
4439 if (((int) width != windows->image.ximage->width) || in XConfigureImage()
4440 ((int) height != windows->image.ximage->height)) in XConfigureImage()
4442 windows->magnify.x=(int) in XConfigureImage()
4443 width*windows->magnify.x/windows->image.ximage->width; in XConfigureImage()
4444 windows->magnify.y=(int) in XConfigureImage()
4445 height*windows->magnify.y/windows->image.ximage->height; in XConfigureImage()
4446 windows->image.x=(int) (width*windows->image.x/windows->image.ximage->width); in XConfigureImage()
4447 windows->image.y=(int) in XConfigureImage()
4448 (height*windows->image.y/windows->image.ximage->height); in XConfigureImage()
4449 status=XMakeImage(display,resource_info,&windows->image,image, in XConfigureImage()
4452 XNoticeWidget(display,windows,"Unable to configure X image:", in XConfigureImage()
4453 windows->image.name); in XConfigureImage()
4462 XDisplayWidth(display,windows->image.screen), in XConfigureImage()
4463 XDisplayHeight(display,windows->image.screen)); in XConfigureImage()
4466 if (window_changes.width > XDisplayWidth(display,windows->image.screen)) in XConfigureImage()
4467 window_changes.width=XDisplayWidth(display,windows->image.screen); in XConfigureImage()
4469 if (window_changes.height > XDisplayHeight(display,windows->image.screen)) in XConfigureImage()
4470 window_changes.height=XDisplayHeight(display,windows->image.screen); in XConfigureImage()
4476 ((XDisplayWidth(display,windows->image.screen)/2)-(width/2)); in XConfigureImage()
4478 ((XDisplayHeight(display,windows->image.screen)/2)-(height/2)); in XConfigureImage()
4480 (void) XReconfigureWMWindow(display,windows->image.id,windows->image.screen, in XConfigureImage()
4482 (void) XClearWindow(display,windows->image.id); in XConfigureImage()
4483 XRefreshWindow(display,&windows->image,(XEvent *) NULL); in XConfigureImage()
4487 if (windows->magnify.mapped != MagickFalse ) in XConfigureImage()
4488 XMakeMagnifyImage(display,windows,exception); in XConfigureImage()
4489 windows->pan.crop_geometry=windows->image.crop_geometry; in XConfigureImage()
4490 XBestIconSize(display,&windows->pan,image); in XConfigureImage()
4491 while (((windows->pan.width << 1) < MaxIconSize) && in XConfigureImage()
4492 ((windows->pan.height << 1) < MaxIconSize)) in XConfigureImage()
4494 windows->pan.width<<=1; in XConfigureImage()
4495 windows->pan.height<<=1; in XConfigureImage()
4497 if (windows->pan.geometry != (char *) NULL) in XConfigureImage()
4498 (void) XParseGeometry(windows->pan.geometry,&windows->pan.x,&windows->pan.y, in XConfigureImage()
4499 &windows->pan.width,&windows->pan.height); in XConfigureImage()
4500 window_changes.width=(int) windows->pan.width; in XConfigureImage()
4501 window_changes.height=(int) windows->pan.height; in XConfigureImage()
4515 (void) XSetNormalHints(display,windows->pan.id,size_hints); in XConfigureImage()
4518 (void) XReconfigureWMWindow(display,windows->pan.id,windows->pan.screen, in XConfigureImage()
4523 windows->icon.crop_geometry=windows->image.crop_geometry; in XConfigureImage()
4524 XBestIconSize(display,&windows->icon,image); in XConfigureImage()
4525 window_changes.width=(int) windows->icon.width; in XConfigureImage()
4526 window_changes.height=(int) windows->icon.height; in XConfigureImage()
4527 (void) XReconfigureWMWindow(display,windows->icon.id,windows->icon.screen, in XConfigureImage()
4529 XSetCursorState(display,windows,MagickFalse); in XConfigureImage()
4551 % XResourceInfo *resource_info,XWindows *windows,Image *image,
4561 % o windows: Specifies a pointer to a XWindows structure.
4572 XResourceInfo *resource_info,XWindows *windows,Image *image, in XCropImage() argument
4651 (void) CloneString(&windows->command.name,"Copy"); in XCropImage()
4656 (void) CloneString(&windows->command.name,"Crop"); in XCropImage()
4661 (void) CloneString(&windows->command.name,"Cut"); in XCropImage()
4665 RectifyModeMenu[0]=windows->command.name; in XCropImage()
4666 windows->command.data=0; in XCropImage()
4667 (void) XCommandWidget(display,windows,CropModeMenu,(XEvent *) NULL); in XCropImage()
4668 (void) XMapRaised(display,windows->command.id); in XCropImage()
4669 XClientMessage(display,windows->image.id,windows->im_protocols, in XCropImage()
4670 windows->im_update_widget,CurrentTime); in XCropImage()
4674 XQueryPosition(display,windows->image.id,&x,&y); in XCropImage()
4675 (void) XSelectInput(display,windows->image.id, in XCropImage()
4676 windows->image.attributes.event_mask | PointerMotionMask); in XCropImage()
4677 crop_info.x=(ssize_t) windows->image.x+x; in XCropImage()
4678 crop_info.y=(ssize_t) windows->image.y+y; in XCropImage()
4685 if (windows->info.mapped != MagickFalse ) in XCropImage()
4692 XInfoWidget(display,windows,text); in XCropImage()
4697 XScreenEvent(display,windows,&event,exception); in XCropImage()
4698 if (event.xany.window == windows->command.id) in XCropImage()
4703 id=XCommandWidget(display,windows,CropModeMenu,&event); in XCropImage()
4714 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4720 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4726 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4753 if (event.xbutton.window != windows->image.id) in XCropImage()
4758 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XCropImage()
4759 crop_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XCropImage()
4760 crop_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XCropImage()
4770 if (event.xkey.window != windows->image.id) in XCropImage()
4796 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4802 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4808 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
4825 if (event.xmotion.window != windows->image.id) in XCropImage()
4832 if (windows->info.mapped != MagickFalse ) in XCropImage()
4834 if ((x < (int) (windows->info.x+windows->info.width)) && in XCropImage()
4835 (y < (int) (windows->info.y+windows->info.height))) in XCropImage()
4836 (void) XWithdrawWindow(display,windows->info.id, in XCropImage()
4837 windows->info.screen); in XCropImage()
4840 if ((x > (int) (windows->info.x+windows->info.width)) || in XCropImage()
4841 (y > (int) (windows->info.y+windows->info.height))) in XCropImage()
4842 (void) XMapWindow(display,windows->info.id); in XCropImage()
4843 crop_info.x=(ssize_t) windows->image.x+x; in XCropImage()
4844 crop_info.y=(ssize_t) windows->image.y+y; in XCropImage()
4851 (void) XSelectInput(display,windows->image.id, in XCropImage()
4852 windows->image.attributes.event_mask); in XCropImage()
4858 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XCropImage()
4862 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XCropImage()
4876 highlight_info.x=crop_info.x-windows->image.x; in XCropImage()
4877 highlight_info.y=crop_info.y-windows->image.y; in XCropImage()
4883 if (windows->info.mapped == MagickFalse) in XCropImage()
4884 (void) XMapWindow(display,windows->info.id); in XCropImage()
4888 XInfoWidget(display,windows,text); in XCropImage()
4889 XHighlightRectangle(display,windows->image.id, in XCropImage()
4890 windows->image.highlight_context,&highlight_info); in XCropImage()
4893 if (windows->info.mapped != MagickFalse ) in XCropImage()
4894 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XCropImage()
4898 XScreenEvent(display,windows,&event,exception); in XCropImage()
4900 XHighlightRectangle(display,windows->image.id, in XCropImage()
4901 windows->image.highlight_context,&highlight_info); in XCropImage()
4906 crop_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XCropImage()
4907 crop_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XCropImage()
4915 crop_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XCropImage()
4916 crop_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XCropImage()
4917 XSetCursorState(display,windows,MagickFalse); in XCropImage()
4919 windows->command.data=0; in XCropImage()
4920 (void) XCommandWidget(display,windows,RectifyModeMenu, in XCropImage()
4928 crop_info.x=(ssize_t) windows->image.x+event.xmotion.x; in XCropImage()
4929 crop_info.y=(ssize_t) windows->image.y+event.xmotion.y; in XCropImage()
4943 if (crop_info.x > (ssize_t) windows->image.ximage->width) in XCropImage()
4944 crop_info.x=(ssize_t) windows->image.ximage->width; in XCropImage()
4955 if (crop_info.y > (ssize_t) windows->image.ximage->height) in XCropImage()
4956 crop_info.y=(ssize_t) windows->image.ximage->height; in XCropImage()
4970 (void) XMapWindow(display,windows->info.id); in XCropImage()
4973 if (windows->info.mapped != MagickFalse ) in XCropImage()
4981 XInfoWidget(display,windows,text); in XCropImage()
4984 highlight_info.x=crop_info.x-windows->image.x; in XCropImage()
4985 highlight_info.y=crop_info.y-windows->image.y; in XCropImage()
4992 XHighlightRectangle(display,windows->image.id, in XCropImage()
4993 windows->image.highlight_context,&highlight_info); in XCropImage()
4994 XScreenEvent(display,windows,&event,exception); in XCropImage()
4995 if (event.xany.window == windows->command.id) in XCropImage()
5000 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XCropImage()
5001 id=XCommandWidget(display,windows,RectifyModeMenu,&event); in XCropImage()
5002 (void) XSetFunction(display,windows->image.highlight_context, in XCropImage()
5004 XHighlightRectangle(display,windows->image.id, in XCropImage()
5005 windows->image.highlight_context,&highlight_info); in XCropImage()
5016 (void) XSetFunction(display,windows->image.highlight_context, in XCropImage()
5022 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5028 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5034 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5039 (void) XSetFunction(display,windows->image.highlight_context, in XCropImage()
5057 XHighlightRectangle(display,windows->image.id, in XCropImage()
5058 windows->image.highlight_context,&highlight_info); in XCropImage()
5065 if (event.xbutton.window != windows->image.id) in XCropImage()
5067 x=windows->image.x+event.xbutton.x; in XCropImage()
5068 y=windows->image.y+event.xbutton.y; in XCropImage()
5108 if (event.xbutton.window == windows->pan.id) in XCropImage()
5109 if ((highlight_info.x != crop_info.x-windows->image.x) || in XCropImage()
5110 (highlight_info.y != crop_info.y-windows->image.y)) in XCropImage()
5111 XHighlightRectangle(display,windows->image.id, in XCropImage()
5112 windows->image.highlight_context,&highlight_info); in XCropImage()
5113 (void) XSetSelectionOwner(display,XA_PRIMARY,windows->image.id, in XCropImage()
5119 if (event.xexpose.window == windows->image.id) in XCropImage()
5126 XRefreshWindow(display,&windows->image,&event); in XCropImage()
5128 if (event.xexpose.window == windows->info.id) in XCropImage()
5130 XInfoWidget(display,windows,text); in XCropImage()
5135 if (event.xkey.window != windows->image.id) in XCropImage()
5155 crop_info.x=(ssize_t) (windows->image.width/2L-crop_info.width/ in XCropImage()
5157 crop_info.y=(ssize_t) (windows->image.height/2L-crop_info.height/ in XCropImage()
5190 (void) XSetFunction(display,windows->image.highlight_context, in XCropImage()
5196 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5202 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5208 XTextViewWidget(display,resource_info,windows,MagickFalse, in XCropImage()
5213 (void) XSetFunction(display,windows->image.highlight_context, in XCropImage()
5223 (void) XSetSelectionOwner(display,XA_PRIMARY,windows->image.id, in XCropImage()
5231 if (event.xmotion.window != windows->image.id) in XCropImage()
5238 if (windows->info.mapped != MagickFalse ) in XCropImage()
5240 if ((x < (int) (windows->info.x+windows->info.width)) && in XCropImage()
5241 (y < (int) (windows->info.y+windows->info.height))) in XCropImage()
5242 (void) XWithdrawWindow(display,windows->info.id, in XCropImage()
5243 windows->info.screen); in XCropImage()
5246 if ((x > (int) (windows->info.x+windows->info.width)) || in XCropImage()
5247 (y > (int) (windows->info.y+windows->info.height))) in XCropImage()
5248 (void) XMapWindow(display,windows->info.id); in XCropImage()
5249 crop_info.x=(ssize_t) windows->image.x+event.xmotion.x; in XCropImage()
5250 crop_info.y=(ssize_t) windows->image.y+event.xmotion.y; in XCropImage()
5290 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XCropImage()
5295 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XCropImage()
5296 XSetCursorState(display,windows,MagickFalse); in XCropImage()
5300 if (((int) crop_info.width != windows->image.ximage->width) || in XCropImage()
5301 ((int) crop_info.height != windows->image.ximage->height)) in XCropImage()
5306 XSetCropGeometry(display,windows,&crop_info,image); in XCropImage()
5307 windows->image.window_changes.width=(int) crop_info.width; in XCropImage()
5308 windows->image.window_changes.height=(int) crop_info.height; in XCropImage()
5309 (void) XConfigureImage(display,resource_info,windows,image,exception); in XCropImage()
5315 XSetCursorState(display,windows,MagickTrue); in XCropImage()
5316 XCheckRefreshWindows(display,windows); in XCropImage()
5321 if (windows->image.crop_geometry != (char *) NULL) in XCropImage()
5322 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XCropImage()
5323 scale_factor=(double) width/windows->image.ximage->width; in XCropImage()
5327 scale_factor=(double) height/windows->image.ximage->height; in XCropImage()
5332 XSetCursorState(display,windows,MagickFalse); in XCropImage()
5340 (void) XConfigureImage(display,resource_info,windows,image,exception); in XCropImage()
5368 XConfigureImageColormap(display,resource_info,windows,image,exception); in XCropImage()
5369 (void) XConfigureImage(display,resource_info,windows,image,exception); in XCropImage()
5390 % XResourceInfo *resource_info,XWindows *windows,Image **image,
5400 % o windows: Specifies a pointer to a XWindows structure.
5408 XResourceInfo *resource_info,XWindows *windows,Image **image, in XDrawEditImage() argument
5511 (void) CloneString(&windows->command.name,"Draw"); in XDrawEditImage()
5512 windows->command.data=4; in XDrawEditImage()
5513 (void) XCommandWidget(display,windows,DrawMenu,(XEvent *) NULL); in XDrawEditImage()
5514 (void) XMapRaised(display,windows->command.id); in XDrawEditImage()
5515 XClientMessage(display,windows->image.id,windows->im_protocols, in XDrawEditImage()
5516 windows->im_update_widget,CurrentTime); in XDrawEditImage()
5526 XQueryPosition(display,windows->image.id,&x,&y); in XDrawEditImage()
5527 (void) XSelectInput(display,windows->image.id, in XDrawEditImage()
5528 windows->image.attributes.event_mask | PointerMotionMask); in XDrawEditImage()
5529 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XDrawEditImage()
5533 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
5539 x+windows->image.x,y+windows->image.y); in XDrawEditImage()
5540 XInfoWidget(display,windows,text); in XDrawEditImage()
5545 XScreenEvent(display,windows,&event,exception); in XDrawEditImage()
5546 if (event.xany.window == windows->command.id) in XDrawEditImage()
5551 id=XCommandWidget(display,windows,DrawMenu,&event); in XDrawEditImage()
5577 element=(ElementType) (XMenuWidget(display,windows, in XDrawEditImage()
5606 pen_number=XMenuWidget(display,windows,DrawMenu[id], in XDrawEditImage()
5626 XColorBrowserWidget(display,windows,"Select",color_name); in XDrawEditImage()
5633 (void) XParseColor(display,windows->map_info->colormap, in XDrawEditImage()
5635 XBestPixel(display,windows->map_info->colormap,(XColor *) NULL, in XDrawEditImage()
5637 windows->pixel_info->pen_colors[pen_number]=color; in XDrawEditImage()
5674 entry=XMenuWidget(display,windows,DrawMenu[id],StipplesMenu, in XDrawEditImage()
5732 XFileBrowserWidget(display,windows,"Stipple",filename); in XDrawEditImage()
5738 XSetCursorState(display,windows,MagickTrue); in XDrawEditImage()
5739 XCheckRefreshWindows(display,windows); in XDrawEditImage()
5745 XSetCursorState(display,windows,MagickFalse); in XDrawEditImage()
5758 XNoticeWidget(display,windows,"Unable to read X bitmap image:", in XDrawEditImage()
5782 entry=XMenuWidget(display,windows,DrawMenu[id],WidthsMenu, in XDrawEditImage()
5792 (void) XDialogWidget(display,windows,"Ok","Enter line width:", in XDrawEditImage()
5801 (void) XMagickCommand(display,resource_info,windows,UndoCommand, in XDrawEditImage()
5807 XTextViewWidget(display,resource_info,windows,MagickFalse, in XDrawEditImage()
5809 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XDrawEditImage()
5824 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XDrawEditImage()
5833 if (event.xbutton.window != windows->image.id) in XDrawEditImage()
5852 if (event.xkey.window != windows->image.id) in XDrawEditImage()
5874 XTextViewWidget(display,resource_info,windows,MagickFalse, in XDrawEditImage()
5893 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
5895 if ((x < (int) (windows->info.x+windows->info.width)) && in XDrawEditImage()
5896 (y < (int) (windows->info.y+windows->info.height))) in XDrawEditImage()
5897 (void) XWithdrawWindow(display,windows->info.id, in XDrawEditImage()
5898 windows->info.screen); in XDrawEditImage()
5901 if ((x > (int) (windows->info.x+windows->info.width)) || in XDrawEditImage()
5902 (y > (int) (windows->info.y+windows->info.height))) in XDrawEditImage()
5903 (void) XMapWindow(display,windows->info.id); in XDrawEditImage()
5908 (void) XSelectInput(display,windows->image.id, in XDrawEditImage()
5909 windows->image.attributes.event_mask); in XDrawEditImage()
5910 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XDrawEditImage()
5929 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XDrawEditImage()
5940 (void) XDrawLines(display,windows->image.id, in XDrawEditImage()
5941 windows->image.highlight_context,coordinate_info, in XDrawEditImage()
5946 XInfoWidget(display,windows,text); in XDrawEditImage()
5961 XInfoWidget(display,windows,text); in XDrawEditImage()
5962 XHighlightLine(display,windows->image.id, in XDrawEditImage()
5963 windows->image.highlight_context,&line_info); in XDrawEditImage()
5966 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
5967 (void) XWithdrawWindow(display,windows->info.id, in XDrawEditImage()
5968 windows->info.screen); in XDrawEditImage()
5983 XInfoWidget(display,windows,text); in XDrawEditImage()
5984 XHighlightRectangle(display,windows->image.id, in XDrawEditImage()
5985 windows->image.highlight_context,&rectangle_info); in XDrawEditImage()
5988 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
5989 (void) XWithdrawWindow(display,windows->info.id, in XDrawEditImage()
5990 windows->info.screen); in XDrawEditImage()
6007 XInfoWidget(display,windows,text); in XDrawEditImage()
6008 XHighlightEllipse(display,windows->image.id, in XDrawEditImage()
6009 windows->image.highlight_context,&rectangle_info); in XDrawEditImage()
6012 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
6013 (void) XWithdrawWindow(display,windows->info.id, in XDrawEditImage()
6014 windows->info.screen); in XDrawEditImage()
6021 (void) XDrawLines(display,windows->image.id, in XDrawEditImage()
6022 windows->image.highlight_context,coordinate_info, in XDrawEditImage()
6033 XInfoWidget(display,windows,text); in XDrawEditImage()
6034 XHighlightLine(display,windows->image.id, in XDrawEditImage()
6035 windows->image.highlight_context,&line_info); in XDrawEditImage()
6038 if (windows->info.mapped != MagickFalse ) in XDrawEditImage()
6039 (void) XWithdrawWindow(display,windows->info.id, in XDrawEditImage()
6040 windows->info.screen); in XDrawEditImage()
6047 XScreenEvent(display,windows,&event,exception); in XDrawEditImage()
6054 (void) XDrawLines(display,windows->image.id, in XDrawEditImage()
6055 windows->image.highlight_context,coordinate_info, in XDrawEditImage()
6062 XHighlightLine(display,windows->image.id, in XDrawEditImage()
6063 windows->image.highlight_context,&line_info); in XDrawEditImage()
6070 XHighlightRectangle(display,windows->image.id, in XDrawEditImage()
6071 windows->image.highlight_context,&rectangle_info); in XDrawEditImage()
6080 XHighlightEllipse(display,windows->image.id, in XDrawEditImage()
6081 windows->image.highlight_context,&rectangle_info); in XDrawEditImage()
6088 (void) XDrawLines(display,windows->image.id, in XDrawEditImage()
6089 windows->image.highlight_context,coordinate_info, in XDrawEditImage()
6092 XHighlightLine(display,windows->image.id, in XDrawEditImage()
6093 windows->image.highlight_context,&line_info); in XDrawEditImage()
6137 if (event.xmotion.window != windows->image.id) in XDrawEditImage()
6169 if (line_info.x2 > (int) windows->image.width) in XDrawEditImage()
6170 line_info.x2=(short) windows->image.width; in XDrawEditImage()
6174 if (line_info.y2 > (int) windows->image.height) in XDrawEditImage()
6175 line_info.y2=(short) windows->image.height; in XDrawEditImage()
6185 if (rectangle_info.x > (ssize_t) windows->image.width) in XDrawEditImage()
6186 rectangle_info.x=(ssize_t) windows->image.width; in XDrawEditImage()
6197 if (rectangle_info.y > (ssize_t) windows->image.height) in XDrawEditImage()
6198 rectangle_info.y=(ssize_t) windows->image.height; in XDrawEditImage()
6208 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XDrawEditImage()
6253 (void) XMagickCommand(display,resource_info,windows,SaveToUndoBufferCommand, in XDrawEditImage()
6259 if (windows->image.crop_geometry != (char *) NULL) in XDrawEditImage()
6260 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XDrawEditImage()
6261 draw_info.x+=windows->image.x-(line_width/2); in XDrawEditImage()
6264 draw_info.x=(int) (width*draw_info.x/windows->image.ximage->width); in XDrawEditImage()
6265 draw_info.y+=windows->image.y-(line_width/2); in XDrawEditImage()
6268 draw_info.y=(int) height*draw_info.y/windows->image.ximage->height; in XDrawEditImage()
6276 width*draw_info.width/windows->image.ximage->width, in XDrawEditImage()
6277 height*draw_info.height/windows->image.ximage->height, in XDrawEditImage()
6315 windows->pixel_info->pen_color=windows->pixel_info->pen_colors[pen_id]; in XDrawEditImage()
6319 XSetCursorState(display,windows,MagickTrue); in XDrawEditImage()
6320 XCheckRefreshWindows(display,windows); in XDrawEditImage()
6321 status=XDrawImage(display,windows->pixel_info,&draw_info,*image,exception); in XDrawEditImage()
6322 XSetCursorState(display,windows,MagickFalse); in XDrawEditImage()
6326 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XDrawEditImage()
6327 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XDrawEditImage()
6329 XSetCursorState(display,windows,MagickFalse); in XDrawEditImage()
6351 % XDrawPanRectangle(Display *display,XWindows *windows)
6358 % o windows: Specifies a pointer to a XWindows structure.
6361 static void XDrawPanRectangle(Display *display,XWindows *windows) in XDrawPanRectangle() argument
6372 scale_factor=(double) windows->pan.width/windows->image.ximage->width; in XDrawPanRectangle()
6373 highlight_info.x=(ssize_t) (scale_factor*windows->image.x+0.5); in XDrawPanRectangle()
6374 highlight_info.width=(unsigned int) (scale_factor*windows->image.width+0.5); in XDrawPanRectangle()
6376 windows->pan.height/windows->image.ximage->height; in XDrawPanRectangle()
6377 highlight_info.y=(ssize_t) (scale_factor*windows->image.y+0.5); in XDrawPanRectangle()
6378 highlight_info.height=(unsigned int) (scale_factor*windows->image.height+0.5); in XDrawPanRectangle()
6382 (void) XClearWindow(display,windows->pan.id); in XDrawPanRectangle()
6383 XHighlightRectangle(display,windows->pan.id,windows->pan.annotate_context, in XDrawPanRectangle()
6404 % XWindows *windows,const CommandType command,Image **image,
6414 % o windows: Specifies a pointer to a XWindows structure.
6425 XWindows *windows,const CommandType command,Image **image, in XImageCache() argument
6470 windows->image.window_changes.width=(int) cache_image->columns; in XImageCache()
6471 windows->image.window_changes.height=(int) cache_image->rows; in XImageCache()
6473 windows->image.ximage->width,windows->image.ximage->height); in XImageCache()
6474 (void) TransformImage(image,windows->image.crop_geometry,image_geometry, in XImageCache()
6476 if (windows->image.crop_geometry != (char *) NULL) in XImageCache()
6477 windows->image.crop_geometry=(char *) RelinquishMagickMemory( in XImageCache()
6478 windows->image.crop_geometry); in XImageCache()
6479 windows->image.crop_geometry=cache_image->geometry; in XImageCache()
6485 if (windows->image.orphan != MagickFalse ) in XImageCache()
6487 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XImageCache()
6488 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XImageCache()
6601 XSetCursorState(display,windows,MagickTrue); in XImageCache()
6602 XCheckRefreshWindows(display,windows); in XImageCache()
6604 XSetCursorState(display,windows,MagickFalse); in XImageCache()
6610 cache_image->columns=(size_t) windows->image.ximage->width; in XImageCache()
6611 cache_image->rows=(size_t) windows->image.ximage->height; in XImageCache()
6612 cache_image->geometry=windows->image.crop_geometry; in XImageCache()
6613 if (windows->image.crop_geometry != (char *) NULL) in XImageCache()
6617 windows->image.crop_geometry,MagickPathExtent); in XImageCache()
6642 windows->image.window_changes.width=(int) redo_image->columns; in XImageCache()
6643 windows->image.window_changes.height=(int) redo_image->rows; in XImageCache()
6644 if (windows->image.crop_geometry != (char *) NULL) in XImageCache()
6645 windows->image.crop_geometry=(char *) in XImageCache()
6646 RelinquishMagickMemory(windows->image.crop_geometry); in XImageCache()
6647 windows->image.crop_geometry=redo_image->geometry; in XImageCache()
6651 if (windows->image.orphan != MagickFalse ) in XImageCache()
6653 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XImageCache()
6654 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XImageCache()
6662 XSetCursorState(display,windows,MagickTrue); in XImageCache()
6663 XCheckRefreshWindows(display,windows); in XImageCache()
6664 XDisplayImageInfo(display,resource_info,windows,undo_image,*image,exception); in XImageCache()
6665 XSetCursorState(display,windows,MagickFalse); in XImageCache()
6685 % XResourceInfo *resource_info,XWindows *windows,
6700 % o windows: Specifies a pointer to a XWindows structure.
6713 XResourceInfo *resource_info,XWindows *windows,const MagickStatusType state, in XImageWindowCommand() argument
6984 (void) XMapRaised(display,windows->command.id); in XImageWindowCommand()
6992 XTranslateImage(display,windows,*image,key_symbol); in XImageWindowCommand()
7014 crop_info.width=(size_t) windows->image.ximage->width; in XImageWindowCommand()
7015 crop_info.height=(size_t) windows->image.ximage->height; in XImageWindowCommand()
7042 if ((int) (windows->image.x+windows->image.width) > in XImageWindowCommand()
7044 windows->image.x=(int) (crop_info.width-windows->image.width); in XImageWindowCommand()
7045 if ((int) (windows->image.y+windows->image.height) > in XImageWindowCommand()
7047 windows->image.y=(int) (crop_info.height-windows->image.height); in XImageWindowCommand()
7048 XSetCropGeometry(display,windows,&crop_info,*image); in XImageWindowCommand()
7049 windows->image.window_changes.width=(int) crop_info.width; in XImageWindowCommand()
7050 windows->image.window_changes.height=(int) crop_info.height; in XImageWindowCommand()
7051 (void) XSetWindowBackgroundPixmap(display,windows->image.id,None); in XImageWindowCommand()
7052 (void) XConfigureImage(display,resource_info,windows,*image, in XImageWindowCommand()
7056 XTranslateImage(display,windows,*image,key_symbol); in XImageWindowCommand()
7082 % XWindows *windows,const CommandType command,Image **image,
7092 % o windows: Specifies a pointer to a XWindows structure.
7103 XWindows *windows,const CommandType command,Image **image, in XMagickCommand() argument
7147 XCheckRefreshWindows(display,windows); in XMagickCommand()
7148 XImageCache(display,resource_info,windows,command,image,exception); in XMagickCommand()
7150 windows->image.window_changes.width=windows->image.ximage->width; in XMagickCommand()
7151 windows->image.window_changes.height=windows->image.ximage->height; in XMagickCommand()
7162 nexus=XOpenImage(display,resource_info,windows,MagickFalse); in XMagickCommand()
7171 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
7172 windows->im_next_image,CurrentTime); in XMagickCommand()
7181 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
7182 windows->im_former_image,CurrentTime); in XMagickCommand()
7200 nexus=XOpenImage(display,resource_info,windows,MagickTrue); in XMagickCommand()
7208 status=XSaveImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7218 XNoticeWidget(display,windows,"Unable to save file:",message); in XMagickCommand()
7228 status=XPrintImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7238 XNoticeWidget(display,windows,"Unable to print file:",message); in XMagickCommand()
7251 XFileBrowserWidget(display,windows,"Delete",filename); in XMagickCommand()
7256 XNoticeWidget(display,windows,"Unable to delete image file:",filename); in XMagickCommand()
7274 status=XDialogWidget(display,windows,"New","Enter image geometry:", in XMagickCommand()
7280 XColorBrowserWidget(display,windows,"Select",color); in XMagickCommand()
7291 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
7292 windows->im_next_image,CurrentTime); in XMagickCommand()
7300 nexus=XVisualDirectoryImage(display,resource_info,windows,exception); in XMagickCommand()
7309 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
7310 windows->im_exit,CurrentTime); in XMagickCommand()
7319 status=XConfirmWidget(display,windows,"Do you really want to exit", in XMagickCommand()
7322 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
7323 windows->im_exit,CurrentTime); in XMagickCommand()
7332 (void) XCropImage(display,resource_info,windows,*image,CutMode,exception); in XMagickCommand()
7340 (void) XCropImage(display,resource_info,windows,*image,CopyMode, in XMagickCommand()
7349 status=XPasteImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7352 XNoticeWidget(display,windows,"Unable to paste X image", in XMagickCommand()
7363 windows->image.window_changes.width=windows->image.ximage->width/2; in XMagickCommand()
7364 windows->image.window_changes.height=windows->image.ximage->height/2; in XMagickCommand()
7365 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7373 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
7374 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
7375 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7383 windows->image.window_changes.width=windows->image.ximage->width << 1; in XMagickCommand()
7384 windows->image.window_changes.height=windows->image.ximage->height << 1; in XMagickCommand()
7385 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7404 width=(size_t) windows->image.ximage->width; in XMagickCommand()
7405 height=(size_t) windows->image.ximage->height; in XMagickCommand()
7410 status=XDialogWidget(display,windows,"Resize", in XMagickCommand()
7417 windows->image.window_changes.width=(int) width; in XMagickCommand()
7418 windows->image.window_changes.height=(int) height; in XMagickCommand()
7419 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7427 if ((windows->image.crop_geometry == (char *) NULL) && in XMagickCommand()
7428 ((int) (*image)->columns == windows->image.ximage->width) && in XMagickCommand()
7429 ((int) (*image)->rows == windows->image.ximage->height)) in XMagickCommand()
7434 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7435 XCheckRefreshWindows(display,windows); in XMagickCommand()
7440 windows->image.ximage->width,windows->image.ximage->height); in XMagickCommand()
7441 (void) TransformImage(image,windows->image.crop_geometry,image_geometry, in XMagickCommand()
7443 if (windows->image.crop_geometry != (char *) NULL) in XMagickCommand()
7444 windows->image.crop_geometry=(char *) RelinquishMagickMemory( in XMagickCommand()
7445 windows->image.crop_geometry); in XMagickCommand()
7446 windows->image.x=0; in XMagickCommand()
7447 windows->image.y=0; in XMagickCommand()
7448 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7449 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7454 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7462 if ((windows->image.width == (unsigned int) (*image)->columns) && in XMagickCommand()
7463 (windows->image.height == (unsigned int) (*image)->rows) && in XMagickCommand()
7464 (windows->image.crop_geometry == (char *) NULL)) in XMagickCommand()
7469 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
7470 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
7471 if (windows->image.crop_geometry != (char *) NULL) in XMagickCommand()
7473 windows->image.crop_geometry=(char *) in XMagickCommand()
7474 RelinquishMagickMemory(windows->image.crop_geometry); in XMagickCommand()
7475 windows->image.crop_geometry=(char *) NULL; in XMagickCommand()
7476 windows->image.x=0; in XMagickCommand()
7477 windows->image.y=0; in XMagickCommand()
7479 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7480 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7488 (void) XCropImage(display,resource_info,windows,*image,CropMode, in XMagickCommand()
7497 status=XChopImage(display,resource_info,windows,image,exception); in XMagickCommand()
7500 XNoticeWidget(display,windows,"Unable to cut X image", in XMagickCommand()
7514 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7515 XCheckRefreshWindows(display,windows); in XMagickCommand()
7523 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7524 if (windows->image.crop_geometry != (char *) NULL) in XMagickCommand()
7531 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XMagickCommand()
7533 (void) FormatLocaleString(windows->image.crop_geometry, in XMagickCommand()
7537 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7539 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7550 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7551 XCheckRefreshWindows(display,windows); in XMagickCommand()
7559 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7560 if (windows->image.crop_geometry != (char *) NULL) in XMagickCommand()
7567 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XMagickCommand()
7569 (void) FormatLocaleString(windows->image.crop_geometry, in XMagickCommand()
7573 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7575 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7583 status=XRotateImage(display,resource_info,windows,90.0,image,exception); in XMagickCommand()
7586 XNoticeWidget(display,windows,"Unable to rotate X image", in XMagickCommand()
7597 status=XRotateImage(display,resource_info,windows,-90.0,image,exception); in XMagickCommand()
7600 XNoticeWidget(display,windows,"Unable to rotate X image", in XMagickCommand()
7611 status=XRotateImage(display,resource_info,windows,0.0,image,exception); in XMagickCommand()
7614 XNoticeWidget(display,windows,"Unable to rotate X image", in XMagickCommand()
7631 XColorBrowserWidget(display,windows,"Select",color); in XMagickCommand()
7634 (void) XDialogWidget(display,windows,"Shear","Enter shear geometry:", in XMagickCommand()
7641 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
7643 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7644 XCheckRefreshWindows(display,windows); in XMagickCommand()
7658 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7659 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7661 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
7662 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
7663 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7664 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7678 (void) XDialogWidget(display,windows,"Roll","Enter roll geometry:", in XMagickCommand()
7685 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
7687 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7688 XCheckRefreshWindows(display,windows); in XMagickCommand()
7699 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7700 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7702 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
7703 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
7704 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7705 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7718 (void) XDialogWidget(display,windows,"Trim","Enter fuzz factor:",fuzz); in XMagickCommand()
7725 status=XTrimImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7728 XNoticeWidget(display,windows,"Unable to trim X image", in XMagickCommand()
7742 (void) XDialogWidget(display,windows,"Apply", in XMagickCommand()
7749 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7750 XCheckRefreshWindows(display,windows); in XMagickCommand()
7755 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7756 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7758 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7759 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7770 (void) XDialogWidget(display,windows,"Apply", in XMagickCommand()
7777 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7778 XCheckRefreshWindows(display,windows); in XMagickCommand()
7783 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7784 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7786 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7787 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7798 (void) XDialogWidget(display,windows,"Apply", in XMagickCommand()
7805 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7806 XCheckRefreshWindows(display,windows); in XMagickCommand()
7810 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7811 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7813 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7814 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7825 (void) XDialogWidget(display,windows,"Gamma", in XMagickCommand()
7832 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7833 XCheckRefreshWindows(display,windows); in XMagickCommand()
7835 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7836 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7838 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7839 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7847 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7848 XCheckRefreshWindows(display,windows); in XMagickCommand()
7850 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7851 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7853 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7854 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7862 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7863 XCheckRefreshWindows(display,windows); in XMagickCommand()
7865 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7866 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7868 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7869 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7884 (void) XDialogWidget(display,windows,"Contrast Stretch", in XMagickCommand()
7891 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7892 XCheckRefreshWindows(display,windows); in XMagickCommand()
7904 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7905 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7907 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7908 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7925 (void) XDialogWidget(display,windows,"Sigmoidal Contrast", in XMagickCommand()
7932 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7933 XCheckRefreshWindows(display,windows); in XMagickCommand()
7941 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7942 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7944 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7945 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7953 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7954 XCheckRefreshWindows(display,windows); in XMagickCommand()
7956 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7957 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7959 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7960 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7968 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7969 XCheckRefreshWindows(display,windows); in XMagickCommand()
7971 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7972 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7974 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7975 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7983 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7984 XCheckRefreshWindows(display,windows); in XMagickCommand()
7986 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
7987 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
7989 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
7990 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
7998 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
7999 XCheckRefreshWindows(display,windows); in XMagickCommand()
8002 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8003 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8005 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8006 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8020 XFileBrowserWidget(display,windows,"Map",filename); in XMagickCommand()
8026 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8027 XCheckRefreshWindows(display,windows); in XMagickCommand()
8036 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8037 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8039 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8040 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8054 status=XDialogWidget(display,windows,"Quantize", in XMagickCommand()
8061 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8062 XCheckRefreshWindows(display,windows); in XMagickCommand()
8067 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8068 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8070 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8071 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8082 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8083 XCheckRefreshWindows(display,windows); in XMagickCommand()
8091 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8092 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8094 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8095 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8109 (void) XDialogWidget(display,windows,"Emboss", in XMagickCommand()
8116 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8117 XCheckRefreshWindows(display,windows); in XMagickCommand()
8129 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8130 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8132 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8133 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8147 (void) XDialogWidget(display,windows,"Reduce Noise", in XMagickCommand()
8154 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8155 XCheckRefreshWindows(display,windows); in XMagickCommand()
8165 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8166 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8168 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8169 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8189 XListBrowserWidget(display,windows,&windows->widget, in XMagickCommand()
8195 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8196 XCheckRefreshWindows(display,windows); in XMagickCommand()
8205 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8206 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8208 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8209 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8223 (void) XDialogWidget(display,windows,"Sharpen", in XMagickCommand()
8230 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8231 XCheckRefreshWindows(display,windows); in XMagickCommand()
8241 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8242 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8244 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8245 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8259 (void) XDialogWidget(display,windows,"Blur", in XMagickCommand()
8266 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8267 XCheckRefreshWindows(display,windows); in XMagickCommand()
8277 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8278 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8280 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8281 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8295 (void) XDialogWidget(display,windows,"Threshold", in XMagickCommand()
8302 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8303 XCheckRefreshWindows(display,windows); in XMagickCommand()
8306 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8307 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8309 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8310 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8324 (void) XDialogWidget(display,windows,"Detect Edges", in XMagickCommand()
8331 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8332 XCheckRefreshWindows(display,windows); in XMagickCommand()
8341 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8342 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8344 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8345 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8359 (void) XDialogWidget(display,windows,"Spread", in XMagickCommand()
8366 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8367 XCheckRefreshWindows(display,windows); in XMagickCommand()
8376 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8377 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8379 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8380 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8397 status=XDialogWidget(display,windows,"Shade", in XMagickCommand()
8404 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8405 XCheckRefreshWindows(display,windows); in XMagickCommand()
8417 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8418 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8420 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8421 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8432 (void) XDialogWidget(display,windows,"Raise","Bevel width:",bevel_width); in XMagickCommand()
8438 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
8440 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8441 XCheckRefreshWindows(display,windows); in XMagickCommand()
8445 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8446 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8448 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8449 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8460 (void) XDialogWidget(display,windows,"Segment","Smooth threshold:", in XMagickCommand()
8467 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8468 XCheckRefreshWindows(display,windows); in XMagickCommand()
8474 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8475 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8477 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8478 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8495 (void) XDialogWidget(display,windows,"Sepia Tone", in XMagickCommand()
8502 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8503 XCheckRefreshWindows(display,windows); in XMagickCommand()
8512 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8513 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8515 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8516 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8530 (void) XDialogWidget(display,windows,"Solarize", in XMagickCommand()
8537 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8538 XCheckRefreshWindows(display,windows); in XMagickCommand()
8541 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8542 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8544 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8545 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8559 (void) XDialogWidget(display,windows,"Swirl","Enter the swirl angle:", in XMagickCommand()
8566 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8567 XCheckRefreshWindows(display,windows); in XMagickCommand()
8577 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8578 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8580 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8581 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8595 (void) XDialogWidget(display,windows,"Implode", in XMagickCommand()
8602 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8603 XCheckRefreshWindows(display,windows); in XMagickCommand()
8613 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8614 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8616 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8617 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8631 (void) XDialogWidget(display,windows,"Vignette", in XMagickCommand()
8638 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8639 XCheckRefreshWindows(display,windows); in XMagickCommand()
8656 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8657 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8659 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8660 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8674 (void) XDialogWidget(display,windows,"Wave", in XMagickCommand()
8681 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8682 XCheckRefreshWindows(display,windows); in XMagickCommand()
8694 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8695 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8697 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8698 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8712 (void) XDialogWidget(display,windows,"Oil Paint", in XMagickCommand()
8719 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8720 XCheckRefreshWindows(display,windows); in XMagickCommand()
8730 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8731 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8733 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8734 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8748 (void) XDialogWidget(display,windows,"Charcoal Draw", in XMagickCommand()
8755 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
8757 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8758 XCheckRefreshWindows(display,windows); in XMagickCommand()
8770 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8771 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8773 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8774 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8782 status=XAnnotateEditImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8785 XNoticeWidget(display,windows,"Unable to annotate X image", in XMagickCommand()
8796 status=XDrawEditImage(display,resource_info,windows,image,exception); in XMagickCommand()
8799 XNoticeWidget(display,windows,"Unable to draw on the X image", in XMagickCommand()
8810 status=XColorEditImage(display,resource_info,windows,image,exception); in XMagickCommand()
8813 XNoticeWidget(display,windows,"Unable to pixel edit X image", in XMagickCommand()
8824 status=XMatteEditImage(display,resource_info,windows,image,exception); in XMagickCommand()
8827 XNoticeWidget(display,windows,"Unable to matte edit X image", in XMagickCommand()
8838 status=XCompositeImage(display,resource_info,windows,*image, in XMagickCommand()
8842 XNoticeWidget(display,windows,"Unable to composite X image", in XMagickCommand()
8859 XColorBrowserWidget(display,windows,"Select",color); in XMagickCommand()
8862 (void) XDialogWidget(display,windows,"Add Border", in XMagickCommand()
8869 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
8871 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8872 XCheckRefreshWindows(display,windows); in XMagickCommand()
8885 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8886 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8888 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
8889 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
8890 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8891 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8908 XColorBrowserWidget(display,windows,"Select",color); in XMagickCommand()
8911 (void) XDialogWidget(display,windows,"Add Frame","Enter frame geometry:", in XMagickCommand()
8918 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XMagickCommand()
8920 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8921 XCheckRefreshWindows(display,windows); in XMagickCommand()
8941 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
8942 if (windows->image.orphan != MagickFalse ) in XMagickCommand()
8944 windows->image.window_changes.width=(int) (*image)->columns; in XMagickCommand()
8945 windows->image.window_changes.height=(int) (*image)->rows; in XMagickCommand()
8946 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMagickCommand()
8947 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMagickCommand()
8966 XNoticeWidget(display,windows,"Unable to edit image comment", in XMagickCommand()
8979 XNoticeWidget(display,windows,"Unable to edit image comment", in XMagickCommand()
8988 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
8989 XCheckRefreshWindows(display,windows); in XMagickCommand()
8993 XNoticeWidget(display,windows,"Unable to edit image comment", in XMagickCommand()
9008 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9016 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9017 XCheckRefreshWindows(display,windows); in XMagickCommand()
9023 XNoticeWidget(display,windows,"Unable to launch image editor", in XMagickCommand()
9029 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
9030 windows->im_next_image,CurrentTime); in XMagickCommand()
9033 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9041 (void) XROIImage(display,resource_info,windows,image,exception); in XMagickCommand()
9051 if (windows->magnify.mapped != MagickFalse ) in XMagickCommand()
9052 (void) XRaiseWindow(display,windows->magnify.id); in XMagickCommand()
9058 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9059 (void) XMapRaised(display,windows->magnify.id); in XMagickCommand()
9060 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9085 XListBrowserWidget(display,windows,&windows->widget, in XMagickCommand()
9094 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9095 XCheckRefreshWindows(display,windows); in XMagickCommand()
9099 windows->image.id); in XMagickCommand()
9113 XNoticeWidget(display,windows,"Unable to show image preview", in XMagickCommand()
9116 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9130 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9131 XCheckRefreshWindows(display,windows); in XMagickCommand()
9133 windows->image.id); in XMagickCommand()
9151 XNoticeWidget(display,windows,"Unable to show histogram", in XMagickCommand()
9154 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9167 XNoticeWidget(display,windows, in XMagickCommand()
9174 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9175 XCheckRefreshWindows(display,windows); in XMagickCommand()
9177 windows->image.id); in XMagickCommand()
9195 XNoticeWidget(display,windows,"Unable to show matte", in XMagickCommand()
9198 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9206 status=XBackgroundImage(display,resource_info,windows,image,exception); in XMagickCommand()
9211 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
9212 windows->im_next_image,CurrentTime); in XMagickCommand()
9223 (void) XDialogWidget(display,windows,"Slide Show", in XMagickCommand()
9228 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
9229 windows->im_next_image,CurrentTime); in XMagickCommand()
9237 status=XPreferencesWidget(display,resource_info,windows); in XMagickCommand()
9242 XClientMessage(display,windows->image.id,windows->im_protocols, in XMagickCommand()
9243 windows->im_next_image,CurrentTime); in XMagickCommand()
9251 XTextViewWidget(display,resource_info,windows,MagickFalse, in XMagickCommand()
9286 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9289 XSetCursorState(display,windows,MagickTrue); in XMagickCommand()
9290 XCheckRefreshWindows(display,windows); in XMagickCommand()
9294 XNoticeWidget(display,windows,"Unable to browse documentation", in XMagickCommand()
9297 XSetCursorState(display,windows,MagickFalse); in XMagickCommand()
9302 XNoticeWidget(display,windows,GetMagickVersion((size_t *) NULL), in XMagickCommand()
9334 % void XMagnifyImage(Display *display,XWindows *windows,XEvent *event,
9342 % o windows: Specifies a pointer to a XWindows structure.
9350 static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event, in XMagnifyImage() argument
9366 (void) XCheckDefineCursor(display,windows->image.id,windows->magnify.cursor); in XMagnifyImage()
9370 windows->magnify.x=(int) windows->image.x+x; in XMagnifyImage()
9371 windows->magnify.y=(int) windows->image.y+y; in XMagnifyImage()
9377 if (windows->info.mapped != MagickFalse ) in XMagnifyImage()
9379 if ((x < (int) (windows->info.x+windows->info.width)) && in XMagnifyImage()
9380 (y < (int) (windows->info.y+windows->info.height))) in XMagnifyImage()
9381 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XMagnifyImage()
9384 if ((x > (int) (windows->info.x+windows->info.width)) || in XMagnifyImage()
9385 (y > (int) (windows->info.y+windows->info.height))) in XMagnifyImage()
9386 (void) XMapWindow(display,windows->info.id); in XMagnifyImage()
9387 if (windows->info.mapped != MagickFalse ) in XMagnifyImage()
9393 windows->magnify.x,windows->magnify.y); in XMagnifyImage()
9394 XInfoWidget(display,windows,text); in XMagnifyImage()
9399 XScreenEvent(display,windows,event,exception); in XMagnifyImage()
9431 if (x >= (int) windows->image.width) in XMagnifyImage()
9432 x=(int) windows->image.width-1; in XMagnifyImage()
9436 if (y >= (int) windows->image.height) in XMagnifyImage()
9437 y=(int) windows->image.height-1; in XMagnifyImage()
9442 XSetCursorState(display,windows,MagickFalse); in XMagnifyImage()
9461 % void XMagnifyWindowCommand(Display *display,XWindows *windows,
9470 % o windows: Specifies a pointer to a XWindows structure.
9480 static void XMagnifyWindowCommand(Display *display,XWindows *windows, in XMagnifyWindowCommand() argument
9496 (void) XWithdrawWindow(display,windows->magnify.id, in XMagnifyWindowCommand()
9497 windows->magnify.screen); in XMagnifyWindowCommand()
9503 windows->magnify.x=(int) windows->image.width/2; in XMagnifyWindowCommand()
9504 windows->magnify.y=(int) windows->image.height/2; in XMagnifyWindowCommand()
9510 if (windows->magnify.x > 0) in XMagnifyWindowCommand()
9511 windows->magnify.x-=quantum; in XMagnifyWindowCommand()
9517 if (windows->magnify.y > 0) in XMagnifyWindowCommand()
9518 windows->magnify.y-=quantum; in XMagnifyWindowCommand()
9524 if (windows->magnify.x < (int) (windows->image.ximage->width-1)) in XMagnifyWindowCommand()
9525 windows->magnify.x+=quantum; in XMagnifyWindowCommand()
9531 if (windows->magnify.y < (int) (windows->image.ximage->height-1)) in XMagnifyWindowCommand()
9532 windows->magnify.y+=quantum; in XMagnifyWindowCommand()
9546 windows->magnify.data=(key_symbol-XK_0); in XMagnifyWindowCommand()
9560 windows->magnify.data=(key_symbol-XK_KP_0); in XMagnifyWindowCommand()
9566 XMakeMagnifyImage(display,windows,exception); in XMagnifyWindowCommand()
9586 % XWindows *windows,Image *image,ExceptionInfo *exception)
9595 % o windows: Specifies a pointer to a XWindows structure.
9603 XWindows *windows,Image *image,ExceptionInfo *exception) in XMakePanImage() argument
9611 XSetCursorState(display,windows,MagickTrue); in XMakePanImage()
9612 XCheckRefreshWindows(display,windows); in XMakePanImage()
9613 windows->pan.x=(int) windows->image.x; in XMakePanImage()
9614 windows->pan.y=(int) windows->image.y; in XMakePanImage()
9615 status=XMakeImage(display,resource_info,&windows->pan,image, in XMakePanImage()
9616 windows->pan.width,windows->pan.height,exception); in XMakePanImage()
9620 (void) XSetWindowBackgroundPixmap(display,windows->pan.id, in XMakePanImage()
9621 windows->pan.pixmap); in XMakePanImage()
9622 (void) XClearWindow(display,windows->pan.id); in XMakePanImage()
9623 XDrawPanRectangle(display,windows); in XMakePanImage()
9624 XSetCursorState(display,windows,MagickFalse); in XMakePanImage()
9645 % XResourceInfo *resource_info,XWindows *windows,Image **image,
9655 % o windows: Specifies a pointer to a XWindows structure.
9663 XResourceInfo *resource_info,XWindows *windows,Image **image, in XMatteEditImage() argument
9734 (void) CloneString(&windows->command.name,"Matte Edit"); in XMatteEditImage()
9735 windows->command.data=4; in XMatteEditImage()
9736 (void) XCommandWidget(display,windows,MatteEditMenu,(XEvent *) NULL); in XMatteEditImage()
9737 (void) XMapRaised(display,windows->command.id); in XMatteEditImage()
9738 XClientMessage(display,windows->image.id,windows->im_protocols, in XMatteEditImage()
9739 windows->im_update_widget,CurrentTime); in XMatteEditImage()
9743 cursor=XMakeCursor(display,windows->image.id,windows->map_info->colormap, in XMatteEditImage()
9745 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XMatteEditImage()
9749 XQueryPosition(display,windows->image.id,&x,&y); in XMatteEditImage()
9750 (void) XSelectInput(display,windows->image.id, in XMatteEditImage()
9751 windows->image.attributes.event_mask | PointerMotionMask); in XMatteEditImage()
9755 if (windows->info.mapped != MagickFalse ) in XMatteEditImage()
9761 x+windows->image.x,y+windows->image.y); in XMatteEditImage()
9762 XInfoWidget(display,windows,text); in XMatteEditImage()
9767 XScreenEvent(display,windows,&event,exception); in XMatteEditImage()
9768 if (event.xany.window == windows->command.id) in XMatteEditImage()
9773 id=XCommandWidget(display,windows,MatteEditMenu,&event); in XMatteEditImage()
9776 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XMatteEditImage()
9792 entry=XMenuWidget(display,windows,MatteEditMenu[id], in XMatteEditImage()
9818 pen_number=XMenuWidget(display,windows,MatteEditMenu[id], in XMatteEditImage()
9831 XColorBrowserWidget(display,windows,"Select",color_name); in XMatteEditImage()
9838 (void) XParseColor(display,windows->map_info->colormap, in XMatteEditImage()
9862 entry=XMenuWidget(display,windows,MatteEditMenu[id],FuzzMenu, in XMatteEditImage()
9873 (void) XDialogWidget(display,windows,"Ok", in XMatteEditImage()
9899 entry=XMenuWidget(display,windows,MatteEditMenu[id],MatteMenu, in XMatteEditImage()
9915 (void) XDialogWidget(display,windows,"Matte",message,matte); in XMatteEditImage()
9922 (void) XMagickCommand(display,resource_info,windows,UndoCommand, in XMatteEditImage()
9928 XTextViewWidget(display,resource_info,windows,MagickFalse, in XMatteEditImage()
9944 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XMatteEditImage()
9953 if ((event.xbutton.window != windows->image.id) && in XMatteEditImage()
9954 (event.xbutton.window != windows->magnify.id)) in XMatteEditImage()
9961 (void) XMagickCommand(display,resource_info,windows, in XMatteEditImage()
9970 if ((event.xbutton.window != windows->image.id) && in XMatteEditImage()
9971 (event.xbutton.window != windows->magnify.id)) in XMatteEditImage()
9978 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XMatteEditImage()
9979 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XMatteEditImage()
9980 XInfoWidget(display,windows,text); in XMatteEditImage()
9981 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XMatteEditImage()
9995 if (event.xkey.window == windows->magnify.id) in XMatteEditImage()
10000 window=windows->magnify.id; in XMatteEditImage()
10003 if (event.xkey.window != windows->image.id) in XMatteEditImage()
10024 XTextViewWidget(display,resource_info,windows,MagickFalse, in XMatteEditImage()
10043 if (windows->info.mapped != MagickFalse ) in XMatteEditImage()
10045 if ((x < (int) (windows->info.x+windows->info.width)) && in XMatteEditImage()
10046 (y < (int) (windows->info.y+windows->info.height))) in XMatteEditImage()
10047 (void) XWithdrawWindow(display,windows->info.id, in XMatteEditImage()
10048 windows->info.screen); in XMatteEditImage()
10051 if ((x > (int) (windows->info.x+windows->info.width)) || in XMatteEditImage()
10052 (y > (int) (windows->info.y+windows->info.height))) in XMatteEditImage()
10053 (void) XMapWindow(display,windows->info.id); in XMatteEditImage()
10059 if (event.xany.window == windows->magnify.id) in XMatteEditImage()
10061 x=windows->magnify.x-windows->image.x; in XMatteEditImage()
10062 y=windows->magnify.y-windows->image.y; in XMatteEditImage()
10078 (void) XClearArea(display,windows->image.id,x_offset,y_offset,1,1, in XMatteEditImage()
10080 XPutPixel(windows->image.ximage,x_offset,y_offset, in XMatteEditImage()
10081 windows->pixel_info->background_color.pixel); in XMatteEditImage()
10086 if (windows->image.crop_geometry != (char *) NULL) in XMatteEditImage()
10087 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width, in XMatteEditImage()
10089 x_offset=(int) (width*(windows->image.x+x_offset)/ in XMatteEditImage()
10090 windows->image.ximage->width+x); in XMatteEditImage()
10091 y_offset=(int) (height*(windows->image.y+y_offset)/ in XMatteEditImage()
10092 windows->image.ximage->height+y); in XMatteEditImage()
10217 (void) XSelectInput(display,windows->image.id, in XMatteEditImage()
10218 windows->image.attributes.event_mask); in XMatteEditImage()
10219 XSetCursorState(display,windows,MagickFalse); in XMatteEditImage()
10240 % XWindows *windows,const unsigned int command)
10249 % o windows: Specifies a pointer to a XWindows structure.
10256 XWindows *windows,const MagickBooleanType command) in XOpenImage() argument
10277 XFileBrowserWidget(display,windows,"Open",filename); in XOpenImage()
10295 status=XGetCommand(display,windows->image.id,&files,&count); in XOpenImage()
10314 XListBrowserWidget(display,windows,&windows->widget, in XOpenImage()
10336 (void) XDialogWidget(display,windows,"Grab","Enter any delay in seconds:", in XOpenImage()
10355 (void) XDialogWidget(display,windows,"Load","Enter the image geometry:", in XOpenImage()
10362 XSetCursorState(display,windows,MagickTrue); in XOpenImage()
10363 XCheckRefreshWindows(display,windows); in XOpenImage()
10367 XSetCursorState(display,windows,MagickFalse); in XOpenImage()
10369 XClientMessage(display,windows->image.id,windows->im_protocols, in XOpenImage()
10370 windows->im_next_image,CurrentTime); in XOpenImage()
10394 XTextViewWidget(display,resource_info,windows,MagickTrue,title, in XOpenImage()
10422 % void XPanImage(Display *display,XWindows *windows,XEvent *event,
10430 % o windows: Specifies a pointer to a XWindows structure.
10438 static void XPanImage(Display *display,XWindows *windows,XEvent *event, in XPanImage() argument
10460 if ((windows->image.ximage->width > (int) windows->image.width) && in XPanImage()
10461 (windows->image.ximage->height > (int) windows->image.height)) in XPanImage()
10464 if (windows->image.ximage->width > (int) windows->image.width) in XPanImage()
10467 if (windows->image.ximage->height > (int) windows->image.height) in XPanImage()
10471 (void) XCheckDefineCursor(display,windows->pan.id,cursor); in XPanImage()
10475 x_factor=(double) windows->image.ximage->width/windows->pan.width; in XPanImage()
10476 y_factor=(double) windows->image.ximage->height/windows->pan.height; in XPanImage()
10477 pan_info.width=windows->pan.width*windows->image.width/ in XPanImage()
10478 windows->image.ximage->width; in XPanImage()
10479 pan_info.height=windows->pan.height*windows->image.height/ in XPanImage()
10480 windows->image.ximage->height; in XPanImage()
10529 if ((int) (pan_info.x+windows->image.width) > in XPanImage()
10530 windows->image.ximage->width) in XPanImage()
10532 (windows->image.ximage->width-windows->image.width); in XPanImage()
10540 if ((int) (pan_info.y+windows->image.height) > in XPanImage()
10541 windows->image.ximage->height) in XPanImage()
10543 (windows->image.ximage->height-windows->image.height); in XPanImage()
10544 if ((windows->image.x != (int) pan_info.x) || in XPanImage()
10545 (windows->image.y != (int) pan_info.y)) in XPanImage()
10550 windows->image.x=(int) pan_info.x; in XPanImage()
10551 windows->image.y=(int) pan_info.y; in XPanImage()
10553 windows->image.width,windows->image.height,windows->image.x, in XPanImage()
10554 windows->image.y); in XPanImage()
10555 XInfoWidget(display,windows,text); in XPanImage()
10559 XDrawPanRectangle(display,windows); in XPanImage()
10560 XRefreshWindow(display,&windows->image,(XEvent *) NULL); in XPanImage()
10568 XScreenEvent(display,windows,event,exception); in XPanImage()
10573 (void) XCheckDefineCursor(display,windows->pan.id,windows->pan.cursor); in XPanImage()
10575 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XPanImage()
10595 % XResourceInfo *resource_info,XWindows *windows,Image *image,
10605 % o windows: Specifies a pointer to a XWindows structure.
10613 XResourceInfo *resource_info,XWindows *windows,Image *image, in XPasteImage() argument
10679 (void) CloneString(&windows->command.name,"Paste"); in XPasteImage()
10680 windows->command.data=1; in XPasteImage()
10681 (void) XCommandWidget(display,windows,PasteMenu,(XEvent *) NULL); in XPasteImage()
10682 (void) XMapRaised(display,windows->command.id); in XPasteImage()
10683 XClientMessage(display,windows->image.id,windows->im_protocols, in XPasteImage()
10684 windows->im_update_widget,CurrentTime); in XPasteImage()
10688 XSetCursorState(display,windows,MagickFalse); in XPasteImage()
10689 XQueryPosition(display,windows->image.id,&x,&y); in XPasteImage()
10690 (void) XSelectInput(display,windows->image.id, in XPasteImage()
10691 windows->image.attributes.event_mask | PointerMotionMask); in XPasteImage()
10692 paste_info.x=(ssize_t) windows->image.x+x; in XPasteImage()
10693 paste_info.y=(ssize_t) windows->image.y+y; in XPasteImage()
10697 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XPasteImage()
10701 if (windows->info.mapped != MagickFalse ) in XPasteImage()
10708 XInfoWidget(display,windows,text); in XPasteImage()
10711 highlight_info.x=paste_info.x-windows->image.x; in XPasteImage()
10712 highlight_info.y=paste_info.y-windows->image.y; in XPasteImage()
10713 XHighlightRectangle(display,windows->image.id, in XPasteImage()
10714 windows->image.highlight_context,&highlight_info); in XPasteImage()
10718 XScreenEvent(display,windows,&event,exception); in XPasteImage()
10719 XHighlightRectangle(display,windows->image.id, in XPasteImage()
10720 windows->image.highlight_context,&highlight_info); in XPasteImage()
10721 if (event.xany.window == windows->command.id) in XPasteImage()
10726 id=XCommandWidget(display,windows,PasteMenu,&event); in XPasteImage()
10743 entry=XMenuWidget(display,windows,PasteMenu[id], in XPasteImage()
10753 XTextViewWidget(display,resource_info,windows,MagickFalse, in XPasteImage()
10781 if (event.xbutton.window != windows->image.id) in XPasteImage()
10790 if (windows->image.crop_geometry != (char *) NULL) in XPasteImage()
10791 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XPasteImage()
10793 scale_factor=(double) windows->image.ximage->width/width; in XPasteImage()
10795 scale_factor=(double) windows->image.ximage->height/height; in XPasteImage()
10797 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XPasteImage()
10798 paste_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XPasteImage()
10799 paste_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XPasteImage()
10810 if (event.xbutton.window != windows->image.id) in XPasteImage()
10817 paste_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XPasteImage()
10818 paste_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XPasteImage()
10836 if (event.xkey.window != windows->image.id) in XPasteImage()
10863 (void) XSetFunction(display,windows->image.highlight_context, in XPasteImage()
10865 XTextViewWidget(display,resource_info,windows,MagickFalse, in XPasteImage()
10867 (void) XSetFunction(display,windows->image.highlight_context, in XPasteImage()
10886 if (windows->info.mapped != MagickFalse ) in XPasteImage()
10888 if ((x < (int) (windows->info.x+windows->info.width)) && in XPasteImage()
10889 (y < (int) (windows->info.y+windows->info.height))) in XPasteImage()
10890 (void) XWithdrawWindow(display,windows->info.id, in XPasteImage()
10891 windows->info.screen); in XPasteImage()
10894 if ((x > (int) (windows->info.x+windows->info.width)) || in XPasteImage()
10895 (y > (int) (windows->info.y+windows->info.height))) in XPasteImage()
10896 (void) XMapWindow(display,windows->info.id); in XPasteImage()
10897 paste_info.x=(ssize_t) windows->image.x+x; in XPasteImage()
10898 paste_info.y=(ssize_t) windows->image.y+y; in XPasteImage()
10910 (void) XSelectInput(display,windows->image.id, in XPasteImage()
10911 windows->image.attributes.event_mask); in XPasteImage()
10912 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XPasteImage()
10913 XSetCursorState(display,windows,MagickFalse); in XPasteImage()
10920 XSetCursorState(display,windows,MagickTrue); in XPasteImage()
10921 XCheckRefreshWindows(display,windows); in XPasteImage()
10926 if (windows->image.crop_geometry != (char *) NULL) in XPasteImage()
10927 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XPasteImage()
10928 scale_factor=(double) width/windows->image.ximage->width; in XPasteImage()
10932 scale_factor=(double) height/windows->image.ximage->height; in XPasteImage()
10942 XSetCursorState(display,windows,MagickFalse); in XPasteImage()
10946 XConfigureImageColormap(display,resource_info,windows,image,exception); in XPasteImage()
10947 (void) XConfigureImage(display,resource_info,windows,image,exception); in XPasteImage()
10967 % XResourceInfo *resource_info,XWindows *windows,Image *image,
10977 % o windows: Specifies a pointer to a XWindows structure.
10985 XResourceInfo *resource_info,XWindows *windows,Image *image, in XPrintImage() argument
11008 XListBrowserWidget(display,windows,&windows->widget,PageSizes,"Select", in XPrintImage()
11016 XSetCursorState(display,windows,MagickTrue); in XPrintImage()
11017 XCheckRefreshWindows(display,windows); in XPrintImage()
11022 windows->image.ximage->width,windows->image.ximage->height); in XPrintImage()
11023 (void) TransformImage(&print_image,windows->image.crop_geometry,geometry, in XPrintImage()
11035 XSetCursorState(display,windows,MagickFalse); in XPrintImage()
11055 % XResourceInfo *resource_info,XWindows *windows,Image **image,
11065 % o windows: Specifies a pointer to a XWindows structure.
11073 XResourceInfo *resource_info,XWindows *windows,Image **image, in XROIImage() argument
11327 (void) CloneString(&windows->command.name,"ROI"); in XROIImage()
11328 windows->command.data=0; in XROIImage()
11329 (void) XCommandWidget(display,windows,ROIMenu,(XEvent *) NULL); in XROIImage()
11330 (void) XMapRaised(display,windows->command.id); in XROIImage()
11331 XClientMessage(display,windows->image.id,windows->im_protocols, in XROIImage()
11332 windows->im_update_widget,CurrentTime); in XROIImage()
11336 XQueryPosition(display,windows->image.id,&x,&y); in XROIImage()
11337 (void) XSelectInput(display,windows->image.id, in XROIImage()
11338 windows->image.attributes.event_mask | PointerMotionMask); in XROIImage()
11339 roi_info.x=(ssize_t) windows->image.x+x; in XROIImage()
11340 roi_info.y=(ssize_t) windows->image.y+y; in XROIImage()
11347 if (windows->info.mapped != MagickFalse ) in XROIImage()
11354 XInfoWidget(display,windows,text); in XROIImage()
11359 XScreenEvent(display,windows,&event,exception); in XROIImage()
11360 if (event.xany.window == windows->command.id) in XROIImage()
11365 id=XCommandWidget(display,windows,ROIMenu,&event); in XROIImage()
11372 XTextViewWidget(display,resource_info,windows,MagickFalse, in XROIImage()
11396 if (event.xbutton.window != windows->image.id) in XROIImage()
11401 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XROIImage()
11402 roi_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XROIImage()
11403 roi_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XROIImage()
11416 if (event.xkey.window != windows->image.id) in XROIImage()
11438 XTextViewWidget(display,resource_info,windows,MagickFalse, in XROIImage()
11457 if (windows->info.mapped != MagickFalse ) in XROIImage()
11459 if ((x < (int) (windows->info.x+windows->info.width)) && in XROIImage()
11460 (y < (int) (windows->info.y+windows->info.height))) in XROIImage()
11461 (void) XWithdrawWindow(display,windows->info.id, in XROIImage()
11462 windows->info.screen); in XROIImage()
11465 if ((x > (int) (windows->info.x+windows->info.width)) || in XROIImage()
11466 (y > (int) (windows->info.y+windows->info.height))) in XROIImage()
11467 (void) XMapWindow(display,windows->info.id); in XROIImage()
11468 roi_info.x=(ssize_t) windows->image.x+x; in XROIImage()
11469 roi_info.y=(ssize_t) windows->image.y+y; in XROIImage()
11476 (void) XSelectInput(display,windows->image.id, in XROIImage()
11477 windows->image.attributes.event_mask); in XROIImage()
11483 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XROIImage()
11487 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XROIImage()
11501 highlight_info.x=roi_info.x-windows->image.x; in XROIImage()
11502 highlight_info.y=roi_info.y-windows->image.y; in XROIImage()
11508 if (windows->info.mapped == MagickFalse) in XROIImage()
11509 (void) XMapWindow(display,windows->info.id); in XROIImage()
11513 XInfoWidget(display,windows,text); in XROIImage()
11514 XHighlightRectangle(display,windows->image.id, in XROIImage()
11515 windows->image.highlight_context,&highlight_info); in XROIImage()
11518 if (windows->info.mapped != MagickFalse ) in XROIImage()
11519 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XROIImage()
11523 XScreenEvent(display,windows,&event,exception); in XROIImage()
11525 XHighlightRectangle(display,windows->image.id, in XROIImage()
11526 windows->image.highlight_context,&highlight_info); in XROIImage()
11531 roi_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XROIImage()
11532 roi_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XROIImage()
11540 roi_info.x=(ssize_t) windows->image.x+event.xbutton.x; in XROIImage()
11541 roi_info.y=(ssize_t) windows->image.y+event.xbutton.y; in XROIImage()
11542 XSetCursorState(display,windows,MagickFalse); in XROIImage()
11544 if (LocaleCompare(windows->command.name,"Apply") == 0) in XROIImage()
11546 (void) CloneString(&windows->command.name,"Apply"); in XROIImage()
11547 windows->command.data=ApplyMenus; in XROIImage()
11548 (void) XCommandWidget(display,windows,ApplyMenu,(XEvent *) NULL); in XROIImage()
11555 roi_info.x=(ssize_t) windows->image.x+event.xmotion.x; in XROIImage()
11556 roi_info.y=(ssize_t) windows->image.y+event.xmotion.y; in XROIImage()
11570 if (roi_info.x > (ssize_t) windows->image.ximage->width) in XROIImage()
11571 roi_info.x=(ssize_t) windows->image.ximage->width; in XROIImage()
11582 if (roi_info.y > (ssize_t) windows->image.ximage->height) in XROIImage()
11583 roi_info.y=(ssize_t) windows->image.ximage->height; in XROIImage()
11600 (void) XMapWindow(display,windows->info.id); in XROIImage()
11603 if (windows->info.mapped != MagickFalse ) in XROIImage()
11611 XInfoWidget(display,windows,text); in XROIImage()
11614 highlight_info.x=roi_info.x-windows->image.x; in XROIImage()
11615 highlight_info.y=roi_info.y-windows->image.y; in XROIImage()
11624 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XROIImage()
11630 (void) XMagickCommand(display,resource_info,windows,command_type, in XROIImage()
11646 if (windows->image.crop_geometry != (char *) NULL) in XROIImage()
11647 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XROIImage()
11649 scale_factor=(double) width/windows->image.ximage->width; in XROIImage()
11654 height/windows->image.ximage->height; in XROIImage()
11667 windows->image.orphan=MagickTrue; in XROIImage()
11668 (void) XMagickCommand(display,resource_info,windows,command_type, in XROIImage()
11672 (void) XMagickCommand(display,resource_info,windows, in XROIImage()
11674 windows->image.orphan=MagickFalse; in XROIImage()
11685 XConfigureImageColormap(display,resource_info,windows,*image, in XROIImage()
11687 (void) XConfigureImage(display,resource_info,windows,*image, in XROIImage()
11690 XCheckRefreshWindows(display,windows); in XROIImage()
11691 XInfoWidget(display,windows,text); in XROIImage()
11692 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11696 XHighlightRectangle(display,windows->image.id, in XROIImage()
11697 windows->image.highlight_context,&highlight_info); in XROIImage()
11698 XScreenEvent(display,windows,&event,exception); in XROIImage()
11699 if (event.xany.window == windows->command.id) in XROIImage()
11704 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XROIImage()
11706 id=XCommandWidget(display,windows,ApplyMenu,&event); in XROIImage()
11716 entry=XMenuWidget(display,windows,ApplyMenu[id], in XROIImage()
11726 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11728 XHighlightRectangle(display,windows->image.id, in XROIImage()
11729 windows->image.highlight_context,&highlight_info); in XROIImage()
11732 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11734 XTextViewWidget(display,resource_info,windows,MagickFalse, in XROIImage()
11736 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11753 XHighlightRectangle(display,windows->image.id, in XROIImage()
11754 windows->image.highlight_context,&highlight_info); in XROIImage()
11759 x=windows->image.x; in XROIImage()
11760 y=windows->image.y; in XROIImage()
11763 if (event.xbutton.window != windows->image.id) in XROIImage()
11765 x=windows->image.x+event.xbutton.x; in XROIImage()
11766 y=windows->image.y+event.xbutton.y; in XROIImage()
11806 if (event.xbutton.window == windows->pan.id) in XROIImage()
11807 if ((highlight_info.x != crop_info.x-windows->image.x) || in XROIImage()
11808 (highlight_info.y != crop_info.y-windows->image.y)) in XROIImage()
11809 XHighlightRectangle(display,windows->image.id, in XROIImage()
11810 windows->image.highlight_context,&highlight_info); in XROIImage()
11811 (void) XSetSelectionOwner(display,XA_PRIMARY,windows->image.id, in XROIImage()
11817 if (event.xexpose.window == windows->image.id) in XROIImage()
11824 XRefreshWindow(display,&windows->image,&event); in XROIImage()
11826 if (event.xexpose.window == windows->info.id) in XROIImage()
11828 XInfoWidget(display,windows,text); in XROIImage()
11836 if (event.xkey.window != windows->image.id) in XROIImage()
11859 roi_info.x=(ssize_t) (windows->image.width/2L-roi_info.width/2L); in XROIImage()
11860 roi_info.y=(ssize_t) (windows->image.height/2L- in XROIImage()
11893 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11895 XTextViewWidget(display,resource_info,windows,MagickFalse, in XROIImage()
11897 (void) XSetFunction(display,windows->image.highlight_context, in XROIImage()
11903 command_type=XImageWindowCommand(display,resource_info,windows, in XROIImage()
11910 (void) XSetSelectionOwner(display,XA_PRIMARY,windows->image.id, in XROIImage()
11918 if (event.xbutton.window != windows->image.id) in XROIImage()
11925 if (windows->info.mapped != MagickFalse ) in XROIImage()
11927 if ((x < (int) (windows->info.x+windows->info.width)) && in XROIImage()
11928 (y < (int) (windows->info.y+windows->info.height))) in XROIImage()
11929 (void) XWithdrawWindow(display,windows->info.id, in XROIImage()
11930 windows->info.screen); in XROIImage()
11933 if ((x > (int) (windows->info.x+windows->info.width)) || in XROIImage()
11934 (y > (int) (windows->info.y+windows->info.height))) in XROIImage()
11935 (void) XMapWindow(display,windows->info.id); in XROIImage()
11936 roi_info.x=(ssize_t) windows->image.x+event.xmotion.x; in XROIImage()
11937 roi_info.y=(ssize_t) windows->image.y+event.xmotion.y; in XROIImage()
11977 (void) XCheckDefineCursor(display,windows->image.id,cursor); in XROIImage()
11982 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XROIImage()
11983 XSetCursorState(display,windows,MagickFalse); in XROIImage()
12006 % XResourceInfo *resource_info,XWindows *windows,double degrees,
12016 % o windows: Specifies a pointer to a XWindows structure.
12026 XResourceInfo *resource_info,XWindows *windows,double degrees,Image **image, in XRotateImage() argument
12099 (void) CloneString(&windows->command.name,"Rotate"); in XRotateImage()
12100 windows->command.data=2; in XRotateImage()
12101 (void) XCommandWidget(display,windows,RotateMenu,(XEvent *) NULL); in XRotateImage()
12102 (void) XMapRaised(display,windows->command.id); in XRotateImage()
12103 XClientMessage(display,windows->image.id,windows->im_protocols, in XRotateImage()
12104 windows->im_update_widget,CurrentTime); in XRotateImage()
12108 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XRotateImage()
12109 XQueryPosition(display,windows->image.id,&x,&y); in XRotateImage()
12117 XHighlightLine(display,windows->image.id, in XRotateImage()
12118 windows->image.highlight_context,&rotate_info); in XRotateImage()
12122 XScreenEvent(display,windows,&event,exception); in XRotateImage()
12123 XHighlightLine(display,windows->image.id, in XRotateImage()
12124 windows->image.highlight_context,&rotate_info); in XRotateImage()
12125 if (event.xany.window == windows->command.id) in XRotateImage()
12130 id=XCommandWidget(display,windows,RotateMenu,&event); in XRotateImage()
12133 (void) XSetFunction(display,windows->image.highlight_context, in XRotateImage()
12158 pen_number=XMenuWidget(display,windows,RotateMenu[id], in XRotateImage()
12171 XColorBrowserWidget(display,windows,"Select",color_name); in XRotateImage()
12178 (void) XParseColor(display,windows->map_info->colormap, in XRotateImage()
12180 XBestPixel(display,windows->map_info->colormap,(XColor *) NULL, in XRotateImage()
12182 windows->pixel_info->pen_colors[pen_number]=color; in XRotateImage()
12199 id=XMenuWidget(display,windows,RotateMenu[id], in XRotateImage()
12207 XTextViewWidget(display,resource_info,windows,MagickFalse, in XRotateImage()
12223 (void) XSetFunction(display,windows->image.highlight_context, in XRotateImage()
12233 if (event.xbutton.window != windows->image.id) in XRotateImage()
12238 (void) XSetFunction(display,windows->image.highlight_context, in XRotateImage()
12257 if (event.xkey.window != windows->image.id) in XRotateImage()
12279 (void) XSetFunction(display,windows->image.highlight_context, in XRotateImage()
12281 XTextViewWidget(display,resource_info,windows,MagickFalse, in XRotateImage()
12283 (void) XSetFunction(display,windows->image.highlight_context, in XRotateImage()
12308 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XRotateImage()
12309 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XRotateImage()
12316 (void) XSetFunction(display,windows->image.highlight_context,GXinvert); in XRotateImage()
12325 if (windows->info.mapped == MagickFalse) in XRotateImage()
12326 (void) XMapWindow(display,windows->info.id); in XRotateImage()
12329 XInfoWidget(display,windows,text); in XRotateImage()
12330 XHighlightLine(display,windows->image.id, in XRotateImage()
12331 windows->image.highlight_context,&rotate_info); in XRotateImage()
12334 if (windows->info.mapped != MagickFalse ) in XRotateImage()
12335 (void) XWithdrawWindow(display,windows->info.id, in XRotateImage()
12336 windows->info.screen); in XRotateImage()
12340 XScreenEvent(display,windows,&event,exception); in XRotateImage()
12342 XHighlightLine(display,windows->image.id, in XRotateImage()
12343 windows->image.highlight_context,&rotate_info); in XRotateImage()
12374 if (rotate_info.x2 > (int) windows->image.width) in XRotateImage()
12375 rotate_info.x2=(short) windows->image.width; in XRotateImage()
12379 if (rotate_info.y2 > (int) windows->image.height) in XRotateImage()
12380 rotate_info.y2=(short) windows->image.height; in XRotateImage()
12392 (void) XSetFunction(display,windows->image.highlight_context,GXcopy); in XRotateImage()
12393 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XRotateImage()
12410 (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image, in XRotateImage()
12412 XSetCursorState(display,windows,MagickTrue); in XRotateImage()
12413 XCheckRefreshWindows(display,windows); in XRotateImage()
12415 windows->pixel_info->pen_colors[pen_id].red); in XRotateImage()
12417 windows->pixel_info->pen_colors[pen_id].green); in XRotateImage()
12419 windows->pixel_info->pen_colors[pen_id].blue); in XRotateImage()
12421 XSetCursorState(display,windows,MagickFalse); in XRotateImage()
12426 if (windows->image.crop_geometry != (char *) NULL) in XRotateImage()
12433 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XRotateImage()
12444 (void) FormatLocaleString(windows->image.crop_geometry, in XRotateImage()
12454 (void) FormatLocaleString(windows->image.crop_geometry, in XRotateImage()
12464 (void) FormatLocaleString(windows->image.crop_geometry, in XRotateImage()
12471 if (windows->image.orphan != MagickFalse ) in XRotateImage()
12478 windows->image.window_changes.width=(int) (*image)->columns; in XRotateImage()
12479 windows->image.window_changes.height=(int) (*image)->rows; in XRotateImage()
12480 if (windows->image.crop_geometry != (char *) NULL) in XRotateImage()
12485 (void) XParseGeometry(windows->image.crop_geometry,&x,&y, in XRotateImage()
12487 windows->image.window_changes.width=(int) width; in XRotateImage()
12488 windows->image.window_changes.height=(int) height; in XRotateImage()
12490 XConfigureImageColormap(display,resource_info,windows,*image,exception); in XRotateImage()
12495 windows->image.window_changes.width=windows->image.ximage->height; in XRotateImage()
12496 windows->image.window_changes.height=windows->image.ximage->width; in XRotateImage()
12501 (void) XConfigureImage(display,resource_info,windows,*image,exception); in XRotateImage()
12521 % XResourceInfo *resource_info,XWindows *windows,Image *image,
12531 % o windows: Specifies a pointer to a XWindows structure.
12539 XResourceInfo *resource_info,XWindows *windows,Image *image, in XSaveImage() argument
12579 XFileBrowserWidget(display,windows,"Save",filename); in XSaveImage()
12590 status=XConfirmWidget(display,windows,"Overwrite",filename); in XSaveImage()
12611 status=XDialogWidget(display,windows,"Save","Enter JPEG quality:", in XSaveImage()
12634 XListBrowserWidget(display,windows,&windows->widget,PageSizes,"Select", in XSaveImage()
12642 XSetCursorState(display,windows,MagickTrue); in XSaveImage()
12643 XCheckRefreshWindows(display,windows); in XSaveImage()
12648 windows->image.ximage->width,windows->image.ximage->height); in XSaveImage()
12649 (void) TransformImage(&save_image,windows->image.crop_geometry,geometry, in XSaveImage()
12660 XSetCursorState(display,windows,MagickFalse); in XSaveImage()
12676 % windows.
12680 % void XScreenEvent(Display *display,XWindows *windows,XEvent *event,
12688 % o windows: Specifies a pointer to a XWindows structure.
12703 *windows; in XPredicate() local
12705 windows=(XWindows *) data; in XPredicate()
12707 (event->xclient.window == windows->image.id)) in XPredicate()
12716 static void XScreenEvent(Display *display,XWindows *windows,XEvent *event, in XScreenEvent() argument
12723 (void) XIfEvent(display,event,XPredicate,(char *) windows); in XScreenEvent()
12724 if (event->xany.window == windows->command.id) in XScreenEvent()
12740 if (event->xbutton.window == windows->backdrop.id) in XScreenEvent()
12746 if (event->xbutton.window == windows->pan.id) in XScreenEvent()
12748 XPanImage(display,windows,event,exception); in XScreenEvent()
12751 if (event->xbutton.window == windows->image.id) in XScreenEvent()
12762 if (x >= (int) windows->image.width) in XScreenEvent()
12763 x=(int) (windows->image.width-1); in XScreenEvent()
12764 windows->magnify.x=(int) windows->image.x+x; in XScreenEvent()
12768 if (y >= (int) windows->image.height) in XScreenEvent()
12769 y=(int) (windows->image.height-1); in XScreenEvent()
12770 windows->magnify.y=windows->image.y+y; in XScreenEvent()
12771 if (windows->magnify.mapped == MagickFalse) in XScreenEvent()
12772 (void) XMapRaised(display,windows->magnify.id); in XScreenEvent()
12773 XMakeMagnifyImage(display,windows,exception); in XScreenEvent()
12775 (void) XWithdrawWindow(display,windows->info.id, in XScreenEvent()
12776 windows->info.screen); in XScreenEvent()
12786 if (event->xclient.message_type != windows->wm_protocols) in XScreenEvent()
12788 if (*event->xclient.data.l != (long) windows->wm_delete_window) in XScreenEvent()
12790 if (event->xclient.window == windows->magnify.id) in XScreenEvent()
12792 (void) XWithdrawWindow(display,windows->magnify.id, in XScreenEvent()
12793 windows->magnify.screen); in XScreenEvent()
12800 if (event->xconfigure.window == windows->magnify.id) in XScreenEvent()
12808 windows->magnify.width=(unsigned int) event->xconfigure.width; in XScreenEvent()
12809 windows->magnify.height=(unsigned int) event->xconfigure.height; in XScreenEvent()
12810 if (windows->magnify.mapped == MagickFalse) in XScreenEvent()
12826 (void) XReconfigureWMWindow(display,windows->magnify.id, in XScreenEvent()
12827 windows->magnify.screen,(unsigned int) (CWWidth | CWHeight), in XScreenEvent()
12831 XMakeMagnifyImage(display,windows,exception); in XScreenEvent()
12838 if (event->xexpose.window == windows->image.id) in XScreenEvent()
12840 XRefreshWindow(display,&windows->image,event); in XScreenEvent()
12843 if (event->xexpose.window == windows->pan.id) in XScreenEvent()
12846 XDrawPanRectangle(display,windows); in XScreenEvent()
12849 if (event->xexpose.window == windows->magnify.id) in XScreenEvent()
12852 XMakeMagnifyImage(display,windows,exception); in XScreenEvent()
12865 if (event->xkey.window != windows->magnify.id) in XScreenEvent()
12872 XMagnifyWindowCommand(display,windows,event->xkey.state,key_symbol, in XScreenEvent()
12878 if (event->xmap.window == windows->magnify.id) in XScreenEvent()
12880 windows->magnify.mapped=MagickTrue; in XScreenEvent()
12881 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XScreenEvent()
12884 if (event->xmap.window == windows->info.id) in XScreenEvent()
12886 windows->info.mapped=MagickTrue; in XScreenEvent()
12894 if (event->xmotion.window == windows->image.id) in XScreenEvent()
12895 if (windows->magnify.mapped != MagickFalse ) in XScreenEvent()
12905 if (x >= (int) windows->image.width) in XScreenEvent()
12906 x=(int) (windows->image.width-1); in XScreenEvent()
12907 windows->magnify.x=(int) windows->image.x+x; in XScreenEvent()
12911 if (y >= (int) windows->image.height) in XScreenEvent()
12912 y=(int) (windows->image.height-1); in XScreenEvent()
12913 windows->magnify.y=windows->image.y+y; in XScreenEvent()
12914 XMakeMagnifyImage(display,windows,exception); in XScreenEvent()
12920 if (event->xunmap.window == windows->magnify.id) in XScreenEvent()
12922 windows->magnify.mapped=MagickFalse; in XScreenEvent()
12925 if (event->xunmap.window == windows->info.id) in XScreenEvent()
12927 windows->info.mapped=MagickFalse; in XScreenEvent()
12953 % void XSetCropGeometry(Display *display,XWindows *windows,
12961 % o windows: Specifies a pointer to a XWindows structure.
12969 static void XSetCropGeometry(Display *display,XWindows *windows, in XSetCropGeometry() argument
12986 if (windows->info.mapped != MagickFalse ) in XSetCropGeometry()
12994 XInfoWidget(display,windows,text); in XSetCropGeometry()
13003 if (windows->image.crop_geometry != (char *) NULL) in XSetCropGeometry()
13004 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XSetCropGeometry()
13006 windows->image.crop_geometry=AcquireString((char *) NULL); in XSetCropGeometry()
13010 scale_factor=(double) width/windows->image.ximage->width; in XSetCropGeometry()
13016 scale_factor=(double) height/windows->image.ximage->height; in XSetCropGeometry()
13022 (void) FormatLocaleString(windows->image.crop_geometry,MagickPathExtent, in XSetCropGeometry()
13043 % XWindows *windows,Image *image,XEvent *event,ExceptionInfo *exception)
13055 % o windows: Specifies a pointer to a XWindows structure.
13066 XWindows *windows,Image *image,XEvent *event,ExceptionInfo *exception) in XTileImage() argument
13124 if (windows->image.crop_geometry != (char *) NULL) in XTileImage()
13125 (void) XParseGeometry(windows->image.crop_geometry,&x,&y,&width,&height); in XTileImage()
13126 scale_factor=(double) width/windows->image.ximage->width; in XTileImage()
13127 event->xbutton.x+=windows->image.x; in XTileImage()
13129 scale_factor=(double) height/windows->image.ximage->height; in XTileImage()
13130 event->xbutton.y+=windows->image.y; in XTileImage()
13171 id=XMenuWidget(display,windows,"Tile Verb",VerbMenu,command); in XTileImage()
13181 XSetCursorState(display,windows,MagickTrue); in XTileImage()
13182 XCheckRefreshWindows(display,windows); in XTileImage()
13191 XCheckRefreshWindows(display,windows); in XTileImage()
13198 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XTileImage()
13206 XClientMessage(display,windows->image.id,windows->im_protocols, in XTileImage()
13207 windows->im_next_image,CurrentTime); in XTileImage()
13215 XClientMessage(display,windows->image.id,windows->im_protocols, in XTileImage()
13216 windows->im_former_image,CurrentTime); in XTileImage()
13226 XNoticeWidget(display,windows,"Image file does not exist:",filename); in XTileImage()
13229 status=XConfirmWidget(display,windows,"Really delete tile",filename); in XTileImage()
13235 XNoticeWidget(display,windows,"Unable to delete image file:", in XTileImage()
13299 windows->image.window_changes.width=(int) image->columns; in XTileImage()
13300 windows->image.window_changes.height=(int) image->rows; in XTileImage()
13301 XConfigureImageColormap(display,resource_info,windows,image,exception); in XTileImage()
13302 (void) XConfigureImage(display,resource_info,windows,image,exception); in XTileImage()
13308 XSetCursorState(display,windows,MagickFalse); in XTileImage()
13329 % void XTranslateImage(Display *display,XWindows *windows,
13337 % o windows: Specifies a pointer to a XWindows structure.
13345 static void XTranslateImage(Display *display,XWindows *windows, in XTranslateImage() argument
13362 x_offset=windows->image.width; in XTranslateImage()
13363 y_offset=windows->image.height; in XTranslateImage()
13371 windows->image.x=(int) windows->image.width/2; in XTranslateImage()
13372 windows->image.y=(int) windows->image.height/2; in XTranslateImage()
13378 windows->image.x-=x_offset; in XTranslateImage()
13385 windows->image.y-=y_offset; in XTranslateImage()
13391 windows->image.x+=x_offset; in XTranslateImage()
13398 windows->image.y+=y_offset; in XTranslateImage()
13407 if (windows->image.x < 0) in XTranslateImage()
13408 windows->image.x=0; in XTranslateImage()
13410 if ((int) (windows->image.x+windows->image.width) > in XTranslateImage()
13411 windows->image.ximage->width) in XTranslateImage()
13412 windows->image.x=(int) windows->image.ximage->width-windows->image.width; in XTranslateImage()
13413 if (windows->image.y < 0) in XTranslateImage()
13414 windows->image.y=0; in XTranslateImage()
13416 if ((int) (windows->image.y+windows->image.height) > in XTranslateImage()
13417 windows->image.ximage->height) in XTranslateImage()
13418 windows->image.y=(int) windows->image.ximage->height-windows->image.height; in XTranslateImage()
13423 windows->image.width,windows->image.height,windows->image.x, in XTranslateImage()
13424 windows->image.y); in XTranslateImage()
13425 XInfoWidget(display,windows,text); in XTranslateImage()
13426 XCheckRefreshWindows(display,windows); in XTranslateImage()
13427 XDrawPanRectangle(display,windows); in XTranslateImage()
13428 XRefreshWindow(display,&windows->image,(XEvent *) NULL); in XTranslateImage()
13429 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XTranslateImage()
13448 % XResourceInfo *resource_info,XWindows *windows,Image *image,
13458 % o windows: Specifies a pointer to a XWindows structure.
13466 XResourceInfo *resource_info,XWindows *windows,Image *image, in XTrimImage() argument
13483 XSetCursorState(display,windows,MagickTrue); in XTrimImage()
13484 XCheckRefreshWindows(display,windows); in XTrimImage()
13488 background=XGetPixel(windows->image.ximage,0,0); in XTrimImage()
13489 trim_info.width=(size_t) windows->image.ximage->width; in XTrimImage()
13490 for (x=0; x < windows->image.ximage->width; x++) in XTrimImage()
13492 for (y=0; y < windows->image.ximage->height; y++) in XTrimImage()
13494 pixel=XGetPixel(windows->image.ximage,x,y); in XTrimImage()
13498 if (y < windows->image.ximage->height) in XTrimImage()
13502 if (trim_info.x == (ssize_t) windows->image.ximage->width) in XTrimImage()
13504 XSetCursorState(display,windows,MagickFalse); in XTrimImage()
13510 background=XGetPixel(windows->image.ximage,windows->image.ximage->width-1,0); in XTrimImage()
13511 for (x=windows->image.ximage->width-1; x != 0; x--) in XTrimImage()
13513 for (y=0; y < windows->image.ximage->height; y++) in XTrimImage()
13515 pixel=XGetPixel(windows->image.ximage,x,y); in XTrimImage()
13519 if (y < windows->image.ximage->height) in XTrimImage()
13526 background=XGetPixel(windows->image.ximage,0,0); in XTrimImage()
13527 trim_info.height=(size_t) windows->image.ximage->height; in XTrimImage()
13528 for (y=0; y < windows->image.ximage->height; y++) in XTrimImage()
13530 for (x=0; x < windows->image.ximage->width; x++) in XTrimImage()
13532 pixel=XGetPixel(windows->image.ximage,x,y); in XTrimImage()
13536 if (x < windows->image.ximage->width) in XTrimImage()
13543 background=XGetPixel(windows->image.ximage,0,windows->image.ximage->height-1); in XTrimImage()
13544 for (y=windows->image.ximage->height-1; y != 0; y--) in XTrimImage()
13546 for (x=0; x < windows->image.ximage->width; x++) in XTrimImage()
13548 pixel=XGetPixel(windows->image.ximage,x,y); in XTrimImage()
13552 if (x < windows->image.ximage->width) in XTrimImage()
13556 if (((unsigned int) trim_info.width != windows->image.width) || in XTrimImage()
13557 ((unsigned int) trim_info.height != windows->image.height)) in XTrimImage()
13562 XSetCropGeometry(display,windows,&trim_info,image); in XTrimImage()
13563 windows->image.window_changes.width=(int) trim_info.width; in XTrimImage()
13564 windows->image.window_changes.height=(int) trim_info.height; in XTrimImage()
13565 (void) XConfigureImage(display,resource_info,windows,image,exception); in XTrimImage()
13567 XSetCursorState(display,windows,MagickFalse); in XTrimImage()
13587 % XResourceInfo *resource_info,XWindows *windows,
13597 % o windows: Specifies a pointer to a XWindows structure.
13603 XResourceInfo *resource_info,XWindows *windows,ExceptionInfo *exception) in XVisualDirectoryImage() argument
13648 XFileBrowserWidget(display,windows,"Directory",filenames); in XVisualDirectoryImage()
13679 "0x%lx",windows->image.id); in XVisualDirectoryImage()
13684 backdrop=((windows->visual_info->klass == TrueColor) || in XVisualDirectoryImage()
13685 (windows->visual_info->klass == DirectColor)) ? MagickTrue : MagickFalse; in XVisualDirectoryImage()
13692 XSetCursorState(display,windows,MagickTrue); in XVisualDirectoryImage()
13693 XCheckRefreshWindows(display,windows); in XVisualDirectoryImage()
13719 XSetCursorState(display,windows,MagickTrue); in XVisualDirectoryImage()
13738 XSetCursorState(display,windows,MagickFalse); in XVisualDirectoryImage()
13755 XSetCursorState(display,windows,MagickFalse); in XVisualDirectoryImage()
13758 XClientMessage(display,windows->image.id,windows->im_protocols, in XVisualDirectoryImage()
13759 windows->im_next_image,CurrentTime); in XVisualDirectoryImage()
14528 *windows; in XDisplayImage() local
14539 windows=XSetWindows((XWindows *) ~0); in XDisplayImage()
14540 if (windows != (XWindows *) NULL) in XDisplayImage()
14559 Allocate windows structure. in XDisplayImage()
14562 windows=XSetWindows(XInitializeWindows(display,resource_info)); in XDisplayImage()
14563 if (windows == (XWindows *) NULL) in XDisplayImage()
14570 magick_windows[number_windows++]=(&windows->icon); in XDisplayImage()
14571 magick_windows[number_windows++]=(&windows->backdrop); in XDisplayImage()
14572 magick_windows[number_windows++]=(&windows->image); in XDisplayImage()
14573 magick_windows[number_windows++]=(&windows->info); in XDisplayImage()
14574 magick_windows[number_windows++]=(&windows->command); in XDisplayImage()
14575 magick_windows[number_windows++]=(&windows->widget); in XDisplayImage()
14576 magick_windows[number_windows++]=(&windows->popup); in XDisplayImage()
14577 magick_windows[number_windows++]=(&windows->magnify); in XDisplayImage()
14578 magick_windows[number_windows++]=(&windows->pan); in XDisplayImage()
14587 if (windows->font_info != (XFontStruct *) NULL) in XDisplayImage()
14588 (void) XFreeFont(display,windows->font_info); in XDisplayImage()
14589 windows->font_info=XBestFont(display,resource_info,MagickFalse); in XDisplayImage()
14590 if (windows->font_info == (XFontStruct *) NULL) in XDisplayImage()
14596 map_info=windows->map_info; in XDisplayImage()
14597 icon_map=windows->icon_map; in XDisplayImage()
14598 visual_info=windows->visual_info; in XDisplayImage()
14599 icon_visual=windows->icon_visual; in XDisplayImage()
14600 pixel=windows->pixel_info; in XDisplayImage()
14601 icon_pixel=windows->icon_pixel; in XDisplayImage()
14602 font_info=windows->font_info; in XDisplayImage()
14603 icon_resources=windows->icon_resources; in XDisplayImage()
14604 class_hints=windows->class_hints; in XDisplayImage()
14605 manager_hints=windows->manager_hints; in XDisplayImage()
14626 windows->context.id=(Window) NULL; in XDisplayImage()
14628 resource_info,&windows->context); in XDisplayImage()
14637 &windows->context); in XDisplayImage()
14640 "Window id: 0x%lx (context)",windows->context.id); in XDisplayImage()
14649 pixel->annotate_context=XCreateGC(display,windows->context.id, in XDisplayImage()
14657 pixel->widget_context=XCreateGC(display,windows->context.id,context_mask, in XDisplayImage()
14668 pixel->highlight_context=XCreateGC(display,windows->context.id, in XDisplayImage()
14673 (void) XDestroyWindow(display,windows->context.id); in XDisplayImage()
14678 icon_resources,&windows->icon); in XDisplayImage()
14679 windows->icon.geometry=resource_info->icon_geometry; in XDisplayImage()
14680 XBestIconSize(display,&windows->icon,display_image); in XDisplayImage()
14681 windows->icon.attributes.colormap=XDefaultColormap(display, in XDisplayImage()
14683 windows->icon.attributes.event_mask=ExposureMask | StructureNotifyMask; in XDisplayImage()
14688 &windows->icon); in XDisplayImage()
14691 windows->icon.id); in XDisplayImage()
14699 icon_pixel->annotate_context=XCreateGC(display,windows->icon.id, in XDisplayImage()
14704 windows->icon.annotate_context=icon_pixel->annotate_context; in XDisplayImage()
14709 &windows->image); in XDisplayImage()
14710 windows->image.shape=MagickTrue; /* non-rectangular shape hint */ in XDisplayImage()
14712 windows->image.shared_memory=MagickFalse; in XDisplayImage()
14720 (void) CopyMagickString(windows->image.name,title,MagickPathExtent); in XDisplayImage()
14721 (void) CopyMagickString(windows->image.icon_name,title,MagickPathExtent); in XDisplayImage()
14734 (void) FormatLocaleString(windows->image.name,MagickPathExtent, in XDisplayImage()
14737 (void) FormatLocaleString(windows->image.name,MagickPathExtent, in XDisplayImage()
14741 (void) CopyMagickString(windows->image.icon_name,filename, in XDisplayImage()
14745 windows->image.immutable=MagickTrue; in XDisplayImage()
14746 windows->image.use_pixmap=resource_info->use_pixmap; in XDisplayImage()
14747 windows->image.geometry=resource_info->image_geometry; in XDisplayImage()
14757 windows->image.width=(unsigned int) geometry_info.width; in XDisplayImage()
14758 windows->image.height=(unsigned int) geometry_info.height; in XDisplayImage()
14759 windows->image.attributes.event_mask=ButtonMotionMask | ButtonPressMask | in XDisplayImage()
14764 resource_info,&windows->backdrop); in XDisplayImage()
14765 if ((resource_info->backdrop) || (windows->backdrop.id != (Window) NULL)) in XDisplayImage()
14770 windows->backdrop.x=0; in XDisplayImage()
14771 windows->backdrop.y=0; in XDisplayImage()
14772 (void) CloneString(&windows->backdrop.name,"Backdrop"); in XDisplayImage()
14773 windows->backdrop.flags=(size_t) (USSize | USPosition); in XDisplayImage()
14774 windows->backdrop.width=(unsigned int) in XDisplayImage()
14776 windows->backdrop.height=(unsigned int) in XDisplayImage()
14778 windows->backdrop.border_width=0; in XDisplayImage()
14779 windows->backdrop.immutable=MagickTrue; in XDisplayImage()
14780 windows->backdrop.attributes.do_not_propagate_mask=ButtonPressMask | in XDisplayImage()
14782 windows->backdrop.attributes.event_mask=ButtonPressMask | KeyPressMask | in XDisplayImage()
14785 manager_hints->icon_window=windows->icon.id; in XDisplayImage()
14790 &windows->backdrop); in XDisplayImage()
14793 "Window id: 0x%lx (backdrop)",windows->backdrop.id); in XDisplayImage()
14794 (void) XMapWindow(display,windows->backdrop.id); in XDisplayImage()
14795 (void) XClearWindow(display,windows->backdrop.id); in XDisplayImage()
14796 if (windows->image.id != (Window) NULL) in XDisplayImage()
14798 (void) XDestroyWindow(display,windows->image.id); in XDisplayImage()
14799 windows->image.id=(Window) NULL; in XDisplayImage()
14804 windows->image.flags|=USPosition; in XDisplayImage()
14805 windows->image.x=(XDisplayWidth(display,visual_info->screen)/2)- in XDisplayImage()
14806 (windows->image.width/2); in XDisplayImage()
14807 windows->image.y=(XDisplayHeight(display,visual_info->screen)/2)- in XDisplayImage()
14808 (windows->image.height/2); in XDisplayImage()
14811 manager_hints->icon_window=windows->icon.id; in XDisplayImage()
14815 if (windows->group_leader.id != (Window) NULL) in XDisplayImage()
14821 manager_hints->window_group=windows->group_leader.id; in XDisplayImage()
14822 (void) XSelectInput(display,windows->group_leader.id,StructureNotifyMask); in XDisplayImage()
14825 "Window id: 0x%lx (group leader)",windows->group_leader.id); in XDisplayImage()
14828 (Window) (resource_info->backdrop ? windows->backdrop.id : root_window), in XDisplayImage()
14829 argv,argc,class_hints,manager_hints,&windows->image); in XDisplayImage()
14830 (void) XChangeProperty(display,windows->image.id,windows->im_protocols, in XDisplayImage()
14832 if (windows->group_leader.id != (Window) NULL) in XDisplayImage()
14833 (void) XSetTransientForHint(display,windows->image.id, in XDisplayImage()
14834 windows->group_leader.id); in XDisplayImage()
14837 windows->image.id); in XDisplayImage()
14842 &windows->info); in XDisplayImage()
14843 (void) CloneString(&windows->info.name,"Info"); in XDisplayImage()
14844 (void) CloneString(&windows->info.icon_name,"Info"); in XDisplayImage()
14845 windows->info.border_width=1; in XDisplayImage()
14846 windows->info.x=2; in XDisplayImage()
14847 windows->info.y=2; in XDisplayImage()
14848 windows->info.flags|=PPosition; in XDisplayImage()
14849 windows->info.attributes.win_gravity=UnmapGravity; in XDisplayImage()
14850 windows->info.attributes.event_mask=ButtonPressMask | ExposureMask | in XDisplayImage()
14855 manager_hints->window_group=windows->image.id; in XDisplayImage()
14856 XMakeWindow(display,windows->image.id,argv,argc,class_hints,manager_hints, in XDisplayImage()
14857 &windows->info); in XDisplayImage()
14858 windows->info.highlight_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14859 windows->info.id,(char *) HighlightBitmap,HighlightWidth,HighlightHeight); in XDisplayImage()
14860 windows->info.shadow_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14861 windows->info.id,(char *) ShadowBitmap,ShadowWidth,ShadowHeight); in XDisplayImage()
14862 (void) XSetTransientForHint(display,windows->info.id,windows->image.id); in XDisplayImage()
14863 if (windows->image.mapped != MagickFalse ) in XDisplayImage()
14864 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XDisplayImage()
14867 windows->info.id); in XDisplayImage()
14872 resource_info,&windows->command); in XDisplayImage()
14873 windows->command.data=MagickMenus; in XDisplayImage()
14874 (void) XCommandWidget(display,windows,CommandMenu,(XEvent *) NULL); in XDisplayImage()
14877 windows->command.geometry=XGetResourceClass(resource_info->resource_database, in XDisplayImage()
14879 (void) CloneString(&windows->command.name,MagickTitle); in XDisplayImage()
14880 windows->command.border_width=0; in XDisplayImage()
14881 windows->command.flags|=PPosition; in XDisplayImage()
14882 windows->command.attributes.event_mask=ButtonMotionMask | ButtonPressMask | in XDisplayImage()
14888 manager_hints->window_group=windows->image.id; in XDisplayImage()
14890 &windows->command); in XDisplayImage()
14891 windows->command.highlight_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14892 windows->command.id,(char *) HighlightBitmap,HighlightWidth, in XDisplayImage()
14894 windows->command.shadow_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14895 windows->command.id,(char *) ShadowBitmap,ShadowWidth,ShadowHeight); in XDisplayImage()
14896 (void) XSetTransientForHint(display,windows->command.id,windows->image.id); in XDisplayImage()
14897 if (windows->command.mapped != MagickFalse ) in XDisplayImage()
14898 (void) XMapRaised(display,windows->command.id); in XDisplayImage()
14901 "Window id: 0x%lx (command)",windows->command.id); in XDisplayImage()
14906 resource_info,&windows->widget); in XDisplayImage()
14909 windows->widget.geometry=XGetResourceClass(resource_info->resource_database, in XDisplayImage()
14911 windows->widget.border_width=0; in XDisplayImage()
14912 windows->widget.flags|=PPosition; in XDisplayImage()
14913 windows->widget.attributes.event_mask=ButtonMotionMask | ButtonPressMask | in XDisplayImage()
14920 manager_hints->window_group=windows->image.id; in XDisplayImage()
14922 &windows->widget); in XDisplayImage()
14923 windows->widget.highlight_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14924 windows->widget.id,(char *) HighlightBitmap,HighlightWidth,HighlightHeight); in XDisplayImage()
14925 windows->widget.shadow_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14926 windows->widget.id,(char *) ShadowBitmap,ShadowWidth,ShadowHeight); in XDisplayImage()
14927 (void) XSetTransientForHint(display,windows->widget.id,windows->image.id); in XDisplayImage()
14930 "Window id: 0x%lx (widget)",windows->widget.id); in XDisplayImage()
14935 resource_info,&windows->popup); in XDisplayImage()
14936 windows->popup.border_width=0; in XDisplayImage()
14937 windows->popup.flags|=PPosition; in XDisplayImage()
14938 windows->popup.attributes.event_mask=ButtonMotionMask | ButtonPressMask | in XDisplayImage()
14944 manager_hints->window_group=windows->image.id; in XDisplayImage()
14946 &windows->popup); in XDisplayImage()
14947 windows->popup.highlight_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14948 windows->popup.id,(char *) HighlightBitmap,HighlightWidth,HighlightHeight); in XDisplayImage()
14949 windows->popup.shadow_stipple=XCreateBitmapFromData(display, in XDisplayImage()
14950 windows->popup.id,(char *) ShadowBitmap,ShadowWidth,ShadowHeight); in XDisplayImage()
14951 (void) XSetTransientForHint(display,windows->popup.id,windows->image.id); in XDisplayImage()
14954 "Window id: 0x%lx (pop up)",windows->popup.id); in XDisplayImage()
14959 resource_info,&windows->magnify); in XDisplayImage()
14961 windows->magnify.shared_memory=MagickFalse; in XDisplayImage()
14964 windows->magnify.geometry=XGetResourceClass(resource_info->resource_database, in XDisplayImage()
14966 (void) FormatLocaleString(windows->magnify.name,MagickPathExtent,"Magnify %uX", in XDisplayImage()
14968 if (windows->magnify.cursor != (Cursor) NULL) in XDisplayImage()
14969 (void) XFreeCursor(display,windows->magnify.cursor); in XDisplayImage()
14970 windows->magnify.cursor=XMakeCursor(display,windows->image.id, in XDisplayImage()
14973 if (windows->magnify.cursor == (Cursor) NULL) in XDisplayImage()
14976 windows->magnify.width=MagnifySize; in XDisplayImage()
14977 windows->magnify.height=MagnifySize; in XDisplayImage()
14978 windows->magnify.flags|=PPosition; in XDisplayImage()
14979 windows->magnify.min_width=MagnifySize; in XDisplayImage()
14980 windows->magnify.min_height=MagnifySize; in XDisplayImage()
14981 windows->magnify.width_inc=MagnifySize; in XDisplayImage()
14982 windows->magnify.height_inc=MagnifySize; in XDisplayImage()
14983 windows->magnify.data=resource_info->magnify; in XDisplayImage()
14984 windows->magnify.attributes.cursor=windows->magnify.cursor; in XDisplayImage()
14985 windows->magnify.attributes.event_mask=ButtonPressMask | ButtonReleaseMask | in XDisplayImage()
14991 manager_hints->window_group=windows->image.id; in XDisplayImage()
14993 &windows->magnify); in XDisplayImage()
14996 "Window id: 0x%lx (magnify)",windows->magnify.id); in XDisplayImage()
14997 (void) XSetTransientForHint(display,windows->magnify.id,windows->image.id); in XDisplayImage()
15002 resource_info,&windows->pan); in XDisplayImage()
15003 (void) CloneString(&windows->pan.name,"Pan Icon"); in XDisplayImage()
15004 windows->pan.width=windows->icon.width; in XDisplayImage()
15005 windows->pan.height=windows->icon.height; in XDisplayImage()
15008 windows->pan.geometry=XGetResourceClass(resource_info->resource_database, in XDisplayImage()
15010 (void) XParseGeometry(windows->pan.geometry,&windows->pan.x,&windows->pan.y, in XDisplayImage()
15011 &windows->pan.width,&windows->pan.height); in XDisplayImage()
15012 windows->pan.flags|=PPosition; in XDisplayImage()
15013 windows->pan.immutable=MagickTrue; in XDisplayImage()
15014 windows->pan.attributes.event_mask=ButtonMotionMask | ButtonPressMask | in XDisplayImage()
15020 manager_hints->window_group=windows->image.id; in XDisplayImage()
15022 &windows->pan); in XDisplayImage()
15025 windows->pan.id); in XDisplayImage()
15026 (void) XSetTransientForHint(display,windows->pan.id,windows->image.id); in XDisplayImage()
15027 if (windows->info.mapped != MagickFalse ) in XDisplayImage()
15028 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XDisplayImage()
15029 if ((windows->image.mapped == MagickFalse) || in XDisplayImage()
15030 (windows->backdrop.id != (Window) NULL)) in XDisplayImage()
15031 (void) XMapWindow(display,windows->image.id); in XDisplayImage()
15045 windows->image.x=0; in XDisplayImage()
15046 windows->image.y=0; in XDisplayImage()
15047 windows->magnify.shape=MagickFalse; in XDisplayImage()
15053 status=XMakeImage(display,resource_info,&windows->image,display_image, in XDisplayImage()
15058 status=XMakeImage(display,resource_info,&windows->magnify,(Image *) NULL, in XDisplayImage()
15059 windows->magnify.width,windows->magnify.height,exception); in XDisplayImage()
15063 if (windows->magnify.mapped != MagickFalse ) in XDisplayImage()
15064 (void) XMapRaised(display,windows->magnify.id); in XDisplayImage()
15065 if (windows->pan.mapped != MagickFalse ) in XDisplayImage()
15066 (void) XMapRaised(display,windows->pan.id); in XDisplayImage()
15067 windows->image.window_changes.width=(int) display_image->columns; in XDisplayImage()
15068 windows->image.window_changes.height=(int) display_image->rows; in XDisplayImage()
15069 (void) XConfigureImage(display,resource_info,windows,display_image,exception); in XDisplayImage()
15070 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XDisplayImage()
15098 if (windows->image.mapped != MagickFalse ) in XDisplayImage()
15144 if ((windows->image.stasis == MagickFalse) || in XDisplayImage()
15145 (windows->magnify.stasis == MagickFalse)) in XDisplayImage()
15149 windows->image.stasis=MagickTrue; in XDisplayImage()
15150 windows->magnify.stasis=MagickTrue; in XDisplayImage()
15153 if (event.xany.window == windows->command.id) in XDisplayImage()
15158 id=XCommandWidget(display,windows,CommandMenu,&event); in XDisplayImage()
15168 entry=XMenuWidget(display,windows,CommandMenu[id],Menus[id], in XDisplayImage()
15176 nexus=XMagickCommand(display,resource_info,windows,command_type, in XDisplayImage()
15197 if (event.xbutton.window == windows->backdrop.id) in XDisplayImage()
15203 if (event.xbutton.window == windows->image.id) in XDisplayImage()
15214 entry=XMenuWidget(display,windows,"Commands",VirtualMenu, in XDisplayImage()
15217 nexus=XMagickCommand(display,resource_info,windows, in XDisplayImage()
15224 if (windows->command.mapped != MagickFalse ) in XDisplayImage()
15225 (void) XWithdrawWindow(display,windows->command.id, in XDisplayImage()
15226 windows->command.screen); in XDisplayImage()
15229 (void) XCommandWidget(display,windows,CommandMenu, in XDisplayImage()
15231 (void) XMapRaised(display,windows->command.id); in XDisplayImage()
15240 (void) XMagickCommand(display,resource_info,windows,ZoomCommand, in XDisplayImage()
15242 XMagnifyImage(display,windows,&event,exception); in XDisplayImage()
15252 entry=XMenuWidget(display,windows,"Commands",VirtualMenu, in XDisplayImage()
15255 nexus=XMagickCommand(display,resource_info,windows, in XDisplayImage()
15264 nexus=XTileImage(display,resource_info,windows, in XDisplayImage()
15268 vid_info.x=(short int) windows->image.x; in XDisplayImage()
15269 vid_info.y=(short int) windows->image.y; in XDisplayImage()
15275 entry=XMenuWidget(display,windows,"Short Cuts",ShortCutsMenu, in XDisplayImage()
15278 nexus=XMagickCommand(display,resource_info,windows, in XDisplayImage()
15287 XTranslateImage(display,windows,*image,XK_Up); in XDisplayImage()
15295 XTranslateImage(display,windows,*image,XK_Down); in XDisplayImage()
15303 if (event.xbutton.window == windows->magnify.id) in XDisplayImage()
15338 factor=XMenuWidget(display,windows,"Magnify",MagnifyMenu,command); in XDisplayImage()
15340 XMagnifyWindowCommand(display,windows,0,MagnifyCommands[factor], in XDisplayImage()
15344 if (event.xbutton.window == windows->pan.id) in XDisplayImage()
15353 XTranslateImage(display,windows,*image,XK_Up); in XDisplayImage()
15361 XTranslateImage(display,windows,*image,XK_Down); in XDisplayImage()
15366 XPanImage(display,windows,&event,exception); in XDisplayImage()
15392 if (event.xclient.message_type == windows->im_protocols) in XDisplayImage()
15394 if (*event.xclient.data.l == (long) windows->im_update_widget) in XDisplayImage()
15396 (void) CloneString(&windows->command.name,MagickTitle); in XDisplayImage()
15397 windows->command.data=MagickMenus; in XDisplayImage()
15398 (void) XCommandWidget(display,windows,CommandMenu, in XDisplayImage()
15402 if (*event.xclient.data.l == (long) windows->im_update_colormap) in XDisplayImage()
15409 if (magick_windows[i]->id == windows->icon.id) in XDisplayImage()
15433 if (windows->pan.mapped != MagickFalse ) in XDisplayImage()
15435 (void) XSetWindowBackgroundPixmap(display,windows->pan.id, in XDisplayImage()
15436 windows->pan.pixmap); in XDisplayImage()
15437 (void) XClearWindow(display,windows->pan.id); in XDisplayImage()
15438 XDrawPanRectangle(display,windows); in XDisplayImage()
15440 if (windows->backdrop.id != (Window) NULL) in XDisplayImage()
15444 if (*event.xclient.data.l == (long) windows->im_former_image) in XDisplayImage()
15449 if (*event.xclient.data.l == (long) windows->im_next_image) in XDisplayImage()
15454 if (*event.xclient.data.l == (long) windows->im_retain_colors) in XDisplayImage()
15459 if (*event.xclient.data.l == (long) windows->im_exit) in XDisplayImage()
15466 if (event.xclient.message_type == windows->dnd_protocols) in XDisplayImage()
15525 if (event.xclient.message_type != windows->wm_protocols) in XDisplayImage()
15527 if (*event.xclient.data.l != (long) windows->wm_delete_window) in XDisplayImage()
15531 if (event.xclient.window == windows->image.id) in XDisplayImage()
15536 if (event.xclient.window == windows->pan.id) in XDisplayImage()
15541 windows->image.window_changes.width=windows->image.ximage->width; in XDisplayImage()
15542 windows->image.window_changes.height=windows->image.ximage->height; in XDisplayImage()
15543 (void) XConfigureImage(display,resource_info,windows, in XDisplayImage()
15555 if (event.xconfigure.window == windows->image.id) in XDisplayImage()
15566 Position the transient windows relative of the Image window. in XDisplayImage()
15568 if (windows->command.geometry == (char *) NULL) in XDisplayImage()
15569 if (windows->command.mapped == MagickFalse) in XDisplayImage()
15571 windows->command.x=event.xconfigure.x- in XDisplayImage()
15572 windows->command.width-25; in XDisplayImage()
15573 windows->command.y=event.xconfigure.y; in XDisplayImage()
15574 XConstrainWindowPosition(display,&windows->command); in XDisplayImage()
15575 window_changes.x=windows->command.x; in XDisplayImage()
15576 window_changes.y=windows->command.y; in XDisplayImage()
15577 (void) XReconfigureWMWindow(display,windows->command.id, in XDisplayImage()
15578 windows->command.screen,(unsigned int) (CWX | CWY), in XDisplayImage()
15581 if (windows->widget.geometry == (char *) NULL) in XDisplayImage()
15582 if (windows->widget.mapped == MagickFalse) in XDisplayImage()
15584 windows->widget.x=event.xconfigure.x+ in XDisplayImage()
15586 windows->widget.y=event.xconfigure.y+ in XDisplayImage()
15588 XConstrainWindowPosition(display,&windows->widget); in XDisplayImage()
15589 window_changes.x=windows->widget.x; in XDisplayImage()
15590 window_changes.y=windows->widget.y; in XDisplayImage()
15591 (void) XReconfigureWMWindow(display,windows->widget.id, in XDisplayImage()
15592 windows->widget.screen,(unsigned int) (CWX | CWY), in XDisplayImage()
15595 if (windows->magnify.geometry == (char *) NULL) in XDisplayImage()
15596 if (windows->magnify.mapped == MagickFalse) in XDisplayImage()
15598 windows->magnify.x=event.xconfigure.x+ in XDisplayImage()
15600 windows->magnify.y=event.xconfigure.y; in XDisplayImage()
15601 XConstrainWindowPosition(display,&windows->magnify); in XDisplayImage()
15602 window_changes.x=windows->magnify.x; in XDisplayImage()
15603 window_changes.y=windows->magnify.y; in XDisplayImage()
15604 (void) XReconfigureWMWindow(display,windows->magnify.id, in XDisplayImage()
15605 windows->magnify.screen,(unsigned int) (CWX | CWY), in XDisplayImage()
15608 if (windows->pan.geometry == (char *) NULL) in XDisplayImage()
15609 if (windows->pan.mapped == MagickFalse) in XDisplayImage()
15611 windows->pan.x=event.xconfigure.x+ in XDisplayImage()
15613 windows->pan.y=event.xconfigure.y+ in XDisplayImage()
15614 windows->magnify.height+50; in XDisplayImage()
15615 XConstrainWindowPosition(display,&windows->pan); in XDisplayImage()
15616 window_changes.x=windows->pan.x; in XDisplayImage()
15617 window_changes.y=windows->pan.y; in XDisplayImage()
15618 (void) XReconfigureWMWindow(display,windows->pan.id, in XDisplayImage()
15619 windows->pan.screen,(unsigned int) (CWX | CWY), in XDisplayImage()
15623 if ((event.xconfigure.width == (int) windows->image.width) && in XDisplayImage()
15624 (event.xconfigure.height == (int) windows->image.height)) in XDisplayImage()
15626 windows->image.width=(unsigned int) event.xconfigure.width; in XDisplayImage()
15627 windows->image.height=(unsigned int) event.xconfigure.height; in XDisplayImage()
15628 windows->image.x=0; in XDisplayImage()
15629 windows->image.y=0; in XDisplayImage()
15632 windows->image.x=vid_info.x; in XDisplayImage()
15633 windows->image.y=vid_info.y; in XDisplayImage()
15635 if (windows->image.mapped != MagickFalse && in XDisplayImage()
15636 windows->image.stasis != MagickFalse ) in XDisplayImage()
15641 windows->image.window_changes.width=event.xconfigure.width; in XDisplayImage()
15642 windows->image.window_changes.height=event.xconfigure.height; in XDisplayImage()
15643 (void) XConfigureImage(display,resource_info,windows, in XDisplayImage()
15649 if ((event.xconfigure.width < windows->image.ximage->width) || in XDisplayImage()
15650 (event.xconfigure.height < windows->image.ximage->height)) in XDisplayImage()
15652 (void) XMapRaised(display,windows->pan.id); in XDisplayImage()
15653 XDrawPanRectangle(display,windows); in XDisplayImage()
15656 if (windows->pan.mapped != MagickFalse ) in XDisplayImage()
15657 (void) XWithdrawWindow(display,windows->pan.id, in XDisplayImage()
15658 windows->pan.screen); in XDisplayImage()
15661 if (event.xconfigure.window == windows->magnify.id) in XDisplayImage()
15669 windows->magnify.width=(unsigned int) event.xconfigure.width; in XDisplayImage()
15670 windows->magnify.height=(unsigned int) event.xconfigure.height; in XDisplayImage()
15671 if (windows->magnify.mapped == MagickFalse) in XDisplayImage()
15684 (void) XReconfigureWMWindow(display,windows->magnify.id, in XDisplayImage()
15685 windows->magnify.screen,(unsigned int) (CWWidth | CWHeight), in XDisplayImage()
15689 if (windows->magnify.mapped != MagickFalse && in XDisplayImage()
15690 windows->magnify.stasis != MagickFalse ) in XDisplayImage()
15692 status=XMakeImage(display,resource_info,&windows->magnify, in XDisplayImage()
15693 display_image,windows->magnify.width,windows->magnify.height, in XDisplayImage()
15695 XMakeMagnifyImage(display,windows,exception); in XDisplayImage()
15699 if (windows->magnify.mapped != MagickFalse && in XDisplayImage()
15700 (event.xconfigure.window == windows->pan.id)) in XDisplayImage()
15707 windows->pan.x=event.xconfigure.x; in XDisplayImage()
15708 windows->pan.y=event.xconfigure.y; in XDisplayImage()
15710 windows->pan.width=(unsigned int) event.xconfigure.width; in XDisplayImage()
15711 windows->pan.height=(unsigned int) event.xconfigure.height; in XDisplayImage()
15714 if (event.xconfigure.window == windows->icon.id) in XDisplayImage()
15719 windows->icon.width=(unsigned int) event.xconfigure.width; in XDisplayImage()
15720 windows->icon.height=(unsigned int) event.xconfigure.height; in XDisplayImage()
15733 if (event.xdestroywindow.window == windows->group_leader.id) in XDisplayImage()
15758 Refresh windows that are now exposed. in XDisplayImage()
15760 if ((event.xexpose.window == windows->image.id) && in XDisplayImage()
15761 windows->image.mapped != MagickFalse ) in XDisplayImage()
15763 XRefreshWindow(display,&windows->image,&event); in XDisplayImage()
15769 if ((event.xexpose.window == windows->magnify.id) && in XDisplayImage()
15770 windows->magnify.mapped != MagickFalse) in XDisplayImage()
15772 XMakeMagnifyImage(display,windows,exception); in XDisplayImage()
15775 if (event.xexpose.window == windows->pan.id) in XDisplayImage()
15777 XDrawPanRectangle(display,windows); in XDisplayImage()
15780 if (event.xexpose.window == windows->icon.id) in XDisplayImage()
15782 XRefreshWindow(display,&windows->icon,&event); in XDisplayImage()
15802 if (event.xkey.window == windows->image.id) in XDisplayImage()
15804 command_type=XImageWindowCommand(display,resource_info,windows, in XDisplayImage()
15807 nexus=XMagickCommand(display,resource_info,windows,command_type, in XDisplayImage()
15810 if (event.xkey.window == windows->magnify.id) in XDisplayImage()
15811 XMagnifyWindowCommand(display,windows,event.xkey.state,key_symbol, in XDisplayImage()
15813 if (event.xkey.window == windows->pan.id) in XDisplayImage()
15816 (void) XWithdrawWindow(display,windows->pan.id, in XDisplayImage()
15817 windows->pan.screen); in XDisplayImage()
15820 XTextViewWidget(display,resource_info,windows,MagickFalse, in XDisplayImage()
15823 XTranslateImage(display,windows,*image,key_symbol); in XDisplayImage()
15857 if (event.xmap.window == windows->backdrop.id) in XDisplayImage()
15861 windows->backdrop.mapped=MagickTrue; in XDisplayImage()
15864 if (event.xmap.window == windows->image.id) in XDisplayImage()
15866 if (windows->backdrop.id != (Window) NULL) in XDisplayImage()
15871 nexus=XOpenImage(display,resource_info,windows,MagickFalse); in XDisplayImage()
15873 if (((int) windows->image.width < windows->image.ximage->width) || in XDisplayImage()
15874 ((int) windows->image.height < windows->image.ximage->height)) in XDisplayImage()
15875 (void) XMapRaised(display,windows->pan.id); in XDisplayImage()
15876 windows->image.mapped=MagickTrue; in XDisplayImage()
15879 if (event.xmap.window == windows->magnify.id) in XDisplayImage()
15881 XMakeMagnifyImage(display,windows,exception); in XDisplayImage()
15882 windows->magnify.mapped=MagickTrue; in XDisplayImage()
15883 (void) XWithdrawWindow(display,windows->info.id, in XDisplayImage()
15884 windows->info.screen); in XDisplayImage()
15887 if (event.xmap.window == windows->pan.id) in XDisplayImage()
15889 XMakePanImage(display,resource_info,windows,display_image, in XDisplayImage()
15891 windows->pan.mapped=MagickTrue; in XDisplayImage()
15894 if (event.xmap.window == windows->info.id) in XDisplayImage()
15896 windows->info.mapped=MagickTrue; in XDisplayImage()
15899 if (event.xmap.window == windows->icon.id) in XDisplayImage()
15910 (void) XMakeImage(display,icon_resources,&windows->icon, in XDisplayImage()
15911 display_image,windows->icon.width,windows->icon.height, in XDisplayImage()
15914 (void) XSetWindowBackgroundPixmap(display,windows->icon.id, in XDisplayImage()
15915 windows->icon.pixmap); in XDisplayImage()
15916 (void) XClearWindow(display,windows->icon.id); in XDisplayImage()
15917 (void) XWithdrawWindow(display,windows->info.id, in XDisplayImage()
15918 windows->info.screen); in XDisplayImage()
15919 windows->icon.mapped=MagickTrue; in XDisplayImage()
15922 if (event.xmap.window == windows->command.id) in XDisplayImage()
15924 windows->command.mapped=MagickTrue; in XDisplayImage()
15927 if (event.xmap.window == windows->popup.id) in XDisplayImage()
15929 windows->popup.mapped=MagickTrue; in XDisplayImage()
15932 if (event.xmap.window == windows->widget.id) in XDisplayImage()
15934 windows->widget.mapped=MagickTrue; in XDisplayImage()
15966 if (event.xproperty.atom != windows->im_remote_command) in XDisplayImage()
15978 XClientMessage(display,windows->image.id,windows->im_protocols, in XDisplayImage()
15979 windows->im_exit,CurrentTime); in XDisplayImage()
16005 if (event.xunmap.window == windows->backdrop.id) in XDisplayImage()
16007 windows->backdrop.mapped=MagickFalse; in XDisplayImage()
16010 if (event.xunmap.window == windows->image.id) in XDisplayImage()
16012 windows->image.mapped=MagickFalse; in XDisplayImage()
16015 if (event.xunmap.window == windows->magnify.id) in XDisplayImage()
16017 windows->magnify.mapped=MagickFalse; in XDisplayImage()
16020 if (event.xunmap.window == windows->pan.id) in XDisplayImage()
16022 windows->pan.mapped=MagickFalse; in XDisplayImage()
16025 if (event.xunmap.window == windows->info.id) in XDisplayImage()
16027 windows->info.mapped=MagickFalse; in XDisplayImage()
16030 if (event.xunmap.window == windows->icon.id) in XDisplayImage()
16033 XConfigureImageColormap(display,resource_info,windows, in XDisplayImage()
16037 windows->icon.mapped=MagickFalse; in XDisplayImage()
16040 if (event.xunmap.window == windows->command.id) in XDisplayImage()
16042 windows->command.mapped=MagickFalse; in XDisplayImage()
16045 if (event.xunmap.window == windows->popup.id) in XDisplayImage()
16047 if (windows->backdrop.id != (Window) NULL) in XDisplayImage()
16048 (void) XSetInputFocus(display,windows->image.id,RevertToParent, in XDisplayImage()
16050 windows->popup.mapped=MagickFalse; in XDisplayImage()
16053 if (event.xunmap.window == windows->widget.id) in XDisplayImage()
16055 if (windows->backdrop.id != (Window) NULL) in XDisplayImage()
16056 (void) XSetInputFocus(display,windows->image.id,RevertToParent, in XDisplayImage()
16058 windows->widget.mapped=MagickFalse; in XDisplayImage()
16073 (void) XMagickCommand(display,resource_info,windows,FreeBuffersCommand, in XDisplayImage()
16087 status=XConfirmWidget(display,windows,"Your image changed.", in XDisplayImage()
16093 (void) XMagickCommand(display,resource_info,windows,SaveCommand, in XDisplayImage()
16097 if ((windows->visual_info->klass == GrayScale) || in XDisplayImage()
16098 (windows->visual_info->klass == PseudoColor) || in XDisplayImage()
16099 (windows->visual_info->klass == DirectColor)) in XDisplayImage()
16104 if (windows->info.mapped != MagickFalse ) in XDisplayImage()
16105 (void) XWithdrawWindow(display,windows->info.id,windows->info.screen); in XDisplayImage()
16106 if (windows->magnify.mapped != MagickFalse ) in XDisplayImage()
16107 (void) XWithdrawWindow(display,windows->magnify.id, in XDisplayImage()
16108 windows->magnify.screen); in XDisplayImage()
16109 if (windows->command.mapped != MagickFalse ) in XDisplayImage()
16110 (void) XWithdrawWindow(display,windows->command.id, in XDisplayImage()
16111 windows->command.screen); in XDisplayImage()
16113 if (windows->pan.mapped != MagickFalse ) in XDisplayImage()
16114 (void) XWithdrawWindow(display,windows->pan.id,windows->pan.screen); in XDisplayImage()
16116 if (windows->backdrop.mapped) in XDisplayImage()
16118 (void) XWithdrawWindow(display,windows->backdrop.id, in XDisplayImage()
16119 windows->backdrop.screen); in XDisplayImage()
16120 (void) XDestroyWindow(display,windows->backdrop.id); in XDisplayImage()
16121 windows->backdrop.id=(Window) NULL; in XDisplayImage()
16122 (void) XWithdrawWindow(display,windows->image.id, in XDisplayImage()
16123 windows->image.screen); in XDisplayImage()
16124 (void) XDestroyWindow(display,windows->image.id); in XDisplayImage()
16125 windows->image.id=(Window) NULL; in XDisplayImage()
16127 XSetCursorState(display,windows,MagickTrue); in XDisplayImage()
16128 XCheckRefreshWindows(display,windows); in XDisplayImage()