CTWM
Loading...
Searching...
No Matches
Functions
/usr/src/RPM/BUILD/ctwm-4.1.0/r_area_list.h File Reference
#include "r_structs.h"
Include dependency graph for r_area_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

RAreaListRAreaListNew (int cap,...)
 Create an RAreaList from a set of RArea's.
 
void RAreaListFree (RAreaList *self)
 Clean up and free an RAreaList.
 
RAreaListRAreaListCopyCropped (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.
 
void RAreaListAdd (RAreaList *self, const RArea *area)
 Add an RArea onto an RAreaList.
 
RAreaListRAreaListHorizontalUnion (const RAreaList *self)
 Create an RAreaList whose RArea's are the horizontal union of our RArea's.
 
RAreaListRAreaListVerticalUnion (const RAreaList *self)
 Create an RAreaList whose RArea's are the vertical union of our RArea's.
 
RAreaListRAreaListIntersect (const RAreaList *self, const RArea *area)
 Create an RAreaList of all the areas in an RAreaList that a given RArea intersects with.
 
void RAreaListForeach (const RAreaList *self, bool(*func)(const RArea *area, void *data), void *data)
 
RArea RAreaListBigArea (const RAreaList *self)
 Create a maximal RArea describing the union of an RAreaList.
 
RArea RAreaListBestTarget (const RAreaList *self, const RArea *area)
 Find the RArea in an RAreaList that has the largest intersection with a given RArea.
 
int RAreaListMaxX (const RAreaList *self)
 Find the x coordinate of the right-most RArea in an RAreaList.
 
int RAreaListMaxY (const RAreaList *self)
 Find the y coordinate of the bottom-most RArea in an RAreaList.
 
int RAreaListMinX2 (const RAreaList *self)
 Find the x coordinate of the right edge of the left-most RArea in an RAreaList.
 
int RAreaListMinY2 (const RAreaList *self)
 Find the y coordinate of the bottom edge of the top-most RArea in an RAreaList.
 
void RAreaListPrint (const RAreaList *self)
 Pretty-print an RAreaList.
 
static int RAreaListLen (const RAreaList *self)
 How many RArea's are in the list?
 

Function Documentation

◆ RAreaListAdd()

void RAreaListAdd ( RAreaList * self,
const RArea * area )

◆ RAreaListBestTarget()

RArea RAreaListBestTarget ( const RAreaList * self,
const RArea * area )

Find the RArea in an RAreaList that has the largest intersection with a given RArea.

Colloquially, which area in an RAreaList does our RArea mostly fit into? This is used to resize a window to fill one monitor, by finding which monitor it's on.

Definition at line 460 of file r_area_list.c.

References PlaceX, RAreaArea(), RAreaIntersect(), RAreaInvalid(), and RAreaIsValid().

Referenced by RLayoutFull1().

◆ RAreaListBigArea()

RArea RAreaListBigArea ( const RAreaList * self)

Create a maximal RArea describing the union of an RAreaList.

This is used to construct a giant square that contains all our monitors (and the dead area necessary to cover them). It winds up being the equivalent of a spanning pseudo-Root window, and is used when we need to figure some sort of "overall" positioning, like when figuring "real" x/y coordinates.

Definition at line 421 of file r_area_list.c.

References PlaceX, RAreaInvalid(), RAreaNew(), RAreaX2(), RAreaY2(), x, RArea::x, y, and RArea::y.

Referenced by _RLayoutRecenterHorizontally(), _RLayoutRecenterVertically(), RAreaListCopyCropped(), and RLayoutBigArea().

◆ RAreaListCopyCropped()

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.

This is used principally during startup, to handle the BorderBottom/Top/Left/Right config params.

Definition at line 93 of file r_area_list.c.

References PlaceX, RAreaListBigArea(), RAreaListIntersectCrop(), and RAreaListNew().

Referenced by RLayoutCopyCropped().

◆ RAreaListForeach()

void RAreaListForeach ( const RAreaList * self,
bool(*)(const RArea *area, void *data) func,
void * data )

◆ RAreaListFree()

void RAreaListFree ( RAreaList * self)

◆ RAreaListHorizontalUnion()

RAreaList * RAreaListHorizontalUnion ( const RAreaList * self)

Create an RAreaList whose RArea's are the horizontal union of our RArea's.

Definition at line 288 of file r_area_list.c.

References PlaceX, RAreaHorizontalUnion(), RAreaListAddList(), RAreaListCopy(), RAreaListDelete(), RAreaListFree(), and RAreaListSortX().

Referenced by RLayoutNew().

◆ RAreaListIntersect()

RAreaList * RAreaListIntersect ( const RAreaList * self,
const RArea * area )

Create an RAreaList of all the areas in an RAreaList that a given RArea intersects with.

Definition at line 359 of file r_area_list.c.

References PlaceX, RAreaIsIntersect(), RAreaListAdd(), and RAreaListNew().

Referenced by _RLayoutHorizontalIntersect(), _RLayoutRecenterHorizontally(), _RLayoutRecenterVertically(), _RLayoutVerticalIntersect(), and RLayoutFull1().

◆ RAreaListLen()

static int RAreaListLen ( const RAreaList * self)
inlinestatic

How many RArea's are in the list?

Definition at line 44 of file r_area_list.h.

References PlaceX.

Referenced by proc_layout_override().

◆ RAreaListMaxX()

int RAreaListMaxX ( const RAreaList * self)

Find the x coordinate of the right-most RArea in an RAreaList.

Definition at line 481 of file r_area_list.c.

References PlaceX, and RArea::x.

Referenced by RLayoutFindLeftRightEdges().

◆ RAreaListMaxY()

int RAreaListMaxY ( const RAreaList * self)

Find the y coordinate of the bottom-most RArea in an RAreaList.

Definition at line 503 of file r_area_list.c.

References PlaceX, and RArea::y.

Referenced by RLayoutFindTopBottomEdges().

◆ RAreaListMinX2()

int RAreaListMinX2 ( const RAreaList * self)

Find the x coordinate of the right edge of the left-most RArea in an RAreaList.

Definition at line 523 of file r_area_list.c.

References PlaceX, and RAreaX2().

Referenced by RLayoutFindLeftRightEdges().

◆ RAreaListMinY2()

int RAreaListMinY2 ( const RAreaList * self)

Find the y coordinate of the bottom edge of the top-most RArea in an RAreaList.

Definition at line 543 of file r_area_list.c.

References PlaceX, and RAreaY2().

Referenced by RLayoutFindTopBottomEdges().

◆ RAreaListNew()

RAreaList * RAreaListNew ( int cap,
... )

Create an RAreaList from a set of RArea's.

Parameters
capHint as to the number of RArea's being passed
...Sequence of RArea * to put in it. Don't forget a trailing NULL.

Definition at line 40 of file r_area_list.c.

References cap, PlaceX, and RAreaListAdd().

Referenced by ctwm_main(), fullzoom(), init_layout_override(), RAreaHorizontalUnion(), RAreaListCopy(), RAreaListCopyCropped(), RAreaListIntersect(), RAreaListIntersectCrop(), RAreaVerticalUnion(), and XrandrNewLayout().

◆ RAreaListPrint()

void RAreaListPrint ( const RAreaList * self)

Pretty-print an RAreaList.

Used for dev/debug.

Definition at line 564 of file r_area_list.c.

References PlaceX, and RAreaPrint().

Referenced by RLayoutPrint().

◆ RAreaListVerticalUnion()

RAreaList * RAreaListVerticalUnion ( const RAreaList * self)

Create an RAreaList whose RArea's are the vertical union of our RArea's.

Definition at line 326 of file r_area_list.c.

References PlaceX, RAreaListAddList(), RAreaListCopy(), RAreaListDelete(), RAreaListFree(), RAreaListSortY(), and RAreaVerticalUnion().

Referenced by RLayoutNew().