// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md /* * Common.cpp * * Created on: 8 maj 2019 * Author: robert */ #include #include #include "Common.hpp" namespace gui { static timeSecondsFunctionPtr timeSecondsFunction = nullptr; bool operator&(const gui::RectangleEdge &lhs, const gui::RectangleEdge &rhs) { using T = std::underlying_type_t; return static_cast(static_cast(lhs) & static_cast(rhs)); } RectangleEdge operator|(const RectangleEdge &lhs, const RectangleEdge &rhs) { using T = std::underlying_type_t; return static_cast(static_cast(lhs) | static_cast(rhs)); } RectangleEdge operator|=(RectangleEdge &lhs, const RectangleEdge &rhs) { lhs = lhs | rhs; return lhs; } uint32_t getTime() { if (timeSecondsFunction != nullptr) return timeSecondsFunction(); return 0; } void setTimeFunction(timeSecondsFunctionPtr fptr) { timeSecondsFunction = fptr; } } // namespace gui