/*
- 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.
#ifndef _MAGICKCORE_XWINDOW_PRIVATE_H
#define _MAGICKCORE_XWINDOW_PRIVATE_H
+#include "MagickCore/draw.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/geometry.h"
+#include "MagickCore/nt-base-private.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantize.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include <X11/keysym.h>
#include <X11/Xresource.h>
#include <X11/Xutil.h>
-#include "MagickCore/exception.h"
-#include "MagickCore/geometry.h"
-#include "MagickCore/quantize.h"
#if defined(__cplusplus) || defined(c_plusplus)
# define klass c_class
\
GetExceptionInfo(&exception); \
(void) ThrowMagickException(&exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s': %s",context, \
+ tag == (const char *) NULL ? "unknown" : tag,"'%s': %s",context, \
strerror(errno)); \
CatchException(&exception); \
(void) DestroyExceptionInfo(&exception); \
dnd_protocols;
} XWindows;
-extern MagickExport char
- *XGetResourceClass(XrmDatabase,const char *,const char *,char *),
- *XGetResourceInstance(XrmDatabase,const char *,const char *,const char *),
- *XGetScreenDensity(Display *);
-
-extern MagickExport Cursor
+extern MagickPrivate Cursor
XMakeCursor(Display *,Window,Colormap,char *,char *);
-extern MagickExport int
- XCheckDefineCursor(Display *,Window,Cursor),
- XError(Display *,XErrorEvent *);
+extern MagickPrivate int
+ XCheckDefineCursor(Display *,Window,Cursor);
-extern MagickExport MagickBooleanType
- XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *),
- XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *),
- XGetWindowColor(Display *,XWindows *,char *),
+extern MagickPrivate MagickBooleanType
+ XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *,
+ ExceptionInfo *),
+ XComponentGenesis(void),
+ XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *,ExceptionInfo *),
+ XGetWindowColor(Display *,XWindows *,char *,ExceptionInfo *),
XMagickProgressMonitor(const char *,const MagickOffsetType,
const MagickSizeType,void *),
XMakeImage(Display *,const XResourceInfo *,XWindowInfo *,Image *,unsigned int,
unsigned int,ExceptionInfo *),
- XQueryColorDatabase(const char *,XColor *),
- XRemoteCommand(Display *,const char *,const char *);
+ XQueryColorCompliance(const char *,XColor *);
-extern MagickPrivate MagickBooleanType
- XComponentGenesis(void);
-
-extern MagickExport void
- DestroyXResources(void),
+extern MagickPrivate void
XBestIconSize(Display *,XWindowInfo *,Image *),
XBestPixel(Display *,const Colormap,XColor *,unsigned int,XColor *),
XCheckRefreshWindows(Display *,XWindows *),
XClientMessage(Display *,const Window,const Atom,const Atom,const Time),
- XConfigureImageColormap(Display *,XResourceInfo *,XWindows *,Image *),
+ XComponentTerminus(void),
+ XConfigureImageColormap(Display *,XResourceInfo *,XWindows *,Image *,
+ ExceptionInfo *),
XConstrainWindowPosition(Display *,XWindowInfo *),
XDelay(Display *,const size_t),
- XDisplayImageInfo(Display *,const XResourceInfo *,XWindows *,Image *,Image *),
- XDestroyResourceInfo(XResourceInfo *),
+ XDisplayImageInfo(Display *,const XResourceInfo *,XWindows *,Image *,Image *,
+ ExceptionInfo *),
XDestroyWindowColors(Display *,Window),
XFreeResources(Display *,XVisualInfo *,XStandardColormap *,XPixelInfo *,
XFontStruct *,XResourceInfo *,XWindowInfo *),
XGetPixelInfo(Display *,const XVisualInfo *,const XStandardColormap *,
const XResourceInfo *,Image *,XPixelInfo *),
XGetMapInfo(const XVisualInfo *,const Colormap,XStandardColormap *),
- XGetResourceInfo(const ImageInfo *,XrmDatabase,const char *,XResourceInfo *),
XGetWindowInfo(Display *,XVisualInfo *,XStandardColormap *,XPixelInfo *,
XFontStruct *,XResourceInfo *,XWindowInfo *),
- XMakeMagnifyImage(Display *,XWindows *),
+ XMakeMagnifyImage(Display *,XWindows *,ExceptionInfo *),
XMakeStandardColormap(Display *,XVisualInfo *,XResourceInfo *,Image *,
- XStandardColormap *,XPixelInfo *),
+ XStandardColormap *,XPixelInfo *,ExceptionInfo *),
XMakeWindow(Display *,Window,char **,int,XClassHint *,XWMHints *,
XWindowInfo *),
XQueryPosition(Display *,const Window,int *,int *),
XRefreshWindow(Display *,const XWindowInfo *,const XEvent *),
- XRetainWindowColors(Display *,const Window),
XSetCursorState(Display *,XWindows *,const MagickStatusType),
XUserPreferences(XResourceInfo *),
XWarning(const ExceptionType,const char *,const char *);
-extern MagickPrivate void
- XComponentTerminus(void);
-
-extern MagickExport Window
+extern MagickPrivate Window
XWindowByID(Display *,const Window,const size_t),
XWindowByName(Display *,const Window,const char *),
XWindowByProperty(Display *,const Window,const Atom);
-extern MagickExport XFontStruct
+extern MagickPrivate XFontStruct
*XBestFont(Display *,const XResourceInfo *,const MagickBooleanType);
-extern MagickExport XrmDatabase
- XGetResourceDatabase(Display *,const char *);
-
-extern MagickExport XVisualInfo
+extern MagickPrivate XVisualInfo
*XBestVisualInfo(Display *,XStandardColormap *,XResourceInfo *);
-extern MagickExport XWindows
+extern MagickPrivate XWindows
*XInitializeWindows(Display *,XResourceInfo *),
*XSetWindows(XWindows *);
-static inline MagickRealType XPixelIntensity(const XColor *pixel)
+extern MagickExport char
+ *XGetResourceClass(XrmDatabase,const char *,const char *,char *),
+ *XGetResourceInstance(XrmDatabase,const char *,const char *,const char *),
+ *XGetScreenDensity(Display *);
+
+extern MagickExport int
+ XError(Display *,XErrorEvent *);
+
+extern MagickExport MagickBooleanType
+ XRemoteCommand(Display *,const char *,const char *);
+
+extern MagickExport void
+ DestroyXResources(void),
+ XDestroyResourceInfo(XResourceInfo *),
+ XGetResourceInfo(const ImageInfo *,XrmDatabase,const char *,XResourceInfo *),
+ XRetainWindowColors(Display *,const Window);
+
+extern MagickExport XrmDatabase
+ XGetResourceDatabase(Display *,const char *);
+
+static inline double XPixelIntensity(const XColor *pixel)
{
- MagickRealType
+ double
intensity;
- intensity=0.299*pixel->red+0.587*pixel->green+0.114*pixel->blue;
+ if ((pixel->red == pixel->green) && (pixel->green == pixel->blue))
+ return((double) pixel->red);
+ intensity=0.212656*pixel->red+0.715158*pixel->green+0.072186*pixel->blue;
return(intensity);
}
#endif
+extern MagickPrivate MagickBooleanType
+ XRenderImage(Image *,const DrawInfo *,const PointInfo *,TypeMetric *,
+ ExceptionInfo *);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif