picturestr.h revision a3f3701cea1ba388e7c877955252bb7375eedebd
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright © 2000 SuSE, Inc.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Permission to use, copy, modify, distribute, and sell this software and its
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * documentation for any purpose is hereby granted without fee, provided that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * the above copyright notice appear in all copies and that both that
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * copyright notice and this permission notice appear in supporting
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * documentation, and that the name of SuSE not be used in advertising or
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * publicity pertaining to distribution of the software without specific,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * written prior permission. SuSE makes no representations about the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * suitability of this software for any purpose. It is provided "as is"
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * without express or implied warranty.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Author: Keith Packard, SuSE, Inc.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _DirectFormat {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _IndexFormat {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictFormat {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned char type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned char depth;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct pixman_vector PictVector, *PictVectorPtr;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct pixman_transform PictTransform, *PictTransformPtr;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictSolidFill {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictGradientStop {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictGradient {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictLinearGradient {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictCircle {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictRadialGradient {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictConicalGradient {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef union _SourcePict {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned int type;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _Picture {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync unsigned long serialNumber;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/* if you add an 8th filter, expand the filter bitfield above */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef int (*CreatePictureProcPtr) (PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*DestroyPictureProcPtr) (PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*DestroyPictureClipProcPtr) (PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*ChangePictureProcPtr) (PicturePtr pPicture, Mask mask);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*ValidatePictureProcPtr) (PicturePtr pPicture, Mask mask);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*RasterizeTrapezoidProcPtr) (PicturePtr pMask,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef Bool (*InitIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*AddTrapsProcPtr) (PicturePtr pPicture,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*AddTrianglesProcPtr) (PicturePtr pPicture,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _PictureScreen {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Called immediately after a picture's transform is changed through the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * SetPictureTransform request. Not called for source-only pictures.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync ChangePictureTransformProcPtr ChangePictureTransform;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Called immediately after a picture's transform is changed through the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * SetPictureFilter request. Not called for source-only pictures.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define VERIFY_PICTURE(pPicture, pid, client, mode) {\
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define VERIFY_ALPHA(pPicture, pid, client, mode) {\
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictureMatchFormat(ScreenPtr pScreen, int depth, CARD32 format);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureGetFilterId(const char *filter, int len, Bool makeit);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern _X_EXPORT char *PictureGetFilterName(int id);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync const char *filter,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictureFindFilter(ScreenPtr pScreen, char *name, int len);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncSetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncSetPictureFilter(PicturePtr pPicture, char *name, int len,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync Mask mask, XID *list, ClientPtr client, int *error);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int xOrigin, int yOrigin, int nRect, xRectangle *rects);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync SetPictureTransform(PicturePtr pPicture, PictTransform * transform);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync xRenderColor * color, int nRect, xRectangle *rects);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 ySrc, int ntriangles, xTriangle * triangles);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncAnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xOff, INT16 yOff, int ntraps, xTrap * traps);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncCreateSolidPicture(Picture pid, xRenderColor * color, int *error);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync xFixed * stops, xRenderColor * colors, int *error);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync xFixed * stops, xRenderColor * colors, int *error);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync xFixed * stops, xRenderColor * colors, int *error);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncPictTransform_from_xRenderTransform(PictTransformPtr pict,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncxRenderTransform_from_PictTransform(xRenderTransform * render,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureTransformPoint(PictTransformPtr transform, PictVectorPtr vector);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictureTransformPoint3d(PictTransformPtr transform, PictVectorPtr vector);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif /* _PICTURESTR_H_ */