From 51db087210b14201589701c49adca80e846a84b9 Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 15 Dec 2017 01:00:03 +0100 Subject: Introduce fractional scaling --- include/rootston/config.h | 2 +- include/wlr/types/wlr_cursor.h | 2 +- include/wlr/types/wlr_output.h | 4 ++-- include/wlr/types/wlr_xcursor_manager.h | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/rootston/config.h b/include/rootston/config.h index 1d54314e..d453a82c 100644 --- a/include/rootston/config.h +++ b/include/rootston/config.h @@ -9,7 +9,7 @@ struct roots_output_config { char *name; enum wl_output_transform transform; int x, y; - int scale; + float scale; struct wl_list link; struct { int width, height; diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index c73a4c8d..e072ca05 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -68,7 +68,7 @@ void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev, */ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x, - int32_t hotspot_y, uint32_t scale); + int32_t hotspot_y, float scale); /** * Set the cursor surface. The surface can be committed to update the cursor diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 39aad718..037fa515 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -45,7 +45,7 @@ struct wlr_output { char make[48]; char model[16]; char serial[16]; - uint32_t scale; + float scale; int32_t width, height; int32_t phys_width, phys_height; // mm enum wl_output_subpixel subpixel; @@ -92,7 +92,7 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, void wlr_output_set_transform(struct wlr_output *output, enum wl_output_transform transform); void wlr_output_set_position(struct wlr_output *output, int32_t lx, int32_t ly); -void wlr_output_set_scale(struct wlr_output *output, uint32_t scale); +void wlr_output_set_scale(struct wlr_output *output, float scale); void wlr_output_destroy(struct wlr_output *output); void wlr_output_effective_resolution(struct wlr_output *output, int *width, int *height); diff --git a/include/wlr/types/wlr_xcursor_manager.h b/include/wlr/types/wlr_xcursor_manager.h index c78a6e8d..2a2c9035 100644 --- a/include/wlr/types/wlr_xcursor_manager.h +++ b/include/wlr/types/wlr_xcursor_manager.h @@ -9,7 +9,7 @@ * A scaled XCursor theme. */ struct wlr_xcursor_manager_theme { - uint32_t scale; + float scale; struct wlr_xcursor_theme *theme; struct wl_list link; }; @@ -38,10 +38,10 @@ struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name, void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager); int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager, - uint32_t scale); + float scale); struct wlr_xcursor *wlr_xcursor_manager_get_xcursor( - struct wlr_xcursor_manager *manager, const char *name, uint32_t scale); + struct wlr_xcursor_manager *manager, const char *name, float scale); /** * Set a `wlr_cursor` image. The manager uses all currently loaded scaled -- cgit v1.2.3