Go to the source code of this file.
Data Structures | |
| struct | ResistanceDataForAnEdge |
| struct | MetaEdgeResistanceData |
Defines | |
| #define | WINDOW_EDGES_RELEVANT(window, display) |
Typedefs | |
| typedef struct ResistanceDataForAnEdge | ResistanceDataForAnEdge |
Functions | |
| static int | find_index_of_edge_near_position (const GArray *edges, int position, gboolean want_interval_min, gboolean horizontal) |
| static gboolean | points_on_same_side (int ref, int pt1, int pt2) |
| static int | find_nearest_position (const GArray *edges, int position, int old_position, const MetaRectangle *new_rect, gboolean horizontal, gboolean only_forward) |
| static gboolean | movement_towards_edge (MetaDirection side, int increment) |
| static gboolean | edge_resistance_timeout (gpointer data) |
| static int | apply_edge_resistance (MetaWindow *window, int old_pos, int new_pos, const MetaRectangle *old_rect, const MetaRectangle *new_rect, GArray *edges, ResistanceDataForAnEdge *resistance_data, GSourceFunc timeout_func, gboolean xdir, gboolean keyboard_op) |
| static int | apply_edge_snapping (int old_pos, int new_pos, const MetaRectangle *new_rect, GArray *edges, gboolean xdir, gboolean keyboard_op) |
| static gboolean | apply_edge_resistance_to_each_side (MetaDisplay *display, MetaWindow *window, const MetaRectangle *old_outer, MetaRectangle *new_outer, GSourceFunc timeout_func, gboolean auto_snap, gboolean keyboard_op, gboolean is_resize) |
| void | meta_display_cleanup_edges (MetaDisplay *display) |
| static int | stupid_sort_requiring_extra_pointer_dereference (gconstpointer a, gconstpointer b) |
| static void | cache_edges (MetaDisplay *display, GList *window_edges, GList *xinerama_edges, GList *screen_edges) |
| static void | initialize_grab_edge_resistance_data (MetaDisplay *display) |
| void | meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display) |
| void | meta_window_edge_resistance_for_move (MetaWindow *window, int old_x, int old_y, int *new_x, int *new_y, GSourceFunc timeout_func, gboolean snap, gboolean is_keyboard_op) |
| void | meta_window_edge_resistance_for_resize (MetaWindow *window, int old_width, int old_height, int *new_width, int *new_height, int gravity, GSourceFunc timeout_func, gboolean snap, gboolean is_keyboard_op) |
| #define WINDOW_EDGES_RELEVANT | ( | window, | |||
| display | ) |
Value:
meta_window_should_be_showing (window) && \ window->screen == display->grab_screen && \ window != display->grab_window && \ window->type != META_WINDOW_DESKTOP && \ window->type != META_WINDOW_MENU && \ window->type != META_WINDOW_SPLASHSCREEN
Definition at line 33 of file edge-resistance.c.
Referenced by meta_display_compute_resistance_and_snapping_edges().
| typedef struct ResistanceDataForAnEdge ResistanceDataForAnEdge |
Definition at line 51 of file edge-resistance.c.
| static int apply_edge_resistance | ( | MetaWindow * | window, | |
| int | old_pos, | |||
| int | new_pos, | |||
| const MetaRectangle * | old_rect, | |||
| const MetaRectangle * | new_rect, | |||
| GArray * | edges, | |||
| ResistanceDataForAnEdge * | resistance_data, | |||
| GSourceFunc | timeout_func, | |||
| gboolean | xdir, | |||
| gboolean | keyboard_op | |||
| ) | [static] |
Definition at line 325 of file edge-resistance.c.
References edge_resistance_timeout(), _MetaEdge::edge_type, FALSE, find_index_of_edge_near_position(), META_EDGE_SCREEN, META_EDGE_WINDOW, META_EDGE_XINERAMA, meta_rectangle_edge_aligns(), movement_towards_edge(), _MetaEdge::rect, _MetaEdge::side_type, ResistanceDataForAnEdge::timeout_edge_pos, ResistanceDataForAnEdge::timeout_func, ResistanceDataForAnEdge::timeout_id, ResistanceDataForAnEdge::timeout_over, ResistanceDataForAnEdge::timeout_setup, TRUE, ResistanceDataForAnEdge::window, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by apply_edge_resistance_to_each_side().
| static gboolean apply_edge_resistance_to_each_side | ( | MetaDisplay * | display, | |
| MetaWindow * | window, | |||
| const MetaRectangle * | old_outer, | |||
| MetaRectangle * | new_outer, | |||
| GSourceFunc | timeout_func, | |||
| gboolean | auto_snap, | |||
| gboolean | keyboard_op, | |||
| gboolean | is_resize | |||
| ) | [static] |
Definition at line 539 of file edge-resistance.c.
References apply_edge_resistance(), apply_edge_snapping(), MetaEdgeResistanceData::bottom_data, MetaEdgeResistanceData::bottom_edges, BOX_BOTTOM, BOX_LEFT, BOX_RIGHT, BOX_TOP, FALSE, _MetaDisplay::grab_edge_resistance_data, _MetaRectangle::height, MetaEdgeResistanceData::left_data, MetaEdgeResistanceData::left_edges, meta_rect(), meta_rectangle_equal(), NULL, MetaEdgeResistanceData::right_data, MetaEdgeResistanceData::right_edges, _MetaWindow::size_hints, MetaEdgeResistanceData::top_data, MetaEdgeResistanceData::top_edges, TRUE, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_window_edge_resistance_for_move(), and meta_window_edge_resistance_for_resize().
| static int apply_edge_snapping | ( | int | old_pos, | |
| int | new_pos, | |||
| const MetaRectangle * | new_rect, | |||
| GArray * | edges, | |||
| gboolean | xdir, | |||
| gboolean | keyboard_op | |||
| ) | [static] |
Definition at line 497 of file edge-resistance.c.
References find_nearest_position().
Referenced by apply_edge_resistance_to_each_side().
| static void cache_edges | ( | MetaDisplay * | display, | |
| GList * | window_edges, | |||
| GList * | xinerama_edges, | |||
| GList * | screen_edges | |||
| ) | [static] |
Definition at line 762 of file edge-resistance.c.
References MetaEdgeResistanceData::bottom_edges, EDGE_LENGTH, FALSE, _MetaDisplay::grab_edge_resistance_data, MetaEdgeResistanceData::left_edges, META_DEBUG_EDGE_RESISTANCE, META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, META_DIRECTION_TOP, meta_is_verbose(), meta_rectangle_edge_list_to_string(), NULL, MetaEdgeResistanceData::right_edges, _MetaEdge::side_type, stupid_sort_requiring_extra_pointer_dereference(), and MetaEdgeResistanceData::top_edges.
Referenced by meta_display_compute_resistance_and_snapping_edges().
| static gboolean edge_resistance_timeout | ( | gpointer | data | ) | [static] |
Definition at line 313 of file edge-resistance.c.
References FALSE, ResistanceDataForAnEdge::timeout_func, ResistanceDataForAnEdge::timeout_id, ResistanceDataForAnEdge::timeout_over, TRUE, and ResistanceDataForAnEdge::window.
Referenced by apply_edge_resistance().
| static int find_index_of_edge_near_position | ( | const GArray * | edges, | |
| int | position, | |||
| gboolean | want_interval_min, | |||
| gboolean | horizontal | |||
| ) | [static] |
Definition at line 70 of file edge-resistance.c.
References _MetaEdge::rect, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by apply_edge_resistance().
| static int find_nearest_position | ( | const GArray * | edges, | |
| int | position, | |||
| int | old_position, | |||
| const MetaRectangle * | new_rect, | |||
| gboolean | horizontal, | |||
| gboolean | only_forward | |||
| ) | [static] |
Definition at line 179 of file edge-resistance.c.
References meta_rectangle_edge_aligns(), meta_rectangle_horiz_overlap(), meta_rectangle_vert_overlap(), points_on_same_side(), _MetaEdge::rect, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by apply_edge_snapping().
| static void initialize_grab_edge_resistance_data | ( | MetaDisplay * | display | ) | [static] |
Definition at line 926 of file edge-resistance.c.
References MetaEdgeResistanceData::bottom_data, FALSE, _MetaDisplay::grab_edge_resistance_data, ResistanceDataForAnEdge::keyboard_buildup, MetaEdgeResistanceData::left_data, MetaEdgeResistanceData::right_data, ResistanceDataForAnEdge::timeout_setup, and MetaEdgeResistanceData::top_data.
Referenced by meta_display_compute_resistance_and_snapping_edges().
| void meta_display_cleanup_edges | ( | MetaDisplay * | display | ) |
Definition at line 668 of file edge-resistance.c.
References MetaEdgeResistanceData::bottom_data, MetaEdgeResistanceData::bottom_edges, _MetaEdge::edge_type, _MetaDisplay::grab_edge_resistance_data, MetaEdgeResistanceData::left_data, MetaEdgeResistanceData::left_edges, META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, META_DIRECTION_TOP, META_EDGE_WINDOW, NULL, MetaEdgeResistanceData::right_data, MetaEdgeResistanceData::right_edges, _MetaEdge::side_type, ResistanceDataForAnEdge::timeout_id, ResistanceDataForAnEdge::timeout_setup, MetaEdgeResistanceData::top_data, MetaEdgeResistanceData::top_edges, and TRUE.
Referenced by meta_display_end_grab_op().
| void meta_display_compute_resistance_and_snapping_edges | ( | MetaDisplay * | display | ) |
Definition at line 942 of file edge-resistance.c.
References _MetaScreen::active_workspace, cache_edges(), _MetaEdge::edge_type, _MetaDisplay::grab_screen, _MetaRectangle::height, initialize_grab_edge_resistance_data(), META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, META_DIRECTION_TOP, META_EDGE_WINDOW, meta_rectangle_edge_cmp(), meta_rectangle_intersect(), meta_rectangle_remove_intersections_with_boxes_from_edges(), meta_stack_list_windows(), META_WINDOW_DOCK, meta_window_get_outer_rect(), NULL, _MetaEdge::rect, _MetaScreen::rect, _MetaWorkspace::screen_edges, _MetaEdge::side_type, _MetaScreen::stack, _MetaWindow::type, _MetaRectangle::width, WINDOW_EDGES_RELEVANT, _MetaRectangle::x, _MetaWorkspace::xinerama_edges, and _MetaRectangle::y.
Referenced by meta_display_begin_grab_op().
| void meta_window_edge_resistance_for_move | ( | MetaWindow * | window, | |
| int | old_x, | |||
| int | old_y, | |||
| int * | new_x, | |||
| int * | new_y, | |||
| GSourceFunc | timeout_func, | |||
| gboolean | snap, | |||
| gboolean | is_keyboard_op | |||
| ) |
Definition at line 1132 of file edge-resistance.c.
References apply_edge_resistance_to_each_side(), BOX_BOTTOM, BOX_LEFT, BOX_RIGHT, BOX_TOP, _MetaWindow::display, FALSE, _MetaDisplay::grab_last_user_action_was_snap, _MetaDisplay::grab_window, _MetaDisplay::grab_wireframe_active, _MetaDisplay::grab_wireframe_rect, META_DEBUG_EDGE_RESISTANCE, meta_window_get_outer_rect(), meta_window_get_xor_rect(), _MetaRectangle::x, and _MetaRectangle::y.
Referenced by process_keyboard_move_grab(), and update_move().
| void meta_window_edge_resistance_for_resize | ( | MetaWindow * | window, | |
| int | old_width, | |||
| int | old_height, | |||
| int * | new_width, | |||
| int * | new_height, | |||
| int | gravity, | |||
| GSourceFunc | timeout_func, | |||
| gboolean | snap, | |||
| gboolean | is_keyboard_op | |||
| ) |
Definition at line 1225 of file edge-resistance.c.
References apply_edge_resistance_to_each_side(), _MetaWindow::display, _MetaDisplay::grab_last_user_action_was_snap, _MetaDisplay::grab_window, _MetaDisplay::grab_wireframe_active, _MetaDisplay::grab_wireframe_rect, _MetaRectangle::height, META_DEBUG_EDGE_RESISTANCE, meta_rectangle_resize_with_gravity(), meta_window_get_outer_rect(), meta_window_get_xor_rect(), TRUE, and _MetaRectangle::width.
Referenced by process_keyboard_resize_grab(), and update_resize().
| static gboolean movement_towards_edge | ( | MetaDirection | side, | |
| int | increment | |||
| ) | [static] |
Definition at line 297 of file edge-resistance.c.
References META_DIRECTION_BOTTOM, META_DIRECTION_LEFT, META_DIRECTION_RIGHT, and META_DIRECTION_TOP.
Referenced by apply_edge_resistance().
| static gboolean points_on_same_side | ( | int | ref, | |
| int | pt1, | |||
| int | pt2 | |||
| ) | [static] |
| static int stupid_sort_requiring_extra_pointer_dereference | ( | gconstpointer | a, | |
| gconstpointer | b | |||
| ) | [static] |
Definition at line 753 of file edge-resistance.c.
References meta_rectangle_edge_cmp_ignore_type().
Referenced by cache_edges().
1.5.5