2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2002-08-12 22:29:38 +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.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// 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
|
2002-08-12 22:29:38 +00:00
|
|
|
|
|
|
|
#include <Carbon/Carbon.h>
|
2003-02-18 22:46:08 +00:00
|
|
|
#include "error_numbers.h"
|
|
|
|
#include "filesys.h"
|
|
|
|
|
2003-06-06 22:08:46 +00:00
|
|
|
#define kBOINCDataBrowserSig 'duff'
|
2003-02-18 22:46:08 +00:00
|
|
|
|
2003-06-06 22:08:46 +00:00
|
|
|
#define TAB_ID 128
|
|
|
|
#define TAB_SIGNATURE 'tabs'
|
2003-02-18 22:46:08 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
kBOINCCommandJoin = 'join',
|
2003-03-10 19:17:54 +00:00
|
|
|
kBOINCShowGraphics = 'sgfx',
|
|
|
|
kBOINCClearMessages = 'clms',
|
2003-02-18 22:46:08 +00:00
|
|
|
kBOINCCommandQuitProject = 'qprj',
|
|
|
|
kBOINCCommandSuspend = 'susp',
|
2003-03-10 19:17:54 +00:00
|
|
|
kBOINCCommandResume = 'resu'
|
2003-02-18 22:46:08 +00:00
|
|
|
};
|
2002-08-12 22:29:38 +00:00
|
|
|
|
2003-03-10 19:17:54 +00:00
|
|
|
extern OSStatus InitMainWindow(void);
|
2003-02-18 22:46:08 +00:00
|
|
|
extern OSStatus AddDockMenu( void );
|
2003-03-10 19:17:54 +00:00
|
|
|
extern OSStatus AddFileMenu( void );
|
2003-02-18 22:46:08 +00:00
|
|
|
extern OSStatus AddColumnToList( ControlRef theList, char *columnName, DataBrowserPropertyID propertyID, DataBrowserPropertyType propertyType );
|
|
|
|
extern bool CheckIfIdle (void);
|
|
|
|
extern pascal void BOINCPollLoopProcessor(EventLoopTimerRef inTimer, void* timeData);
|
|
|
|
extern pascal void BOINCIdleDetect(EventLoopTimerRef inTimer, void* timeData);
|
2003-03-10 19:17:54 +00:00
|
|
|
extern void SuspendBOINC( bool suspend );
|
2003-02-18 22:46:08 +00:00
|
|
|
extern pascal OSStatus MainAppEventHandler(EventHandlerCallRef appHandler, EventRef theEvent, void* appData);
|
|
|
|
extern pascal OSStatus MainWinEventHandler(EventHandlerCallRef appHandler, EventRef theEvent, void* appData);
|
2003-06-10 17:53:18 +00:00
|
|
|
extern OSStatus mac_setup (void);
|
2003-02-18 22:46:08 +00:00
|
|
|
extern void mac_cleanup (void);
|
|
|
|
extern void SelectItemOfTabControl(ControlRef myTabControl);
|
|
|
|
extern pascal OSStatus TabEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData);
|
|
|
|
extern void InstallTabHandler(WindowRef window);
|
|
|
|
extern void GUIRedraw(void);
|
|
|
|
extern OSStatus BOINCCarbonProjectCallback( ControlRef browser, DataBrowserItemID itemID,
|
|
|
|
DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue);
|
|
|
|
extern OSStatus BOINCCarbonWorkCallback( ControlRef browser, DataBrowserItemID itemID,
|
|
|
|
DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue);
|
|
|
|
extern OSStatus BOINCCarbonTransferCallback( ControlRef browser, DataBrowserItemID itemID,
|
|
|
|
DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue);
|
|
|
|
extern OSStatus BOINCCarbonMessageCallback( ControlRef browser, DataBrowserItemID itemID,
|
|
|
|
DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue);
|
|
|
|
extern OSStatus SaveBOINCPreferences( void );
|
|
|
|
extern OSStatus ReadBOINCPreferences( void );
|
|
|
|
|
|
|
|
//void DisplayBOINCStatusWindow (int left, int top, int width, int height);
|
2002-08-12 22:29:38 +00:00
|
|
|
|
2003-02-18 22:46:08 +00:00
|
|
|
static const EventTypeSpec appEventList[] = { {kEventClassCommand, kEventCommandProcess} };
|
|
|
|
|
|
|
|
static const EventTypeSpec winEventList[] = { {kEventClassWindow, kEventWindowBoundsChanged} };
|
|
|
|
|
|
|
|
typedef struct MESSAGE {
|
|
|
|
char project[256];
|
|
|
|
char msg[256];
|
|
|
|
UInt32 timestamp;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct MESSAGE MESSAGE;
|