mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Wayland: Clean up listener struct initialization
Adapt style to match the rest of the project.
(cherry picked from commit 0f38382e25
)
This commit is contained in:
parent
50d5de7cd4
commit
2b504e41d5
@ -48,7 +48,8 @@ static void wmBaseHandlePing(void* userData,
|
|||||||
xdg_wm_base_pong(wmBase, serial);
|
xdg_wm_base_pong(wmBase, serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct xdg_wm_base_listener wmBaseListener = {
|
static const struct xdg_wm_base_listener wmBaseListener =
|
||||||
|
{
|
||||||
wmBaseHandlePing
|
wmBaseHandlePing
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -164,7 +165,8 @@ static void registryHandleGlobalRemove(void* userData,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const struct wl_registry_listener registryListener = {
|
static const struct wl_registry_listener registryListener =
|
||||||
|
{
|
||||||
registryHandleGlobal,
|
registryHandleGlobal,
|
||||||
registryHandleGlobalRemove
|
registryHandleGlobalRemove
|
||||||
};
|
};
|
||||||
|
@ -106,7 +106,8 @@ static void outputHandleScale(void* userData,
|
|||||||
monitor->wl.scale = factor;
|
monitor->wl.scale = factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_output_listener outputListener = {
|
static const struct wl_output_listener outputListener =
|
||||||
|
{
|
||||||
outputHandleGeometry,
|
outputHandleGeometry,
|
||||||
outputHandleMode,
|
outputHandleMode,
|
||||||
outputHandleDone,
|
outputHandleDone,
|
||||||
|
@ -392,7 +392,8 @@ static void xdgDecorationHandleConfigure(void* userData,
|
|||||||
createDecorations(window);
|
createDecorations(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct zxdg_toplevel_decoration_v1_listener xdgDecorationListener = {
|
static const struct zxdg_toplevel_decoration_v1_listener xdgDecorationListener =
|
||||||
|
{
|
||||||
xdgDecorationHandleConfigure,
|
xdgDecorationHandleConfigure,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -676,7 +677,8 @@ static void xdgToplevelHandleClose(void* userData,
|
|||||||
_glfwInputWindowCloseRequest(window);
|
_glfwInputWindowCloseRequest(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct xdg_toplevel_listener xdgToplevelListener = {
|
static const struct xdg_toplevel_listener xdgToplevelListener =
|
||||||
|
{
|
||||||
xdgToplevelHandleConfigure,
|
xdgToplevelHandleConfigure,
|
||||||
xdgToplevelHandleClose
|
xdgToplevelHandleClose
|
||||||
};
|
};
|
||||||
@ -1349,7 +1351,8 @@ static void pointerHandleAxis(void* userData,
|
|||||||
_glfwInputScroll(window, x, y);
|
_glfwInputScroll(window, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_pointer_listener pointerListener = {
|
static const struct wl_pointer_listener pointerListener =
|
||||||
|
{
|
||||||
pointerHandleEnter,
|
pointerHandleEnter,
|
||||||
pointerHandleLeave,
|
pointerHandleLeave,
|
||||||
pointerHandleMotion,
|
pointerHandleMotion,
|
||||||
@ -1643,7 +1646,8 @@ static void keyboardHandleRepeatInfo(void* userData,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct wl_keyboard_listener keyboardListener = {
|
static const struct wl_keyboard_listener keyboardListener =
|
||||||
|
{
|
||||||
keyboardHandleKeymap,
|
keyboardHandleKeymap,
|
||||||
keyboardHandleEnter,
|
keyboardHandleEnter,
|
||||||
keyboardHandleLeave,
|
keyboardHandleLeave,
|
||||||
@ -1687,7 +1691,8 @@ static void seatHandleName(void* userData,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_seat_listener seatListener = {
|
static const struct wl_seat_listener seatListener =
|
||||||
|
{
|
||||||
seatHandleCapabilities,
|
seatHandleCapabilities,
|
||||||
seatHandleName,
|
seatHandleName,
|
||||||
};
|
};
|
||||||
@ -1708,8 +1713,9 @@ static void dataOfferHandleOffer(void* userData,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_data_offer_listener dataOfferListener = {
|
static const struct wl_data_offer_listener dataOfferListener =
|
||||||
dataOfferHandleOffer,
|
{
|
||||||
|
dataOfferHandleOffer
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dataDeviceHandleDataOffer(void* userData,
|
static void dataDeviceHandleDataOffer(void* userData,
|
||||||
@ -1798,7 +1804,8 @@ static void dataDeviceHandleSelection(void* userData,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_data_device_listener dataDeviceListener = {
|
const struct wl_data_device_listener dataDeviceListener =
|
||||||
|
{
|
||||||
dataDeviceHandleDataOffer,
|
dataDeviceHandleDataOffer,
|
||||||
dataDeviceHandleEnter,
|
dataDeviceHandleEnter,
|
||||||
dataDeviceHandleLeave,
|
dataDeviceHandleLeave,
|
||||||
@ -2415,7 +2422,8 @@ static void relativePointerHandleRelativeMotion(void* userData,
|
|||||||
_glfwInputCursorPos(window, xpos, ypos);
|
_glfwInputCursorPos(window, xpos, ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct zwp_relative_pointer_v1_listener relativePointerListener = {
|
static const struct zwp_relative_pointer_v1_listener relativePointerListener =
|
||||||
|
{
|
||||||
relativePointerHandleRelativeMotion
|
relativePointerHandleRelativeMotion
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2445,7 +2453,8 @@ static void lockedPointerHandleUnlocked(void* userData,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct zwp_locked_pointer_v1_listener lockedPointerListener = {
|
static const struct zwp_locked_pointer_v1_listener lockedPointerListener =
|
||||||
|
{
|
||||||
lockedPointerHandleLocked,
|
lockedPointerHandleLocked,
|
||||||
lockedPointerHandleUnlocked
|
lockedPointerHandleUnlocked
|
||||||
};
|
};
|
||||||
@ -2612,7 +2621,8 @@ static void dataSourceHandleCancelled(void* userData,
|
|||||||
_glfw.wl.selectionSource = NULL;
|
_glfw.wl.selectionSource = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_data_source_listener dataSourceListener = {
|
static const struct wl_data_source_listener dataSourceListener =
|
||||||
|
{
|
||||||
dataSourceHandleTarget,
|
dataSourceHandleTarget,
|
||||||
dataSourceHandleSend,
|
dataSourceHandleSend,
|
||||||
dataSourceHandleCancelled,
|
dataSourceHandleCancelled,
|
||||||
|
Loading…
Reference in New Issue
Block a user