summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/service/display_controller.h
blob: 406fae21a4fe31a51d926ff151c4034d4cafdc4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"

namespace Service::AM {

struct Applet;

class IDisplayController final : public ServiceFramework<IDisplayController> {
public:
    explicit IDisplayController(Core::System& system_, std::shared_ptr<Applet> applet_);
    ~IDisplayController() override;

private:
    Result GetCallerAppletCaptureImageEx(Out<bool> out_was_written,
                                         OutBuffer<BufferAttr_HipcMapAlias> out_image_data);
    Result TakeScreenShotOfOwnLayer(bool unknown0, s32 fbshare_layer_index);
    Result ClearCaptureBuffer(bool unknown0, s32 fbshare_layer_index, u32 color);
    Result AcquireLastForegroundCaptureSharedBuffer(Out<bool> out_was_written,
                                                    Out<s32> out_fbshare_layer_index);
    Result ReleaseLastForegroundCaptureSharedBuffer();
    Result AcquireCallerAppletCaptureSharedBuffer(Out<bool> out_was_written,
                                                  Out<s32> out_fbshare_layer_index);
    Result ReleaseCallerAppletCaptureSharedBuffer();
    Result AcquireLastApplicationCaptureSharedBuffer(Out<bool> out_was_written,
                                                     Out<s32> out_fbshare_layer_index);
    Result ReleaseLastApplicationCaptureSharedBuffer();

    const std::shared_ptr<Applet> applet;
};

} // namespace Service::AM