| Mutter Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct MetaRectangle; struct MetaStrut; enum MetaEdgeType; struct MetaEdge; MetaRectangle * meta_rectangle_copy (const MetaRectangle *rect); void meta_rectangle_free (MetaRectangle *rect); MetaRectangle meta_rect (int x,int y,int width,int height); int meta_rectangle_area (const MetaRectangle *rect); gboolean meta_rectangle_intersect (const MetaRectangle *src1,const MetaRectangle *src2,MetaRectangle *dest); gboolean meta_rectangle_equal (const MetaRectangle *src1,const MetaRectangle *src2); void meta_rectangle_union (const MetaRectangle *rect1,const MetaRectangle *rect2,MetaRectangle *dest); gboolean meta_rectangle_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2); gboolean meta_rectangle_vert_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2); gboolean meta_rectangle_horiz_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2); gboolean meta_rectangle_could_fit_rect (const MetaRectangle *outer_rect,const MetaRectangle *inner_rect); gboolean meta_rectangle_contains_rect (const MetaRectangle *outer_rect,const MetaRectangle *inner_rect);
struct MetaStrut {
MetaRectangle rect;
MetaSide side;
};
MetaRectangle |
MetaRectangle the MetaStrut is on |
MetaSide |
MetaSide the MetaStrut is on |
typedef enum {
META_EDGE_WINDOW,
META_EDGE_MONITOR,
META_EDGE_SCREEN
} MetaEdgeType;
struct MetaEdge {
MetaRectangle rect; /* width or height should be 1 */
MetaSide side_type;
MetaEdgeType edge_type;
};
MetaRectangle |
MetaRectangle with the bounds of the edge |
MetaSide |
Side |
MetaEdgeType |
To what belongs the edge |
gboolean meta_rectangle_intersect (const MetaRectangle *src1,const MetaRectangle *src2,MetaRectangle *dest);
|
a MetaRectangle |
|
another MetaRectangle |
|
an empty MetaRectangle, to be filled with the coordinates of the intersection. [out caller-allocates] |
Returns : |
TRUE is some intersection exists and is not degenerate, FALSE otherwise. |
gboolean meta_rectangle_equal (const MetaRectangle *src1,const MetaRectangle *src2);
void meta_rectangle_union (const MetaRectangle *rect1,const MetaRectangle *rect2,MetaRectangle *dest);
|
a MetaRectangle |
|
another MetaRectangle |
|
an empty MetaRectangle, to be filled with the coordinates of the bounding box. [out caller-allocates] |
gboolean meta_rectangle_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2);
gboolean meta_rectangle_vert_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2);
gboolean meta_rectangle_horiz_overlap (const MetaRectangle *rect1,const MetaRectangle *rect2);
gboolean meta_rectangle_could_fit_rect (const MetaRectangle *outer_rect,const MetaRectangle *inner_rect);
gboolean meta_rectangle_contains_rect (const MetaRectangle *outer_rect,const MetaRectangle *inner_rect);