polytreewm/src/unit.h

30 lines
564 B
C
Raw Permalink Normal View History

2021-11-17 02:56:19 +00:00
#ifndef _UNIT_H
#define _UNIT_H
#include <stdbool.h>
#include <stddef.h>
#define UNIT_DELETE(unit) { \
unit_delete(unit); \
unit = NULL; \
}
2022-09-08 20:05:17 +00:00
typedef unsigned char UnitKind;
#define UNIT_GLOBAL 0
#define UNIT_MONITOR 1
#define UNIT_TAG 2
2021-11-17 03:21:32 +00:00
typedef struct Unit *Unit;
2021-11-17 02:56:19 +00:00
2021-11-17 03:21:32 +00:00
Unit unit_new(UnitKind kind, Unit parent);
2021-11-17 02:56:19 +00:00
void unit_delete(Unit unit);
bool unit_get_show_bar(Unit unit);
bool unit_toggle_show_bar(Unit unit);
2021-11-18 15:18:27 +00:00
float unit_get_master_area_factor(Unit unit);
float unit_inc_master_area_factor(Unit unit, float delta);
2021-11-17 02:56:19 +00:00
#endif // _UNIT_H