2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
2004-04-10 09:11:03 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-04-11 04:37:10 +00:00
|
|
|
#ifndef _BOINCGUIAPP_H_
|
|
|
|
#define _BOINCGUIAPP_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "BOINCGUIApp.cpp"
|
|
|
|
#endif
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-04-11 04:12:44 +00:00
|
|
|
#include "MainFrame.h"
|
|
|
|
#include "MainDocument.h"
|
2004-10-25 21:42:47 +00:00
|
|
|
#ifndef NOTASKBAR
|
2004-11-02 04:44:24 +00:00
|
|
|
#include "BOINCTaskBar.h"
|
2004-10-25 21:42:47 +00:00
|
|
|
#endif
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CBOINCGUIApp : public wxApp
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(CBOINCGUIApp)
|
|
|
|
|
|
|
|
protected:
|
2004-04-11 04:37:10 +00:00
|
|
|
int OnExit();
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
void OnInitCmdLine(wxCmdLineParser &parser);
|
|
|
|
bool OnCmdLineParsed(wxCmdLineParser &parser);
|
|
|
|
|
2004-11-17 09:27:06 +00:00
|
|
|
void DetectDefaultWindowStation();
|
|
|
|
void DetectDefaultDesktop();
|
|
|
|
|
2004-11-23 07:45:11 +00:00
|
|
|
bool IsBOINCCoreRunning();
|
|
|
|
void StartupBOINCCore();
|
|
|
|
void ShutdownBOINCCore();
|
|
|
|
|
2004-12-14 02:50:16 +00:00
|
|
|
wxInt32 StartupSystemIdleDetection();
|
|
|
|
wxInt32 ShutdownSystemIdleDetection();
|
|
|
|
|
2004-05-21 06:27:15 +00:00
|
|
|
wxLocale* m_pLocale;
|
|
|
|
wxConfig* m_pConfig;
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
CMainFrame* m_pFrame;
|
|
|
|
CMainDocument* m_pDocument;
|
2004-10-25 21:42:47 +00:00
|
|
|
#ifndef NOTASKBAR
|
2004-10-23 07:13:18 +00:00
|
|
|
CTaskBarIcon* m_pTaskBarIcon;
|
2004-10-25 21:42:47 +00:00
|
|
|
#endif
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-11-23 07:45:11 +00:00
|
|
|
bool m_bBOINCStartedByManager;
|
2004-11-19 08:11:49 +00:00
|
|
|
bool m_bFrameVisible;
|
|
|
|
|
2005-01-07 17:05:21 +00:00
|
|
|
wxInt32 m_lBOINCCoreProcessId;
|
2004-11-23 07:45:11 +00:00
|
|
|
|
2004-12-14 02:50:16 +00:00
|
|
|
#ifdef __WXMSW__
|
2005-01-06 22:25:53 +00:00
|
|
|
HANDLE m_hBOINCCoreProcess;
|
2005-01-07 07:32:23 +00:00
|
|
|
HINSTANCE m_hIdleDetectionDll;
|
2004-12-14 02:50:16 +00:00
|
|
|
#endif
|
|
|
|
|
2004-11-17 09:27:06 +00:00
|
|
|
wxString m_strDefaultWindowStation;
|
|
|
|
wxString m_strDefaultDesktop;
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
bool OnInit();
|
|
|
|
|
2005-01-07 07:32:23 +00:00
|
|
|
wxInt32 UpdateSystemIdleDetection();
|
|
|
|
|
2004-11-17 09:27:06 +00:00
|
|
|
CMainFrame* GetFrame() { return m_pFrame; };
|
|
|
|
CMainDocument* GetDocument() { return m_pDocument; };
|
2004-10-25 21:42:47 +00:00
|
|
|
#ifndef NOTASKBAR
|
2004-11-17 09:27:06 +00:00
|
|
|
CTaskBarIcon* GetTaskBarIcon() { return m_pTaskBarIcon; };
|
2004-10-25 21:42:47 +00:00
|
|
|
#endif
|
2004-10-23 07:13:18 +00:00
|
|
|
|
2004-11-17 09:27:06 +00:00
|
|
|
wxString GetDefaultWindowStation() { return m_strDefaultWindowStation; };
|
|
|
|
wxString GetDefaultDesktop() { return m_strDefaultDesktop; };
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE_APP(CBOINCGUIApp)
|
2004-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
|
2004-04-11 05:09:18 +00:00
|
|
|
#endif
|
|
|
|
|