aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_cursor.h6
-rw-r--r--include/wlr/types/wlr_geometry.h12
2 files changed, 16 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index 64a75e4f..30495d44 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -4,6 +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/xcursor.h>
struct wlr_cursor_state;
@@ -87,12 +88,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_geometry *geo);
/**
* 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);
+void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
+ struct wlr_input_device *dev, struct wlr_geometry *geo);
#endif
diff --git a/include/wlr/types/wlr_geometry.h b/include/wlr/types/wlr_geometry.h
new file mode 100644
index 00000000..3e218bed
--- /dev/null
+++ b/include/wlr/types/wlr_geometry.h
@@ -0,0 +1,12 @@
+#ifndef _WLR_TYPES_GEOMETRY_H
+#define _WLR_TYPES_GEOMETRY_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);
+
+#endif