45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright © 2000 SuSE, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation, and that the name of SuSE not be used in advertising or
45e9809aff7304721fddb95654901b32195c9c7avboxsync * publicity pertaining to distribution of the software without specific,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * written prior permission. SuSE makes no representations about the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * suitability of this software for any purpose. It is provided "as is"
45e9809aff7304721fddb95654901b32195c9c7avboxsync * without express or implied warranty.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
45e9809aff7304721fddb95654901b32195c9c7avboxsync * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
45e9809aff7304721fddb95654901b32195c9c7avboxsync * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Author: Keith Packard, SuSE, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _FBOVERLAY_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _FBOVERLAY_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "privates.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef FB_OVERLAY_MAX
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define FB_OVERLAY_MAX 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _fbOverlayLayer {
45e9809aff7304721fddb95654901b32195c9c7avboxsync union {
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pbits;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int width;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int depth;
45e9809aff7304721fddb95654901b32195c9c7avboxsync } init;
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync PixmapPtr pixmap;
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionRec region;
45e9809aff7304721fddb95654901b32195c9c7avboxsync } run;
45e9809aff7304721fddb95654901b32195c9c7avboxsync } u;
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 key; /* special pixel value */
45e9809aff7304721fddb95654901b32195c9c7avboxsync} FbOverlayLayer;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _fbOverlayScrPriv {
45e9809aff7304721fddb95654901b32195c9c7avboxsync int nlayers;
45e9809aff7304721fddb95654901b32195c9c7avboxsync fbOverlayPaintKeyProc PaintKey;
45e9809aff7304721fddb95654901b32195c9c7avboxsync miCopyProc CopyWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync FbOverlayLayer layer[FB_OVERLAY_MAX];
45e9809aff7304721fddb95654901b32195c9c7avboxsync} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define fbOverlayGetScrPriv(s) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey())
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayCreateWindow(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayCloseScreen (int iScreen, ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayWindowLayer(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayCreateScreenResources(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayPaintKey (DrawablePtr pDrawable,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr pRegion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 pixel,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int layer);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayUpdateLayerRegion (ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int layer,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgn);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayCopyWindow(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DDXPointRec ptOldOrg,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgnSrc);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayWindowExposures (WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgn,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr other_exposed);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlaySetupScreen(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pbits1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pbits2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int xsize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ysize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dpix,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dpiy,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int width1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int width2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bpp1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bpp2);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncfbOverlayFinishScreenInit(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pbits1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pbits2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int xsize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ysize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dpix,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dpiy,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int width1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int width2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bpp1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bpp2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int depth1,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int depth2);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _FBOVERLAY_H_ */