00001 00002 // This code is part of the MaiaProject free software 00003 // 00004 // Keyboard and Mouse Emulator - Virtual keyboard Engine 00005 // 00006 // Copyright (c) 2002-2003 Luca Clivio <luca.clivio@maiaproject.org> 00007 // Tel. +39-347-2538040 00008 // via B.Croce 2, 20037 Paderno Dugnano (Milano) - Italy 00009 // 00010 // Developers: 00011 // Simone Mangano <simone.mangano@maiaproject.org> 00012 // Andrea Tosato <andrea.tosato@maiaproject.org> 00013 // 00014 // ----------------------------------------------------------------------------- 00015 // This program is free software; This program is free software; 00016 // you can redistribute it and/or modify it under the terms of the 00017 // GNU General Public License as published by the Free Software Foundation; 00018 // either version 2 of the License, or (at your option) any later version. 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // You should have received a copy of the GNU General Public License 00023 // along with this program; if not, write to the Free Software 00024 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00026 00027 00028 #ifndef _openmaiaMain_ 00029 #define _openmaiaMain_ 00030 00031 #include "openmaiaConstants.h" 00032 00033 00034 #include <wx/wx.h> 00035 #include <wx/socket.h> 00036 #include <wx/process.h> 00037 #include <wx/hashmap.h> 00038 #include <wx/xrc/xmlres.h> 00039 00040 #include <openmaia/libopenmaia.h> 00041 00042 class openmaiaFrame; 00043 class openmaiaServer; 00044 class openmaiaOptions; 00045 class openmaiaProcessesHandler; 00046 00047 #include "openmaiaFrame.h" 00048 #include "openmaiaServer.h" 00049 #include "openmaiaOptions.h" 00050 #include "openmaiaProcessesHandler.h" 00051 00052 00053 #include <vector> 00054 #include <iostream> 00055 #include <fstream> 00056 00057 #include <stdio.h> /* for printf */ 00058 #include <stdlib.h> /* for exit */ 00059 #include <getopt.h> 00060 00061 00062 #define MOUSE_TIMER_ID 1 00063 00069 class openmaiaMain: public wxApp 00070 { 00071 public: 00072 wxString binPath; 00073 wxString currentProfileName; 00074 00075 virtual bool OnInit(); 00076 virtual int OnExit() ; 00077 00078 // frame interface 00079 void LoadProfile(wxString); 00080 void StartProfile(); 00081 void StopProfile(); 00082 void StartConfigurator(wxString); 00083 void SetParameter(wxString, wxString); 00084 void Exit(); 00085 void SaveOptions(); 00086 void SetSubprocessParameters(); 00087 00088 // process handler interface 00089 void NotifyProcessStop(wxString); 00090 00091 00092 openmaiaFrame *mainFrame ; 00093 openmaiaServer *server; 00094 openmaiaOptions *options; 00095 openmaiaProcessesHandler *processesHandler; 00096 00097 private: 00098 bool inDeveloperTree; 00099 00100 wxTimer *timerIdleWakeUp; 00101 00102 00103 00104 wxString processOptions; 00105 00106 00107 // ---------------------------------------------------------------- private methods --- 00108 00109 void OnTimer(wxTimerEvent& WXUNUSED(event)); 00110 00111 00112 00113 00114 DECLARE_EVENT_TABLE() 00115 00116 } ; 00117 00118 DECLARE_APP(openmaiaMain) 00119 00120 00121 #endif // _openmaiaMain_
Copyright © by Luca Clivio |