From 3599fe4a7836e04607aee4e16fa50b24101d3da9 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. (cherry picked from commit 45061750236007f8eaa782a9a8d12ff44733b68a) --- src/wl_init.c | 14 +++++++------- src/wl_monitor.c | 12 ++++++------ src/wl_platform.h | 1 - src/wl_window.c | 14 +++++++------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 7024cfba..730ddb43 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -720,10 +720,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) { } @@ -864,8 +864,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) { int i; @@ -1030,9 +1030,9 @@ static void createKeyTables(void) int _glfwPlatformInit(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 d1448a24..68da1026 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -46,7 +46,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; @@ -63,7 +63,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; @@ -84,7 +84,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) { @@ -101,7 +101,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; } @@ -120,8 +120,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 aaf767c3..2385402e 100644 --- a/src/wl_platform.h +++ b/src/wl_platform.h @@ -347,7 +347,6 @@ typedef struct _GLFWcursorWayland int currentImage; } _GLFWcursorWayland; - void _glfwAddOutputWayland(uint32_t name, uint32_t version); GLFWbool _glfwInputTextWayland(_GLFWwindow* window, uint32_t scancode); diff --git a/src/wl_window.c b/src/wl_window.c index 1359d588..cb2e2237 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -471,9 +471,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); @@ -491,9 +491,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); @@ -1371,7 +1371,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity) { } -void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled) +void _glfwPlatformSetRawMouseMotion(_GLFWwindow* window, GLFWbool enabled) { // This is handled in relativePointerHandleRelativeMotion }