From 45061750236007f8eaa782a9a8d12ff44733b68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 23 Mar 2022 18:55:22 +0100 Subject: [PATCH] Wayland: Clean up pointer declarations Adapt style to match the rest of the project. --- src/wl_init.c | 14 +++++++------- src/wl_monitor.c | 12 ++++++------ src/wl_platform.h | 10 +++++----- src/wl_window.c | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 720ac53e..061d2726 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -724,10 +724,10 @@ static void dataDeviceHandleDataOffer(void* data, static void dataDeviceHandleEnter(void* data, struct wl_data_device* device, uint32_t serial, - struct wl_surface *surface, + struct wl_surface* surface, wl_fixed_t x, wl_fixed_t y, - struct wl_data_offer *offer) + struct wl_data_offer* offer) { } @@ -863,8 +863,8 @@ static void registryHandleGlobal(void* data, } } -static void registryHandleGlobalRemove(void *data, - struct wl_registry *registry, +static void registryHandleGlobalRemove(void* data, + struct wl_registry* registry, uint32_t name) { _GLFWmonitor* monitor; @@ -1155,9 +1155,9 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform) int _glfwInitWayland(void) { - const char *cursorTheme; - const char *cursorSizeStr; - char *cursorSizeEnd; + const char* cursorTheme; + const char* cursorSizeStr; + char* cursorSizeEnd; long cursorSizeLong; int cursorSize; diff --git a/src/wl_monitor.c b/src/wl_monitor.c index 5bdda918..44d9f0e1 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -48,7 +48,7 @@ static void outputHandleGeometry(void* data, const char* model, int32_t transform) { - struct _GLFWmonitor *monitor = data; + struct _GLFWmonitor* monitor = data; monitor->wl.x = x; monitor->wl.y = y; @@ -65,7 +65,7 @@ static void outputHandleMode(void* data, int32_t height, int32_t refresh) { - struct _GLFWmonitor *monitor = data; + struct _GLFWmonitor* monitor = data; GLFWvidmode mode; mode.width = width; @@ -86,7 +86,7 @@ static void outputHandleMode(void* data, static void outputHandleDone(void* data, struct wl_output* output) { - struct _GLFWmonitor *monitor = data; + struct _GLFWmonitor* monitor = data; if (monitor->widthMM <= 0 || monitor->heightMM <= 0) { @@ -103,7 +103,7 @@ static void outputHandleScale(void* data, struct wl_output* output, int32_t factor) { - struct _GLFWmonitor *monitor = data; + struct _GLFWmonitor* monitor = data; monitor->wl.scale = factor; } @@ -122,8 +122,8 @@ static const struct wl_output_listener outputListener = { void _glfwAddOutputWayland(uint32_t name, uint32_t version) { - _GLFWmonitor *monitor; - struct wl_output *output; + _GLFWmonitor* monitor; + struct wl_output* output; if (version < 2) { diff --git a/src/wl_platform.h b/src/wl_platform.h index 9e7202bd..405f00b3 100644 --- a/src/wl_platform.h +++ b/src/wl_platform.h @@ -45,10 +45,10 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR #include "xkb_unicode.h" #include "posix_poll.h" -typedef int (* PFN_wl_display_flush)(struct wl_display *display); -typedef void (* PFN_wl_display_cancel_read)(struct wl_display *display); -typedef int (* PFN_wl_display_dispatch_pending)(struct wl_display *display); -typedef int (* PFN_wl_display_read_events)(struct wl_display *display); +typedef int (* PFN_wl_display_flush)(struct wl_display* display); +typedef void (* PFN_wl_display_cancel_read)(struct wl_display* display); +typedef int (* PFN_wl_display_dispatch_pending)(struct wl_display* display); +typedef int (* PFN_wl_display_read_events)(struct wl_display* display); typedef struct wl_display* (* PFN_wl_display_connect)(const char*); typedef void (* PFN_wl_display_disconnect)(struct wl_display*); typedef int (* PFN_wl_display_roundtrip)(struct wl_display*); @@ -457,7 +457,7 @@ float _glfwGetWindowOpacityWayland(_GLFWwindow* window); void _glfwSetWindowOpacityWayland(_GLFWwindow* window, float opacity); void _glfwSetWindowMousePassthroughWayland(_GLFWwindow* window, GLFWbool enabled); -void _glfwSetRawMouseMotionWayland(_GLFWwindow *window, GLFWbool enabled); +void _glfwSetRawMouseMotionWayland(_GLFWwindow* window, GLFWbool enabled); GLFWbool _glfwRawMouseMotionSupportedWayland(void); void _glfwPollEventsWayland(void); diff --git a/src/wl_window.c b/src/wl_window.c index 0222b925..1e743132 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -364,9 +364,9 @@ static void checkScaleChange(_GLFWwindow* window) } } -static void surfaceHandleEnter(void *data, - struct wl_surface *surface, - struct wl_output *output) +static void surfaceHandleEnter(void* data, + struct wl_surface* surface, + struct wl_output* output) { _GLFWwindow* window = data; _GLFWmonitor* monitor = wl_output_get_user_data(output); @@ -384,9 +384,9 @@ static void surfaceHandleEnter(void *data, checkScaleChange(window); } -static void surfaceHandleLeave(void *data, - struct wl_surface *surface, - struct wl_output *output) +static void surfaceHandleLeave(void* data, + struct wl_surface* surface, + struct wl_output* output) { _GLFWwindow* window = data; _GLFWmonitor* monitor = wl_output_get_user_data(output); @@ -1163,7 +1163,7 @@ void _glfwSetWindowOpacityWayland(_GLFWwindow* window, float opacity) "Wayland: The platform does not support setting the window opacity"); } -void _glfwSetRawMouseMotionWayland(_GLFWwindow *window, GLFWbool enabled) +void _glfwSetRawMouseMotionWayland(_GLFWwindow* window, GLFWbool enabled) { // This is handled in relativePointerHandleRelativeMotion }