diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-08-25 13:26:13 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-08-26 08:32:11 -0400 |
commit | 0a97b68278a621882c712b55ffe851101e5902d0 (patch) | |
tree | b8cbe14e0aafdccd2e0c366d0b95ae76fef0cde7 /include | |
parent | d0cf8d0d01b12d359be5c4216ef5f0bdbdfee622 (diff) |
implement cursor and device geometry mapping
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_cursor.h | 6 | ||||
-rw-r--r-- | include/wlr/types/wlr_geometry.h | 12 |
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 |