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