65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * All Rights Reserved.
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Permission is hereby granted, free of charge, to any person obtaining
65fea56f17cd614bc8908264df980a62e1931468vboxsync * a copy of this software and associated documentation files (the
65fea56f17cd614bc8908264df980a62e1931468vboxsync * "Software"), to deal in the Software without restriction, including
65fea56f17cd614bc8908264df980a62e1931468vboxsync * without limitation on the rights to use, copy, modify, merge,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * and to permit persons to whom the Software is furnished to do so,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * subject to the following conditions:
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * The above copyright notice and this permission notice (including the
65fea56f17cd614bc8908264df980a62e1931468vboxsync * next paragraph) shall be included in all copies or substantial
65fea56f17cd614bc8908264df980a62e1931468vboxsync * portions of the Software.
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65fea56f17cd614bc8908264df980a62e1931468vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
65fea56f17cd614bc8908264df980a62e1931468vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
65fea56f17cd614bc8908264df980a62e1931468vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
65fea56f17cd614bc8908264df980a62e1931468vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
65fea56f17cd614bc8908264df980a62e1931468vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65fea56f17cd614bc8908264df980a62e1931468vboxsync * SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Authors:
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Kevin E. Martin <kem@redhat.com>
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/** \file
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Interface for pixmap support. \see dmxpixmap.c */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef DMXPIXMAP_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define DMXPIXMAP_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "pixmapstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/** Pixmap private area. */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _dmxPixPriv {
65fea56f17cd614bc8908264df980a62e1931468vboxsync Pixmap pixmap;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XImage *detachedImage;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} dmxPixPrivRec, *dmxPixPrivPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern Bool dmxInitPixmap(ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width, int height, int depth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned usage_hint);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern void dmxBECreatePixmap(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/** Get pixmap private pointer. */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define DMX_GET_PIXMAP_PRIV(_pPix) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* DMXPIXMAP_H */