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