f0ab104f070bc7f569404826fea1828ed985638cvboxsync/******************************************************************************
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * Copyright (c) 1994, 1995 Hewlett-Packard Company
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * Permission is hereby granted, free of charge, to any person obtaining
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * a copy of this software and associated documentation files (the
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * "Software"), to deal in the Software without restriction, including
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * without limitation the rights to use, copy, modify, merge, publish,
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * distribute, sublicense, and/or sell copies of the Software, and to
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * permit persons to whom the Software is furnished to do so, subject to
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * the following conditions:
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * The above copyright notice and this permission notice shall be included
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * in all copies or substantial portions of the Software.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * Except as contained in this notice, the name of the Hewlett-Packard
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * Company shall not be used in advertising or otherwise to promote the
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * sale, use or other dealings in this Software without prior written
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * authorization from the Hewlett-Packard Company.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * Header file for DIX-related DBE
f0ab104f070bc7f569404826fea1828ed985638cvboxsync *****************************************************************************/
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* INCLUDES */
f0ab104f070bc7f569404826fea1828ed985638cvboxsynctypedef struct
f0ab104f070bc7f569404826fea1828ed985638cvboxsync VisualID visual; /* one visual ID that supports double-buffering */
f0ab104f070bc7f569404826fea1828ed985638cvboxsynctypedef struct
f0ab104f070bc7f569404826fea1828ed985638cvboxsync XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* DEFINES */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync#define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \
f0ab104f070bc7f569404826fea1828ed985638cvboxsync dixLookupPrivate(&(pScreen)->devPrivates, dbeScreenPrivKey))
f0ab104f070bc7f569404826fea1828ed985638cvboxsync#define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \
f0ab104f070bc7f569404826fea1828ed985638cvboxsync DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen)
f0ab104f070bc7f569404826fea1828ed985638cvboxsync dixLookupPrivate(&(pWin)->devPrivates, dbeWindowPrivKey))
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* Initial size of the buffer ID array in the window priv. */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* Reallocation increment for the buffer ID array. */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* Marker for free elements in the buffer ID array. */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* TYPEDEFS */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync/* Record used to pass swap information between DIX and DDX swapping
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * procedures.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ******************************************************************************
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ** Per-window data
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ******************************************************************************
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* A pointer to the window with which the DBE window private (buffer) is
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * associated.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Last known swap action for this buffer. Legal values for this field
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Last known buffer size.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Coordinates used for static gravity when the window is positioned.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync short x, y;
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Number of XIDs associated with this buffer.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Capacity of the current buffer ID array, IDs. */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Pointer to the array of buffer IDs. This initially points to initIDs.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * When the static limit of the initIDs array is reached, the array is
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * reallocated and this pointer is set to the new array instead of initIDs.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Initial array of buffer IDs. We are defining the XID array within the
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * window priv to optimize for data locality. In most cases, only one
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * buffer will be associated with a window. Having the array declared
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * here can prevent us from accessing the data in another memory page,
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * possibly resulting in a page swap and loss of performance. Initially we
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * will use this array to store buffer IDs. For situations where we have
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * more IDs than can fit in this static array, we will allocate a larger
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * array to use, possibly suffering a performance loss.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Device-specific private information.
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ******************************************************************************
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ** Per-screen data
f0ab104f070bc7f569404826fea1828ed985638cvboxsync ******************************************************************************
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Wrapped functions
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * It is the responsibilty of the DDX layer to wrap PositionWindow().
f0ab104f070bc7f569404826fea1828ed985638cvboxsync * DbeExtensionInit wraps DestroyWindow().
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Per-screen DIX routines */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync /* Per-screen DDX routines */
f0ab104f070bc7f569404826fea1828ed985638cvboxsync int /*swapAction*/
f0ab104f070bc7f569404826fea1828ed985638cvboxsync int * /*pNumWindows*/,
f0ab104f070bc7f569404826fea1828ed985638cvboxsync#endif /* DBE_STRUCT_H */