boxes.h File Reference

Go to the source code of this file.

Data Structures

struct  _MetaRectangle
struct  _MetaStrut
struct  _MetaEdge

Defines

#define BOX_LEFT(box)   ((box).x)
#define BOX_RIGHT(box)   ((box).x + (box).width)
#define BOX_TOP(box)   ((box).y)
#define BOX_BOTTOM(box)   ((box).y + (box).height)
#define RECT_LENGTH   27
#define EDGE_LENGTH   37

Typedefs

typedef struct _MetaRectangle MetaRectangle
typedef struct _MetaStrut MetaStrut
typedef struct _MetaEdge MetaEdge

Enumerations

enum  FixedDirections { FIXED_DIRECTION_NONE = 0, FIXED_DIRECTION_X = 1 << 0, FIXED_DIRECTION_Y = 1 << 1 }
enum  MetaEdgeType { META_EDGE_WINDOW, META_EDGE_XINERAMA, META_EDGE_SCREEN }

Functions

char * meta_rectangle_to_string (const MetaRectangle *rect, char *output)
char * meta_rectangle_region_to_string (GList *region, const char *separator_string, char *output)
char * meta_rectangle_edge_to_string (const MetaEdge *edge, char *output)
char * meta_rectangle_edge_list_to_string (GList *edge_list, const char *separator_string, char *output)
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)
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)
void meta_rectangle_resize_with_gravity (const MetaRectangle *old_rect, MetaRectangle *rect, int gravity, int new_width, int new_height)
GList * meta_rectangle_get_minimal_spanning_set_for_region (const MetaRectangle *basic_rect, const GSList *all_struts)
GList * meta_rectangle_expand_region (GList *region, const int left_expand, const int right_expand, const int top_expand, const int bottom_expand)
GList * meta_rectangle_expand_region_conditionally (GList *region, const int left_expand, const int right_expand, const int top_expand, const int bottom_expand, const int min_x, const int min_y)
void meta_rectangle_expand_to_avoiding_struts (MetaRectangle *rect, const MetaRectangle *expand_to, const MetaDirection direction, const GSList *all_struts)
void meta_rectangle_free_list_and_elements (GList *filled_list)
gboolean meta_rectangle_could_fit_in_region (const GList *spanning_rects, const MetaRectangle *rect)
gboolean meta_rectangle_contained_in_region (const GList *spanning_rects, const MetaRectangle *rect)
gboolean meta_rectangle_overlaps_with_region (const GList *spanning_rects, const MetaRectangle *rect)
void meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects, FixedDirections fixed_directions, MetaRectangle *rect, const MetaRectangle *min_size)
void meta_rectangle_clip_to_region (const GList *spanning_rects, FixedDirections fixed_directions, MetaRectangle *rect)
void meta_rectangle_shove_into_region (const GList *spanning_rects, FixedDirections fixed_directions, MetaRectangle *rect)
void meta_rectangle_find_linepoint_closest_to_point (double x1, double y1, double x2, double y2, double px, double py, double *valx, double *valy)
gboolean meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
gint meta_rectangle_edge_cmp (gconstpointer a, gconstpointer b)
gint meta_rectangle_edge_cmp_ignore_type (gconstpointer a, gconstpointer b)
GList * meta_rectangle_remove_intersections_with_boxes_from_edges (GList *edges, const GSList *rectangles)
GList * meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect, const GSList *all_struts)
GList * meta_rectangle_find_nonintersected_xinerama_edges (const GList *xinerama_rects, const GSList *all_struts)


Define Documentation

#define BOX_BOTTOM ( box   )     ((box).y + (box).height)

#define BOX_LEFT ( box   )     ((box).x)

#define BOX_RIGHT ( box   )     ((box).x + (box).width)

#define BOX_TOP ( box   )     ((box).y)

#define EDGE_LENGTH   37

#define RECT_LENGTH   27


Typedef Documentation

typedef struct _MetaEdge MetaEdge

Definition at line 65 of file boxes.h.

typedef struct _MetaRectangle MetaRectangle

Definition at line 30 of file boxes.h.

typedef struct _MetaStrut MetaStrut

Definition at line 39 of file boxes.h.


Enumeration Type Documentation

Enumerator:
FIXED_DIRECTION_NONE 
FIXED_DIRECTION_X 
FIXED_DIRECTION_Y 

Definition at line 51 of file boxes.h.

Enumerator:
META_EDGE_WINDOW 
META_EDGE_XINERAMA 
META_EDGE_SCREEN 

Definition at line 58 of file boxes.h.


Function Documentation

MetaRectangle meta_rect ( int  x,
int  y,
int  width,
int  height 
)

int meta_rectangle_area ( const MetaRectangle rect  ) 

void meta_rectangle_clamp_to_fit_into_region ( const GList *  spanning_rects,
FixedDirections  fixed_directions,
MetaRectangle rect,
const MetaRectangle min_size 
)

void meta_rectangle_clip_to_region ( const GList *  spanning_rects,
FixedDirections  fixed_directions,
MetaRectangle rect 
)

gboolean meta_rectangle_contained_in_region ( const GList *  spanning_rects,
const MetaRectangle rect 
)

gboolean meta_rectangle_contains_rect ( const MetaRectangle outer_rect,
const MetaRectangle inner_rect 
)

gboolean meta_rectangle_could_fit_in_region ( const GList *  spanning_rects,
const MetaRectangle rect 
)

gboolean meta_rectangle_could_fit_rect ( const MetaRectangle outer_rect,
const MetaRectangle inner_rect 
)

gboolean meta_rectangle_edge_aligns ( const MetaRectangle rect,
const MetaEdge edge 
)

gint meta_rectangle_edge_cmp ( gconstpointer  a,
gconstpointer  b 
)

gint meta_rectangle_edge_cmp_ignore_type ( gconstpointer  a,
gconstpointer  b 
)

char* meta_rectangle_edge_list_to_string ( GList *  edge_list,
const char *  separator_string,
char *  output 
)

char* meta_rectangle_edge_to_string ( const MetaEdge edge,
char *  output 
)

gboolean meta_rectangle_equal ( const MetaRectangle src1,
const MetaRectangle src2 
)

GList* meta_rectangle_expand_region ( GList *  region,
const int  left_expand,
const int  right_expand,
const int  top_expand,
const int  bottom_expand 
)

GList* meta_rectangle_expand_region_conditionally ( GList *  region,
const int  left_expand,
const int  right_expand,
const int  top_expand,
const int  bottom_expand,
const int  min_x,
const int  min_y 
)

void meta_rectangle_expand_to_avoiding_struts ( MetaRectangle rect,
const MetaRectangle expand_to,
const MetaDirection  direction,
const GSList *  all_struts 
)

void meta_rectangle_find_linepoint_closest_to_point ( double  x1,
double  y1,
double  x2,
double  y2,
double  px,
double  py,
double *  valx,
double *  valy 
)

Definition at line 1045 of file boxes.c.

Referenced by constrain_aspect_ratio(), and test_find_closest_point_to_line().

GList* meta_rectangle_find_nonintersected_xinerama_edges ( const GList *  xinerama_rects,
const GSList *  all_struts 
)

GList* meta_rectangle_find_onscreen_edges ( const MetaRectangle basic_rect,
const GSList *  all_struts 
)

void meta_rectangle_free_list_and_elements ( GList *  filled_list  ) 

GList* meta_rectangle_get_minimal_spanning_set_for_region ( const MetaRectangle basic_rect,
const GSList *  all_struts 
)

gboolean meta_rectangle_horiz_overlap ( const MetaRectangle rect1,
const MetaRectangle rect2 
)

gboolean meta_rectangle_intersect ( const MetaRectangle src1,
const MetaRectangle src2,
MetaRectangle dest 
)

gboolean meta_rectangle_overlap ( const MetaRectangle rect1,
const MetaRectangle rect2 
)

gboolean meta_rectangle_overlaps_with_region ( const GList *  spanning_rects,
const MetaRectangle rect 
)

Definition at line 779 of file boxes.c.

References FALSE, meta_rectangle_overlap(), and NULL.

Referenced by update_onscreen_requirements().

char* meta_rectangle_region_to_string ( GList *  region,
const char *  separator_string,
char *  output 
)

GList* meta_rectangle_remove_intersections_with_boxes_from_edges ( GList *  edges,
const GSList *  rectangles 
)

void meta_rectangle_resize_with_gravity ( const MetaRectangle old_rect,
MetaRectangle rect,
int  gravity,
int  new_width,
int  new_height 
)

void meta_rectangle_shove_into_region ( const GList *  spanning_rects,
FixedDirections  fixed_directions,
MetaRectangle rect 
)

char* meta_rectangle_to_string ( const MetaRectangle rect,
char *  output 
)

gboolean meta_rectangle_vert_overlap ( const MetaRectangle rect1,
const MetaRectangle rect2 
)


Generated on Sat Aug 23 22:04:22 2008 for metacity by  doxygen 1.5.5