|
marco 1.29.1
Window manager
|
#include "boxes.h"#include <glib.h>#include <stdlib.h>#include <stdio.h>#include <X11/Xutil.h>#include <time.h>#include <math.h>Macros | |
| #define | NUM_RANDOM_RUNS 10000 |
| #define | EPSILON 0.000000001 |
Functions | |
| static void | init_random_ness (void) |
| static void | get_random_rect (MetaRectangle *rect) |
| static MetaRectangle * | new_meta_rect (int x, int y, int width, int height) |
| static MetaStrut * | new_meta_strut (int x, int y, int width, int height, int side) |
| static MetaEdge * | new_screen_edge (int x, int y, int width, int height, int side_type) |
| static MetaEdge * | new_xinerama_edge (int x, int y, int width, int height, int side_type) |
| static void | test_area (void) |
| static void | test_intersect (void) |
| static void | test_equal (void) |
| static void | test_overlap_funcs (void) |
| static void | test_basic_fitting (void) |
| static void | free_strut_list (GSList *struts) |
| static GSList * | get_strut_list (int which) |
| static GList * | get_screen_region (int which) |
| static GList * | get_screen_edges (int which) |
| static GList * | get_xinerama_edges (int which_xinerama_set, int which_strut_set) |
| static void | verify_lists_are_equal (GList *code, GList *answer) |
| static void | test_regions_okay (void) |
| static void | test_region_fitting (void) |
| static void | test_clamping_to_region (void) |
| static gboolean | rect_overlaps_region (const GList *spanning_rects, const MetaRectangle *rect) |
| static void | test_clipping_to_region (void) |
| static void | test_shoving_into_region (void) |
| static void | verify_edge_lists_are_equal (GList *code, GList *answer) |
| static void | test_find_onscreen_edges (void) |
| static void | test_find_nonintersected_xinerama_edges (void) |
| static void | test_gravity_resize (void) |
| static void | test_find_closest_point_to_line (void) |
| int | main (void) |
Variables | |
| gboolean | time_to_print = FALSE |
| #define EPSILON 0.000000001 |
| #define NUM_RANDOM_RUNS 10000 |
|
static |
Referenced by get_screen_edges(), get_screen_region(), and get_xinerama_edges().
|
static |
|
static |
References free_strut_list(), get_strut_list(), meta_rect(), meta_rectangle_find_onscreen_edges(), and NULL.
Referenced by test_find_onscreen_edges().
|
static |
References FALSE, free_strut_list(), get_strut_list(), meta_rect(), meta_rectangle_get_minimal_spanning_set_for_region(), and NULL.
Referenced by test_clamping_to_region(), test_clipping_to_region(), test_region_fitting(), test_regions_okay(), and test_shoving_into_region().
|
static |
References new_meta_strut(), and NULL.
Referenced by get_screen_edges(), get_screen_region(), and get_xinerama_edges().
|
static |
References free_strut_list(), get_strut_list(), _MetaRectangle::height, meta_rectangle_find_nonintersected_xinerama_edges(), new_meta_rect(), NULL, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by test_find_nonintersected_xinerama_edges().
| int main | ( | void | ) |
References init_random_ness(), test_area(), test_basic_fitting(), test_clamping_to_region(), test_clipping_to_region(), test_equal(), test_find_closest_point_to_line(), test_find_nonintersected_xinerama_edges(), test_find_onscreen_edges(), test_gravity_resize(), test_intersect(), test_overlap_funcs(), test_region_fitting(), test_regions_okay(), and test_shoving_into_region().
|
static |
References _MetaRectangle::height, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by get_xinerama_edges(), and test_regions_okay().
|
static |
References _MetaStrut::edge, META_EDGE_SCREEN, meta_rect(), _MetaStrut::rect, and _MetaStrut::side.
Referenced by get_strut_list().
|
static |
References _MetaEdge::edge_type, _MetaRectangle::height, META_EDGE_SCREEN, _MetaEdge::rect, _MetaEdge::side_type, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by test_find_onscreen_edges().
|
static |
|
static |
References FALSE, meta_rectangle_overlap(), and NULL.
Referenced by test_clipping_to_region().
|
static |
References get_random_rect(), _MetaRectangle::height, meta_rect(), meta_rectangle_area(), NUM_RANDOM_RUNS, and _MetaRectangle::width.
Referenced by main().
|
static |
References get_random_rect(), meta_rect(), meta_rectangle_contains_rect(), meta_rectangle_could_fit_rect(), and NUM_RANDOM_RUNS.
Referenced by main().
|
static |
References FIXED_DIRECTION_X, FIXED_DIRECTION_Y, get_random_rect(), get_screen_region(), _MetaRectangle::height, meta_rect(), meta_rectangle_clamp_to_fit_into_region(), meta_rectangle_could_fit_in_region(), NUM_RANDOM_RUNS, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by main().
|
static |
References FIXED_DIRECTION_X, get_random_rect(), get_screen_region(), meta_rect(), meta_rectangle_clip_to_region(), meta_rectangle_contained_in_region(), meta_rectangle_equal(), NUM_RANDOM_RUNS, and rect_overlaps_region().
Referenced by main().
|
static |
|
static |
References EPSILON, and meta_rectangle_find_linepoint_closest_to_point().
Referenced by main().
|
static |
References EDGE_LENGTH, get_xinerama_edges(), META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, META_DIRECTION_TOP, meta_rectangle_edge_list_to_string(), new_xinerama_edge(), NULL, and verify_edge_lists_are_equal().
Referenced by main().
|
static |
References EDGE_LENGTH, get_screen_edges(), META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, META_DIRECTION_TOP, meta_rectangle_edge_list_to_string(), new_screen_edge(), NULL, and verify_edge_lists_are_equal().
Referenced by main().
|
static |
References meta_rect(), meta_rectangle_equal(), meta_rectangle_resize_with_gravity(), and _MetaRectangle::x.
Referenced by main().
|
static |
References meta_rect(), meta_rectangle_area(), meta_rectangle_equal(), and meta_rectangle_intersect().
Referenced by main().
|
static |
References get_random_rect(), meta_rect(), meta_rectangle_horiz_overlap(), meta_rectangle_overlap(), meta_rectangle_vert_overlap(), and NUM_RANDOM_RUNS.
Referenced by main().
|
static |
References get_random_rect(), get_screen_region(), meta_rect(), meta_rectangle_contained_in_region(), meta_rectangle_could_fit_in_region(), and NUM_RANDOM_RUNS.
Referenced by main().
|
static |
References get_screen_region(), meta_rectangle_region_to_string(), new_meta_rect(), NULL, RECT_LENGTH, and verify_lists_are_equal().
Referenced by main().
|
static |
References FIXED_DIRECTION_X, FIXED_DIRECTION_Y, get_random_rect(), get_screen_region(), meta_rect(), meta_rectangle_contained_in_region(), meta_rectangle_could_fit_in_region(), meta_rectangle_equal(), meta_rectangle_shove_into_region(), and NUM_RANDOM_RUNS.
Referenced by main().
|
static |
References _MetaEdge::edge_type, _MetaRectangle::height, meta_rectangle_equal(), _MetaEdge::rect, _MetaEdge::side_type, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by test_find_nonintersected_xinerama_edges(), and test_find_onscreen_edges().
|
static |
References _MetaRectangle::height, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by test_regions_okay().
| gboolean time_to_print = FALSE |