eglglobals.h revision 3464ebd5
13464ebd5Sriastradh/**************************************************************************
23464ebd5Sriastradh *
33464ebd5Sriastradh * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
43464ebd5Sriastradh * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
53464ebd5Sriastradh * Copyright 2010-2011 LunarG, Inc.
63464ebd5Sriastradh * All Rights Reserved.
73464ebd5Sriastradh *
83464ebd5Sriastradh * Permission is hereby granted, free of charge, to any person obtaining a
93464ebd5Sriastradh * copy of this software and associated documentation files (the
103464ebd5Sriastradh * "Software"), to deal in the Software without restriction, including
113464ebd5Sriastradh * without limitation the rights to use, copy, modify, merge, publish,
123464ebd5Sriastradh * distribute, sub license, and/or sell copies of the Software, and to
133464ebd5Sriastradh * permit persons to whom the Software is furnished to do so, subject to
143464ebd5Sriastradh * the following conditions:
153464ebd5Sriastradh *
163464ebd5Sriastradh * The above copyright notice and this permission notice (including the
173464ebd5Sriastradh * next paragraph) shall be included in all copies or substantial portions
183464ebd5Sriastradh * of the Software.
193464ebd5Sriastradh *
203464ebd5Sriastradh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
213464ebd5Sriastradh * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
223464ebd5Sriastradh * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
233464ebd5Sriastradh * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
243464ebd5Sriastradh * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
253464ebd5Sriastradh * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
263464ebd5Sriastradh * DEALINGS IN THE SOFTWARE.
273464ebd5Sriastradh *
283464ebd5Sriastradh **************************************************************************/
293464ebd5Sriastradh
303464ebd5Sriastradh
314a49301eSmrg#ifndef EGLGLOBALS_INCLUDED
324a49301eSmrg#define EGLGLOBALS_INCLUDED
334a49301eSmrg
34cdc920a0Smrg
354a49301eSmrg#include "egltypedefs.h"
364a49301eSmrg#include "eglmutex.h"
374a49301eSmrg
384a49301eSmrg
394a49301eSmrg/**
404a49301eSmrg * Global library data
414a49301eSmrg */
424a49301eSmrgstruct _egl_global
434a49301eSmrg{
444a49301eSmrg   _EGLMutex *Mutex;
454a49301eSmrg
464a49301eSmrg   /* the list of all displays */
474a49301eSmrg   _EGLDisplay *DisplayList;
484a49301eSmrg
494a49301eSmrg   EGLint NumAtExitCalls;
504a49301eSmrg   void (*AtExitCalls[10])(void);
514a49301eSmrg};
524a49301eSmrg
534a49301eSmrg
544a49301eSmrgextern struct _egl_global _eglGlobal;
554a49301eSmrg
564a49301eSmrg
574a49301eSmrgextern void
584a49301eSmrg_eglAddAtExitCall(void (*func)(void));
594a49301eSmrg
604a49301eSmrg
614a49301eSmrg#endif /* EGLGLOBALS_INCLUDED */
62