diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-24 09:07:56 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-24 09:07:56 +0100 |
| commit | 40773d41fa7898e7f03b0de011a9740061ade0aa (patch) | |
| tree | 66a425fdc830be4ea33b1d75454038036f17d3c7 /dev/Usr/LibCF/Core.h | |
| parent | cb6d0477d6ea65b6364bfbcd872552bec6fbc22a (diff) | |
Add LibFont and LibLocale, port structs that I made for app-kit to LibCF too.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Usr/LibCF/Core.h')
| -rw-r--r-- | dev/Usr/LibCF/Core.h | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/dev/Usr/LibCF/Core.h b/dev/Usr/LibCF/Core.h index 7aaa001d..acebe996 100644 --- a/dev/Usr/LibCF/Core.h +++ b/dev/Usr/LibCF/Core.h @@ -15,5 +15,60 @@ namespace LibCF class CFGUID; class CFProperty; class CFObject; - class CFRef; /// TODO: Ref->CFRef + class CFRef; + class CFFont; + struct CFPoint; + struct CFRect; + struct CFColor; + +#ifndef __LP64__ + typedef SInt32 CFInteger; + typedef float CFReal; +#else + typedef SInt64 CFInteger; + typedef double CFReal; +#endif + + typedef SInt32 CFInteger32; + typedef SInt64 CFInteger64; + + typedef char CFChar8; + typedef char16_t CFChar16; + + struct CFPoint + { + CFInteger64 x_1{0UL}; + CFInteger64 y_1{0UL}; + + CFInteger64 x_2{0UL}; + CFInteger64 y_2{0UL}; + CFReal ang{0UL}; + + operator bool(); + + /// @brief Check if point is within the current CFPoint. + /// @param point the current point to check. + /// @retval true if point is within this point. + /// @retval validations failed. + bool isWithin(CFPoint& point); + }; + + struct CFColor final + { + CFInteger64 r, g, b, a{0}; + }; + + struct CFRect final + { + CFInteger64 x{0UL}; + CFInteger64 y{0UL}; + + CFInteger64 width{0UL}; + CFInteger64 height{0UL}; + + operator bool(); + + BOOL sizeMatches(CFRect& rect) noexcept; + BOOL positionMatches(CFRect& rect) noexcept; + }; } // namespace LibCF
\ No newline at end of file |
