Files
MuditaOS/module-services/service-eink/messages/ImageMessage.hpp
Piotr Tański 3f29c30bed [EGD-4968] Change GUI service to optimize flow and memory management
Gui and Eink services refactor.
Displaying frames performance optimization.
Critical resources management.
2021-01-08 16:36:12 +01:00

40 lines
1.0 KiB
C++

// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "EinkMessage.hpp"
#include <cstdint>
#include <module-gui/gui/core/Context.hpp>
#include <module-gui/gui/Common.hpp>
namespace service::eink
{
class ImageMessage : public EinkMessage
{
public:
ImageMessage(int contextId, ::gui::Context *context, ::gui::RefreshModes refreshMode);
[[nodiscard]] auto getContextId() const noexcept -> int;
[[nodiscard]] auto getData() noexcept -> std::uint8_t *;
[[nodiscard]] auto getRefreshMode() const noexcept -> ::gui::RefreshModes;
private:
int contextId;
::gui::Context *context;
::gui::RefreshModes refreshMode;
};
class ImageDisplayedNotification : public EinkMessage
{
public:
explicit ImageDisplayedNotification(int contextId);
[[nodiscard]] auto getContextId() const noexcept -> int;
private:
int contextId;
};
} /* namespace seink */