b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/**************************************************************************
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCopyright (c) 2002 Apple Computer, Inc.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncAll Rights Reserved.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncPermission is hereby granted, free of charge, to any person obtaining a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynccopy of this software and associated documentation files (the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync"Software"), to deal in the Software without restriction, including
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncwithout limitation the rights to use, copy, modify, merge, publish,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncdistribute, sub license, and/or sell copies of the Software, and to
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncpermit persons to whom the Software is furnished to do so, subject to
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncthe following conditions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncThe above copyright notice and this permission notice (including the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncnext paragraph) shall be included in all copies or substantial portions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncof the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync**************************************************************************/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Authors:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Jens Owen <jens@precisioninsight.com>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Prototypes for AppleDRI functions */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef _DRI_H_
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _DRI_H_
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include <X11/Xdefs.h>
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "scrnintstr.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _APPLEDRI_SERVER_
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "appledri.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "Xplugin.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*ClipNotifyPtr)( WindowPtr, int, int );
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * These functions can be wrapped by the DRI. Each of these have
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * generic default funcs (initialized in DRICreateInfoRec) and can be
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * overridden by the driver in its [driver]DRIScreenInit function.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync WindowExposuresProcPtr WindowExposures;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CopyWindowProcPtr CopyWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ValidateTreeProcPtr ValidateTree;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PostValidateTreeProcPtr PostValidateTree;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ClipNotifyProcPtr ClipNotify;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xp_surface_id id;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int kind;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} DRISurfaceNotifyArg;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIScreenInit(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIFinishScreenInit(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRICloseScreen(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIExtensionInit(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRIReset(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Bool *isCapable);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIAuthConnection(ScreenPtr pScreen, unsigned int magic);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRICreateSurface(ScreenPtr pScreen,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Drawable id,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xp_client_id client_id,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync xp_surface_id *surface_id,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int key[2],
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void (*notify) (void *arg, void *data),
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void *notify_data);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIDestroySurface(ScreenPtr pScreen,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Drawable id,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void (*notify) (void *arg, void *data),
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void *notify_data);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern Bool DRIDrawablePrivDelete(pointer pResource,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync XID id);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRICopyWindow(WindowPtr pWin,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DDXPointRec ptOldOrg,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RegionPtr prgnSrc);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern int DRIValidateTree(WindowPtr pParent,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync WindowPtr pChild,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync VTKind kind);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRIPostValidateTree(WindowPtr pParent,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync WindowPtr pChild,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync VTKind kind);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRIClipNotify(WindowPtr pWin,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dx,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int dy);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRIWindowExposures(WindowPtr pWin,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RegionPtr prgn,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync RegionPtr bsreg);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRISurfaceNotify (xp_surface_id id, int kind);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern void DRIQueryVersion(int *majorVersion,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int *minorVersion,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync int *patchVersion);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif