From 5e06d61e4238f7e2ebc9ac4750ff477423b02279 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 27 Aug 2017 17:35:12 -0400 Subject: implement touch up and touch down --- include/wlr/types/wlr_cursor.h | 3 +++ include/wlr/types/wlr_geometry.h | 2 ++ include/wlr/types/wlr_output_layout.h | 13 +++++++++++++ 3 files changed, 18 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index ad5c52a4..4ba7b25f 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -46,6 +46,9 @@ void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur); bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev, double x, double y); +void wlr_cursor_warp_absolute(struct wlr_cursor *cur, + struct wlr_input_device *dev, double x_mm, double y_mm); + /** * Move the cursor in the direction of the given x and y coordinates. * diff --git a/include/wlr/types/wlr_geometry.h b/include/wlr/types/wlr_geometry.h index 7ac2f843..cac75431 100644 --- a/include/wlr/types/wlr_geometry.h +++ b/include/wlr/types/wlr_geometry.h @@ -15,4 +15,6 @@ bool wlr_geometry_intersection(struct wlr_geometry *geo_a, 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 144c2d5a..0d157f56 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -4,14 +4,20 @@ #include #include +struct wlr_output_layout_state; + struct wlr_output_layout { struct wl_list outputs; + struct wlr_output_layout_state *state; }; +struct wlr_output_layout_output_state; + struct wlr_output_layout_output { struct wlr_output *output; int x, y; struct wl_list link; + struct wlr_output_layout_output_state *state; }; struct wlr_output_layout *wlr_output_layout_init(); @@ -55,4 +61,11 @@ void wlr_output_layout_closest_boundary(struct wlr_output_layout *layout, struct wlr_output *reference, double x, double y, double *dest_x, 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. + */ +struct wlr_geometry *wlr_output_layout_get_geometry( + struct wlr_output_layout *layout, struct wlr_output *reference); + #endif -- cgit v1.2.3