widget.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore X11 widget methods.
  13. */
  14. #ifndef MAGICKCORE_WIDGET_H
  15. #define MAGICKCORE_WIDGET_H
  16. #if defined(MAGICKCORE_X11_DELEGATE)
  17. #include "magick/xwindow-private.h"
  18. #endif
  19. #if defined(__cplusplus) || defined(c_plusplus)
  20. extern "C" {
  21. #endif
  22. #if defined(MAGICKCORE_X11_DELEGATE)
  23. extern MagickExport int
  24. XCommandWidget(Display *,XWindows *,const char *const *,XEvent *),
  25. XConfirmWidget(Display *,XWindows *,const char *,const char *),
  26. XDialogWidget(Display *,XWindows *,const char *,const char *,char *),
  27. XMenuWidget(Display *,XWindows *,const char *,const char *const *,char *);
  28. extern MagickExport MagickBooleanType
  29. XPreferencesWidget(Display *,XResourceInfo *,XWindows *);
  30. extern MagickExport void
  31. DestroyXWidget(void),
  32. XColorBrowserWidget(Display *,XWindows *,const char *,char *),
  33. XFileBrowserWidget(Display *,XWindows *,const char *,char *),
  34. XFontBrowserWidget(Display *,XWindows *,const char *,char *),
  35. XInfoWidget(Display *,XWindows *,const char *),
  36. XListBrowserWidget(Display *,XWindows *,XWindowInfo *,const char *const *,
  37. const char *,const char *,char *),
  38. XNoticeWidget(Display *,XWindows *,const char *,const char *),
  39. XProgressMonitorWidget(Display *,XWindows *,const char *,
  40. const MagickOffsetType,const MagickSizeType),
  41. XTextViewWidget(Display *,const XResourceInfo *,XWindows *,
  42. const MagickBooleanType,const char *,const char **);
  43. static inline void XTextViewHelp(Display *display,
  44. const XResourceInfo *resource_info,XWindows *windows,
  45. const MagickBooleanType mono,const char *title,const char *help)
  46. {
  47. char
  48. **help_list;
  49. ssize_t
  50. i;
  51. help_list=StringToList(help);
  52. if (help_list == (char **) NULL)
  53. return;
  54. XTextViewWidget(display,resource_info,windows,mono,title,(const char **)
  55. help_list);
  56. for (i=0; help_list[i] != (char *) NULL; i++)
  57. help_list[i]=DestroyString(help_list[i]);
  58. help_list=(char **) RelinquishMagickMemory(help_list);
  59. }
  60. #endif
  61. #if defined(__cplusplus) || defined(c_plusplus)
  62. }
  63. #endif
  64. #endif