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