1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0023885: Inclusion of X11 header should be protected with macro

X11 headers inclusions have been protected with macro
Remarks fix
This commit is contained in:
dbv
2013-04-12 13:44:46 +04:00
parent 5d05cf31f0
commit 87225ffd03
7 changed files with 20 additions and 145 deletions

View File

@@ -134,10 +134,6 @@ defaultPrompt:
# include <strings.h>
#endif
#include <Draw_WindowBase.hxx>
#include <X11/XWDFile.h>
#include <stdio.h>
#include <tk.h>
@@ -174,10 +170,7 @@ static Standard_Boolean tty; /* Non-zero means standard input is a
static unsigned long thePixels[MAXCOLOR];
Display* Draw_WindowDisplay = NULL;
Standard_Integer Draw_WindowScreen = 0;
Colormap Draw_WindowColorMap;
Standard_Boolean Draw_BlackBackGround = Standard_True;
@@ -187,10 +180,21 @@ Draw_Window* Draw_Window::firstWindow = NULL;
// X11 specific part
#if !defined(__APPLE__) || defined(MACOSX_USE_GLX)
#include <X11/Xutil.h>
#include <Aspect_DisplayConnection.hxx>
Display* Draw_WindowDisplay = NULL;
Colormap Draw_WindowColorMap;
static Handle(Aspect_DisplayConnection) Draw_DisplayConnection;
// Base_Window struct definition
//===================================
struct Base_Window
{
GC gc;
XSetWindowAttributes xswa;
};
//=======================================================================
//function : Draw_Window
//purpose :
@@ -597,6 +601,7 @@ void Draw_Window::Hide()
//=======================================================================
void Draw_Window::Destroy()
{
XFreeGC (Draw_WindowDisplay, base.gc);
XDestroyWindow(Draw_WindowDisplay, win);
win = 0;
if (myBuffer != 0)

View File

@@ -1,41 +0,0 @@
// Created on: 1995-03-17
// Created by: Remi LEQUETTE
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2012 OPEN CASCADE SAS
//
// The content of this file is subject to the Open CASCADE Technology Public
// License Version 6.5 (the "License"). You may not use the content of this file
// except in compliance with the License. Please obtain a copy of the License
// at http://www.opencascade.org and read it completely before using this file.
//
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
//
// The Original Code and all software distributed under the License is
// distributed on an "AS IS" basis, without warranty of any kind, and the
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
#ifndef _Draw_WindowBase_HeaderFile
#define _Draw_WindowBase_HeaderFile
#ifndef WNT
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#endif
// Definition de la class Base_Window
//===================================
struct Base_Window
{
GC gc;
XSetWindowAttributes xswa;
};
#endif

View File

@@ -13,7 +13,6 @@ Draw_Viewer.hxx
Draw_Viewer.hxx
Draw_Window.cxx
Draw_Window.hxx
Draw_WindowBase.hxx
Draw_PInterp.hxx
Draw_CommandFunction.hxx
DrawRessource.h