~ctwm/ctwm/trunk

614.1.1 by Maxime Soulé
First step of xrandr integration
1
/*
2
 * Copyright notice...
3
 */
4
5
#ifndef _CTWM_R_AREA_LIST_H
6
#define _CTWM_R_AREA_LIST_H
7
8
#include "r_structs.h"
9
10
11
RAreaList *RAreaListNew(int cap, ...);
12
13
void RAreaListFree(RAreaList *self);
14
614.1.91 by Matthew Fuller
Staticize external RAreaList funcs, with some other minor local
15
RAreaList *RAreaListCopyCropped(const RAreaList *self, int left_margin,
614.1.2 by Maxime Soulé
Menus are now clipped using layout
16
                                int right_margin,
17
                                int top_margin, int bottom_margin);
614.1.1 by Maxime Soulé
First step of xrandr integration
18
614.1.91 by Matthew Fuller
Staticize external RAreaList funcs, with some other minor local
19
void RAreaListAdd(RAreaList *self, const RArea *area);
20
21
RAreaList *RAreaListHorizontalUnion(const RAreaList *self);
22
RAreaList *RAreaListVerticalUnion(const RAreaList *self);
23
24
RAreaList *RAreaListIntersect(const RAreaList *self, const RArea *area);
25
void RAreaListForeach(const RAreaList *self,
614.1.93 by Matthew Fuller
const-ify the callback func for RAreaListForeach().
26
                      bool (*func)(const RArea *area, void *data),
614.1.12 by Maxime Soulé
f.fill, f.pack & f.jump* functions detect inter-monitors edges
27
                      void *data);
28
614.1.91 by Matthew Fuller
Staticize external RAreaList funcs, with some other minor local
29
RArea RAreaListBigArea(const RAreaList *self);
30
RArea RAreaListBestTarget(const RAreaList *self, const RArea *area);
31
32
int RAreaListMaxX(const RAreaList *self);
33
int RAreaListMaxY(const RAreaList *self);
34
int RAreaListMinX2(const RAreaList *self);
35
int RAreaListMinY2(const RAreaList *self);
36
37
void RAreaListPrint(const RAreaList *self);
614.1.1 by Maxime Soulé
First step of xrandr integration
38
656.2.6 by Matthew Fuller
Guard against an empty specified layout.
39
40
/*
41
 * Simple accessors to avoid unnecessary layering violations.
42
 */
43
/// How many RArea's are in the list?
44
static inline int RAreaListLen(const RAreaList *self)
45
{
46
	return self->len;
47
}
48
49
614.1.1 by Maxime Soulé
First step of xrandr integration
50
#endif  /* _CTWM_R_AREA_LIST_H */