00001 /******************************************************************** 00002 Description: The FrontEnd Thread (FET) 00003 part of the 3Dsia project 00004 created: StonedBones, 7.2.2000 00005 00006 History: 00007 date, name, changes, in funtion 00008 070200 StonedBones created source 00009 200200 Xandi Added plugin support :) 00010 00011 ********************************************************************/ 00012 00013 #include "frontEnd.h" 00014 #include "frontEndThread.h" 00015 00016 #ifdef FRONTEND_TEXTONLY 00017 #include "frontends/textonly/textonlyFrontEnd.h" 00018 #endif 00019 00020 #ifdef FRONTEND_NCURSES 00021 #include "frontends/ncurses/ncursesFrontEnd.h" 00022 #endif 00023 00024 #ifdef FRONTEND_KDE 00025 #include "frontends/kde/kdeFrontEnd.h" 00026 #endif 00027 00028 #ifdef FRONTEND_QT 00029 #include "frontends/qt/qtFrontEnd.h" 00030 #include <qapp.h> 00031 #include <unistd.h> 00032 #endif 00033 00034 00035 #ifdef FRONTEND_PLUGIN 00036 #include "frontends/plugin/pluginFrontEnd.h" 00037 #endif 00038 00039 00040 #include <unistd.h> 00041 #include <pthread.h> 00042 00043 FrontEnd* frontEnd; // use 'extern FrontEnd* frontEnd;' to access the frontend 00044 00045 /*................................................................... 00046 Description: The FrontEnd Thread (FET) creates frontend and keeps it alive 00047 Args: FETArgs* args: various arguments (see header-file) 00048 Returns: <none> 00049 Created: StonedBones, 7.2.2000 00050 [ToDo:] 00051 [Comments:] 00052 Changes: 00053 -------------------------------------------------------------------*/ 00054 00055 00056 00057 void* FrontEndThread (void* argz) 00058 { 00059 FETArgs* args = (FETArgs*) argz; 00060 #ifdef FRONTEND_KDE 00061 frontEnd = new KDEFrontEnd (args->argc, args->argv); 00062 frontEnd->init (); 00063 #endif 00064 00065 #ifdef FRONTEND_NCURSES 00066 frontEnd = new NCursesFrontEnd (args->argc, args->argv); 00067 #endif 00068 00069 #ifdef FRONTEND_PLUGIN 00070 frontEnd = new PlugInFrontEnd (args->argc, args->argv); 00071 frontEnd->init (); 00072 #endif 00073 00074 #ifdef FRONTEND_TEXTONLY 00075 frontEnd = new TextOnlyFrontEnd (args->argc, args->argv); 00076 #endif 00077 00078 00079 #ifdef FRONTEND_QT 00080 frontEnd = new QtFrontEnd (args->argc, args->argv); 00081 frontEnd->init (); 00082 #endif 00083 00084 00085 00086 00087 frontEnd->displayDebugMessage ("FrontEndThread started"); 00088 00089 return argz; 00090 } 00091