- Main Page
- Data Structures
- Files

- File List
- Globals

dmxpict.h
Go to the documentation of this file.

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