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