libdisplaydevice master
C++ library to modify display devices.
mac_api_utils.h
Go to the documentation of this file.
1
5#pragma once
6
7// local includes
8#include "types.h"
9
19 [[nodiscard]] bool isSuccess(MacApiError error_code);
20
27 [[nodiscard]] bool fuzzyCompareRefreshRates(const Rational &lhs, const Rational &rhs);
28
35 [[nodiscard]] bool fuzzyCompareModes(const MacDisplayMode &lhs, const MacDisplayMode &rhs);
36} // namespace display_device::mac_utils
Declarations for macOS specific display device types.
int MacApiError
Error code returned by macOS display APIs.
Definition types.h:20
Shared utility-level code for macOS API wrappers.
Definition mac_api_utils.h:13
bool fuzzyCompareRefreshRates(const Rational &lhs, const Rational &rhs)
Check if two refresh rates are close enough to be treated as equal.
Definition mac_api_utils.cpp:16
bool fuzzyCompareModes(const MacDisplayMode &lhs, const MacDisplayMode &rhs)
Check if two macOS display modes are close enough to be treated as equal.
Definition mac_api_utils.cpp:26
bool isSuccess(MacApiError error_code)
Check if a macOS API error represents success.
Definition mac_api_utils.cpp:12
Display mode data used by the macOS backend.
Definition types.h:64
Floating point stored in a "numerator/denominator" form.
Definition types.h:104