1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

GVariant: Add to_bool(), to_int() and to_color().

This commit is contained in:
Andreas Kling 2019-04-13 12:35:19 +02:00
parent 4df360be8c
commit 0f4050903d
2 changed files with 37 additions and 0 deletions

View file

@ -61,6 +61,8 @@ public:
operator WSAPI_Point() const;
String to_string() const { return String::format("[%d,%d]", x(), y()); }
bool is_null() const { return !m_x && !m_y; }
private:
int m_x { 0 };
int m_y { 0 };