initial EGL code
[mesa.git] / src / egl / main / eglsurface.h
1 #ifndef EGLSURFACE_INCLUDED
2 #define EGLSURFACE_INCLUDED
3
4
5 #include "egltypedefs.h"
6
7
8 /**
9 * "Base" class for device driver surfaces.
10 */
11 struct _egl_surface
12 {
13 EGLSurface Handle; /* The public/opaque handle which names this object */
14 _EGLConfig *Config;
15
16 /* May need reference counting here */
17 EGLBoolean IsBound;
18 EGLBoolean DeletePending;
19
20 EGLint Type; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */
21 EGLint Width, Height;
22 EGLint TextureFormat, TextureTarget;
23 EGLint MipmapTexture, MipmapLevel;
24 EGLint SwapInterval;
25
26 /* If type == EGL_SCREEN_BIT: */
27 EGLint VisibleRefCount; /* number of screens I'm displayed on */
28 };
29
30
31 extern void
32 _eglInitSurface(_EGLSurface *surf);
33
34
35 extern void
36 _eglSaveSurface(_EGLSurface *surf);
37
38
39 extern void
40 _eglRemoveSurface(_EGLSurface *surf);
41
42
43 extern _EGLSurface *
44 _eglLookupSurface(EGLSurface surf);
45
46
47 extern _EGLSurface *
48 _eglGetCurrentSurface(EGLint readdraw);
49
50
51 extern EGLBoolean
52 _eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw);
53
54
55 extern EGLBoolean
56 _eglCopyBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
57
58
59 extern EGLBoolean
60 _eglQuerySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
61
62
63 extern EGLSurface
64 _eglCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
65
66
67 extern EGLSurface
68 _eglCreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
69
70
71 extern EGLSurface
72 _eglCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
73
74
75 extern EGLBoolean
76 _eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface);
77
78
79 extern EGLBoolean
80 _eglSurfaceAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
81
82
83 extern EGLBoolean
84 _eglBindTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer);
85
86
87 extern EGLBoolean
88 _eglReleaseTexImage(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface, EGLint buffer);
89
90
91 extern EGLBoolean
92 _eglSwapInterval(_EGLDriver *drv, EGLDisplay dpy, EGLint interval);
93
94
95
96 #endif /* EGLSURFACE_INCLUDED */