81 #if defined(MAGICKCORE_X11_DELEGATE) 85 #define AutoReverseAnimationState 0x0004 86 #define ForwardAnimationState 0x0008 87 #define HighlightState 0x0010 88 #define PlayAnimationState 0x0020 89 #define RepeatAnimationState 0x0040 90 #define StepAnimationState 0x0080 100 " Press any button to map or unmap the Command widget.\n" 103 " The Command widget lists a number of sub-menus and commands.\n" 121 " Browse Documentation\n" 126 " Menu items with a indented triangle have a sub-menu. They\n" 127 " are represented above as the indented items. To access a\n" 128 " sub-menu item, move the pointer to the appropriate menu and\n" 129 " press a button and drag. When you find the desired sub-menu\n" 130 " item, release the button and the command is executed. Move\n" 131 " the pointer away from the sub-menu if you decide not to\n" 132 " execute a particular command.\n" 134 "KEYBOARD ACCELERATORS\n" 135 " Accelerators are one or two key presses that effect a\n" 136 " particular command. The keyboard accelerators that\n" 137 " animate(1) understands is:\n" 139 " Ctl+O Press to open an image from a file.\n" 141 " space Press to display the next image in the sequence.\n" 143 " < Press to speed-up the display of the images. Refer to\n" 144 " -delay for more information.\n" 146 " > Press to slow the display of the images. Refer to\n" 147 " -delay for more information.\n" 149 " F1 Press to display helpful information about animate(1).\n" 151 " Find Press to browse documentation about ImageMagick.\n" 153 " ? Press to display information about the image. Press\n" 154 " any key or button to erase the information.\n" 156 " This information is printed: image name; image size;\n" 157 " and the total number of unique colors in the image.\n" 159 " Ctl-q Press to discard all images and exit program.\n" 185 static const unsigned char 188 (
unsigned char) 0xaa,
189 (
unsigned char) 0x55,
190 (
unsigned char) 0xaa,
191 (
unsigned char) 0x55,
192 (
unsigned char) 0xaa,
193 (
unsigned char) 0x55,
194 (
unsigned char) 0xaa,
199 (
unsigned char) 0x00,
200 (
unsigned char) 0x00,
201 (
unsigned char) 0x00,
202 (
unsigned char) 0x00,
203 (
unsigned char) 0x00,
204 (
unsigned char) 0x00,
205 (
unsigned char) 0x00,
225 BrowseDocumentationCommand,
237 #define HighlightWidth 8 238 #define HighlightHeight 8 239 #define ShadowWidth 8 240 #define ShadowHeight 8 246 *XMagickCommand(Display *,XResourceInfo *,XWindows *,
const CommandType,
299 assert(image_info != (
const ImageInfo *) NULL);
301 assert(images != (
Image *) NULL);
306 if (display == (Display *) NULL)
315 resource_database=XGetResourceDatabase(display,
GetClientName());
318 if (image_info->
page != (
char *) NULL)
322 (void) XAnimateImages(display,&
resource_info,argv,1,images,exception);
372 XWindows *windows,
const CommandType command_type,
Image **image,
391 switch (command_type)
419 XFileBrowserWidget(display,windows,
"Animate",filenames);
420 if (*filenames ==
'\0')
421 return((
Image *) NULL);
426 if (filelist == (
char **) NULL)
430 return((
Image *) NULL);
433 filelist[0]=filenames;
435 if ((status ==
MagickFalse) || (number_files == 0))
437 for (i=0; i < number_files; i++)
440 if (number_files == 0)
442 ThrowXWindowException(
ImageError,
"NoImagesWereLoaded",filenames);
443 return((
Image *) NULL);
447 return((
Image *) NULL);
452 XCheckRefreshWindows(display,windows);
453 for (i=0; i < number_files; i++)
460 if (next != (
Image *) NULL)
462 if (number_files <= 5)
471 if (images == (
Image *) NULL)
474 ThrowXWindowException(
ImageError,
"NoImagesWereLoaded",filenames);
475 return((
Image *) NULL);
493 *state|=PlayAnimationState;
494 *state&=(~AutoReverseAnimationState);
512 XSetWMName(display,windows->image.id,&window_name);
513 (void)
XFree((
void *) window_name.value);
517 case StepBackwardCommand:
518 case StepForwardCommand:
520 *state|=StepAnimationState;
521 *state&=(~PlayAnimationState);
522 if (command_type == StepBackwardCommand)
523 *state&=(~ForwardAnimationState);
524 if (command_type == StepForwardCommand)
525 *state|=ForwardAnimationState;
530 *state|=RepeatAnimationState;
531 *state&=(~AutoReverseAnimationState);
532 *state|=PlayAnimationState;
535 case AutoReverseCommand:
537 *state|=AutoReverseAnimationState;
538 *state&=(~RepeatAnimationState);
539 *state|=PlayAnimationState;
547 status=XSaveImage(display,
resource_info,windows,*image,exception);
554 exception->
reason != (
char *) NULL ? exception->
reason :
"",
557 XNoticeWidget(display,windows,
"Unable to save file:",message);
576 *state=ForwardAnimationState;
577 *state&=(~AutoReverseAnimationState);
582 *state&=(~ForwardAnimationState);
583 *state&=(~AutoReverseAnimationState);
598 "Help Viewer - Animate",AnimateHelp);
601 case BrowseDocumentationCommand:
615 mozilla_window=XWindowByProperty(display,root_window,mozilla_atom);
616 if (mozilla_window != (Window) NULL)
628 XA_STRING,8,PropModeReplace,(
unsigned char *) command,
629 (int) strlen(command));
634 XCheckRefreshWindows(display,windows);
636 (
char *) NULL,exception);
638 XNoticeWidget(display,windows,
"Unable to browse documentation",
640 XDelay(display,1500);
656 XClientMessage(display,windows->image.id,windows->im_protocols,
657 windows->im_exit,CurrentTime);
666 status=XConfirmWidget(display,windows,
"Do you really want to exit",
669 XClientMessage(display,windows->image.id,windows->im_protocols,
670 windows->im_exit,CurrentTime);
712 #if defined(__cplusplus) || defined(c_plusplus) 722 image_1=(
const Image **) x;
723 image_2=(
const Image **) y;
724 return((
int) ((*image_1)->scene-(*image_2)->scene));
727 #if defined(__cplusplus) || defined(c_plusplus) 731 MagickExport void XAnimateBackgroundImage(Display *display,
765 static XStandardColormap
769 *visual_info = (XVisualInfo *) NULL;
796 assert(images != (
Image *) NULL);
800 resources=(*resource_info);
801 window_info.id=(Window) NULL;
804 window_info.id=root_window;
807 if (isdigit((
int) ((
unsigned char) *resources.window_id)) != 0)
808 window_info.id=XWindowByID(display,root_window,
809 (Window) strtol((
char *) resources.window_id,(
char **) NULL,0));
810 if (window_info.id == (Window) NULL)
812 XWindowByName(display,root_window,resources.window_id);
814 if (window_info.id == (Window) NULL)
816 ThrowXWindowException(
XServerError,
"NoWindowWithSpecifiedIDExists",
817 resources.window_id);
831 if (visual_info == (XVisualInfo *) NULL)
837 if (map_info == (XStandardColormap *) NULL)
839 "MemoryAllocationFailed",images->
filename);
841 pixel.pixels=(
unsigned long *) NULL;
845 resources.map_type=(
char *) NULL;
846 resources.visual_type=visual_type;
847 visual_info=XBestVisualInfo(display,map_info,&resources);
848 if (visual_info == (XVisualInfo *) NULL)
854 window_info.ximage=(XImage *) NULL;
855 window_info.matte_image=(XImage *) NULL;
856 window_info.pixmap=(Pixmap) NULL;
857 window_info.matte_pixmap=(Pixmap) NULL;
862 if (window_info.id == root_window)
863 XDestroyWindowColors(display,root_window);
865 if (coalesce_image == (
Image *) NULL)
868 images=coalesce_image;
869 if (resources.map_type == (
char *) NULL)
870 if ((visual_info->klass != TrueColor) &&
871 (visual_info->klass != DirectColor))
879 for (next=images; next != (
Image *) NULL; )
884 (next->
colors > (
size_t) visual_info->colormap_size))
886 for (i=0; i < (ssize_t) images->
colors; i++)
889 if (i < (ssize_t) images->
colors)
893 if (next != (
Image *) NULL)
902 if (image_list == (
Image **) NULL)
904 "MemoryAllocationFailed",images->
filename);
905 for (i=0; i < (ssize_t) number_scenes; i++)
906 if (image_list[i]->scene == 0)
908 if (i == (ssize_t) number_scenes)
913 resources.colormap=SharedColormap;
914 display_image=image_list[0];
915 for (scene=0; scene < (int) number_scenes; scene++)
918 (visual_info->klass == TrueColor) ||
919 (visual_info->klass == DirectColor))
920 (void)
SetImageType(image_list[scene],image_list[scene]->alpha_trait ==
922 if ((display_image->
columns < image_list[scene]->columns) &&
923 (display_image->
rows < image_list[scene]->
rows))
924 display_image=image_list[scene];
927 (visual_info->klass == TrueColor) || (visual_info->klass == DirectColor))
930 XMakeStandardColormap(display,visual_info,&resources,display_image,map_info,
935 context_values.background=pixel.background_color.pixel;
936 context_values.foreground=pixel.foreground_color.pixel;
937 pixel.annotate_context=
XCreateGC(display,window_info.id,(
unsigned long)
938 (GCBackground | GCForeground),&context_values);
939 if (pixel.annotate_context == (GC) NULL)
945 XGetWindowInfo(display,visual_info,map_info,&pixel,(XFontStruct *) NULL,
946 &resources,&window_info);
950 window_info.width=(
unsigned int) image_list[0]->columns;
951 window_info.height=(
unsigned int) image_list[0]->rows;
952 if ((image_list[0]->columns != window_info.width) ||
953 (image_list[0]->
rows != window_info.height))
955 image_list[0]->filename);
957 window_attributes.width,window_attributes.height);
958 geometry_info.
width=window_info.width;
959 geometry_info.
height=window_info.height;
960 geometry_info.
x=(ssize_t) window_info.x;
961 geometry_info.
y=(ssize_t) window_info.y;
964 window_info.width=(
unsigned int) geometry_info.
width;
965 window_info.height=(
unsigned int) geometry_info.
height;
966 window_info.x=(int) geometry_info.
x;
967 window_info.y=(
int) geometry_info.
y;
968 status=XMakeImage(display,&resources,&window_info,image_list[0],
969 window_info.width,window_info.height,exception);
978 "Image: %s[%.20g] %.20gx%.20g ",image_list[0]->
filename,(double)
979 image_list[0]->scene,(
double) image_list[0]->
columns,(double)
980 image_list[0]->rows);
981 if (image_list[0]->colors != 0)
983 image_list[0]->colors);
990 width=window_info.width;
991 height=window_info.height;
997 window_info.x=(int) (window_attributes.width/2)-
998 (window_info.ximage->width/2);
999 window_info.y=(int) (window_attributes.height/2)-
1000 (window_info.ximage->height/2);
1001 width=(
unsigned int) window_attributes.width;
1002 height=(
unsigned int) window_attributes.height;
1004 if (resources.image_geometry != (
char *) NULL)
1020 if (size_hints == (XSizeHints *) NULL)
1022 "MemoryAllocationFailed",images->
filename);
1023 size_hints->flags=0L;
1026 flags=
XWMGeometry(display,visual_info->screen,resources.image_geometry,
1027 default_geometry,window_info.border_width,size_hints,&window_info.x,
1028 &window_info.y,(
int *) &width,(
int *) &height,&gravity);
1031 width=(
unsigned int) window_attributes.width;
1032 height=(
unsigned int) window_attributes.height;
1034 (void)
XFree((
void *) size_hints);
1039 window_info.pixmap=
XCreatePixmap(display,window_info.id,(
unsigned int) width,
1040 (
unsigned int) height,window_info.depth);
1041 if (window_info.pixmap == (Pixmap) NULL)
1047 if (((
unsigned int) width > window_info.width) ||
1048 ((
unsigned int) height > window_info.height))
1050 window_info.annotate_context,0,0,(
unsigned int) width,
1051 (
unsigned int) height);
1052 (void)
XPutImage(display,window_info.pixmap,window_info.annotate_context,
1053 window_info.ximage,0,0,window_info.x,window_info.y,window_info.width,
1054 window_info.height);
1061 sizeof(*window_info.pixmaps));
1063 sizeof(*window_info.matte_pixmaps));
1064 if ((window_info.pixmaps == (Pixmap *) NULL) ||
1065 (window_info.matte_pixmaps == (Pixmap *) NULL))
1068 window_info.pixmaps[0]=window_info.pixmap;
1069 window_info.matte_pixmaps[0]=window_info.pixmap;
1070 for (scene=1; scene < (int) number_scenes; scene++)
1079 window_info.pixmap=(Pixmap) NULL;
1080 window_info.matte_pixmap=(Pixmap) NULL;
1081 if ((resources.map_type != (
char *) NULL) ||
1082 (visual_info->klass == TrueColor) ||
1083 (visual_info->klass == DirectColor))
1084 if (image_list[scene]->storage_class ==
PseudoClass)
1085 XGetPixelInfo(display,visual_info,map_info,&resources,
1086 image_list[scene],window_info.pixel_info);
1087 columns=(
unsigned int) image_list[scene]->columns;
1088 rows=(
unsigned int) image_list[scene]->rows;
1089 if ((image_list[scene]->columns != columns) ||
1090 (image_list[scene]->
rows != rows))
1092 image_list[scene]->filename);
1093 status=XMakeImage(display,&resources,&window_info,image_list[scene],
1094 columns,rows,exception);
1101 "Image: [%.20g] %s %.20gx%.20g ",(double) image_list[scene]->scene,
1102 image_list[scene]->filename,(
double) columns,(double) rows);
1103 if (image_list[scene]->colors != 0)
1105 image_list[scene]->colors);
1107 image_list[scene]->
magick);
1112 window_info.pixmap=
XCreatePixmap(display,window_info.id,width,height,
1114 if (window_info.pixmap == (Pixmap) NULL)
1120 if ((width > window_info.width) || (height > window_info.height))
1122 window_info.annotate_context,0,0,width,height);
1123 (void)
XPutImage(display,window_info.pixmap,window_info.annotate_context,
1124 window_info.ximage,0,0,window_info.x,window_info.y,window_info.width,
1125 window_info.height);
1127 window_info.pixmap);
1129 window_info.pixmaps[scene]=window_info.pixmap;
1130 window_info.matte_pixmaps[scene]=window_info.matte_pixmap;
1131 if (image_list[scene]->alpha_trait)
1134 image_list[scene]->ticks_per_second,1L);
1135 XDelay(display,resources.delay*(delay == 0 ? 10 : delay));
1137 window_info.pixel_info=(&pixel);
1141 (void)
XSelectInput(display,window_info.id,SubstructureNotifyMask);
1146 for (scene=0; scene < (int) number_scenes; scene++)
1151 if (event.type == DestroyNotify)
1154 window_info.pixmap=window_info.pixmaps[scene];
1155 window_info.matte_pixmap=window_info.matte_pixmaps[scene];
1157 window_info.pixmap);
1161 image_list[scene]->ticks_per_second,1L);
1162 XDelay(display,resources.delay*(delay == 0 ? 10 : delay));
1165 if (iterations == (ssize_t) image_list[0]->iterations)
1167 }
while (event.type != DestroyNotify);
1211 #define MagickMenus 4 1212 #define MaXWindows 8 1213 #define MagickTitle "Commands" 1216 *
const CommandMenu[]=
1226 *
const AnimateMenu[]=
1242 *
const DirectionMenu[]=
1251 "Browse Documentation",
1257 *
const *Menus[MagickMenus]=
1265 static const CommandType
1289 DirectionCommands[]=
1297 BrowseDocumentationCommand,
1301 static const CommandType
1302 *Commands[MagickMenus]=
1357 *magick_windows[MaXWindows];
1411 assert(images != (
Image *) NULL);
1416 windows=XSetWindows((XWindows *) ~0);
1417 if (windows != (XWindows *) NULL)
1422 if (*working_directory ==
'\0')
1424 status=chdir(working_directory);
1427 "UnableToOpenFile",
"%s",working_directory);
1451 windows=XSetWindows(XInitializeWindows(display,
resource_info));
1452 if (windows == (XWindows *) NULL)
1459 magick_windows[number_windows++]=(&windows->icon);
1460 magick_windows[number_windows++]=(&windows->backdrop);
1461 magick_windows[number_windows++]=(&windows->image);
1462 magick_windows[number_windows++]=(&windows->info);
1463 magick_windows[number_windows++]=(&windows->command);
1464 magick_windows[number_windows++]=(&windows->widget);
1465 magick_windows[number_windows++]=(&windows->popup);
1466 for (i=0; i < (ssize_t) number_windows; i++)
1467 magick_windows[i]->
id=(Window) NULL;
1472 if (windows->font_info != (XFontStruct *) NULL)
1473 (
void)
XFreeFont(display,windows->font_info);
1475 if (windows->font_info == (XFontStruct *) NULL)
1481 map_info=windows->map_info;
1482 icon_map=windows->icon_map;
1483 visual_info=windows->visual_info;
1484 icon_visual=windows->icon_visual;
1485 pixel=windows->pixel_info;
1486 icon_pixel=windows->icon_pixel;
1487 font_info=windows->font_info;
1488 icon_resources=windows->icon_resources;
1489 class_hints=windows->class_hints;
1490 manager_hints=windows->manager_hints;
1491 root_window=
XRootWindow(display,visual_info->screen);
1493 if (coalesce_image == (
Image *) NULL)
1496 images=coalesce_image;
1498 if ((visual_info->klass != TrueColor) &&
1499 (visual_info->klass != DirectColor))
1507 for (next=images; next != (
Image *) NULL; )
1512 (next->
colors > (
size_t) visual_info->colormap_size))
1514 for (i=0; i < (ssize_t) images->
colors; i++)
1517 if (i < (ssize_t) images->
colors)
1521 if (next != (
Image *) NULL)
1523 (
Image *) NULL,exception);
1530 if (image_list == (
Image **) NULL)
1533 for (scene=0; scene < (ssize_t) number_scenes; scene++)
1534 if (image_list[scene]->scene == 0)
1536 if (scene == (ssize_t) number_scenes)
1542 display_image=image_list[0];
1543 for (scene=0; scene < (ssize_t) number_scenes; scene++)
1546 (visual_info->klass == TrueColor) ||
1547 (visual_info->klass == DirectColor))
1548 (
void)
SetImageType(image_list[scene],image_list[scene]->alpha_trait ==
1550 if ((display_image->
columns < image_list[scene]->columns) &&
1551 (display_image->
rows < image_list[scene]->rows))
1552 display_image=image_list[scene];
1557 "Image: %s[%.20g] %.20gx%.20g ",display_image->
filename,(double)
1558 display_image->
scene,(
double) display_image->
columns,(double)
1559 display_image->
rows);
1560 if (display_image->
colors != 0)
1566 XMakeStandardColormap(display,visual_info,
resource_info,display_image,
1567 map_info,pixel,exception);
1571 windows->context.id=(Window) NULL;
1572 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1577 class_hints->res_class[0]);
1578 manager_hints->flags=InputHint | StateHint;
1580 manager_hints->initial_state=WithdrawnState;
1581 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1585 "Window id: 0x%lx (context)",windows->context.id);
1586 context_values.background=pixel->background_color.pixel;
1587 context_values.font=font_info->fid;
1588 context_values.foreground=pixel->foreground_color.pixel;
1591 (GCBackground | GCFont | GCForeground | GCGraphicsExposures);
1592 if (pixel->annotate_context != (GC) NULL)
1593 (
void)
XFreeGC(display,pixel->annotate_context);
1594 pixel->annotate_context=
1595 XCreateGC(display,windows->context.id,context_mask,&context_values);
1596 if (pixel->annotate_context == (GC) NULL)
1599 context_values.background=pixel->depth_color.pixel;
1600 if (pixel->widget_context != (GC) NULL)
1601 (void)
XFreeGC(display,pixel->widget_context);
1602 pixel->widget_context=
1603 XCreateGC(display,windows->context.id,context_mask,&context_values);
1604 if (pixel->widget_context == (GC) NULL)
1607 context_values.background=pixel->foreground_color.pixel;
1608 context_values.foreground=pixel->background_color.pixel;
1609 context_values.plane_mask=
1610 context_values.background ^ context_values.foreground;
1611 if (pixel->highlight_context != (GC) NULL)
1612 (void)
XFreeGC(display,pixel->highlight_context);
1613 pixel->highlight_context=
XCreateGC(display,windows->context.id,
1614 (
size_t) (context_mask | GCPlaneMask),&context_values);
1615 if (pixel->highlight_context == (GC) NULL)
1622 XGetWindowInfo(display,icon_visual,icon_map,icon_pixel,(XFontStruct *) NULL,
1623 icon_resources,&windows->icon);
1625 XBestIconSize(display,&windows->icon,display_image);
1626 windows->icon.attributes.colormap=
1628 windows->icon.attributes.event_mask=ExposureMask | StructureNotifyMask;
1629 manager_hints->flags=InputHint | StateHint;
1631 manager_hints->initial_state=IconicState;
1632 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1640 if (icon_pixel->annotate_context != (GC) NULL)
1641 (
void)
XFreeGC(display,icon_pixel->annotate_context);
1642 context_values.background=icon_pixel->background_color.pixel;
1643 context_values.foreground=icon_pixel->foreground_color.pixel;
1644 icon_pixel->annotate_context=
XCreateGC(display,windows->icon.id,
1645 (
size_t) (GCBackground | GCForeground),&context_values);
1646 if (icon_pixel->annotate_context == (GC) NULL)
1649 windows->icon.annotate_context=icon_pixel->annotate_context;
1653 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1666 (void)
CloneString(&windows->image.icon_name,title);
1681 display_image->
scene,(double) number_scenes);
1682 (void)
CloneString(&windows->image.name,window_name);
1683 (void)
CloneString(&windows->image.icon_name,filename);
1698 windows->image.width=(
unsigned int) geometry_info.
width;
1699 windows->image.height=(
unsigned int) geometry_info.
height;
1700 windows->image.attributes.event_mask=ButtonMotionMask | ButtonPressMask |
1701 ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask |
1702 KeyReleaseMask | LeaveWindowMask | OwnerGrabButtonMask |
1703 PropertyChangeMask | StructureNotifyMask | SubstructureNotifyMask;
1704 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1706 if ((
resource_info->backdrop) || (windows->backdrop.id != (Window) NULL))
1711 windows->backdrop.x=0;
1712 windows->backdrop.y=0;
1713 (void)
CloneString(&windows->backdrop.name,
"ImageMagick Backdrop");
1714 windows->backdrop.flags=(size_t) (USSize | USPosition);
1715 windows->backdrop.width=(
unsigned int)
1717 windows->backdrop.height=(
unsigned int)
1719 windows->backdrop.border_width=0;
1721 windows->backdrop.attributes.do_not_propagate_mask=ButtonPressMask |
1723 windows->backdrop.attributes.event_mask=ButtonPressMask | KeyPressMask |
1724 StructureNotifyMask;
1725 manager_hints->flags=IconWindowHint | InputHint | StateHint;
1726 manager_hints->icon_window=windows->icon.id;
1728 manager_hints->initial_state=
1730 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1731 &windows->backdrop);
1734 "Window id: 0x%lx (backdrop)",windows->backdrop.id);
1735 (void)
XMapWindow(display,windows->backdrop.id);
1737 if (windows->image.id != (Window) NULL)
1740 windows->image.id=(Window) NULL;
1745 windows->image.flags|=USPosition;
1746 windows->image.x=(
XDisplayWidth(display,visual_info->screen)/2)-
1747 (windows->image.width/2);
1748 windows->image.y=(
XDisplayHeight(display,visual_info->screen)/2)-
1749 (windows->image.height/2);
1751 manager_hints->flags=IconWindowHint | InputHint | StateHint;
1752 manager_hints->icon_window=windows->icon.id;
1754 manager_hints->initial_state=
1756 if (windows->group_leader.id != (Window) NULL)
1762 manager_hints->window_group=windows->group_leader.id;
1763 (void)
XSelectInput(display,windows->group_leader.id,StructureNotifyMask);
1766 "Window id: 0x%lx (group leader)",windows->group_leader.id);
1768 XMakeWindow(display,
1769 (Window) (
resource_info->backdrop ? windows->backdrop.id : root_window),
1770 argv,argc,class_hints,manager_hints,&windows->image);
1771 (void)
XChangeProperty(display,windows->image.id,windows->im_protocols,
1772 XA_STRING,8,PropModeReplace,(
unsigned char *) NULL,0);
1773 if (windows->group_leader.id != (Window) NULL)
1775 windows->group_leader.id);
1782 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1785 (void)
CloneString(&windows->info.icon_name,
"Info");
1786 windows->info.border_width=1;
1789 windows->info.flags|=PPosition;
1790 windows->info.attributes.win_gravity=UnmapGravity;
1791 windows->info.attributes.event_mask=ButtonPressMask | ExposureMask |
1792 StructureNotifyMask;
1793 manager_hints->flags=InputHint | StateHint | WindowGroupHint;
1795 manager_hints->initial_state=NormalState;
1796 manager_hints->window_group=windows->image.id;
1797 XMakeWindow(display,windows->image.id,argv,argc,class_hints,manager_hints,
1800 windows->info.id,(
char *) HighlightBitmap,HighlightWidth,HighlightHeight);
1802 windows->info.id,(
char *) ShadowBitmap,ShadowWidth,ShadowHeight);
1804 if (windows->image.mapped)
1805 (void)
XWithdrawWindow(display,windows->info.id,windows->info.screen);
1812 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1814 windows->command.data=MagickMenus;
1815 (void) XCommandWidget(display,windows,CommandMenu,(XEvent *) NULL);
1818 windows->command.geometry=XGetResourceClass(
resource_info->resource_database,
1819 resource_name,
"geometry",(
char *) NULL);
1820 (void)
CloneString(&windows->command.name,MagickTitle);
1821 windows->command.border_width=0;
1822 windows->command.flags|=PPosition;
1823 windows->command.attributes.event_mask=ButtonMotionMask | ButtonPressMask |
1824 ButtonReleaseMask | EnterWindowMask | ExposureMask | LeaveWindowMask |
1825 OwnerGrabButtonMask | StructureNotifyMask;
1826 manager_hints->flags=InputHint | StateHint | WindowGroupHint;
1828 manager_hints->initial_state=NormalState;
1829 manager_hints->window_group=windows->image.id;
1830 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1833 windows->command.id,(
char *) HighlightBitmap,HighlightWidth,
1836 windows->command.id,(
char *) ShadowBitmap,ShadowWidth,ShadowHeight);
1840 "Window id: 0x%lx (command)",windows->command.id);
1844 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1848 windows->widget.geometry=XGetResourceClass(
resource_info->resource_database,
1849 resource_name,
"geometry",(
char *) NULL);
1850 windows->widget.border_width=0;
1851 windows->widget.flags|=PPosition;
1852 windows->widget.attributes.event_mask=ButtonMotionMask | ButtonPressMask |
1853 ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask |
1854 KeyReleaseMask | LeaveWindowMask | OwnerGrabButtonMask |
1855 StructureNotifyMask;
1856 manager_hints->flags=InputHint | StateHint | WindowGroupHint;
1858 manager_hints->initial_state=NormalState;
1859 manager_hints->window_group=windows->image.id;
1860 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1863 windows->widget.id,(
char *) HighlightBitmap,HighlightWidth,HighlightHeight);
1865 windows->widget.id,(
char *) ShadowBitmap,ShadowWidth,ShadowHeight);
1869 "Window id: 0x%lx (widget)",windows->widget.id);
1873 XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
1875 windows->popup.border_width=0;
1876 windows->popup.flags|=PPosition;
1877 windows->popup.attributes.event_mask=ButtonMotionMask | ButtonPressMask |
1878 ButtonReleaseMask | EnterWindowMask | ExposureMask | KeyPressMask |
1879 KeyReleaseMask | LeaveWindowMask | StructureNotifyMask;
1880 manager_hints->flags=InputHint | StateHint | WindowGroupHint;
1882 manager_hints->initial_state=NormalState;
1883 manager_hints->window_group=windows->image.id;
1884 XMakeWindow(display,root_window,argv,argc,class_hints,manager_hints,
1887 windows->popup.id,(
char *) HighlightBitmap,HighlightWidth,HighlightHeight);
1889 windows->popup.id,(
char *) ShadowBitmap,ShadowWidth,ShadowHeight);
1893 "Window id: 0x%lx (pop up)",windows->popup.id);
1912 window_changes.width=(int) windows->image.width;
1913 window_changes.height=(
int) windows->image.height;
1915 (
unsigned int) (CWWidth | CWHeight),&window_changes);
1917 sizeof(*windows->image.pixmaps));
1919 sizeof(*windows->image.pixmaps));
1920 if ((windows->image.pixmaps == (Pixmap *) NULL) ||
1921 (windows->image.matte_pixmaps == (Pixmap *) NULL))
1925 (windows->backdrop.id != (Window) NULL))
1926 (void)
XMapWindow(display,windows->image.id);
1928 for (scene=0; scene < (ssize_t) number_scenes; scene++)
1937 windows->image.pixmap=(Pixmap) NULL;
1938 windows->image.matte_pixmap=(Pixmap) NULL;
1940 (visual_info->klass == TrueColor) ||
1941 (visual_info->klass == DirectColor))
1942 if (image_list[scene]->storage_class ==
PseudoClass)
1944 image_list[scene],windows->image.pixel_info);
1945 columns=(
unsigned int) image_list[scene]->columns;
1946 rows=(
unsigned int) image_list[scene]->rows;
1947 if ((image_list[scene]->columns != columns) ||
1948 (image_list[scene]->
rows != rows))
1950 image_list[scene]->filename);
1951 status=XMakeImage(display,
resource_info,&windows->image,image_list[scene],
1952 columns,rows,exception);
1959 "Image: [%.20g] %s %.20gx%.20g ",(double) image_list[scene]->scene,
1960 image_list[scene]->filename,(
double) columns,(double) rows);
1961 if (image_list[scene]->colors != 0)
1963 image_list[scene]->colors);
1965 image_list[scene]->
magick);
1986 strlen(image_list[scene]->magick_filename)-1;
1987 while ((p > image_list[scene]->magick_filename) && (*(p-1) !=
'/'))
1991 (double) number_scenes);
1992 (void)
CloneString(&windows->image.name,window_name);
1995 if (status != Success)
1997 XSetWMName(display,windows->image.id,&window_name);
1998 (void)
XFree((
void *) window_name.value);
2000 windows->image.pixmaps[scene]=windows->image.pixmap;
2001 windows->image.matte_pixmaps[scene]=windows->image.matte_pixmap;
2006 event.xexpose.width=(int) image_list[scene]->columns;
2007 event.xexpose.height=(int) image_list[scene]->rows;
2008 XRefreshWindow(display,&windows->image,&event);
2013 if (windows->command.mapped)
2014 (void)
XMapRaised(display,windows->command.id);
2022 image=image_list[0];
2024 (void) XMagickCommand(display,
resource_info,windows,PlayCommand,&images,
2029 if ((state & PlayAnimationState) || (state & StepAnimationState))
2036 XDelay(display,
resource_info->delay*(delay == 0 ? 10 : delay));
2037 if (state & ForwardAnimationState)
2042 if (scene < ((ssize_t) number_scenes-1))
2047 if (iterations == (ssize_t) image_list[0]->iterations)
2052 if ((state & AutoReverseAnimationState) != 0)
2054 state&=(~ForwardAnimationState);
2059 if ((state & RepeatAnimationState) == 0)
2060 state&=(~PlayAnimationState);
2071 if (scene > first_scene)
2076 if (iterations == (ssize_t) image_list[0]->
iterations)
2079 state&=(~RepeatAnimationState);
2081 if (state & AutoReverseAnimationState)
2083 state|=ForwardAnimationState;
2089 if ((state & RepeatAnimationState) ==
MagickFalse)
2090 state&=(~PlayAnimationState);
2091 scene=(ssize_t) number_scenes-1;
2096 image=image_list[scene];
2099 if ((state & StepAnimationState) ||
2109 strlen(image_list[scene]->filename)-1;
2110 while ((p > image_list[scene]->filename) && (*(p-1) !=
'/'))
2114 scene+1,(double) number_scenes);
2128 if (status != Success)
2130 XSetWMName(display,windows->image.id,&window_name);
2131 (void)
XFree((
void *) window_name.value);
2138 image_list[scene],windows->image.pixel_info);
2139 if (image != (
Image *) NULL)
2141 windows->image.ximage->width=(int) image->
columns;
2142 windows->image.ximage->height=(
int) image->
rows;
2144 windows->image.pixmap=windows->image.pixmaps[scene];
2145 windows->image.matte_pixmap=windows->image.matte_pixmaps[scene];
2148 event.xexpose.width=(int) image->
columns;
2149 event.xexpose.height=(
int) image->
rows;
2150 if ((state & ExitState) == 0)
2152 XRefreshWindow(display,&windows->image,&event);
2155 state&=(~StepAnimationState);
2169 length=
XLookupString((XKeyEvent *) &event.xkey,command,(
int)
2170 sizeof(command),&key_symbol,(XComposeStatus *) NULL);
2171 *(command+length)=
'\0';
2172 if ((key_symbol == XK_q) || (key_symbol == XK_Escape))
2174 XClientMessage(display,windows->image.id,
2175 windows->im_protocols,windows->im_exit,CurrentTime);
2191 if (event.xany.window == windows->command.id)
2199 id=XCommandWidget(display,windows,CommandMenu,&event);
2203 command_type=CommandMenus[id];
2204 if (
id < MagickMenus)
2212 entry=XMenuWidget(display,windows,CommandMenu[
id],Menus[
id],
2217 command_type=Commands[id][entry];
2219 if (command_type != NullCommand)
2221 command_type,&image,&state,exception);
2230 "Button Press: 0x%lx %u +%d+%d",
event.xbutton.window,
2231 event.xbutton.button,
event.xbutton.x,
event.xbutton.y);
2232 if ((event.xbutton.button == Button3) &&
2233 (
event.xbutton.state & Mod1Mask))
2238 event.xbutton.button=Button2;
2239 event.xbutton.state&=(~Mod1Mask);
2241 if (event.xbutton.window == windows->backdrop.id)
2243 (void)
XSetInputFocus(display,event.xbutton.window,RevertToParent,
2244 event.xbutton.time);
2247 if (event.xbutton.window == windows->image.id)
2257 if (windows->command.mapped)
2259 windows->command.screen);
2262 (void) XCommandWidget(display,windows,CommandMenu,
2264 (void)
XMapRaised(display,windows->command.id);
2273 "Button Release: 0x%lx %u +%d+%d",
event.xbutton.window,
2274 event.xbutton.button,
event.xbutton.x,
event.xbutton.y);
2281 "Client Message: 0x%lx 0x%lx %d 0x%lx",(
unsigned long)
2282 event.xclient.window,(
unsigned long)
event.xclient.message_type,
2283 event.xclient.format,(
unsigned long) event.xclient.data.l[0]);
2284 if (event.xclient.message_type == windows->im_protocols)
2286 if (*event.xclient.data.l == (
long) windows->im_update_colormap)
2291 for (i=0; i < (ssize_t) number_windows; i++)
2293 if (magick_windows[i]->
id == windows->icon.id)
2295 context_values.background=pixel->background_color.pixel;
2296 context_values.foreground=pixel->foreground_color.pixel;
2297 (void)
XChangeGC(display,magick_windows[i]->annotate_context,
2298 context_mask,&context_values);
2299 (void)
XChangeGC(display,magick_windows[i]->widget_context,
2300 context_mask,&context_values);
2301 context_values.background=pixel->foreground_color.pixel;
2302 context_values.foreground=pixel->background_color.pixel;
2303 context_values.plane_mask=
2304 context_values.background ^ context_values.foreground;
2305 (void)
XChangeGC(display,magick_windows[i]->highlight_context,
2306 (
size_t) (context_mask | GCPlaneMask),
2308 magick_windows[i]->attributes.background_pixel=
2309 pixel->background_color.pixel;
2310 magick_windows[i]->attributes.border_pixel=
2311 pixel->border_color.pixel;
2312 magick_windows[i]->attributes.colormap=map_info->colormap;
2314 (
unsigned long) magick_windows[i]->mask,
2315 &magick_windows[i]->attributes);
2317 if (windows->backdrop.id != (Window) NULL)
2321 if (*event.xclient.data.l == (
long) windows->im_exit)
2328 if (event.xclient.message_type == windows->dnd_protocols)
2348 if ((*event.xclient.data.l != 2) && (*event.xclient.data.l != 128))
2352 MagickFalse,(Atom) AnyPropertyType,&type,&format,&length,&after,
2354 if ((status != Success) || (length == 0))
2356 if (*event.xclient.data.l == 2)
2371 (void)
XFree((
void *) data);
2379 if (nexus != (
Image *) NULL)
2381 (void)
XFree((
void *) data);
2387 if (event.xclient.message_type != windows->wm_protocols)
2389 if (*event.xclient.data.l == (
long) windows->wm_take_focus)
2391 (void)
XSetInputFocus(display,event.xclient.window,RevertToParent,
2392 (Time)
event.xclient.data.l[1]);
2395 if (*event.xclient.data.l != (
long) windows->wm_delete_window)
2398 visual_info->screen);
2399 if (event.xclient.window == windows->image.id)
2406 case ConfigureNotify:
2410 "Configure Notify: 0x%lx %dx%d+%d+%d %d",
event.xconfigure.window,
2411 event.xconfigure.width,
event.xconfigure.height,
event.xconfigure.x,
2412 event.xconfigure.y,
event.xconfigure.send_event);
2413 if (event.xconfigure.window == windows->image.id)
2415 if (event.xconfigure.send_event != 0)
2423 if (windows->command.geometry == (
char *) NULL)
2427 event.xconfigure.x-windows->command.width-25;
2428 windows->command.y=
event.xconfigure.y;
2429 XConstrainWindowPosition(display,&windows->command);
2430 window_changes.x=windows->command.x;
2431 window_changes.y=windows->command.y;
2433 windows->command.screen,(
unsigned int) (CWX | CWY),
2436 if (windows->widget.geometry == (
char *) NULL)
2440 event.xconfigure.x+
event.xconfigure.width/10;
2442 event.xconfigure.y+
event.xconfigure.height/10;
2443 XConstrainWindowPosition(display,&windows->widget);
2444 window_changes.x=windows->widget.x;
2445 window_changes.y=windows->widget.y;
2447 windows->widget.screen,(
unsigned int) (CWX | CWY),
2454 windows->image.width=(
unsigned int) event.xconfigure.width;
2455 windows->image.height=(
unsigned int)
event.xconfigure.height;
2458 if (event.xconfigure.window == windows->icon.id)
2463 windows->icon.width=(
unsigned int) event.xconfigure.width;
2464 windows->icon.height=(
unsigned int)
event.xconfigure.height;
2476 "Destroy Notify: 0x%lx",
event.xdestroywindow.window);
2477 if (event.xdestroywindow.window == windows->group_leader.id)
2490 if (event.xcrossing.mode != NotifyUngrab)
2498 "Expose: 0x%lx %dx%d+%d+%d",
event.xexpose.window,
2499 event.xexpose.width,
event.xexpose.height,
event.xexpose.x,
2504 if (event.xexpose.window == windows->image.id)
2506 windows->image.pixmap=windows->image.pixmaps[scene];
2507 windows->image.matte_pixmap=windows->image.matte_pixmaps[scene];
2508 XRefreshWindow(display,&windows->image,&event);
2511 if (event.xexpose.window == windows->icon.id)
2512 if (event.xexpose.count == 0)
2514 XRefreshWindow(display,&windows->icon,&event);
2527 length=
XLookupString((XKeyEvent *) &event.xkey,command,(
int)
2528 sizeof(command),&key_symbol,(XComposeStatus *) NULL);
2529 *(command+length)=
'\0';
2532 "Key press: 0x%lx (%c)",(
unsigned long) key_symbol,*command);
2533 command_type=NullCommand;
2538 if ((event.xkey.state & ControlMask) ==
MagickFalse)
2540 command_type=OpenCommand;
2545 command_type=StepBackwardCommand;
2550 command_type=StepForwardCommand;
2555 command_type=FasterCommand;
2560 command_type=SlowerCommand;
2565 command_type=HelpCommand;
2570 command_type=BrowseDocumentationCommand;
2575 command_type=InfoCommand;
2581 command_type=QuitCommand;
2587 if (command_type != NullCommand)
2589 command_type,&image,&state,exception);
2597 (void)
XLookupString((XKeyEvent *) &
event.xkey,command,(int)
2598 sizeof(command),&key_symbol,(XComposeStatus *) NULL);
2601 "Key release: 0x%lx (%c)",(
unsigned long) key_symbol,*command);
2610 if (event.xcrossing.mode != NotifyUngrab)
2619 if (event.xmap.window == windows->backdrop.id)
2626 if (event.xmap.window == windows->image.id)
2628 if (windows->backdrop.id != (Window) NULL)
2634 OpenCommand,&image,&state,exception);
2641 if (event.xmap.window == windows->info.id)
2646 if (event.xmap.window == windows->icon.id)
2651 XMakeStandardColormap(display,icon_visual,icon_resources,
2652 display_image,icon_map,icon_pixel,exception);
2653 (void) XMakeImage(display,icon_resources,&windows->icon,
2654 display_image,windows->icon.width,windows->icon.height,
2657 windows->icon.pixmap);
2660 windows->info.screen);
2664 if (event.xmap.window == windows->command.id)
2669 if (event.xmap.window == windows->popup.id)
2674 if (event.xmap.window == windows->widget.id)
2688 case PropertyNotify:
2706 "Property Notify: 0x%lx 0x%lx %d",(
unsigned long)
2707 event.xproperty.window,(
unsigned long)
event.xproperty.atom,
2708 event.xproperty.state);
2709 if (event.xproperty.atom != windows->im_remote_command)
2716 AnyPropertyType,&type,&format,&length,&after,&data);
2717 if ((status != Success) || (length == 0))
2723 if (nexus != (
Image *) NULL)
2725 (void)
XFree((
void *) data);
2728 case ReparentNotify:
2732 "Reparent Notify: 0x%lx=>0x%lx",
event.xreparent.parent,
2733 event.xreparent.window);
2740 "Unmap Notify: 0x%lx",
event.xunmap.window);
2741 if (event.xunmap.window == windows->backdrop.id)
2746 if (event.xunmap.window == windows->image.id)
2751 if (event.xunmap.window == windows->info.id)
2756 if (event.xunmap.window == windows->icon.id)
2758 if (map_info->colormap == icon_map->colormap)
2760 display_image,exception);
2761 (void) XFreeStandardColormap(display,icon_visual,icon_map,
2766 if (event.xunmap.window == windows->command.id)
2771 if (event.xunmap.window == windows->popup.id)
2773 if (windows->backdrop.id != (Window) NULL)
2779 if (event.xunmap.window == windows->widget.id)
2781 if (windows->backdrop.id != (Window) NULL)
2798 while (!(state & ExitState));
2801 if ((windows->visual_info->klass == GrayScale) ||
2802 (windows->visual_info->klass == PseudoColor) ||
2803 (windows->visual_info->klass == DirectColor))
2808 if (windows->info.mapped)
2809 (void)
XWithdrawWindow(display,windows->info.id,windows->info.screen);
2810 if (windows->command.mapped)
2812 windows->command.screen);
2815 if (windows->backdrop.mapped)
2818 windows->backdrop.screen);
2820 windows->backdrop.id=(Window) NULL;
2821 (void)
XWithdrawWindow(display,windows->image.id,windows->image.screen);
2823 windows->image.id=(Window) NULL;
2826 XCheckRefreshWindows(display,windows);
2827 for (scene=1; scene < (ssize_t) number_scenes; scene++)
2829 if (windows->image.pixmaps[scene] != (Pixmap) NULL)
2830 (
void)
XFreePixmap(display,windows->image.pixmaps[scene]);
2831 windows->image.pixmaps[scene]=(Pixmap) NULL;
2832 if (windows->image.matte_pixmaps[scene] != (Pixmap) NULL)
2833 (
void)
XFreePixmap(display,windows->image.matte_pixmaps[scene]);
2834 windows->image.matte_pixmaps[scene]=(Pixmap) NULL;
2837 windows->image.pixmaps=(Pixmap *)
2839 windows->image.matte_pixmaps=(Pixmap *)
2841 if (nexus == (
Image *) NULL)
2847 (void)
XWithdrawWindow(display,windows->image.id,windows->image.screen);
2848 XDelay(display,SuspendTime);
2849 (void) XFreeStandardColormap(display,icon_visual,icon_map,icon_pixel);
2851 (
void) XFreeStandardColormap(display,visual_info,map_info,pixel);
2852 DestroyXResources();
2943 "UnableToOpenFile",
"%s",path);
2945 XFileBrowserWidget(display,windows,
"Save",filename);
2946 if (*filename ==
'\0')
2956 status=XConfirmWidget(display,windows,
"Overwrite",filename);
2977 status=XDialogWidget(display,windows,
"Save",
"Enter JPEG quality:",
2979 if (*quality ==
'\0')
2999 if (image_info->
page != (
char *) NULL)
3001 XListBrowserWidget(display,windows,&windows->widget,PageSizes,
"Select",
3002 "Select page geometry:",geometry);
3003 if (*geometry !=
'\0')
3010 status=
WriteImages(image_info,image,filename,exception);
3051 assert(image_info != (
const ImageInfo *) NULL);
3054 assert(image != (
Image *) NULL);
3059 "DelegateLibrarySupportNotBuiltIn",
"'%s' (X11)",image->
filename);
MagickExport Image * CoalesceImages(const Image *image, ExceptionInfo *exception)
char magick[MagickPathExtent]
static const ColormapInfo Colormap[]
static unsigned long StringToUnsignedLong(const char *magick_restrict value)
#define MagickAuthoritativeURL
static ResourceInfo resource_info
#define MagickPackageName
MagickExport WarningHandler SetWarningHandler(WarningHandler handler)
#define XChangeWindowAttributes
MagickExport MagickStatusType ParseMetaGeometry(const char *geometry, ssize_t *x, ssize_t *y, size_t *width, size_t *height)
#define XCheckTypedWindowEvent
#define XSetTransientForHint
MagickExport MagickBooleanType AnimateImages(const ImageInfo *image_info, Image *image, ExceptionInfo *exception)
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
char magick[MagickPathExtent]
MagickExport char * GetPageGeometry(const char *page_geometry)
#define XVisualIDFromVisual
static MagickBooleanType IsPixelInfoEquivalent(const PixelInfo *magick_restrict p, const PixelInfo *magick_restrict q)
#define XAllocStandardColormap
#define MagickCoreSignature
MagickExport MagickBooleanType SetImageType(Image *image, const ImageType type, ExceptionInfo *exception)
MagickExport Image * GetFirstImageInList(const Image *images)
MagickExport MagickBooleanType RemapImages(const QuantizeInfo *quantize_info, Image *images, const Image *remap_image, ExceptionInfo *exception)
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
static WarningHandler warning_handler
MagickExport Image * NewImageList(void)
unsigned int MagickStatusType
MagickExport char * AcquireString(const char *source)
#define XReconfigureWMWindow
MagickExport ErrorHandler SetErrorHandler(ErrorHandler handler)
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
char filename[MagickPathExtent]
MagickExport int LocaleNCompare(const char *p, const char *q, const size_t length)
#define XStringListToTextProperty
MagickExport time_t GetMagickTime(void)
MagickExport void MagickDelay(const MagickSizeType milliseconds)
MagickExport MagickBooleanType IsEventLogging(void)
MagickExport Image * ReadImage(const ImageInfo *image_info, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info, const unsigned int frames, ExceptionInfo *exception)
char magick_filename[MagickPathExtent]
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
MagickExport MagickBooleanType IsPathAccessible(const char *path)
MagickExport const char * GetMagickVersion(size_t *version)
static int LocaleToUppercase(const int c)
#define XCreateBitmapFromData
MagickExport const char * GetMagickCopyright(void)
void(* WarningHandler)(const ExceptionType, const char *, const char *)
MagickExport void CatchException(ExceptionInfo *exception)
MagickExport Image * DestroyImageList(Image *images)
MagickExport const char * GetClientName(void)
static int SceneCompare(const void *x, const void *y)
#define XGetWindowAttributes
MagickExport int LocaleCompare(const char *p, const char *q)
char filename[MagickPathExtent]
#define GetMagickModule()
MagickExport MagickBooleanType ExpandFilenames(int *number_arguments, char ***arguments)
#define XSetWindowBackgroundPixmap
MagickExport Image ** ImageListToArray(const Image *images, ExceptionInfo *exception)
MagickExport char * InterpretImageProperties(ImageInfo *image_info, Image *image, const char *embed_text, ExceptionInfo *exception)
MagickExport ImageInfo * DestroyImageInfo(ImageInfo *image_info)
#define XGetWindowProperty
MagickExport Image * GetNextImageInList(const Image *images)
MagickExport char * DestroyString(char *string)
#define XUninstallColormap
MagickExport void * AcquireMagickMemory(const size_t size)
MagickExport ImageInfo * CloneImageInfo(const ImageInfo *image_info)
MagickExport void AppendImageToList(Image **images, const Image *append)
MagickExport void * RelinquishMagickMemory(void *memory)
MagickExport char * CloneString(char **destination, const char *source)
MagickExport MagickBooleanType InvokeDelegate(ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception)
void(* ErrorHandler)(const ExceptionType, const char *, const char *)
MagickExport size_t GetImageListLength(const Image *images)
#define XRefreshKeyboardMapping
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
MagickExport MagickBooleanType WriteImages(const ImageInfo *image_info, Image *images, const char *filename, ExceptionInfo *exception)