b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $Xorg: dbestruct.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/******************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright (c) 1994, 1995 Hewlett-Packard Company
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 * The above copyright notice and this permission notice shall be included
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * in all copies or substantial portions of the Software.
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 * 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 * Header file for DIX-related DBE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *****************************************************************************/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XFree86$ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* INCLUDES */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* DEFINES */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ((DbeScreenPrivPtr)((pScreen)->devPrivates[dbeScreenPrivIndex].ptr)))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ((DbeWindowPrivPtr)(pWindow->devPrivates[dbeWindowPrivIndex].ptr)))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Initial size of the buffer ID array in the window priv. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Reallocation increment for the buffer ID array. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Marker for free elements in the buffer ID array. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* TYPEDEFS */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Record used to pass swap information between DIX and DDX swapping
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * procedures.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ******************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ** Per-window data
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ******************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* A pointer to the window with which the DBE window private (buffer) is
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * associated.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Last known swap action for this buffer. Legal values for this field
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Last known buffer size.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Coordinates used for static gravity when the window is positioned.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync short x, y;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Number of XIDs associated with this buffer.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Capacity of the current buffer ID array, IDs. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Pointer to the array of buffer IDs. This initially points to initIDs.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * When the static limit of the initIDs array is reached, the array is
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * reallocated and this pointer is set to the new array instead of initIDs.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Initial array of buffer IDs. We are defining the XID array within the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * window priv to optimize for data locality. In most cases, only one
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * buffer will be associated with a window. Having the array declared
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * here can prevent us from accessing the data in another memory page,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * possibly resulting in a page swap and loss of performance. Initially we
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * will use this array to store buffer IDs. For situations where we have
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * more IDs than can fit in this static array, we will allocate a larger
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * array to use, possibly suffering a performance loss.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Device-specific private information.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ******************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ** Per-screen data
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ******************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Info for creating window privs */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int winPrivPrivLen; /* Length of privs in DbeWindowPrivRec */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int *winPrivPrivSizes; /* Array of private record sizes */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int totalWinPrivSize; /* PrivRec + size of all priv priv ptrs */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Resources created by DIX to be used by DDX */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Private indices created by DIX to be used by DDX */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Wrapped functions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * It is the responsibilty of the DDX layer to wrap PositionWindow().
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * DbeExtensionInit wraps DestroyWindow().
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Per-screen DIX routines */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int /*index*/,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned /*amount*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Per-screen DDX routines */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int /*swapAction*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int * /*pNumWindows*/,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync /* Device-specific private information.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif /* DBE_STRUCT_H */