mirror of
				https://github.com/labwc/labwc.git
				synced 2025-10-29 05:40:24 -04:00 
			
		
		
		
	 1d72a08916
			
		
	
	
		1d72a08916
		
	
	
	
	
		
			
			Adds functions for calculation of distances between window edges, as well as for window growing and shrinking. All calculations are based on the "pending" geometry. Ignored from snapping: - views that do not share the same output - minimized views - maximized views - views that are neither: - part of the current workspace - part of the always-on-top tree
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			597 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			597 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0-only */
 | |
| #ifndef LABWC_SNAP_H
 | |
| #define LABWC_SNAP_H
 | |
| 
 | |
| #include "common/border.h"
 | |
| #include "view.h"
 | |
| 
 | |
| struct wlr_box;
 | |
| 
 | |
| struct border snap_get_max_distance(struct view *view);
 | |
| 
 | |
| void snap_vector_to_next_edge(struct view *view, enum view_edge direction, int *dx, int *dy);
 | |
| int snap_distance_to_next_edge(struct view *view, enum view_edge direction);
 | |
| void snap_grow_to_next_edge(struct view *view, enum view_edge direction, struct wlr_box *geo);
 | |
| void snap_shrink_to_next_edge(struct view *view, enum view_edge direction, struct wlr_box *geo);
 | |
| 
 | |
| #endif /* LABWC_SNAP_H */
 |