14void ShowMacDialog(std::string_view title, std::string_view message, std::string_view button_label);
16void GetMacOSVersion(
int *return_major,
int *return_minor,
int *return_bugfix);
27 int version_major, version_minor, version_bugfix;
28 GetMacOSVersion(&version_major, &version_minor, &version_bugfix);
30 if (version_major < major)
return false;
31 if (version_major == major && version_minor < minor)
return false;
32 if (version_major == major && version_minor == minor && version_bugfix < bugfix)
return false;
37bool IsMonospaceFont(CFStringRef name);
39void MacOSSetThreadName(
const std::string &name);
41uint64_t MacOSGetPhysicalMemory();
48 if (p) ::CFRelease(p);
void ShowMacDialog(std::string_view title, std::string_view message, std::string_view button_label)
Helper function displaying a message the best possible way.
std::unique_ptr< typename std::remove_pointer< T >::type, CFDeleter< typename std::remove_pointer< T >::type > > CFAutoRelease
Specialisation of std::unique_ptr for CoreFoundation objects.
bool MacOSVersionIsAtLeast(long major, long minor, long bugfix)
Check if we are at least running on the specified version of Mac OS.
Deleter that calls CFRelease rather than deleting the pointer.