polytreewm/src/unit.h

30 lines
546 B
C
Raw 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; \
}
2021-11-17 03:21:32 +00:00
typedef enum {
UNIT_GLOBAL = 0,
UNIT_MONITOR = 1,
UNIT_TAG = 2,
} UnitKind;
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