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