1706f2543Smrg/****************************************************************************** 2706f2543Smrg * 3706f2543Smrg * Copyright (c) 1994, 1995 Hewlett-Packard Company 4706f2543Smrg * 5706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining 6706f2543Smrg * a copy of this software and associated documentation files (the 7706f2543Smrg * "Software"), to deal in the Software without restriction, including 8706f2543Smrg * without limitation the rights to use, copy, modify, merge, publish, 9706f2543Smrg * distribute, sublicense, and/or sell copies of the Software, and to 10706f2543Smrg * permit persons to whom the Software is furnished to do so, subject to 11706f2543Smrg * the following conditions: 12706f2543Smrg * 13706f2543Smrg * The above copyright notice and this permission notice shall be included 14706f2543Smrg * in all copies or substantial portions of the Software. 15706f2543Smrg * 16706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17706f2543Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18706f2543Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19706f2543Smrg * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, 20706f2543Smrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21706f2543Smrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 22706f2543Smrg * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23706f2543Smrg * 24706f2543Smrg * Except as contained in this notice, the name of the Hewlett-Packard 25706f2543Smrg * Company shall not be used in advertising or otherwise to promote the 26706f2543Smrg * sale, use or other dealings in this Software without prior written 27706f2543Smrg * authorization from the Hewlett-Packard Company. 28706f2543Smrg * 29706f2543Smrg * Header file for users of machine-independent DBE code 30706f2543Smrg * 31706f2543Smrg *****************************************************************************/ 32706f2543Smrg 33706f2543Smrg 34706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 35706f2543Smrg#include <dix-config.h> 36706f2543Smrg#endif 37706f2543Smrg 38706f2543Smrg#ifndef MIDBE_STRUCT_H 39706f2543Smrg#define MIDBE_STRUCT_H 40706f2543Smrg 41706f2543Smrg 42706f2543Smrg/* DEFINES */ 43706f2543Smrg 44706f2543Smrg#define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \ 45706f2543Smrg (!(pDbeWindowPriv) ? NULL : (MiDbeWindowPrivPrivPtr) \ 46706f2543Smrg dixLookupPrivate(&(pDbeWindowPriv)->devPrivates, miDbeWindowPrivPrivKey)) 47706f2543Smrg 48706f2543Smrg#define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\ 49706f2543Smrg MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin)) 50706f2543Smrg 51706f2543Smrg/* TYPEDEFS */ 52706f2543Smrg 53706f2543Smrgtypedef struct _MiDbeWindowPrivPrivRec 54706f2543Smrg{ 55706f2543Smrg /* Place machine-specific fields in here. 56706f2543Smrg * Since this is mi code, we do not really have machine-specific fields. 57706f2543Smrg */ 58706f2543Smrg 59706f2543Smrg /* Pointer to a drawable that contains the contents of the back buffer. 60706f2543Smrg */ 61706f2543Smrg PixmapPtr pBackBuffer; 62706f2543Smrg 63706f2543Smrg /* Pointer to a drawable that contains the contents of the front buffer. 64706f2543Smrg * This pointer is only used for the XdbeUntouched swap action. For that 65706f2543Smrg * swap action, we need to copy the front buffer (window) contents into 66706f2543Smrg * this drawable, copy the contents of current back buffer drawable (the 67706f2543Smrg * back buffer) into the window, swap the front and back drawable pointers, 68706f2543Smrg * and then swap the drawable/resource associations in the resource 69706f2543Smrg * database. 70706f2543Smrg */ 71706f2543Smrg PixmapPtr pFrontBuffer; 72706f2543Smrg 73706f2543Smrg /* Pointer back to our window private with which we are associated. */ 74706f2543Smrg DbeWindowPrivPtr pDbeWindowPriv; 75706f2543Smrg 76706f2543Smrg} MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr; 77706f2543Smrg 78706f2543Smrg#endif /* MIDBE_STRUCT_H */ 79706f2543Smrg 80