b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/******************************************************************************
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (c) 1994, 1995 Hewlett-Packard Company
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 the rights to use, copy, modify, merge, publish,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * distribute, sublicense, and/or sell copies of the Software, and to
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * permit persons to whom the Software is furnished to do so, subject to
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * the following conditions:
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * The above copyright notice and this permission notice shall be included
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * in all copies or substantial portions of the Software.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Except as contained in this notice, the name of the Hewlett-Packard
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Company shall not be used in advertising or otherwise to promote the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * sale, use or other dealings in this Software without prior written
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * authorization from the Hewlett-Packard Company.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Header file for users of machine-independent DBE code
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *****************************************************************************/
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef HAVE_DIX_CONFIG_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <dix-config.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifndef MIDBE_STRUCT_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define MIDBE_STRUCT_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* DEFINES */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync (!(pDbeWindowPriv) ? NULL : (MiDbeWindowPrivPrivPtr) \
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync dixLookupPrivate(&(pDbeWindowPriv)->devPrivates, miDbeWindowPrivPrivKey))
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin))
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync (!(pDbeScreenPriv) ? NULL : (MiDbeScreenPrivPrivPtr) \
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync dixLookupPrivate(&(pDbeScreenPriv)->devPrivates, miDbeScreenPrivPrivKey))
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* TYPEDEFS */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _MiDbeWindowPrivPrivRec
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync{
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Place machine-specific fields in here.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Since this is mi code, we do not really have machine-specific fields.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Pointer to a drawable that contains the contents of the back buffer.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PixmapPtr pBackBuffer;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Pointer to a drawable that contains the contents of the front buffer.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This pointer is only used for the XdbeUntouched swap action. For that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * swap action, we need to copy the front buffer (window) contents into
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * this drawable, copy the contents of current back buffer drawable (the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * back buffer) into the window, swap the front and back drawable pointers,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and then swap the drawable/resource associations in the resource
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * database.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PixmapPtr pFrontBuffer;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Pointer back to our window private with which we are associated. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync DbeWindowPrivPtr pDbeWindowPriv;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _MiDbeScreenPrivPrivRec
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync{
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Place machine-specific fields in here.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Since this is mi code, we do not really have machine-specific fields.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /* Pointer back to our screen private with which we are associated. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync DbeScreenPrivPtr pDbeScreenPriv;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} MiDbeScreenPrivPrivRec, *MiDbeScreenPrivPrivPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif /* MIDBE_STRUCT_H */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync