2004-05-17 22:15:10 +00:00
|
|
|
// $Id$
|
|
|
|
//
|
2004-04-10 09:11:03 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
|
|
|
//
|
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Contributor(s):
|
|
|
|
//
|
2004-05-17 22:15:10 +00:00
|
|
|
// Revision History:
|
|
|
|
//
|
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
|
|
|
|
|