a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * All Rights Reserved.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Permission is hereby granted, free of charge, to any person obtaining
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * a copy of this software and associated documentation files (the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * "Software"), to deal in the Software without restriction, including
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * without limitation on the rights to use, copy, modify, merge,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * and to permit persons to whom the Software is furnished to do so,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * subject to the following conditions:
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * The above copyright notice and this permission notice (including the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * next paragraph) shall be included in all copies or substantial
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * portions of the Software.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * SOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Authors:
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Kevin E. Martin <kem@redhat.com>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** \file
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * This file provides access to the externally visible RENDER support
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * functions, global variables and macros for DMX.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * FIXME: Move function definitions for non-externally visible function
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * to .c file. */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifndef DMXPICT_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define DMXPICT_H
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** Picture private structure */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _dmxPictPriv {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync Picture pict; /**< Picture ID from back-end server */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync Mask savedMask; /**< Mask of picture attributes saved for
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * lazy window creation. */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync} dmxPictPrivRec, *dmxPictPrivPtr;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** Glyph Set private structure */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsynctypedef struct _dmxGlyphPriv {
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync GlyphSet *glyphSets; /**< Glyph Set IDs from back-end server */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync} dmxGlyphPrivRec, *dmxGlyphPrivPtr;
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxInitRender(void);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxResetRender(void);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool dmxPictureInit(ScreenPtr pScreen,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictFormatPtr formats, int nformats);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxCreatePictureList(WindowPtr pWindow);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool dmxDestroyPictureList(WindowPtr pWindow);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int dmxCreatePicture(PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxDestroyPicture(PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int dmxChangePictureClip(PicturePtr pPicture, int clipType,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync pointer value, int n);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxDestroyPictureClip(PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxChangePicture(PicturePtr pPicture, Mask mask);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxValidatePicture(PicturePtr pPicture, Mask mask);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxComposite(CARD8 op,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xMask, INT16 yMask,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxGlyphs(CARD8 op,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PicturePtr pSrc, PicturePtr pDst,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictFormatPtr maskFormat,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int nlists, GlyphListPtr lists, GlyphPtr * glyphs);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxCompositeRects(CARD8 op,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PicturePtr pDst,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync xRenderColor * color,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int nRect, xRectangle *rects);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool dmxInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int ndef, xColorItem * pdef);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxTrapezoids(CARD8 op,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PicturePtr pSrc, PicturePtr pDst,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictFormatPtr maskFormat,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync int ntrap, xTrapezoid * traps);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern void dmxTriangles(CARD8 op,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PicturePtr pSrc, PicturePtr pDst,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync PictFormatPtr maskFormat,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern int dmxBECreatePicture(PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsyncextern Bool dmxBEFreePicture(PicturePtr pPicture);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** Get the picture private data given a picture pointer */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define DMX_GET_PICT_PRIV(_pPict) \
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync (dmxPictPrivPtr)dixLookupPrivate(&(_pPict)->devPrivates, dmxPictPrivateKey)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** Set the glyphset private data given a glyphset pointer */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv) \
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateKey, (_pPriv))
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/** Get the glyphset private data given a glyphset pointer */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define DMX_GET_GLYPH_PRIV(_pGlyph) \
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateKey)
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif /* DMXPICT_H */