1 #ifndef EGLDISPLAY_INCLUDED
2 #define EGLDISPLAY_INCLUDED
8 #include "egltypedefs.h"
13 EGLNativeDisplayType NativeDisplay
;
16 const char *DriverName
;
17 const char *DriverArgs
;
21 _EGLScreen
**Screens
; /* array [NumScreens] */
24 _EGLConfig
**Configs
; /* array [NumConfigs] of ptr to _EGLConfig */
26 /* lists of linked contexts and surface */
27 _EGLContext
*ContextList
;
28 _EGLSurface
*SurfaceList
;
29 #ifdef _EGL_PLATFORM_X
36 _eglNewDisplay(NativeDisplayType displayName
);
40 _eglLinkDisplay(_EGLDisplay
*dpy
);
44 _eglUnlinkDisplay(_EGLDisplay
*dpy
);
48 _eglGetDisplayHandle(_EGLDisplay
*display
);
52 _eglLookupDisplay(EGLDisplay dpy
);
56 * Return true if the display is linked.
58 static INLINE EGLBoolean
59 _eglIsDisplayLinked(_EGLDisplay
*dpy
)
61 return (EGLBoolean
) (_eglGetDisplayHandle(dpy
) != EGL_NO_DISPLAY
);
66 _eglFindDisplay(NativeDisplayType nativeDisplay
);
70 _eglReleaseDisplayResources(_EGLDriver
*drv
, EGLDisplay dpy
);
74 _eglCleanupDisplay(_EGLDisplay
*disp
);
78 _eglLinkContext(_EGLContext
*ctx
, _EGLDisplay
*dpy
);
82 _eglUnlinkContext(_EGLContext
*ctx
);
86 _eglGetContextHandle(_EGLContext
*ctx
);
90 _eglLookupContext(EGLContext ctx
);
94 * Return true if the context is linked to a display.
96 static INLINE EGLBoolean
97 _eglIsContextLinked(_EGLContext
*ctx
)
99 return (EGLBoolean
) (_eglGetContextHandle(ctx
) != EGL_NO_CONTEXT
);
103 _eglLinkSurface(_EGLSurface
*surf
, _EGLDisplay
*dpy
);
107 _eglUnlinkSurface(_EGLSurface
*surf
);
111 _eglGetSurfaceHandle(_EGLSurface
*);
115 _eglLookupSurface(EGLSurface surf
);
119 * Return true if the surface is linked to a display.
121 static INLINE EGLBoolean
122 _eglIsSurfaceLinked(_EGLSurface
*surf
)
124 return (EGLBoolean
) (_eglGetSurfaceHandle(surf
) != EGL_NO_SURFACE
);
129 * Cast an unsigned int to a pointer.
132 _eglUIntToPointer(unsigned int v
)
134 return (void *) ((uintptr_t) v
);
139 * Cast a pointer to an unsigned int. The pointer must be one that is
140 * returned by _eglUIntToPointer.
142 static INLINE
unsigned int
143 _eglPointerToUInt(const void *p
)
145 return (unsigned int) ((uintptr_t) p
);
149 #endif /* EGLDISPLAY_INCLUDED */