hyprctl: include color management presets and sdr information (#12019)
* move string parsing for eCMType to its own namespace, similar to how `src/protocols/types/ContentType.cpp` is done * expose cm type and sdr settings in `hyprctl monitors`, format floats to .2f
This commit is contained in:
parent
117e38db35
commit
34812c33db
9 changed files with 104 additions and 54 deletions
20
src/helpers/CMType.hpp
Normal file
20
src/helpers/CMType.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
namespace NCMType {
|
||||
enum eCMType : uint8_t {
|
||||
CM_AUTO = 0, // subject to change. srgb for 8bpc, wide for 10bpc if supported
|
||||
CM_SRGB, // default, sRGB primaries
|
||||
CM_WIDE, // wide color gamut, BT2020 primaries
|
||||
CM_EDID, // primaries from edid (known to be inaccurate)
|
||||
CM_HDR, // wide color gamut and HDR PQ transfer function
|
||||
CM_HDR_EDID, // same as CM_HDR with edid primaries
|
||||
CM_DCIP3, // movie theatre with greenish white point
|
||||
CM_DP3, // applle P3 variant with blueish white point
|
||||
CM_ADOBE, // adobe colorspace
|
||||
};
|
||||
|
||||
std::optional<eCMType> fromString(const std::string cmType);
|
||||
std::string toString(eCMType cmType);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue