2016-12-02 12:08:43 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
2017-01-06 09:53:47 +00:00
|
|
|
// Copyright (C) 2017 University of California
|
2016-12-02 12:08:43 +00:00
|
|
|
//
|
|
|
|
// BOINC 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 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC 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.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
// mac_util.h
|
|
|
|
|
|
|
|
#ifndef _MAC_UTIL_H_
|
|
|
|
#define _MAC_UTIL_H_
|
|
|
|
|
2016-12-21 14:08:36 +00:00
|
|
|
#include <Carbon/Carbon.h>
|
2016-12-02 12:08:43 +00:00
|
|
|
|
2017-06-08 09:26:45 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
double getTimeSinceBoot(void);
|
|
|
|
void getPathToThisApp(char* pathBuf, size_t bufSize);
|
|
|
|
void BringAppToFront();
|
|
|
|
void BringAppWithPidToFront(pid_t pid);
|
2017-07-17 03:50:03 +00:00
|
|
|
pid_t getActiveAppPid();
|
2017-06-08 09:26:45 +00:00
|
|
|
pid_t getPidIfRunning(char * bundleID);
|
2017-02-27 14:32:58 +00:00
|
|
|
|
|
|
|
OSStatus GetPathToAppFromID(OSType creator, CFStringRef bundleID, char *path, size_t maxLen);
|
|
|
|
|
2017-06-08 09:26:45 +00:00
|
|
|
int compareOSVersionTo(int toMajor, int toMinor);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
2017-02-27 14:32:58 +00:00
|
|
|
#endif
|
2016-12-02 12:08:43 +00:00
|
|
|
|
|
|
|
#endif // _MAC_UTIL_H_
|