decorations: add SetDecorations action

This commit is contained in:
Tobias Bengfort 2024-04-20 06:29:51 +02:00 committed by Johan Malm
parent e2590f10fd
commit 41a3b68846
6 changed files with 62 additions and 0 deletions

View file

@ -7,6 +7,7 @@
*/
#include <assert.h>
#include <strings.h>
#include "common/mem.h"
#include "common/scene-helpers.h"
#include "labwc.h"
@ -344,6 +345,21 @@ ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate)
return false;
}
enum ssd_mode
ssd_mode_parse(const char *mode)
{
if (!mode) {
return LAB_SSD_MODE_FULL;
}
if (!strcasecmp(mode, "none")) {
return LAB_SSD_MODE_NONE;
} else if (!strcasecmp(mode, "border")) {
return LAB_SSD_MODE_BORDER;
} else {
return LAB_SSD_MODE_FULL;
}
}
void
ssd_set_active(struct ssd *ssd, bool active)
{