0027349: XtControl_Reader is not thread-safe
[occt.git] / src / InterfaceGraphic / InterfaceGraphic.hxx
... / ...
CommitLineData
1// Copyright (c) 1991-1999 Matra Datavision
2// Copyright (c) 1999-2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef __INTERFACE_GRAPHIC_HXX
16#define __INTERFACE_GRAPHIC_HXX
17
18#if defined(_WIN32)
19
20#include <windows.h>
21
22#ifdef DrawText
23 #undef DrawText
24#endif
25
26#elif !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
27
28#include <stdio.h>
29
30// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion
31#define GL_GLEXT_LEGACY
32#define GLX_GLXEXT_LEGACY
33
34#include <X11/Xlib.h>
35#include <X11/Xutil.h>
36#include <X11/Xatom.h>
37#include <GL/glx.h>
38
39// workaround name conflicts with OCCT methods (in class TopoDS_Shape for example)
40#ifdef Convex
41 #undef Convex
42#endif
43#ifdef Status
44 #undef Status
45#endif
46#ifdef Opposite
47 #undef Opposite
48#endif
49
50#endif
51
52#endif // __INTERFACE_GRAPHIC_HXX