From 872f4e44da31acd2fd63935492f0a0fae2f6efb6 Mon Sep 17 00:00:00 2001 From: dbv Date: Fri, 15 Mar 2013 11:47:42 +0400 Subject: [PATCH] 0023769: Eliminate the dependence on X11 libs on Mac OS X Removed ImageUtility package as it is no longer used. Disabled Xw package building on Mac OS X when Cocoa used. --- adm/UDLIST | 1 - src/ImageUtility/EXTERNLIB | 1 - src/ImageUtility/FILES | 11 - src/ImageUtility/ImageUtility.cdl | 100 ------ src/ImageUtility/ImageUtility.cxx | 244 --------------- src/ImageUtility/ImageUtility_WOKSteps.edl | 35 --- src/ImageUtility/ImageUtility_WOKUMake.edl | 32 -- src/ImageUtility/ImageUtility_X11Display.cxx | 26 -- src/ImageUtility/ImageUtility_X11Display.hxx | 43 --- src/ImageUtility/ImageUtility_X11Dump.cdl | 76 ----- src/ImageUtility/ImageUtility_X11Dump.cxx | 311 ------------------- src/ImageUtility/ImageUtility_X11GC.cxx | 26 -- src/ImageUtility/ImageUtility_X11GC.hxx | 43 --- src/ImageUtility/ImageUtility_X11Window.cxx | 26 -- src/ImageUtility/ImageUtility_X11Window.hxx | 43 --- src/ImageUtility/ImageUtility_X11XImage.cxx | 26 -- src/ImageUtility/ImageUtility_X11XImage.hxx | 43 --- src/ImageUtility/ImageUtility_XPR.cdl | 81 ----- src/ImageUtility/ImageUtility_XPR.cxx | 124 -------- src/ImageUtility/ImageUtility_XWD.cdl | 66 ---- src/ImageUtility/ImageUtility_XWD.cxx | 74 ----- src/ImageUtility/ImageUtility_XWUD.cdl | 81 ----- src/ImageUtility/ImageUtility_XWUD.cxx | 126 -------- src/QADraw/QADraw.cxx | 2 +- src/TKService/PACKAGES | 1 - src/Visual3d/Visual3d_ViewManager.cxx | 39 ++- src/Xw/Xw_CMPLRS.edl | 7 +- src/Xw/Xw_WOKSteps.edl | 7 +- src/Xw/Xw_WOKUMake.edl | 7 +- 29 files changed, 42 insertions(+), 1660 deletions(-) delete mode 100755 src/ImageUtility/EXTERNLIB delete mode 100755 src/ImageUtility/FILES delete mode 100755 src/ImageUtility/ImageUtility.cdl delete mode 100755 src/ImageUtility/ImageUtility.cxx delete mode 100755 src/ImageUtility/ImageUtility_WOKSteps.edl delete mode 100755 src/ImageUtility/ImageUtility_WOKUMake.edl delete mode 100755 src/ImageUtility/ImageUtility_X11Display.cxx delete mode 100755 src/ImageUtility/ImageUtility_X11Display.hxx delete mode 100755 src/ImageUtility/ImageUtility_X11Dump.cdl delete mode 100755 src/ImageUtility/ImageUtility_X11Dump.cxx delete mode 100755 src/ImageUtility/ImageUtility_X11GC.cxx delete mode 100755 src/ImageUtility/ImageUtility_X11GC.hxx delete mode 100755 src/ImageUtility/ImageUtility_X11Window.cxx delete mode 100755 src/ImageUtility/ImageUtility_X11Window.hxx delete mode 100755 src/ImageUtility/ImageUtility_X11XImage.cxx delete mode 100755 src/ImageUtility/ImageUtility_X11XImage.hxx delete mode 100755 src/ImageUtility/ImageUtility_XPR.cdl delete mode 100755 src/ImageUtility/ImageUtility_XPR.cxx delete mode 100755 src/ImageUtility/ImageUtility_XWD.cdl delete mode 100755 src/ImageUtility/ImageUtility_XWD.cxx delete mode 100755 src/ImageUtility/ImageUtility_XWUD.cdl delete mode 100755 src/ImageUtility/ImageUtility_XWUD.cxx diff --git a/adm/UDLIST b/adm/UDLIST index 9108f29a69..9da6e02420 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -210,7 +210,6 @@ p Aspect p DsgPrs p Graphic3d p Image -p ImageUtility p MeshVS p NIS p OpenGl diff --git a/src/ImageUtility/EXTERNLIB b/src/ImageUtility/EXTERNLIB deleted file mode 100755 index 990b6d9cb0..0000000000 --- a/src/ImageUtility/EXTERNLIB +++ /dev/null @@ -1 +0,0 @@ -CSF_XwLibs diff --git a/src/ImageUtility/FILES b/src/ImageUtility/FILES deleted file mode 100755 index f99e031c14..0000000000 --- a/src/ImageUtility/FILES +++ /dev/null @@ -1,11 +0,0 @@ -EXTERNLIB -ImageUtility_WOKSteps.edl -ImageUtility_WOKUMake.edl -ImageUtility_X11Display.hxx -ImageUtility_X11Display.cxx -ImageUtility_X11Window.hxx -ImageUtility_X11Window.cxx -ImageUtility_X11XImage.hxx -ImageUtility_X11XImage.cxx -ImageUtility_X11GC.hxx -ImageUtility_X11GC.cxx diff --git a/src/ImageUtility/ImageUtility.cdl b/src/ImageUtility/ImageUtility.cdl deleted file mode 100755 index 4250218e2d..0000000000 --- a/src/ImageUtility/ImageUtility.cdl +++ /dev/null @@ -1,100 +0,0 @@ --- Created on: 1993-07-27 --- Created by: Jean Louis FRENKEL --- Copyright (c) 1993-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. - - -package ImageUtility - - -uses - TCollection, - Image, - AlienImage, - OSD, - Aspect - -is - - class XPR ; - --- Purpose : perform a "xpr " with a XAlienImage build - -- from any Image , any AlienImage . - - class XWUD ; - --- Purpose : perform a "xwud " with a XAlienImage build - -- from any Image , any AlienImage . - - class XWD ; - --- Purpose : perform a "xwd " and create Image and XAlienImage. - - class X11Dump ; - --- Purpose : Create a X11 Window and perform a XPutImage on it, - -- from any Image , any AlienImage . - - imported X11Window ; - --- Xlib.h : Window type - - imported X11Display ; - --- Xlib.h : Display type - - imported X11XImage ; - --- Xlib.h : XImage type - - imported X11GC ; - --- Xlib.h : XImage type - - PixelDiff( aImage : immutable Image from Image ; - anotherImage : immutable Image from Image ) - returns mutable PseudoColorImage from Image - --- Purpose : Create a Black & White Image from two Image. - -- Resulting Image Pixel is set to 0 if Pixel from - -- both Image are the same else set to 1 . - raises TypeMismatch from Standard; - - PixelColorDiff( aImage : immutable Image from Image ; - anotherImage : immutable Image from Image ) - returns mutable PseudoColorImage from Image - --- Purpose : Create a Black & White Image from two Image. - -- Resulting Image Pixel is set to 0 if PixelColor - -- from both Image are the same else set to 1 . - raises TypeMismatch from Standard; - - PixelColorDiff( aImage : immutable Image from Image ; - anotherImage : immutable Image from Image ; - aCRColorMap : immutable ColorRampColorMap from Aspect ) - returns mutable PseudoColorImage from Image - --- Purpose : Create a ColorRamp Image from two Image. - -- Resulting Image Pixel Index is proportional - -- to the (Red+Green_Blue)Image Differences scaling - -- to the ColorRamp range. - raises TypeMismatch from Standard; - - PixelColorDiff( aImage : immutable Image from Image ; - anotherImage : immutable Image from Image ; - aCRColorMap : immutable ColorRampColorMap from Aspect ; - RedDiff : out mutable PseudoColorImage from Image ; - GreenDiff : out mutable PseudoColorImage from Image ; - BlueDiff : out mutable PseudoColorImage from Image ) - --- Purpose : Create a ColorRamp Images from two Image. - -- Resulting Image Pixel Index is proportional - -- to the Image Differences scaling to the - -- ColorRamp range. - raises TypeMismatch from Standard; - - -end ; diff --git a/src/ImageUtility/ImageUtility.cxx b/src/ImageUtility/ImageUtility.cxx deleted file mode 100755 index f298c721ab..0000000000 --- a/src/ImageUtility/ImageUtility.cxx +++ /dev/null @@ -1,244 +0,0 @@ -// 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. - -// Modified 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM) - -#include -#include -#include - - -#define LOPTIM -#ifndef LOPTIM -static Handle(Aspect_ColorRampColorMap) TheBWColorMap = - new Aspect_ColorRampColorMap(0,2,Quantity_Color(1.,1.,1.,Quantity_TOC_RGB)); -#else -static Handle(Aspect_ColorRampColorMap)& _TheBWColorMap() { - static Handle(Aspect_ColorRampColorMap) TheBWColorMap = - new Aspect_ColorRampColorMap(0,2,Quantity_Color(1.,1.,1.,Quantity_TOC_RGB)); -return TheBWColorMap; -} -#define TheBWColorMap _TheBWColorMap() -#endif // LOPTIM - - -static void Rescale( const Handle(Image_PseudoColorImage) aPImage ) - -{ Aspect_IndexPixel PMin, PMax ; - Standard_Integer dim, base ; - Quantity_Color aColor ; - Standard_Real scale, offset ; ; - - Handle(Aspect_ColorRampColorMap):: - DownCast(aPImage->ColorMap())->ColorRampDefinition( base, dim, aColor ); - - aPImage->Extrema( PMin, PMax ) ; - - if ( PMax.Value() == PMin.Value() ) return ; - - scale = Standard_Real( dim-1 ) / Standard_Real( PMax.Value() - PMin.Value()) ; - offset = Standard_Real( base ) - Standard_Real( PMin.Value() ) * scale ; - - aPImage->Rescale( scale, offset ) ; - -} - -Handle(Image_PseudoColorImage) ImageUtility::PixelColorDiff( - const Handle(Image_Image)& Image1, - const Handle(Image_Image)& Image2 ) -{ - return PixelColorDiff( Image1, Image2, TheBWColorMap ) ; -} - -Handle(Image_PseudoColorImage) ImageUtility::PixelColorDiff( - const Handle(Image_Image)& Image1, - const Handle(Image_Image)& Image2, - const Handle(Aspect_ColorRampColorMap)& TheColorMap ) - -{ Handle(Image_PseudoColorImage) RetImage = NULL ; - Standard_Integer x,y, Error, BasePixel, RampLength ; - Standard_Integer LX, LY, UX, UY ; - Standard_Integer LX1, LY1, UX1, UY1 ; - Standard_Integer LX2, LY2, UX2, UY2 ; - Aspect_IndexPixel aPixel; - Standard_Real r1,g1,b1, r2,g2,b2 ; - Quantity_Color aColor ; - - TheColorMap->ColorRampDefinition( BasePixel, RampLength, aColor ) ; - - Aspect_IndexPixel Pixel0(BasePixel); - Aspect_IndexPixel Pixel1(BasePixel+RampLength-1); - - LX1 = Image1->LowerX() ; - LY1 = Image1->LowerY() ; - - UX1 = Image1->UpperX() ; - UY1 = Image1->UpperY() ; - - LX2 = Image2->LowerX() ; - LY2 = Image2->LowerY() ; - - UX2 = Image2->UpperX() ; - UY2 = Image2->UpperY() ; - - LX = Image1->LowerX() ; LX = Min( LX, Image2->LowerX() ) ; - LY = Image1->LowerY() ; LY = Min( LY, Image2->LowerY() ) ; - - UX = Image1->UpperX() ; UX = Max( UX, Image2->UpperX() ) ; - UY = Image1->UpperY() ; UY = Max( UY, Image2->UpperY() ) ; - - RetImage = new Image_PseudoColorImage( LX, LY, - (UX-LX)+1, (UY-LY)+1, - TheColorMap, - Pixel1 ) ; - - if ( RampLength == 2 ) { //B&W ColorMap - for ( y = LY ; y <= UY ; y++ ) { - for ( x = LX ; x <= UX ; x++ ) { - if ( ( x >= LX1 && x >= LX2 ) && ( x <= UX1 && x <= UX2 ) && - ( y >= LY1 && y >= LY2 ) && ( y <= UY1 && y <= UY2 ) ) { - if ( Image1->PixelColor(x,y) == Image2->PixelColor(x,y) ) { - RetImage->SetPixel( x,y, Pixel0 ) ; - } - } - } - } - } - else { - for ( y = LY ; y <= UY ; y++ ) { - for ( x = LX ; x <= UX ; x++ ) { - if ( ( x >= LX1 && x >= LX2 ) && ( x <= UX1 && x <= UX2 ) && - ( y >= LY1 && y >= LY2 ) && ( y <= UY1 && y <= UY2 ) ) { - Image1->PixelColor(x,y).Values( r1,g1,b1, Quantity_TOC_RGB ) ; - Image2->PixelColor(x,y).Values( r2,g2,b2, Quantity_TOC_RGB ) ; - - Error = BasePixel ; - - Error += - Standard_Integer( (Abs(r1-r2)+Abs(g1-g2)+Abs(b1-b2))/3. - *(RampLength-1) - ); - - aPixel.SetValue( Error ) ; - - RetImage->SetPixel( x,y, aPixel ) ; - } - } - } - Rescale( RetImage ) ; - } - - return RetImage ; -} - -void ImageUtility::PixelColorDiff( - const Handle(Image_Image)& Image1, - const Handle(Image_Image)& Image2, - const Handle(Aspect_ColorRampColorMap)& TheColorMap, - Handle(Image_PseudoColorImage)& RedDiff, - Handle(Image_PseudoColorImage)& GreenDiff, - Handle(Image_PseudoColorImage)& BlueDiff ) - -{ Standard_Integer x,y, Error, BasePixel, RampLength ; - Standard_Integer LX, LY, UX, UY ; - Standard_Integer LX1, LY1, UX1, UY1 ; - Standard_Integer LX2, LY2, UX2, UY2 ; - Aspect_IndexPixel aPixel; - Standard_Real r1,g1,b1, r2,g2,b2 ; - Quantity_Color aColor ; - - TheColorMap->ColorRampDefinition( BasePixel, RampLength, aColor ) ; - - Aspect_IndexPixel Pixel0(BasePixel); - Aspect_IndexPixel Pixel1(BasePixel+RampLength-1); - - LX1 = Image1->LowerX() ; - LY1 = Image1->LowerY() ; - - UX1 = Image1->UpperX() ; - UY1 = Image1->UpperY() ; - - LX2 = Image2->LowerX() ; - LY2 = Image2->LowerY() ; - - UX2 = Image2->UpperX() ; - UY2 = Image2->UpperY() ; - - LX = Image1->LowerX() ; LX = Min( LX, Image2->LowerX() ) ; - LY = Image1->LowerY() ; LY = Min( LY, Image2->LowerY() ) ; - - UX = Image1->UpperX() ; UX = Max( UX, Image2->UpperX() ) ; - UY = Image1->UpperY() ; UY = Max( UY, Image2->UpperY() ) ; - - RedDiff = new Image_PseudoColorImage( LX, LY, - (UX-LX)+1, (UY-LY)+1, - TheColorMap, - Pixel1 ) ; - - GreenDiff = new Image_PseudoColorImage( LX, LY, - (UX-LX)+1, (UY-LY)+1, - TheColorMap, - Pixel1 ) ; - - BlueDiff = new Image_PseudoColorImage( LX, LY, - (UX-LX)+1, (UY-LY)+1, - TheColorMap, - Pixel1 ) ; - - if ( RampLength == 2 ) { //B&W ColorMap - for ( y = LY ; y <= UY ; y++ ) { - for ( x = LX ; x <= UX ; x++ ) { - if ( ( x >= LX1 && x >= LX2 ) && ( x <= UX1 && x <= UX2 ) && - ( y >= LY1 && y >= LY2 ) && ( y <= UY1 && y <= UY2 ) ) { - Image1->PixelColor(x,y).Values( r1,g1,b1, Quantity_TOC_RGB ) ; - Image2->PixelColor(x,y).Values( r2,g2,b2, Quantity_TOC_RGB ) ; - - if ( r1 == r2 ) RedDiff->SetPixel ( x,y, Pixel0 ) ; - if ( g1 == g2 ) GreenDiff->SetPixel( x,y, Pixel0 ) ; - if ( b1 == b2 ) BlueDiff->SetPixel ( x,y, Pixel0 ) ; - } - } - } - } - else { - for ( y = LY ; y <= UY ; y++ ) { - for ( x = LX ; x <= UX ; x++ ) { - if ( ( x >= LX1 && x >= LX2 ) && ( x <= UX1 && x <= UX2 ) && - ( y >= LY1 && y >= LY2 ) && ( y <= UY1 && y <= UY2 ) ) { - Image1->PixelColor(x,y).Values( r1,g1,b1, Quantity_TOC_RGB ) ; - Image2->PixelColor(x,y).Values( r2,g2,b2, Quantity_TOC_RGB ) ; - - Error = BasePixel + Standard_Integer( Abs(r1-r2)*(RampLength-1) ); - - aPixel.SetValue( Error ) ; RedDiff->SetPixel( x,y, aPixel ) ; - - Error = BasePixel + Standard_Integer( Abs(g1-g2)*(RampLength-1) ); - - aPixel.SetValue( Error ) ; GreenDiff->SetPixel( x,y, aPixel ) ; - - Error = BasePixel + Standard_Integer( Abs(b1-b2)*(RampLength-1) ); - - aPixel.SetValue( Error ) ; BlueDiff->SetPixel( x,y, aPixel ) ; - } - } - } - Rescale( RedDiff ) ; - Rescale( GreenDiff ) ; - Rescale( BlueDiff ) ; - } -} diff --git a/src/ImageUtility/ImageUtility_WOKSteps.edl b/src/ImageUtility/ImageUtility_WOKSteps.edl deleted file mode 100755 index ca2e0520ea..0000000000 --- a/src/ImageUtility/ImageUtility_WOKSteps.edl +++ /dev/null @@ -1,35 +0,0 @@ --- Created by: Stephane Callegari --- Copyright (c) 1998-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. - - -@ifnotdefined ( %ImageUtility_WOKSteps_EDL) then - - @set %ImageUtility_WOKSteps_EDL = ""; - - @if ( %Station == "wnt" ) then - - -- Pas d'ImageUtility sur WNT - @set %WOKSteps_ObjGroup = ""; - @set %WOKSteps_DepGroup = ""; - @set %WOKSteps_LibGroup = ""; - @set %WOKSteps_ExecGroup = ""; - - @endif; - -@endif; diff --git a/src/ImageUtility/ImageUtility_WOKUMake.edl b/src/ImageUtility/ImageUtility_WOKUMake.edl deleted file mode 100755 index 3f4173fa42..0000000000 --- a/src/ImageUtility/ImageUtility_WOKUMake.edl +++ /dev/null @@ -1,32 +0,0 @@ --- Created by: Stephane Callegari --- Copyright (c) 1996-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. - - -@ifnotdefined ( %ImageUtility_WOKUMake_EDL) then - - @set %ImageUtility_WOKUMake_EDL = ""; - - @if ( %Station == "wnt" ) then - - -- Pas d'ImageUtility sur WNT - @set %WOKUMake_Steps = "*src xcpp.fill(src) xcpp.src(xcpp.fill) xcpp.header(xcpp.fill) .xcpp.template(xcpp.fill) obj.inc"; - - @endif; - -@endif; diff --git a/src/ImageUtility/ImageUtility_X11Display.cxx b/src/ImageUtility/ImageUtility_X11Display.cxx deleted file mode 100755 index 3f47e627b3..0000000000 --- a/src/ImageUtility/ImageUtility_X11Display.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include - -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11Display) -{ - static Handle(Standard_Type) _atype = - new Standard_Type ("ImageUtility_X11Display", sizeof (ImageUtility_X11Display)); - return _atype; -} diff --git a/src/ImageUtility/ImageUtility_X11Display.hxx b/src/ImageUtility/ImageUtility_X11Display.hxx deleted file mode 100755 index 46f98741bd..0000000000 --- a/src/ImageUtility/ImageUtility_X11Display.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -//============================================================================ -//==== Titre: ImageUtility_X11Display.hxx -//==== Role : The header file of primitve type "X11Display" from package -//==== "AlienImage" -//==== -//==== Implementation: This is a primitive type implemented with typedef -//==== typedef Display ImageUtility_X11Display; -//============================================================================ - -#ifndef _ImageUtility_X11Display_HeaderFile -#define _ImageUtility_X11Display_HeaderFile - -/* - * Data structure used by color operations from - */ -//==== Definition de Type ==================================================== -#include -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11Display); -//============================================================================ - -#include - -typedef Display *ImageUtility_X11Display ; - -#endif diff --git a/src/ImageUtility/ImageUtility_X11Dump.cdl b/src/ImageUtility/ImageUtility_X11Dump.cdl deleted file mode 100755 index 4c6031b310..0000000000 --- a/src/ImageUtility/ImageUtility_X11Dump.cdl +++ /dev/null @@ -1,76 +0,0 @@ --- Created on: 1993-03-23 --- Created by: BBL,JLF --- Copyright (c) 1993-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. - - -class X11Dump from ImageUtility - -uses - X11Display from ImageUtility, - X11Window from ImageUtility, - X11XImage from ImageUtility, - X11GC from ImageUtility, - Image from Image, - AsciiString from TCollection - -raises - TypeMismatch from Standard - -is - Create( DisplayName : AsciiString from TCollection ; - aImage : Image from Image ) - returns X11Dump from ImageUtility ; - ---Level: Internal - ---Purpose : Create a new X11 Display,Window,Colormap,GC,XImage suitable - -- for aImage . - - Create( aX11Dump : X11Dump from ImageUtility ; - aImage : Image from Image ) - returns X11Dump from ImageUtility ; - ---Level: Internal - ---Purpose : Create a new X11 XImage and share Display,Window,Colormap, - -- GC with a previous aX11Dump ; - - X11GC ( me ) - returns X11GC from ImageUtility - is static; - X11Window ( me ) - returns X11Window from ImageUtility - is static; - X11Display ( me ) - returns X11Display from ImageUtility - is static; - X11XImage ( me ) - returns X11XImage from ImageUtility - is static; - - UpdateX11Colormap ( me ) - is static; - UpdateX11XImage ( me : in out ) - is static; - DisplayX11XImage ( me ) - is static; - -fields - myDisplay : X11Display from ImageUtility ; - myWindow : X11Window from ImageUtility ; - myXImage : X11XImage from ImageUtility ; - myGC : X11GC from ImageUtility ; - myImage : Image from Image ; -end ; diff --git a/src/ImageUtility/ImageUtility_X11Dump.cxx b/src/ImageUtility/ImageUtility_X11Dump.cxx deleted file mode 100755 index 50281e088e..0000000000 --- a/src/ImageUtility/ImageUtility_X11Dump.cxx +++ /dev/null @@ -1,311 +0,0 @@ -// 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. - -// Modified 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM) - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - - - -ImageUtility_X11Dump::ImageUtility_X11Dump( - const TCollection_AsciiString& DisplayName , - const Handle(Image_Image)& aImage ) - -{ myImage = aImage ; - - myDisplay = XOpenDisplay( DisplayName.ToCString() ) ; - - XVisualInfo VInfo, *PVinfo ; - int Nitems ; - XSetWindowAttributes WinAttr ; - - Visual *theVisual = DefaultVisual( myDisplay, DefaultScreen( myDisplay ) ); - - VInfo.visualid = theVisual->visualid ; - - PVinfo = XGetVisualInfo( myDisplay, VisualIDMask, &VInfo, &Nitems ) ; - - if ( aImage->Type() == Image_TOI_PseudoColorImage ) { - if ( PVinfo->depth != 8 || PVinfo->c_class != PseudoColor ) { - VInfo.depth = 8 ; - VInfo.c_class = PseudoColor ; - PVinfo = XGetVisualInfo( myDisplay, - VisualDepthMask|VisualClassMask, - &VInfo, &Nitems ) ; - } - } - else { - if ( PVinfo->depth != 24 || PVinfo->c_class != TrueColor ) { - VInfo.depth = 24 ; - VInfo.c_class = TrueColor ; - PVinfo = XGetVisualInfo( myDisplay, - VisualDepthMask|VisualClassMask, - &VInfo, &Nitems ) ; - } - } - - WinAttr.background_pixel = 0 ; - WinAttr.border_pixel = 0 ; - - WinAttr.colormap = XCreateColormap( myDisplay, - RootWindow( myDisplay, - DefaultScreen( myDisplay ) ), - PVinfo->visual, - (PVinfo->c_class==TrueColor)? - AllocNone:AllocAll ) ; - - - myWindow = XCreateWindow( myDisplay, - RootWindow( myDisplay, DefaultScreen( myDisplay ) ), - 0, 0, - ( unsigned int ) aImage->Width(), - ( unsigned int ) aImage->Height(), - 0, - PVinfo->depth, - InputOutput, - PVinfo->visual, - CWBackPixel | CWBorderPixel | CWColormap, &WinAttr ) ; - - myXImage = XCreateImage( myDisplay, - PVinfo->visual, - PVinfo->depth, - ZPixmap, - 0, - NULL, - ( unsigned int ) aImage->Width(), - ( unsigned int ) aImage->Height(), - BitmapPad( myDisplay ), - 0 ) ; - - myGC = XCreateGC( myDisplay, myWindow, 0, NULL ) ; - - XSetPlaneMask( myDisplay, myGC, AllPlanes ) ; - XSetFunction( myDisplay, myGC, GXcopy ) ; - - UpdateX11Colormap() ; - UpdateX11XImage() ; - - XMapWindow( myDisplay, myWindow ) ; - - XFlush( myDisplay ) ; - -} - -ImageUtility_X11Dump::ImageUtility_X11Dump( - const ImageUtility_X11Dump& anOtherX11Dump , - const Handle(Image_Image)& aImage ) - -{ myImage = aImage ; - - myDisplay = anOtherX11Dump.X11Display() ; - - myWindow = anOtherX11Dump.X11Window() ; - - XWindowAttributes WinAttr ; - - XGetWindowAttributes( myDisplay, myWindow, &WinAttr ) ; - - myXImage = XCreateImage( myDisplay, - WinAttr.visual, - WinAttr.depth, - ZPixmap, - 0, - NULL, - ( unsigned int ) aImage->Width(), - ( unsigned int ) aImage->Height(), - BitmapPad( myDisplay ), - 0 ) ; - - myGC = anOtherX11Dump.X11GC() ; - - UpdateX11XImage() ; - - XFlush( myDisplay ) ; -} - -ImageUtility_X11GC ImageUtility_X11Dump::X11GC() const -{ return myGC ; } - -ImageUtility_X11Window ImageUtility_X11Dump::X11Window() const -{ return myWindow ; } - -ImageUtility_X11Display ImageUtility_X11Dump::X11Display() const -{ return myDisplay ; } - -ImageUtility_X11XImage ImageUtility_X11Dump::X11XImage() const -{ return myXImage ; } - -void ImageUtility_X11Dump::UpdateX11Colormap() const - -{ - if ( myImage->Type() != Image_TOI_PseudoColorImage ) return ; - - Handle(Image_PseudoColorImage) aPImage = - Handle(Image_PseudoColorImage)::DownCast( myImage ) ; - Handle(Aspect_ColorMap) TheColorMap = aPImage->ColorMap() ; - Aspect_ColorMapEntry aEntry ; - XColor aColor ; - Standard_Integer i ; - XWindowAttributes WinAttr ; - - XGetWindowAttributes( myDisplay, myWindow, &WinAttr ) ; - - for ( i = 0 ; i < TheColorMap->Size() ; i++ ) { - aEntry = TheColorMap->Entry( i+1 ) ; - - aColor.pixel = aEntry.Index() % WinAttr.visual->map_entries ; - aColor.red = (unsigned short)(aEntry.Color().Red() * 0xffff + 0.5 ); - aColor.green = (unsigned short)(aEntry.Color().Green() * 0xffff + 0.5 ); - aColor.blue = (unsigned short)(aEntry.Color().Blue() * 0xffff + 0.5 ); - aColor.flags = DoRed | DoGreen | DoBlue ; - - XStoreColor( myDisplay, WinAttr.colormap, &aColor ) ; - } -} - -static unsigned int get_range( unsigned long col_mask ) - -{ - while ( !(col_mask & 1) ) col_mask >>= 1 ; - - return( col_mask ) ; -} - -static unsigned int get_shift( unsigned long col_mask , unsigned long rgb_bit ) - -{ long shift ; - - if ( ( col_mask >> rgb_bit ) == 0 ) { - shift = 0 ; - } - else if ( ( col_mask >> ( 2 * rgb_bit ) ) == 0 ) { - shift = rgb_bit ; - } - else { - shift = 2 * rgb_bit ; - } - - return( shift ) ; -} - - -void ImageUtility_X11Dump::UpdateX11XImage() - -{ Standard_Integer x,y, width, height, X, Y, bits_per_line; - - width = myImage->Width() ; - height = myImage->Height() ; - - X = myImage->LowerX() ; - Y = myImage->LowerY() ; - - if ( myXImage->data == NULL || - myXImage->width != width || - myXImage->height != height ) { - if ( myXImage->data != NULL ) { - Standard_Address ToBeFree = ( Standard_Address ) myXImage->data ; - Standard::Free( ToBeFree); - myXImage->data = NULL ; - } - - myXImage->width = width ; - myXImage->height = height ; - bits_per_line = width * myXImage->bits_per_pixel ; - if ( bits_per_line % myXImage->bitmap_pad ) { - bits_per_line += myXImage->bitmap_pad ; - } - - myXImage->bytes_per_line = bits_per_line / 8 ; - - myXImage->data = ( char * ) - Standard::Allocate(myXImage->bytes_per_line*myXImage->height); - } - - if ( myImage->Type() == Image_TOI_PseudoColorImage ) { - char *pl, *p ; - Handle(Image_PseudoColorImage) aPImage = - Handle(Image_PseudoColorImage)::DownCast( myImage ) ; - Image_PixelRowOfDIndexedImage aRow( 0, myImage->Width()-1 ) ; - - for ( y = 0 , pl = myXImage->data ; - y < height ; - y++, pl += myXImage->bytes_per_line ) { - aPImage->Row( X, Y+y, aRow ) ; - for ( x = 0 , p = pl ; x < width ; x++, p++ ) { - *p = ( char ) ( aRow(x).Value() & 0xff ) ; - } - } - } - else { - unsigned int *pl, *p ; - Handle(Image_ColorImage) aCImage = - Handle(Image_ColorImage)::DownCast( myImage ) ; - Image_PixelRowOfDColorImage aRow( 0, myImage->Width()-1 ) ; - - XWindowAttributes WinAttr ; - Standard_Real r,g,b ; - unsigned int lr,lg,lb, rgb_range, r_shift, g_shift, b_shift ; - - XGetWindowAttributes( myDisplay, myWindow, &WinAttr ) ; - - rgb_range = get_range( WinAttr.visual->red_mask ) ; - r_shift = get_shift( WinAttr.visual->red_mask, - WinAttr.visual->bits_per_rgb ) ; - g_shift = get_shift( WinAttr.visual->green_mask, - WinAttr.visual->bits_per_rgb ) ; - b_shift = get_shift( WinAttr.visual->blue_mask, - WinAttr.visual->bits_per_rgb ) ; - - for ( y = 0 , pl = ( unsigned int *) myXImage->data ; - y < height ; - y++, pl += ( myXImage->bytes_per_line/sizeof( unsigned int ) ) ) { - aCImage->Row( X, Y+y, aRow ) ; - for ( x = 0 , p = pl ; x < width ; x++, p++ ) { - aRow(x).Value().Values( r,g,b , Quantity_TOC_RGB ) ; - lr = ( unsigned int ) ( r * ( rgb_range ) +0.5) ; - lg = ( unsigned int ) ( g * ( rgb_range ) +0.5) ; - lb = ( unsigned int ) ( b * ( rgb_range ) +0.5) ; - *p = (lr<width,myXImage->height ) ; - -} - diff --git a/src/ImageUtility/ImageUtility_X11GC.cxx b/src/ImageUtility/ImageUtility_X11GC.cxx deleted file mode 100755 index 85e37eb3d5..0000000000 --- a/src/ImageUtility/ImageUtility_X11GC.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include - -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11GC) -{ - static Handle(Standard_Type) _atype = - new Standard_Type ("ImageUtility_X11GC", sizeof (ImageUtility_X11GC)); - return _atype; -} diff --git a/src/ImageUtility/ImageUtility_X11GC.hxx b/src/ImageUtility/ImageUtility_X11GC.hxx deleted file mode 100755 index a4bf4497a3..0000000000 --- a/src/ImageUtility/ImageUtility_X11GC.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -//============================================================================ -//==== Titre: ImageUtility_X11GC.hxx -//==== Role : The header file of primitve type "X11GC" from package -//==== "ImageUtility" -//==== -//==== Implementation: This is a primitive type implemented with typedef -//==== typedef GC ImageUtility_X11GC; -//============================================================================ - -#ifndef _ImageUtility_X11GC_HeaderFile -#define _ImageUtility_X11GC_HeaderFile - -/* - * Data structure used by color operations from - */ -//==== Definition de Type ==================================================== -#include -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11GC); -//============================================================================ - -#include - -typedef GC ImageUtility_X11GC ; - -#endif diff --git a/src/ImageUtility/ImageUtility_X11Window.cxx b/src/ImageUtility/ImageUtility_X11Window.cxx deleted file mode 100755 index a7b623b88c..0000000000 --- a/src/ImageUtility/ImageUtility_X11Window.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include - -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11Window) -{ - static Handle(Standard_Type) _atype = - new Standard_Type ("ImageUtility_X11Window", sizeof (ImageUtility_X11Window)); - return _atype; -} diff --git a/src/ImageUtility/ImageUtility_X11Window.hxx b/src/ImageUtility/ImageUtility_X11Window.hxx deleted file mode 100755 index da5ebd6416..0000000000 --- a/src/ImageUtility/ImageUtility_X11Window.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -//============================================================================ -//==== Titre: ImageUtility_X11Window.hxx -//==== Role : The header file of primitve type "X11Window" from package -//==== "ImageUtility" -//==== -//==== Implementation: This is a primitive type implemented with typedef -//==== typedef Window ImageUtility_X11Window; -//============================================================================ - -#ifndef _ImageUtility_X11Window_HeaderFile -#define _ImageUtility_X11Window_HeaderFile - -/* - * Data structure used by color operations from - */ -//==== Definition de Type ==================================================== -#include -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11Window); -//============================================================================ - -#include - -typedef Window ImageUtility_X11Window ; - -#endif diff --git a/src/ImageUtility/ImageUtility_X11XImage.cxx b/src/ImageUtility/ImageUtility_X11XImage.cxx deleted file mode 100755 index c806aae3ee..0000000000 --- a/src/ImageUtility/ImageUtility_X11XImage.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include - -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11XImage) -{ - static Handle(Standard_Type) _atype = - new Standard_Type ("ImageUtility_X11XImage", sizeof (ImageUtility_X11XImage)); - return _atype; -} diff --git a/src/ImageUtility/ImageUtility_X11XImage.hxx b/src/ImageUtility/ImageUtility_X11XImage.hxx deleted file mode 100755 index 3809aed695..0000000000 --- a/src/ImageUtility/ImageUtility_X11XImage.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -//============================================================================ -//==== Titre: ImageUtility_X11XImage.hxx -//==== Role : The header file of primitve type "X11XImage" from package -//==== "ImageUtility" -//==== -//==== Implementation: This is a primitive type implemented with typedef -//==== typedef XImage ImageUtility_X11XImage; -//============================================================================ - -#ifndef _ImageUtility_X11XImage_HeaderFile -#define _ImageUtility_X11XImage_HeaderFile - -/* - * Data structure used by color operations from - */ -//==== Definition de Type ==================================================== -#include -const Handle(Standard_Type)& STANDARD_TYPE(ImageUtility_X11XImage); -//============================================================================ - -#include - -typedef XImage *ImageUtility_X11XImage ; - -#endif diff --git a/src/ImageUtility/ImageUtility_XPR.cdl b/src/ImageUtility/ImageUtility_XPR.cdl deleted file mode 100755 index ae0e6246d1..0000000000 --- a/src/ImageUtility/ImageUtility_XPR.cdl +++ /dev/null @@ -1,81 +0,0 @@ --- Created on: 1993-03-23 --- Created by: BBL,JLF --- Copyright (c) 1993-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. - - -class XPR from ImageUtility - - ---Version: 0.0 - - ---Purpose: Performs a "xpr" with a XAlienImage build - -- from any Image , any AlienImage . - - ---Keywords: - ---Warning: - ---References: - -uses - AlienUserImage from AlienImage, - XAlienImage from AlienImage, - File from OSD, - Image from Image - -raises - TypeMismatch from Standard - -is - XPR ( myclass ; aImage : in Image from Image; - aName : CString from Standard; - xprOptions : CString from Standard - = "" ) ; - ---Level: Internal - ---Purpose: Write content of a Image object to aTmpFile and - -- execute a Spawn "xpr xprOptions aTmpFile | lpr &" . - - XPR ( myclass ; aAlienUserImage : in AlienUserImage from AlienImage; - aName : CString from Standard ; - xprOptions : CString from Standard - = "" ) ; - ---Level: Internal - ---Purpose: Write content of a AlienImage object to aTmpFile and - -- execute a Spawn "xpr xprOptions aTmpFile| lpr &" . - - XPR ( myclass ; aXAlienImage : in XAlienImage from AlienImage ; - xprOptions : CString from Standard - = "" ) ; - ---Level: Internal - ---Purpose: Write content of a XAlienImage object to aTmpFile and - -- execute a Spawn "xpr xprOptions aTmpFile| lpr &" . - - XPR ( myclass ; aFile : in File from OSD ; - xprOptions : CString from Standard - = "" ) ; - ---Level: Internal - ---Purpose: execute a Spawn - -- "xpr xprOptions /aFile.SystemName()/ | lpr &" . - - XPR ( myclass ; aFileName : CString from Standard ; - xprOptions : CString from Standard - = "" ) ; - ---Level: Internal - ---Purpose: execute a Spawn "xpr xprOptions aFileName | lpr &" . - - - -end ; diff --git a/src/ImageUtility/ImageUtility_XPR.cxx b/src/ImageUtility/ImageUtility_XPR.cxx deleted file mode 100755 index a38a89b469..0000000000 --- a/src/ImageUtility/ImageUtility_XPR.cxx +++ /dev/null @@ -1,124 +0,0 @@ -// 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. - -// Modified 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM) - -#include -#include -#include -#include -#include - -#define LOPTIM -#ifndef LOPTIM -static Handle(AlienImage_XAlienImage) XAlienImage = new AlienImage_XAlienImage(); -#else -static Handle(AlienImage_XAlienImage)& _XAlienImage() { - static Handle(AlienImage_XAlienImage) XAlienImage = new AlienImage_XAlienImage(); -return XAlienImage; -} -#define XAlienImage _XAlienImage() -#endif // LOPTIM - -void ImageUtility_XPR::XPR( - const Handle(AlienImage_AlienUserImage)& aAlienImage, - const Standard_CString aName, - const Standard_CString xprOptions ) -{ if ( aAlienImage->IsKind(STANDARD_TYPE(AlienImage_XAlienImage) ) ) { - Handle(AlienImage_XAlienImage) aXImage = - Handle(AlienImage_XAlienImage)::DownCast(aAlienImage) ; - - aXImage->SetName( TCollection_AsciiString( aName ) ) ; - - XPR( aXImage, xprOptions ) ; - } - else { - XPR( aAlienImage->ToImage(), aName, xprOptions ) ; - } -} - -void ImageUtility_XPR::XPR( const Handle(Image_Image)& aImage, - const Standard_CString aName, - const Standard_CString xprOptions ) - -{ XAlienImage->Clear() ; - XAlienImage->FromImage( aImage ) ; - - XAlienImage->SetName( TCollection_AsciiString( aName ) ) ; - - XPR( XAlienImage, xprOptions ) ; -} - -void ImageUtility_XPR::XPR( - const Handle(AlienImage_XAlienImage)& aXImage, - const Standard_CString xprOptions ) - -{ - OSD_File File = OSD_File::BuildTemporary() ; - -#ifdef TRACE - OSD_Path Path ; - TCollection_AsciiString Name ; - - File.Path(Path) ; - - Path.SystemName( Name ) ; - - cout << "BuildTemporaryFile :" << Name << endl << flush ; -#endif - - aXImage->Write( File ) ; - - File.Close() ; - - XPR( File, xprOptions ) ; -} - - -void ImageUtility_XPR::XPR( const OSD_File& File, - const Standard_CString xprOptions ) - -{ - TCollection_AsciiString s, Name ; - OSD_Path Path ; - OSD_Process Process ; - - File.Path( Path ) ; - - Path.SystemName( Name, OSD_Default ) ; - - XPR( Name.ToCString(), xprOptions ) ; -} - -void ImageUtility_XPR::XPR( const Standard_CString aName, - const Standard_CString xprOptions ) - -{ - TCollection_AsciiString s; - OSD_Process Process ; - - s = TCollection_AsciiString("xpr ") - + TCollection_AsciiString(xprOptions) - + TCollection_AsciiString(" ") - + aName - + TCollection_AsciiString( " | lpr &" ); - - Process.Spawn( s ) ; - -} - diff --git a/src/ImageUtility/ImageUtility_XWD.cdl b/src/ImageUtility/ImageUtility_XWD.cdl deleted file mode 100755 index 7b1c2c2aa9..0000000000 --- a/src/ImageUtility/ImageUtility_XWD.cdl +++ /dev/null @@ -1,66 +0,0 @@ --- Created on: 1993-03-23 --- Created by: BBL,JLF --- Copyright (c) 1993-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. - - -class XWD from ImageUtility - - ---Version: 0.0 - - ---Purpose: Performs a "xwd" and creates a XAlienImage and an Image - - ---Keywords: - ---Warning: - ---References: - -uses - XAlienImage from AlienImage, - File from OSD, - Image from Image - -raises - TypeMismatch from Standard - -is - Create returns XWD from ImageUtility ; - ---Level: Internal - ---Purpose: Create a XWD object . - - XWD( me : in out ; xwdOptions : CString from Standard = "" ) - returns Boolean from Standard - is static; - ---Level: Internal - ---Purpose: execute a Spawn "xwd xwudOptions -out aTmpFile" . - - XAlienImage( me ) - returns XAlienImage from AlienImage - is static; - ---Level: Internal - ---Purpose: returns the XAlienImage created from "xwd". - - Image( me ) - returns Image from Image - is static; - ---Level: Internal - ---Purpose: returns the Image created from "xwd". - -fields - myXAlienImage : XAlienImage from AlienImage; - myImage : Image from Image; -end ; diff --git a/src/ImageUtility/ImageUtility_XWD.cxx b/src/ImageUtility/ImageUtility_XWD.cxx deleted file mode 100755 index 0f0696574f..0000000000 --- a/src/ImageUtility/ImageUtility_XWD.cxx +++ /dev/null @@ -1,74 +0,0 @@ -// 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. - -#include -#include -#include -#include -#include - -ImageUtility_XWD::ImageUtility_XWD() - -{ myXAlienImage = NULL ; - myImage = NULL ; -} - -Handle(Image_Image) ImageUtility_XWD::Image() const -{ return myImage ; } - -Handle(AlienImage_XAlienImage) ImageUtility_XWD::XAlienImage() const -{ return myXAlienImage; } - -Standard_Boolean ImageUtility_XWD::XWD( const Standard_CString xwdOptions ) - -{ Standard_Boolean RetStatus ; - - OSD_File File = OSD_File::BuildTemporary() ; - - TCollection_AsciiString s, Name ; - OSD_Path Path ; - OSD_Process Process ; - - File.Path( Path ) ; - - Path.SystemName( Name, OSD_Default ) ; - -#ifdef TRACE - cout << "BuildTemporaryFile :" << Name << endl << flush ; -#endif - - s = TCollection_AsciiString("xwd ") - + TCollection_AsciiString(xwdOptions) - + TCollection_AsciiString(" -out ") - + Name ; - - Process.Spawn( s ) ; - - myXAlienImage = new AlienImage_XAlienImage() ; - - if (( RetStatus = myXAlienImage->Read( File ) )) { - myImage = myXAlienImage->ToImage() ; - } - else { - myImage = NULL ; - myXAlienImage = NULL ; - } - - return RetStatus ; -} - diff --git a/src/ImageUtility/ImageUtility_XWUD.cdl b/src/ImageUtility/ImageUtility_XWUD.cdl deleted file mode 100755 index 013b53843b..0000000000 --- a/src/ImageUtility/ImageUtility_XWUD.cdl +++ /dev/null @@ -1,81 +0,0 @@ --- Created on: 1993-03-23 --- Created by: BBL,JLF --- Copyright (c) 1993-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. - - -class XWUD from ImageUtility - - ---Version: 0.0 - - ---Purpose: Performs a "xwud -noclick" with a XAlienImage build - -- from any Image , any AlienImage . - - ---Keywords: - ---Warning: - ---References: - -uses - AlienUserImage from AlienImage, - XAlienImage from AlienImage, - File from OSD, - Image from Image - -raises - TypeMismatch from Standard - -is - XWUD( myclass ; aImage : in Image from Image; - aName : CString from Standard; - xwudOptions : CString from Standard - = "-new -noclick" ) ; - ---Level: Internal - ---Purpose: Write content of a Image object to aTmpFile and - -- execute a Spawn "xwud xwudOptions -in aTmpFile &" . - - XWUD( myclass ; aAlienUserImage : in AlienUserImage from AlienImage; - aName : CString from Standard ; - xwudOptions : CString from Standard - = "-new -noclick" ) ; - ---Level: Internal - ---Purpose: Write content of a AlienImage object to aTmpFile and - -- execute a Spawn "xwud xwudOptions -in aTmpFile &" . - - XWUD( myclass ; aXAlienImage : in XAlienImage from AlienImage ; - xwudOptions : CString from Standard - = "-new -noclick" ) ; - ---Level: Internal - ---Purpose: Write content of a XAlienImage object to aTmpFile and - -- execute a Spawn "xwud xwudOptions -in aTmpFile &" . - - XWUD( myclass ; aFile : in File from OSD ; - xwudOptions : CString from Standard - = "-new -noclick" ) ; - ---Level: Internal - ---Purpose: execute a Spawn - -- "xwud -new -noclick -in /aFile.SystemName()/ &" . - - XWUD( myclass ; aFileName : CString from Standard ; - xwudOptions : CString from Standard - = "-new -noclick" ) ; - ---Level: Internal - ---Purpose: execute a Spawn "xwud xwudOptions -in aFileName &" . - - - -end ; diff --git a/src/ImageUtility/ImageUtility_XWUD.cxx b/src/ImageUtility/ImageUtility_XWUD.cxx deleted file mode 100755 index ddacc9ad52..0000000000 --- a/src/ImageUtility/ImageUtility_XWUD.cxx +++ /dev/null @@ -1,126 +0,0 @@ -// 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. - -// Modified 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM) - -#include -#include -#include -#include -#include - -#define LOPTIM -#ifndef LOPTIM -static Handle(AlienImage_XAlienImage) XAlienImage = new AlienImage_XAlienImage(); -#else -static Handle(AlienImage_XAlienImage)& _XAlienImage() { - static Handle(AlienImage_XAlienImage) XAlienImage = new AlienImage_XAlienImage(); -return XAlienImage; -} -#define XAlienImage _XAlienImage() -#endif // LOPTIM - -void ImageUtility_XWUD::XWUD( - const Handle(AlienImage_AlienUserImage)& aAlienImage, - const Standard_CString aName, - const Standard_CString xwudOptions ) - -{ - if ( aAlienImage->IsKind(STANDARD_TYPE(AlienImage_XAlienImage) ) ) { - Handle(AlienImage_XAlienImage) aXImage = - Handle(AlienImage_XAlienImage)::DownCast(aAlienImage) ; - - aXImage->SetName( TCollection_AsciiString( aName ) ) ; - - XWUD( aXImage, xwudOptions ) ; - } - else { - XWUD( aAlienImage->ToImage(), aName, xwudOptions ) ; - } -} - -void ImageUtility_XWUD::XWUD( const Handle(Image_Image)& aImage, - const Standard_CString aName, - const Standard_CString xwudOptions ) - -{ XAlienImage->Clear() ; - XAlienImage->FromImage( aImage ) ; - - XAlienImage->SetName( TCollection_AsciiString( aName ) ) ; - - XWUD( XAlienImage, xwudOptions ) ; -} - -void ImageUtility_XWUD::XWUD( - const Handle(AlienImage_XAlienImage)& aXImage, - const Standard_CString xwudOptions ) - -{ - OSD_File File = OSD_File::BuildTemporary() ; - -#ifdef TRACE - OSD_Path Path ; - TCollection_AsciiString Name ; - - File.Path(Path) ; - - Path.SystemName( Name ) ; - - cout << "BuildTemporaryFile :" << Name << endl << flush ; -#endif - - aXImage->Write( File ) ; - - File.Close() ; - - XWUD( File, xwudOptions ) ; -} - - -void ImageUtility_XWUD::XWUD( const OSD_File& File, - const Standard_CString xwudOptions ) - -{ - TCollection_AsciiString s, Name ; - OSD_Path Path ; - OSD_Process Process ; - - File.Path( Path ) ; - - Path.SystemName( Name, OSD_Default ) ; - - XWUD( Name.ToCString(), xwudOptions ) ; -} - -void ImageUtility_XWUD::XWUD( const Standard_CString aName, - const Standard_CString xwudOptions ) - -{ - TCollection_AsciiString s; - OSD_Process Process ; - - s = TCollection_AsciiString("xwud ") - + TCollection_AsciiString(xwudOptions) - + TCollection_AsciiString(" -in ") - + aName - + TCollection_AsciiString( "&" ); - - Process.Spawn( s ) ; - -} - diff --git a/src/QADraw/QADraw.cxx b/src/QADraw/QADraw.cxx index d69cbf04f4..5cdfb951b6 100755 --- a/src/QADraw/QADraw.cxx +++ b/src/QADraw/QADraw.cxx @@ -450,7 +450,7 @@ static Standard_Integer QAAISGetMousePoint (Draw_Interpretor& di, Standard_Integ static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { -#if ! defined(WNT) +#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) if ( argc > 1 ) { di << "Usage : " << argv[0] << "\n"; return 1; diff --git a/src/TKService/PACKAGES b/src/TKService/PACKAGES index 4ace95d0e5..5d49f741c8 100755 --- a/src/TKService/PACKAGES +++ b/src/TKService/PACKAGES @@ -4,7 +4,6 @@ SelectBasics Xw AlienImage Image -ImageUtility WNT Cocoa TColQuantity diff --git a/src/Visual3d/Visual3d_ViewManager.cxx b/src/Visual3d/Visual3d_ViewManager.cxx index 96d0ad3d41..409ddb641c 100755 --- a/src/Visual3d/Visual3d_ViewManager.cxx +++ b/src/Visual3d/Visual3d_ViewManager.cxx @@ -75,11 +75,13 @@ #include #include -#ifndef WNT -# include -#else +#if defined (_WIN32) || defined(__WIN32__) # include -#endif // WNT +#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX) +# include +#else +# include +#endif //-Aliases @@ -954,15 +956,17 @@ Standard_Boolean Exist = Standard_False; // Parse the list of views to find // a view with the specified window Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView); - int TheWindowIdOfView; -#ifndef WNT -const Handle(Xw_Window) THEWindow = *(Handle(Xw_Window) *) &AWindow; - int TheSpecifiedWindowId = int (THEWindow->XWindow ()); +#if defined(_WIN32) || defined(__WIN32__) + const Handle(WNT_Window) THEWindow = Handle(WNT_Window)::DownCast (AWindow); + int TheSpecifiedWindowId = int (THEWindow->HWindow ()); +#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX) + const Handle(Cocoa_Window) THEWindow = Handle(Cocoa_Window)::DownCast (AWindow); + NSView* TheSpecifiedWindowId = THEWindow->HView(); #else -const Handle(WNT_Window) THEWindow = *(Handle(WNT_Window) *) &AWindow; - int TheSpecifiedWindowId = int (THEWindow->HWindow ()); -#endif // WNT + const Handle(Xw_Window) THEWindow = Handle(Xw_Window)::DownCast (AWindow); + int TheSpecifiedWindowId = int (THEWindow->XWindow ()); +#endif while ((! Exist) && (MyIterator.More ())) { @@ -970,12 +974,15 @@ const Handle(WNT_Window) THEWindow = *(Handle(WNT_Window) *) &AWindow; ((MyIterator.Value ())->IsActive ()) ) { const Handle(Aspect_Window) AspectWindow = (MyIterator.Value ())->Window (); -#ifndef WNT -const Handle(Xw_Window) theWindow = *(Handle(Xw_Window) *) &AspectWindow; - TheWindowIdOfView = int (theWindow->XWindow ()); +#if defined(_WIN32) || defined(__WIN32__) + const Handle(WNT_Window) theWindow = Handle(WNT_Window)::DownCast (AspectWindow); + int TheWindowIdOfView = int (theWindow->HWindow ()); +#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX) + const Handle(Cocoa_Window) theWindow = Handle(Cocoa_Window)::DownCast (AspectWindow); + NSView* TheWindowIdOfView = theWindow->HView(); #else -const Handle(WNT_Window) theWindow = *(Handle(WNT_Window) *) &AspectWindow; - TheWindowIdOfView = int (theWindow->HWindow ()); + const Handle(Xw_Window) theWindow = Handle(Xw_Window)::DownCast (AspectWindow); + int TheWindowIdOfView = int (theWindow->XWindow ()); #endif // WNT // Comparaison on window IDs if (TheWindowIdOfView == TheSpecifiedWindowId) { diff --git a/src/Xw/Xw_CMPLRS.edl b/src/Xw/Xw_CMPLRS.edl index c47b227ce3..7b154e4b88 100755 --- a/src/Xw/Xw_CMPLRS.edl +++ b/src/Xw/Xw_CMPLRS.edl @@ -21,7 +21,12 @@ @uses "CSF.edl"; - @if ( %Station == "wnt" ) then +-- Use GLX or Cocoa +@ifnotdefined ( %MACOSX_USE_GLX ) then + @set %MACOSX_USE_GLX = "${MACOSX_USE_GLX}"; +@endif; + + @if ( %Station == "wnt" || (%Station == "mac" && %MACOSX_USE_GLX != "true")) then -- Pas de compile sur WNT @set %WOKUMake_Steps = "src"; @endif; diff --git a/src/Xw/Xw_WOKSteps.edl b/src/Xw/Xw_WOKSteps.edl index a4026920e5..7527a77686 100755 --- a/src/Xw/Xw_WOKSteps.edl +++ b/src/Xw/Xw_WOKSteps.edl @@ -23,8 +23,13 @@ @ifnotdefined ( %Xw_WOKSteps_EDL ) then ---@set %Xw_WOKSteps_EDL = ""; +-- Use GLX or Cocoa +@ifnotdefined ( %MACOSX_USE_GLX ) then + @set %MACOSX_USE_GLX = "${MACOSX_USE_GLX}"; +@endif; + --- Insert your stuff Here -@if ( %Station == "wnt" ) then +@if ( %Station == "wnt" || (%Station == "mac" && %MACOSX_USE_GLX != "true")) then -- Pas d'Xw sur Windows NT @set %WOKSteps_ObjGroup = ""; @set %WOKSteps_DepGroup = ""; diff --git a/src/Xw/Xw_WOKUMake.edl b/src/Xw/Xw_WOKUMake.edl index 8165ac706b..634fb4cc52 100755 --- a/src/Xw/Xw_WOKUMake.edl +++ b/src/Xw/Xw_WOKUMake.edl @@ -22,9 +22,14 @@ sss @ifnotdefined ( %Xw_WOKUMake_EDL ) then @set %Xw_WOKUMake_EDL = ""; +-- Use GLX or Cocoa +@ifnotdefined ( %MACOSX_USE_GLX ) then + @set %MACOSX_USE_GLX = "${MACOSX_USE_GLX}"; +@endif; + --- Insert your stuff Here -@if ( %Station == "wnt" ) then +@if ( %Station == "wnt" || (%Station == "mac" && %MACOSX_USE_GLX != "true")) then @set %WOKUMake_Steps = "*src xcpp.fill(src) xcpp.src(xcpp.fill) xcpp.header(xcpp.fill) .xcpp.template(xcpp.fill) obj.inc"; @endif; @endif;