polytreewm/src/unit.h

30 lines
546 B
C
Raw Normal View History

2021-11-16 21:56:19 -05:00
#ifndef _UNIT_H
#define _UNIT_H
#include <stdbool.h>
#include <stddef.h>
#define UNIT_DELETE(unit) { \
unit_delete(unit); \
unit = NULL; \
}
2021-11-16 22:21:32 -05:00
typedef enum {
UNIT_GLOBAL = 0,
UNIT_MONITOR = 1,
UNIT_TAG = 2,
} UnitKind;
typedef struct Unit *Unit;
2021-11-16 21:56:19 -05:00
2021-11-16 22:21:32 -05:00
Unit unit_new(UnitKind kind, Unit parent);
2021-11-16 21:56:19 -05:00
void unit_delete(Unit unit);
bool unit_get_show_bar(Unit unit);
bool unit_toggle_show_bar(Unit unit);
2021-11-18 10:18:27 -05:00
float unit_get_master_area_factor(Unit unit);
float unit_inc_master_area_factor(Unit unit, float delta);
2021-11-16 21:56:19 -05:00
#endif // _UNIT_H