Remove spaces and tabs at end of lines.
[synfig.git] / synfig-osx / trunk / launcher / dri-surface.h
1 /* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */
2 /**************************************************************************
3
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5 Copyright (c) 2002 Apple Computer, Inc.
6 All Rights Reserved.
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the
10 "Software"), to deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sub license, and/or sell copies of the Software, and to
13 permit persons to whom the Software is furnished to do so, subject to
14 the following conditions:
15
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial portions
18 of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
23 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
24 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28 **************************************************************************/
29
30 /*
31  * Authors:
32  *   Jens Owen <jens@precisioninsight.com>
33  *
34  */
35
36 /* Prototypes for DRI functions */
37
38 #ifndef _DRI_SURFACE_H_
39 #define _DRI_SURFACE_H_
40
41 #include "dri.h"
42 #include "Xplugin.h"
43
44 typedef void (*ClipNotifyPtr)( WindowPtr, int, int );
45
46
47 /*
48  * These functions can be wrapped by the DRI.  Each of these have
49  * generic default funcs (initialized in DRICreateInfoRec) and can be
50  * overridden by the driver in its [driver]DRIScreenInit function.
51  */
52 typedef struct {
53     WindowExposuresProcPtr       WindowExposures;
54     CopyWindowProcPtr            CopyWindow;
55     ValidateTreeProcPtr          ValidateTree;
56     PostValidateTreeProcPtr      PostValidateTree;
57     ClipNotifyProcPtr            ClipNotify;
58 } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
59
60 typedef struct {
61     xp_surface_id id;
62     int kind;
63 } DRISurfaceNotifyArg;
64
65 extern void DRIClipNotify(WindowPtr pWin,
66                           int dx,
67                           int dy);
68
69 extern void DRICloseScreen(ScreenPtr pScreen);
70
71 extern void DRICopyWindow(WindowPtr pWin,
72                           DDXPointRec ptOldOrg,
73                           RegionPtr prgnSrc);
74
75 extern Bool DRICreateSurface(ScreenPtr pScreen,
76                              Drawable id,
77                              DrawablePtr pDrawable,
78                              xp_client_id client_id,
79                              xp_surface_id *surface_id,
80                              unsigned int key[2],
81                              void (*notify) (void *arg, void *data),
82                              void *notify_data);
83
84 extern Bool DRIDestroySurface(ScreenPtr pScreen,
85                               Drawable id,
86                               DrawablePtr pDrawable,
87                               void (*notify) (void *arg, void *data),
88                               void *notify_data);
89
90 extern Bool DRIDrawablePrivDelete(pointer pResource,
91                                   XID id);
92
93 extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
94
95 extern void DRIPostValidateTree(WindowPtr pParent,
96                                 WindowPtr pChild,
97                                 VTKind    kind);
98
99 extern int DRIValidateTree(WindowPtr pParent,
100                            WindowPtr pChild,
101                            VTKind    kind);
102
103 extern void DRIWindowExposures(WindowPtr pWin,
104                               RegionPtr prgn,
105                               RegionPtr bsreg);
106
107 extern void DRISurfaceNotify (xp_surface_id id, int kind);
108
109 extern Bool DRIStartDrawing (DrawablePtr pDraw);
110 extern Bool DRIStopDrawing (DrawablePtr pDraw, Bool flush);
111 extern Bool DRIDamageRegion (DrawablePtr pDraw, RegionPtr pRegion);
112 extern void DRISynchronizeDrawable (DrawablePtr pDraw, Bool flush);
113 extern void DRISynchronize (Bool flush);
114
115 #endif