Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mesa / src / egl / main / eglscreen.h
blob5e2f6579e625c670c49f1396e75d51ff52879143
1 /**************************************************************************
3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
5 * Copyright 2010 LunarG, Inc.
6 * All Rights Reserved.
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:
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.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 * DEALINGS IN THE SOFTWARE.
28 **************************************************************************/
31 #ifndef EGLSCREEN_INCLUDED
32 #define EGLSCREEN_INCLUDED
35 #include "egltypedefs.h"
38 #ifdef EGL_MESA_screen_surface
41 #define _EGL_SCREEN_MAX_MODES 16
44 /**
45 * Per-screen information.
46 * Note that an EGL screen doesn't have a size. A screen may be set to
47 * one of several display modes (width/height/scanrate). The screen
48 * then displays a drawing surface. The drawing surface must be at least
49 * as large as the display mode's resolution. If it's larger, the
50 * OriginX and OriginY fields control what part of the surface is visible
51 * on the screen.
53 struct _egl_screen
55 _EGLDisplay *Display;
57 EGLScreenMESA Handle; /* The public/opaque handle which names this object */
59 _EGLMode *CurrentMode;
60 _EGLSurface *CurrentSurface;
62 EGLint OriginX, OriginY; /**< Origin of scan-out region w.r.t. surface */
63 EGLint StepX, StepY; /**< Screen position/origin granularity */
65 EGLint NumModes;
66 _EGLMode *Modes; /**< array [NumModes] */
70 PUBLIC void
71 _eglInitScreen(_EGLScreen *screen, _EGLDisplay *dpy, EGLint num_modes);
74 PUBLIC EGLScreenMESA
75 _eglLinkScreen(_EGLScreen *screen);
78 extern _EGLScreen *
79 _eglLookupScreen(EGLScreenMESA screen, _EGLDisplay *dpy);
82 /**
83 * Return the handle of a linked screen.
85 static INLINE EGLScreenMESA
86 _eglGetScreenHandle(_EGLScreen *screen)
88 return (screen) ? screen->Handle : (EGLScreenMESA) 0;
92 extern EGLBoolean
93 _eglGetScreensMESA(_EGLDriver *drv, _EGLDisplay *dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
96 extern EGLBoolean
97 _eglScreenPositionMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, EGLint x, EGLint y);
100 extern EGLBoolean
101 _eglQueryScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy,
102 _EGLScreen *scrn, _EGLSurface **surface);
105 extern EGLBoolean
106 _eglQueryScreenModeMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, _EGLMode **m);
109 extern EGLBoolean
110 _eglQueryScreenMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, EGLint attribute, EGLint *value);
113 #endif /* EGL_MESA_screen_surface */
116 #endif /* EGLSCREEN_INCLUDED */