TerminateGui.c

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------------*/
00002 /* INRIA 2007 */
00003 /* Allan CORNET */
00004 /*-----------------------------------------------------------------------------------*/ 
00005 #include "TerminateGui.h"
00006 /*-----------------------------------------------------------------------------------*/ 
00007 #include "xscion.h"
00008 #include "fromjava.h" /* IsFromJava */
00009 /*-----------------------------------------------------------------------------------*/ 
00010 static int CloseConsoleGUI(void);
00011 /*-----------------------------------------------------------------------------------*/ 
00012 #ifdef _MSC_VER
00013 #include "wsci/wtext.h"
00014 extern LPTW GetTextWinScilab(void);
00015 extern BOOL IsWindowInterface(void);
00016 extern void RestoreConsoleColors(void);
00017 extern int IsFromC(void);
00018 #endif
00019 /*-----------------------------------------------------------------------------------*/ 
00020 BOOL TerminateGUI(void)
00021 {
00022 #ifdef _MSC_VER
00023         if ( IsWindowInterface() ) 
00024         {
00025                 CloseConsoleGUI();
00026         }
00027         else
00028         {
00029                 if ( !IsFromC() && !IsFromJava() )  RestoreConsoleColors();
00030         }
00031 #else
00032         {
00033                 int i = 0 ;
00034                 C2F (xscion) (&i);
00035                 if (i != 0) CloseConsoleGUI();
00036         }
00037 #endif
00038         return TRUE;
00039 }
00040 /*-----------------------------------------------------------------------------------*/ 
00041 static int CloseConsoleGUI(void)
00042 {
00043 #ifdef _MSC_VER
00044         LPTW lptw=GetTextWinScilab();
00045         TextClose (lptw);
00046         TextMessage ();         /* process messages */
00047 #else
00048 
00049 #endif
00050         return 0;
00051 }
00052 /*-----------------------------------------------------------------------------------*/ 

Generated on Sun Mar 4 15:03:54 2007 for Scilab [trunk] by  doxygen 1.5.1