1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-07 22:57:25 -04:00

Wayland: Rename handlers for more unicity

This commit is contained in:
Emmanuel Gil Peyrot 2018-09-29 21:01:03 +02:00
parent 4d3f0fb5df
commit 754b7feaa1
2 changed files with 60 additions and 60 deletions

View File

@ -32,16 +32,16 @@
#include <errno.h> #include <errno.h>
static void geometry(void* data, static void outputHandleGeometry(void* data,
struct wl_output* output, struct wl_output* output,
int32_t x, int32_t x,
int32_t y, int32_t y,
int32_t physicalWidth, int32_t physicalWidth,
int32_t physicalHeight, int32_t physicalHeight,
int32_t subpixel, int32_t subpixel,
const char* make, const char* make,
const char* model, const char* model,
int32_t transform) int32_t transform)
{ {
struct _GLFWmonitor *monitor = data; struct _GLFWmonitor *monitor = data;
char name[1024]; char name[1024];
@ -55,12 +55,12 @@ static void geometry(void* data,
monitor->name = _glfw_strdup(name); monitor->name = _glfw_strdup(name);
} }
static void mode(void* data, static void outputHandleMode(void* data,
struct wl_output* output, struct wl_output* output,
uint32_t flags, uint32_t flags,
int32_t width, int32_t width,
int32_t height, int32_t height,
int32_t refresh) int32_t refresh)
{ {
struct _GLFWmonitor *monitor = data; struct _GLFWmonitor *monitor = data;
GLFWvidmode mode; GLFWvidmode mode;
@ -81,16 +81,16 @@ static void mode(void* data,
monitor->wl.currentMode = monitor->modeCount - 1; monitor->wl.currentMode = monitor->modeCount - 1;
} }
static void done(void* data, struct wl_output* output) static void outputHandleDone(void* data, struct wl_output* output)
{ {
struct _GLFWmonitor *monitor = data; struct _GLFWmonitor *monitor = data;
_glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST); _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
} }
static void scale(void* data, static void outputHandleScale(void* data,
struct wl_output* output, struct wl_output* output,
int32_t factor) int32_t factor)
{ {
struct _GLFWmonitor *monitor = data; struct _GLFWmonitor *monitor = data;
@ -98,10 +98,10 @@ static void scale(void* data,
} }
static const struct wl_output_listener outputListener = { static const struct wl_output_listener outputListener = {
geometry, outputHandleGeometry,
mode, outputHandleMode,
done, outputHandleDone,
scale, outputHandleScale,
}; };

View File

@ -39,18 +39,18 @@
#include <poll.h> #include <poll.h>
static void handlePing(void* data, static void shellSurfaceHandlePing(void* data,
struct wl_shell_surface* shellSurface, struct wl_shell_surface* shellSurface,
uint32_t serial) uint32_t serial)
{ {
wl_shell_surface_pong(shellSurface, serial); wl_shell_surface_pong(shellSurface, serial);
} }
static void handleConfigure(void* data, static void shellSurfaceHandleConfigure(void* data,
struct wl_shell_surface* shellSurface, struct wl_shell_surface* shellSurface,
uint32_t edges, uint32_t edges,
int32_t width, int32_t width,
int32_t height) int32_t height)
{ {
_GLFWwindow* window = data; _GLFWwindow* window = data;
float aspectRatio; float aspectRatio;
@ -94,15 +94,15 @@ static void handleConfigure(void* data,
_glfwInputWindowDamage(window); _glfwInputWindowDamage(window);
} }
static void handlePopupDone(void* data, static void shellSurfaceHandlePopupDone(void* data,
struct wl_shell_surface* shellSurface) struct wl_shell_surface* shellSurface)
{ {
} }
static const struct wl_shell_surface_listener shellSurfaceListener = { static const struct wl_shell_surface_listener shellSurfaceListener = {
handlePing, shellSurfaceHandlePing,
handleConfigure, shellSurfaceHandleConfigure,
handlePopupDone shellSurfaceHandlePopupDone
}; };
static int createTmpfileCloexec(char* tmpname) static int createTmpfileCloexec(char* tmpname)
@ -387,9 +387,9 @@ static void checkScaleChange(_GLFWwindow* window)
} }
} }
static void handleEnter(void *data, static void surfaceHandleEnter(void *data,
struct wl_surface *surface, struct wl_surface *surface,
struct wl_output *output) struct wl_output *output)
{ {
_GLFWwindow* window = data; _GLFWwindow* window = data;
_GLFWmonitor* monitor = wl_output_get_user_data(output); _GLFWmonitor* monitor = wl_output_get_user_data(output);
@ -407,9 +407,9 @@ static void handleEnter(void *data,
checkScaleChange(window); checkScaleChange(window);
} }
static void handleLeave(void *data, static void surfaceHandleLeave(void *data,
struct wl_surface *surface, struct wl_surface *surface,
struct wl_output *output) struct wl_output *output)
{ {
_GLFWwindow* window = data; _GLFWwindow* window = data;
_GLFWmonitor* monitor = wl_output_get_user_data(output); _GLFWmonitor* monitor = wl_output_get_user_data(output);
@ -429,8 +429,8 @@ static void handleLeave(void *data,
} }
static const struct wl_surface_listener surfaceListener = { static const struct wl_surface_listener surfaceListener = {
handleEnter, surfaceHandleEnter,
handleLeave surfaceHandleLeave
}; };
static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable) static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)
@ -1352,14 +1352,14 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
wl_buffer_destroy(cursor->wl.buffer); wl_buffer_destroy(cursor->wl.buffer);
} }
static void handleRelativeMotion(void* data, static void relativePointerHandleRelativeMotion(void* data,
struct zwp_relative_pointer_v1* pointer, struct zwp_relative_pointer_v1* pointer,
uint32_t timeHi, uint32_t timeHi,
uint32_t timeLo, uint32_t timeLo,
wl_fixed_t dx, wl_fixed_t dx,
wl_fixed_t dy, wl_fixed_t dy,
wl_fixed_t dxUnaccel, wl_fixed_t dxUnaccel,
wl_fixed_t dyUnaccel) wl_fixed_t dyUnaccel)
{ {
_GLFWwindow* window = data; _GLFWwindow* window = data;
@ -1372,11 +1372,11 @@ static void handleRelativeMotion(void* data,
} }
static const struct zwp_relative_pointer_v1_listener relativePointerListener = { static const struct zwp_relative_pointer_v1_listener relativePointerListener = {
handleRelativeMotion relativePointerHandleRelativeMotion
}; };
static void handleLocked(void* data, static void lockedPointerHandleLocked(void* data,
struct zwp_locked_pointer_v1* lockedPointer) struct zwp_locked_pointer_v1* lockedPointer)
{ {
} }
@ -1396,14 +1396,14 @@ static void unlockPointer(_GLFWwindow* window)
static void lockPointer(_GLFWwindow* window); static void lockPointer(_GLFWwindow* window);
static void handleUnlocked(void* data, static void lockedPointerHandleUnlocked(void* data,
struct zwp_locked_pointer_v1* lockedPointer) struct zwp_locked_pointer_v1* lockedPointer)
{ {
} }
static const struct zwp_locked_pointer_v1_listener lockedPointerListener = { static const struct zwp_locked_pointer_v1_listener lockedPointerListener = {
handleLocked, lockedPointerHandleLocked,
handleUnlocked lockedPointerHandleUnlocked
}; };
static void lockPointer(_GLFWwindow* window) static void lockPointer(_GLFWwindow* window)