deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/***********************************************************
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCopyright 1987, 1998 The Open Group
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncthe above copyright notice appear in all copies and that both that
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynccopyright notice and this permission notice appear in supporting
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncdocumentation.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncThe above copyright notice and this permission notice shall be included in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncall copies or substantial portions of the Software.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncin this Software without prior written authorization from The Open Group.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync All Rights Reserved
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncPermission to use, copy, modify, and distribute this software and its
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncdocumentation for any purpose and without fee is hereby granted,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncprovided that the above copyright notice appear in all copies and that
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncboth that copyright notice and this permission notice appear in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncsupporting documentation, and that the name of Digital not be
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncused in advertising or publicity pertaining to distribution of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncsoftware without specific, written prior permission.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncSOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync******************************************************************/
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* $XFree86$ */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifndef PIXMAP_H
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define PIXMAP_H
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "misc.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "screenint.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* types for Drawable */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DRAWABLE_WINDOW 0
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DRAWABLE_PIXMAP 1
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define UNDRAWABLE_WINDOW 2
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DRAWABLE_BUFFER 3
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* flags to PaintWindow() */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define PW_BACKGROUND 0
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define PW_BORDER 1
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define NullPixmap ((PixmapPtr)0)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _Drawable *DrawablePtr;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _Pixmap *PixmapPtr;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef union _PixUnion {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync PixmapPtr pixmap;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long pixel;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} PixUnion;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define SamePixUnion(a,b,isPixel)\
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define EqualPixUnion(as, a, bs, b) \
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ((as) == (bs) && (SamePixUnion (a, b, as)))
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define OnScreenDrawable(type) \
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ((type == DRAWABLE_WINDOW) || (type == DRAWABLE_BUFFER))
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define WindowDrawable(type) \
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern PixmapPtr GetScratchPixmapHeader(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ScreenPtr /*pScreen*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*width*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*height*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*depth*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*bitsPerPixel*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*devKind*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pointer /*pPixData*/);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void FreeScratchPixmapHeader(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync PixmapPtr /*pPixmap*/);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern Bool CreateScratchPixmapsForScreen(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*scrnum*/);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void FreeScratchPixmapsForScreen(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*scrnum*/);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern PixmapPtr AllocatePixmap(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ScreenPtr /*pScreen*/,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /*pixDataSize*/);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif /* PIXMAP_H */