core: support offline web applet

This commit is contained in:
Liam 2024-01-06 21:21:01 -05:00
parent 8a146469c0
commit 68303ed601
32 changed files with 470 additions and 58 deletions

View file

@ -198,6 +198,16 @@ bool Nvnflinger::CloseLayer(u64 layer_id) {
return false;
}
void Nvnflinger::SetLayerVisibility(u64 layer_id, bool visible) {
const auto lock_guard = Lock();
for (auto& display : displays) {
if (auto* layer = display.FindLayer(layer_id); layer) {
layer->SetVisibility(visible);
}
}
}
void Nvnflinger::DestroyLayer(u64 layer_id) {
const auto lock_guard = Lock();

View file

@ -79,6 +79,9 @@ public:
/// Closes a layer on all displays for the given layer ID.
bool CloseLayer(u64 layer_id);
/// Makes a layer visible on all displays for the given layer ID.
void SetLayerVisibility(u64 layer_id, bool visible);
/// Destroys the given layer ID.
void DestroyLayer(u64 layer_id);