mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 12:34:31 -04:00
Gui and Eink services refactor. Displaying frames performance optimization. Critical resources management.
40 lines
1.0 KiB
C++
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 */
|