diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_box.h | 20 | ||||
-rw-r--r-- | include/wlr/types/wlr_cursor.h | 6 | ||||
-rw-r--r-- | include/wlr/types/wlr_geometry.h | 20 | ||||
-rw-r--r-- | include/wlr/types/wlr_output_layout.h | 6 |
4 files changed, 26 insertions, 26 deletions
diff --git a/include/wlr/types/wlr_box.h b/include/wlr/types/wlr_box.h new file mode 100644 index 00000000..e2b1ab4e --- /dev/null +++ b/include/wlr/types/wlr_box.h @@ -0,0 +1,20 @@ +#ifndef _WLR_TYPES_GEOMETRY_H +#define _WLR_TYPES_GEOMETRY_H +#include <stdbool.h> + +struct wlr_box { + int x, y; + int width, height; +}; + +void wlr_box_closest_point(struct wlr_box *box, double x, double y, + double *dest_x, double *dest_y); + +bool wlr_box_intersection(struct wlr_box *box_a, + struct wlr_box *box_b, struct wlr_box **dest); + +bool wlr_box_contains_point(struct wlr_box *box, double x, double y); + +bool wlr_box_empty(struct wlr_box *box); + +#endif diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index ef3b8dbb..5fc0ec76 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -4,7 +4,7 @@ #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_input_device.h> -#include <wlr/types/wlr_geometry.h> +#include <wlr/types/wlr_box.h> #include <wlr/xcursor.h> struct wlr_cursor_state; @@ -100,13 +100,13 @@ void wlr_cursor_map_input_to_output(struct wlr_cursor *cur, /** * Maps this cursor to an arbitrary region on the associated wlr_output_layout. */ -void wlr_cursor_map_to_region(struct wlr_cursor *cur, struct wlr_geometry *geo); +void wlr_cursor_map_to_region(struct wlr_cursor *cur, struct wlr_box *box); /** * Maps inputs from this input device to an arbitrary region on the associated * wlr_output_layout. */ void wlr_cursor_map_input_to_region(struct wlr_cursor *cur, - struct wlr_input_device *dev, struct wlr_geometry *geo); + struct wlr_input_device *dev, struct wlr_box *box); #endif diff --git a/include/wlr/types/wlr_geometry.h b/include/wlr/types/wlr_geometry.h deleted file mode 100644 index cac75431..00000000 --- a/include/wlr/types/wlr_geometry.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _WLR_TYPES_GEOMETRY_H -#define _WLR_TYPES_GEOMETRY_H -#include <stdbool.h> - -struct wlr_geometry { - int x, y; - int width, height; -}; - -void wlr_geometry_closest_boundary(struct wlr_geometry *geo, double x, double y, - int *dest_x, int *dest_y, double *distance); - -bool wlr_geometry_intersection(struct wlr_geometry *geo_a, - struct wlr_geometry *geo_b, struct wlr_geometry **dest); - -bool wlr_geometry_contains_point(struct wlr_geometry *geo, int x, int y); - -bool wlr_geometry_empty(struct wlr_geometry *geo); - -#endif diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index dfb5234d..794fc491 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -62,10 +62,10 @@ void wlr_output_layout_closest_boundary(struct wlr_output_layout *layout, double *dest_y); /** - * Get the geometry of the layout for the given reference output. If `reference` - * is NULL, the geometry will be for the extents of the entire layout. + * Get the box of the layout for the given reference output. If `reference` + * is NULL, the box will be for the extents of the entire layout. */ -struct wlr_geometry *wlr_output_layout_get_geometry( +struct wlr_box *wlr_output_layout_get_box( struct wlr_output_layout *layout, struct wlr_output *reference); #endif |