13 #ifndef MAC_APPLICATION_H
14 #define MAC_APPLICATION_H
18 #if defined(__APPLE__)
26 class ApplicationPrivate;
34 #ifndef OSXSUPPORTSTANDALONE
56 ApplicationPresentationDefault = 0,
57 ApplicationPresentationAutoHideDock = (1 << 0),
58 ApplicationPresentationHideDock = (1 << 1),
59 ApplicationPresentationAutoHideMenuBar = (1 << 2),
60 ApplicationPresentationHideMenuBar = (1 << 3)
72 ActivationPolicyProhibited
82 static bool activate(pid_t pid = 0, uint32_t timeout = 800);
107 ActivityIdleDisplaySleepDisabled = (1 << 0),
108 ActivityIdleSystemSleepDisabled = (1 << 1),
109 ActivityAutomaticTerminationDisabled = (1 << 2),
110 ActivityUserInitiated = (1 << 3),
111 ActivityBackground = (1 << 4)
ApplicationActivityBlock(Application::ActivityOptions options, const std::string &reason=std::string())
~ApplicationActivityBlock()
Application related functions.
static void setPresentationOptions(PresentationOptions options)
Sets the application presentation options to use when this application is active. Only certain combin...
static void removeBusyStateIndicator()
Hide busy state indicator.
static void endActivity(ApplicationActivityToken &token)
Ends the given activity.
static void disableWindowRestoration()
Disables the window restoration of Mac OS X 10.7 or later.
static bool setActivationPolicy(ActivationPolicy policy)
Attempts to modify the app's activation policy.
static void enableAutomaticTermination(const std::string &reason=std::string())
Enables automatic termination for the application of Mac OS X 10.7 or later.
static void disableAutomaticTermination(const std::string &reason=std::string())
Disables automatic termination for the application of Mac OS X 10.7 or later.
ActivationPolicy
Activation policies that control whether and how an app may be activated.
@ ActivationPolicyRegular
The application is an ordinary app that appears in the Dock and may have a user interface.
@ ActivationPolicyAccessory
The application does not appear in the Dock and does not have a menu bar, but it may be activated pro...
static bool activate(pid_t pid=0, uint32_t timeout=800)
Activate application and bring all process windows forward, timeout allows to wait for application to...
static void initializeCocoa()
Startup function to call when running Cocoa code from a Carbon application.
unsigned int ActivityOptions
Activity options storage type.
static void indicateBusyState(const std::string &message=std::string())
Show busy state indicator, possibly displaying a descriptive message (UTF8)
static void disableRelaunchOnLogin()
Disables relaunching the application on login of Mac OS X 10.7 or later.
static bool isAppearingDarkAqua()
Returns true if effective appearance of the App is Dark Aqua (macOS 10.14 or later)
static ApplicationActivityToken beginActivityWithOptions(ActivityOptions options, const std::string &reason=std::string())
Begin an activity using the given options and reason.
static void enableSuddenTermination()
Enables the application for quick killing using sudden termination of Mac OS X 10....
static bool isActive(pid_t pid=0)
Returns a boolean value indicating whether the referenced application is currently frontmost (active)
static void disableSuddenTermination()
Disables the application for quickly killing using sudden termination of Mac OS X 10....
static void enableRelaunchOnLogin()
Enables relaunching the application on login of Mac OS X 10.7 or later.
unsigned int PresentationOptions
Application presentation options storage type.
#define OSXSUPPORT_PUBLIC_API
Symbol visibility macros.
#define OSXSUPPORT_PRIVATE_API