CTWM
Loading...
Searching...
No Matches
/usr/src/RPM/BUILD/ctwm-4.1.0/r_area_list.h
Go to the documentation of this file.
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
11RAreaList *RAreaListNew(int cap, ...);
12
14
16 int right_margin,
17 int top_margin, int bottom_margin);
18
19void RAreaListAdd(RAreaList *self, const RArea *area);
20
23
24RAreaList *RAreaListIntersect(const RAreaList *self, const RArea *area);
26 bool (*func)(const RArea *area, void *data),
27 void *data);
28
30RArea RAreaListBestTarget(const RAreaList *self, const RArea *area);
31
32int RAreaListMaxX(const RAreaList *self);
33int RAreaListMaxY(const RAreaList *self);
34int RAreaListMinX2(const RAreaList *self);
35int RAreaListMinY2(const RAreaList *self);
36
37void RAreaListPrint(const RAreaList *self);
38
39
40/*
41 * Simple accessors to avoid unnecessary layering violations.
42 */
43/// How many RArea's are in the list?
44static inline int RAreaListLen(const RAreaList *self)
45{
46 return self->len;
47}
48
49
50#endif /* _CTWM_R_AREA_LIST_H */
static int PlaceX
Definition add_window.c:82
int cap
Definition parse_be.c:2020
RAreaList * RAreaListNew(int cap,...)
Create an RAreaList from a set of RArea's.
Definition r_area_list.c:40
void RAreaListForeach(const RAreaList *self, bool(*func)(const RArea *area, void *data), void *data)
RArea RAreaListBestTarget(const RAreaList *self, const RArea *area)
Find the RArea in an RAreaList that has the largest intersection with a given RArea.
int RAreaListMinY2(const RAreaList *self)
Find the y coordinate of the bottom edge of the top-most RArea in an RAreaList.
static int RAreaListLen(const RAreaList *self)
How many RArea's are in the list?
Definition r_area_list.h:44
RAreaList * RAreaListVerticalUnion(const RAreaList *self)
Create an RAreaList whose RArea's are the vertical union of our RArea's.
void RAreaListFree(RAreaList *self)
Clean up and free an RAreaList.
RArea RAreaListBigArea(const RAreaList *self)
Create a maximal RArea describing the union of an RAreaList.
int RAreaListMaxY(const RAreaList *self)
Find the y coordinate of the bottom-most RArea in an RAreaList.
void RAreaListPrint(const RAreaList *self)
Pretty-print an RAreaList.
RAreaList * RAreaListIntersect(const RAreaList *self, const RArea *area)
Create an RAreaList of all the areas in an RAreaList that a given RArea intersects with.
int RAreaListMaxX(const RAreaList *self)
Find the x coordinate of the right-most RArea in an RAreaList.
RAreaList * RAreaListHorizontalUnion(const RAreaList *self)
Create an RAreaList whose RArea's are the horizontal union of our RArea's.
RAreaList * RAreaListCopyCropped(const RAreaList *self, int left_margin, int right_margin, int top_margin, int bottom_margin)
Create a copy of an RAreaList with given amounts cropped off the sides.
Definition r_area_list.c:93
void RAreaListAdd(RAreaList *self, const RArea *area)
Add an RArea onto an RAreaList.
int RAreaListMinX2(const RAreaList *self)
Find the x coordinate of the right edge of the left-most RArea in an RAreaList.
A set of RArea's.
Definition r_structs.h:30
A particular extent of space.
Definition r_structs.h:16