1 /**************************************************************************
3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
4 Copyright (c) 2002-2012 Apple Computer, Inc.
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the
9 "Software"), to deal in the Software without restriction, including
10 without limitation the rights to use, copy, modify, merge, publish,
11 distribute, sub license, and/or sell copies of the Software, and to
12 permit persons to whom the Software is furnished to do so, subject to
13 the following conditions:
15 The above copyright notice and this permission notice (including the
16 next paragraph) shall be included in all copies or substantial portions
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
23 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 **************************************************************************/
31 * Jens Owen <jens@precisioninsight.com>
32 * Jeremy Huddleston <jeremyhu@apple.com>
35 /* Prototypes for AppleDRI functions */
40 #include <X11/Xdefs.h>
41 #include "scrnintstr.h"
42 #define _APPLEDRI_SERVER_
46 typedef void (*ClipNotifyPtr
)(WindowPtr
, int, int);
49 * These functions can be wrapped by the DRI. Each of these have
50 * generic default funcs (initialized in DRICreateInfoRec) and can be
51 * overridden by the driver in its [driver]DRIScreenInit function.
54 WindowExposuresProcPtr WindowExposures
;
55 CopyWindowProcPtr CopyWindow
;
56 ValidateTreeProcPtr ValidateTree
;
57 PostValidateTreeProcPtr PostValidateTree
;
58 ClipNotifyProcPtr ClipNotify
;
59 } DRIWrappedFuncsRec
, *DRIWrappedFuncsPtr
;
64 } DRISurfaceNotifyArg
;
67 DRIScreenInit(ScreenPtr pScreen
);
70 DRIFinishScreenInit(ScreenPtr pScreen
);
73 DRICloseScreen(ScreenPtr pScreen
);
76 DRIExtensionInit(void);
82 DRIQueryDirectRenderingCapable(ScreenPtr pScreen
, Bool
*isCapable
);
85 DRIAuthConnection(ScreenPtr pScreen
, unsigned int magic
);
87 extern Bool
DRICreateSurface(ScreenPtr pScreen
,
89 DrawablePtr pDrawable
,
90 xp_client_id client_id
,
91 xp_surface_id
* surface_id
,
93 void (*notify
)(void *arg
, void *data
),
97 DRIDestroySurface(ScreenPtr pScreen
, Drawable id
, DrawablePtr pDrawable
,
98 void (*notify
)(void *arg
,
99 void *data
), void *notify_data
);
102 DRIDrawablePrivDelete(pointer pResource
, XID id
);
104 extern DRIWrappedFuncsRec
*
105 DRIGetWrappedFuncs(ScreenPtr pScreen
);
108 DRICopyWindow(WindowPtr pWin
, DDXPointRec ptOldOrg
, RegionPtr prgnSrc
);
111 DRIValidateTree(WindowPtr pParent
, WindowPtr pChild
, VTKind kind
);
114 DRIPostValidateTree(WindowPtr pParent
, WindowPtr pChild
, VTKind kind
);
117 DRIClipNotify(WindowPtr pWin
, int dx
, int dy
);
120 DRIWindowExposures(WindowPtr pWin
, RegionPtr prgn
, RegionPtr bsreg
);
123 DRISurfaceNotify(xp_surface_id id
, int kind
);
126 DRIQueryVersion(int *majorVersion
, int *minorVersion
, int *patchVersion
);
129 DRICreatePixmap(ScreenPtr pScreen
, Drawable id
, DrawablePtr pDrawable
,
134 DRIGetPixmapData(DrawablePtr pDrawable
, int *width
, int *height
, int *pitch
,
139 DRIDestroyPixmap(DrawablePtr pDrawable
);