File Index

Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

# dmxpict.h

Go to the documentation of this file.

    00001 /* $XFree86$ */
    00002 /*
    00003  * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
    00004  *
    00005  * All Rights Reserved.
    00006  *
    00007  * Permission is hereby granted, free of charge, to any person obtaining
    00008  * a copy of this software and associated documentation files (the
    00009  * "Software"), to deal in the Software without restriction, including
    00010  * without limitation on the rights to use, copy, modify, merge,
    00011  * publish, distribute, sublicense, and/or sell copies of the Software,
    00012  * and to permit persons to whom the Software is furnished to do so,
    00013  * subject to the following conditions:
    00014  *
    00015  * The above copyright notice and this permission notice (including the
    00016  * next paragraph) shall be included in all copies or substantial
    00017  * portions of the Software.
    00018  *
    00019  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00020  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00021  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    00022  * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
    00023  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    00024  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    00025  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    00026  * SOFTWARE.
    00027  */
    00028
    00029 /*
    00030  * Authors:
    00031  *   Kevin E. Martin <kem@redhat.com>
    00032  *
    00033  */
    00034
    00042 #ifndef DMXPICT_H
    00043 #define DMXPICT_H
    00044
    00046 typedef struct _dmxPictPriv {
    00047     Picture  pict;
    00048     Mask     savedMask;
    00050 } dmxPictPrivRec, *dmxPictPrivPtr;
    00051
    00052
    00054 typedef struct _dmxGlyphPriv {
    00055     GlyphSet  *glyphSets;
    00056 } dmxGlyphPrivRec, *dmxGlyphPrivPtr;
    00057
    00058
    00059 extern void dmxInitRender(void);
    00060 extern void dmxResetRender(void);
    00061
    00062 extern Bool dmxPictureInit(ScreenPtr pScreen,
    00063                            PictFormatPtr formats, int nformats);
    00064
    00065 extern void dmxCreatePictureList(WindowPtr pWindow);
    00066 extern Bool dmxDestroyPictureList(WindowPtr pWindow);
    00067
    00068 extern int dmxCreatePicture(PicturePtr pPicture);
    00069 extern void dmxDestroyPicture(PicturePtr pPicture);
    00070 extern int dmxChangePictureClip(PicturePtr pPicture, int clipType,
    00071                                 pointer value, int n);
    00072 extern void dmxDestroyPictureClip(PicturePtr pPicture);
    00073 extern void dmxChangePicture(PicturePtr pPicture, Mask mask);
    00074 extern void dmxValidatePicture(PicturePtr pPicture, Mask mask);
    00075 extern void dmxComposite(CARD8 op,
    00076                          PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
    00077                          INT16 xSrc, INT16 ySrc,
    00078                          INT16 xMask, INT16 yMask,
    00079                          INT16 xDst, INT16 yDst,
    00080                          CARD16 width, CARD16 height);
    00081 extern void dmxGlyphs(CARD8 op,
    00082                       PicturePtr pSrc, PicturePtr pDst,
    00083                       PictFormatPtr maskFormat,
    00084                       INT16 xSrc, INT16 ySrc,
    00085                       int nlists, GlyphListPtr lists, GlyphPtr *glyphs);
    00086 extern void dmxCompositeRects(CARD8 op,
    00087                               PicturePtr pDst,
    00088                               xRenderColor *color,
    00089                               int nRect, xRectangle *rects);
    00090 extern Bool dmxInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
    00091 extern void dmxCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
    00092 extern void dmxUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat,
    00093                              int ndef, xColorItem *pdef);
    00094 extern void dmxTrapezoids(CARD8 op,
    00095                           PicturePtr pSrc, PicturePtr pDst,
    00096                           PictFormatPtr maskFormat,
    00097                           INT16 xSrc, INT16 ySrc,
    00098                           int ntrap, xTrapezoid *traps);
    00099 extern void dmxTriangles(CARD8 op,
    00100                          PicturePtr pSrc, PicturePtr pDst,
    00101                          PictFormatPtr maskFormat,
    00102                          INT16 xSrc, INT16 ySrc,
    00103                          int ntri, xTriangle *tris);
    00104 extern void dmxTriStrip(CARD8 op,
    00105                         PicturePtr pSrc, PicturePtr pDst,
    00106                         PictFormatPtr maskFormat,
    00107                         INT16 xSrc, INT16 ySrc,
    00108                         int npoint, xPointFixed *points);
    00109 extern void dmxTriFan(CARD8 op,
    00110                       PicturePtr pSrc, PicturePtr pDst,
    00111                       PictFormatPtr maskFormat,
    00112                       INT16 xSrc, INT16 ySrc,
    00113                       int npoint, xPointFixed *points);
    00114
    00115 extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
    00116 extern Bool dmxBEFreePicture(PicturePtr pPicture);
    00117
    00118 extern int dmxPictPrivateIndex;
    00119 extern int dmxGlyphSetPrivateIndex;
    00123 #define DMX_GET_PICT_PRIV(_pPict)                                       \
    00124     (dmxPictPrivPtr)(_pPict)->devPrivates[dmxPictPrivateIndex].ptr
    00125
    00127 #define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv)                             \
    00128     GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateIndex, (_pPriv))
    00129
    00130 #define DMX_GET_GLYPH_PRIV(_pGlyph)                                     \
    00131     (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateIndex)
    00132
    00133 #endif /* DMXPICT_H */