Add fixed-point versions of weston_surface_{to, from}_global
To be used by input code, paralleling the existing integer versions.
Enlarge the surface_{to,from}_global_float input types to GLfloat to
avoid losing precision.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/src/compositor.h b/src/compositor.h
index 8a3a4a0..3d9ddd8 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -389,12 +389,20 @@
weston_surface_to_global(struct weston_surface *surface,
int32_t sx, int32_t sy, int32_t *x, int32_t *y);
void
+weston_surface_to_global_fixed(struct weston_surface *surface,
+ wl_fixed_t sx, wl_fixed_t sy,
+ wl_fixed_t *x, wl_fixed_t *y);
+void
weston_surface_to_global_float(struct weston_surface *surface,
- int32_t sx, int32_t sy, GLfloat *x, GLfloat *y);
+ GLfloat sx, GLfloat sy, GLfloat *x, GLfloat *y);
void
weston_surface_from_global(struct weston_surface *surface,
int32_t x, int32_t y, int32_t *sx, int32_t *sy);
+void
+weston_surface_from_global_fixed(struct weston_surface *surface,
+ wl_fixed_t x, wl_fixed_t y,
+ wl_fixed_t *sx, wl_fixed_t *sy);
void
weston_spring_init(struct weston_spring *spring,