% MagickCore X11 User Interface Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% September 1993 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
#include "MagickCore/PreRvIcccm.h"
#include "MagickCore/string_.h"
#include "MagickCore/token.h"
+#include "MagickCore/token-private.h"
#include "MagickCore/utility.h"
+#include "MagickCore/utility-private.h"
#include "MagickCore/xwindow-private.h"
#include "MagickCore/widget.h"
+#include "MagickCore/widget-private.h"
#if defined(MAGICKCORE_X11_DELEGATE)
\f
% A description of each parameter follows:
%
*/
-MagickExport void DestroyXWidget(void)
+MagickPrivate void DestroyXWidget(void)
{
if (selection_info != (XWidgetInfo *) NULL)
selection_info=(XWidgetInfo *) RelinquishMagickMemory(selection_info);
if (event->xexpose.count == 0)
if (windows->magnify.mapped)
{
- XMakeMagnifyImage(display,windows);
+ ExceptionInfo
+ *exception;
+
+ exception=AcquireExceptionInfo();
+ XMakeMagnifyImage(display,windows,exception);
+ exception=DestroyExceptionInfo(exception);
break;
}
if (event->xexpose.window == windows->command.id)
% o reply: the response from the user is returned in this parameter.
%
*/
-MagickExport void XColorBrowserWidget(Display *display,XWindows *windows,
+MagickPrivate void XColorBrowserWidget(Display *display,XWindows *windows,
const char *action,char *reply)
{
#define CancelButtonText "Cancel"
/*
Respond to X events.
*/
+ XGetWidgetInfo((char *) NULL,&mode_info);
XGetWidgetInfo((char *) NULL,&slider_info);
XGetWidgetInfo((char *) NULL,&north_info);
XGetWidgetInfo((char *) NULL,&south_info);
XGetWidgetInfo((char *) NULL,&expose_info);
+ XGetWidgetInfo((char *) NULL,&selection_info);
visible_colors=0;
delay=SuspendTime << 2;
state=UpdateConfigurationState;
/*
User pressed mode button.
*/
- (void) CopyMagickString(reply_info.text,mode_info.text,
- MaxTextExtent);
+ if (mode_info.text != (char *) NULL)
+ (void) CopyMagickString(reply_info.text,mode_info.text,
+ MaxTextExtent);
(void) CopyMagickString(primary_selection,reply_info.text,
MaxTextExtent);
(void) XSetSelectionOwner(display,XA_PRIMARY,windows->widget.id,
if (MatteIsActive(grab_info,event.xbutton))
{
/*
- Select a pen color from the X server.
+ Select a fill color from the X server.
*/
- (void) XGetWindowColor(display,windows,reply_info.text);
+ (void) XGetWindowColor(display,windows,reply_info.text,
+ exception);
reply_info.marker=reply_info.text;
reply_info.cursor=reply_info.text+Extent(reply_info.text);
XDrawMatteText(display,&windows->widget,&reply_info);
% o event: Specifies a pointer to a X11 XEvent structure.
%
*/
-MagickExport int XCommandWidget(Display *display,XWindows *windows,
+MagickPrivate int XCommandWidget(Display *display,XWindows *windows,
const char **selections,XEvent *event)
{
#define tile_width 112
sizeof(*selection_info));
if (selection_info == (XWidgetInfo *) NULL)
{
- ThrowXWindowFatalException(ResourceLimitError,
+ ThrowXWindowFatalException(ResourceLimitFatalError,
"MemoryAllocationFailed","...");
return(id);
}
% o description: Specifies any description to the message.
%
*/
-MagickExport int XConfirmWidget(Display *display,XWindows *windows,
+MagickPrivate int XConfirmWidget(Display *display,XWindows *windows,
const char *reason,const char *description)
{
#define CancelButtonText "Cancel"
/*
Dismiss button status changed.
*/
- dismiss_info.raised=cancel_info.raised == MagickFalse ?
+ dismiss_info.raised=dismiss_info.raised == MagickFalse ?
MagickTrue : MagickFalse;
XDrawBeveledButton(display,&windows->widget,&dismiss_info);
break;
% o reply: the response from the user is returned in this parameter.
%
*/
-MagickExport int XDialogWidget(Display *display,XWindows *windows,
+MagickPrivate int XDialogWidget(Display *display,XWindows *windows,
const char *action,const char *query,char *reply)
{
#define CancelButtonText "Cancel"
% o reply: the response from the user is returned in this parameter.
%
*/
-MagickExport void XFileBrowserWidget(Display *display,XWindows *windows,
+MagickPrivate void XFileBrowserWidget(Display *display,XWindows *windows,
const char *action,char *reply)
{
#define CancelButtonText "Cancel"
}
#endif
-MagickExport void XFontBrowserWidget(Display *display,XWindows *windows,
+MagickPrivate void XFontBrowserWidget(Display *display,XWindows *windows,
const char *action,char *reply)
{
#define BackButtonText "Back"
% displayed in the Info widget.
%
*/
-MagickExport void XInfoWidget(Display *display,XWindows *windows,
+MagickPrivate void XInfoWidget(Display *display,XWindows *windows,
const char *activity)
{
unsigned int
% o reply: the response from the user is returned in this parameter.
%
*/
-MagickExport void XListBrowserWidget(Display *display,XWindows *windows,
+MagickPrivate void XListBrowserWidget(Display *display,XWindows *windows,
XWindowInfo *window_info,const char **list,const char *action,
const char *query,char *reply)
{
XGetWidgetInfo((char *) NULL,&north_info);
XGetWidgetInfo((char *) NULL,&south_info);
XGetWidgetInfo((char *) NULL,&expose_info);
+ XGetWidgetInfo((char *) NULL,&selection_info);
visible_entries=0;
delay=SuspendTime << 2;
state=UpdateConfigurationState;
% is returned here.
%
*/
-MagickExport int XMenuWidget(Display *display,XWindows *windows,
+MagickPrivate int XMenuWidget(Display *display,XWindows *windows,
const char *title,const char **selections,char *item)
{
Cursor
% o description: Specifies any description to the message.
%
*/
-MagickExport void XNoticeWidget(Display *display,XWindows *windows,
+MagickPrivate void XNoticeWidget(Display *display,XWindows *windows,
const char *reason,const char *description)
{
#define DismissButtonText "Dismiss"
% o window: Specifies a pointer to a XWindows structure.
%
*/
-MagickExport MagickBooleanType XPreferencesWidget(Display *display,
+MagickPrivate MagickBooleanType XPreferencesWidget(Display *display,
XResourceInfo *resource_info,XWindows *windows)
{
#define ApplyButtonText "Apply"
MagickFalse ? MagickTrue : MagickFalse;
preferences_info[4].raised=resource_info->display_warnings ==
MagickFalse ? MagickTrue : MagickFalse;
- preferences_info[5].raised=resource_info->quantize_info->dither ==
- MagickFalse ? MagickTrue : MagickFalse;
+ preferences_info[5].raised=
+ resource_info->quantize_info->dither_method == NoDitherMethod ?
+ MagickTrue : MagickFalse;
preferences_info[6].raised=resource_info->colormap !=
SharedColormap ? MagickTrue : MagickFalse;
preferences_info[7].raised=resource_info->use_pixmap ==
preferences_info[3].raised == MagickFalse ? MagickTrue : MagickFalse;
resource_info->display_warnings=
preferences_info[4].raised == MagickFalse ? MagickTrue : MagickFalse;
- resource_info->quantize_info->dither=
- preferences_info[5].raised == MagickFalse ? MagickTrue : MagickFalse;
+ resource_info->quantize_info->dither_method=
+ preferences_info[5].raised == MagickFalse ?
+ RiemersmaDitherMethod : NoDitherMethod;
resource_info->colormap=SharedColormap;
if (preferences_info[6].raised)
resource_info->colormap=PrivateColormap;
% o span: Specifies the span relative to completing a task.
%
*/
-MagickExport void XProgressMonitorWidget(Display *display,XWindows *windows,
+MagickPrivate void XProgressMonitorWidget(Display *display,XWindows *windows,
const char *task,const MagickOffsetType offset,const MagickSizeType span)
{
unsigned int
% o textlist: This string list is displayed within the Text View widget.
%
*/
-MagickExport void XTextViewWidget(Display *display,
+MagickPrivate void XTextViewWidget(Display *display,
const XResourceInfo *resource_info,XWindows *windows,
const MagickBooleanType mono,const char *title,const char **textlist)
{
XGetWidgetInfo((char *) NULL,&north_info);
XGetWidgetInfo((char *) NULL,&south_info);
XGetWidgetInfo((char *) NULL,&expose_info);
+ XGetWidgetInfo((char *) NULL,&selection_info);
visible_lines=0;
delay=SuspendTime << 2;
height=(unsigned int) (font_info->ascent+font_info->descent);