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