[Bf-blender-cvs] [b3a713fffa3] master: Cleanup: use const arguments for GHOST/Wayland
Campbell Barton
noreply at git.blender.org
Fri Jun 24 02:00:57 CEST 2022
Commit: b3a713fffa3928e1692cf5b1354728d0feaf4c77
Author: Campbell Barton
Date: Fri Jun 24 09:58:27 2022 +1000
Branches: master
https://developer.blender.org/rBb3a713fffa3928e1692cf5b1354728d0feaf4c77
Cleanup: use const arguments for GHOST/Wayland
===================================================================
M intern/ghost/intern/GHOST_SystemWayland.cpp
M intern/ghost/intern/GHOST_WindowWayland.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 85860bccbe3..daedae3112b 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -626,12 +626,12 @@ static const std::vector<std::string> mime_send = {
static void relative_pointer_handle_relative_motion(
void *data,
struct zwp_relative_pointer_v1 * /*zwp_relative_pointer_v1*/,
- uint32_t /*utime_hi*/,
- uint32_t /*utime_lo*/,
- wl_fixed_t dx,
- wl_fixed_t dy,
- wl_fixed_t /*dx_unaccel*/,
- wl_fixed_t /*dy_unaccel*/)
+ const uint32_t /*utime_hi*/,
+ const uint32_t /*utime_lo*/,
+ const wl_fixed_t dx,
+ const wl_fixed_t dy,
+ const wl_fixed_t /*dx_unaccel*/,
+ const wl_fixed_t /*dy_unaccel*/)
{
input_t *input = static_cast<input_t *>(data);
GHOST_WindowWayland *win = window_from_surface(input->focus_pointer);
@@ -741,7 +741,7 @@ static void data_source_handle_target(void * /*data*/,
static void data_source_handle_send(void *data,
struct wl_data_source * /*wl_data_source*/,
const char * /*mime_type*/,
- int32_t fd)
+ const int32_t fd)
{
input_t *input = static_cast<input_t *>(data);
std::lock_guard lock{input->data_source_mutex};
@@ -793,7 +793,7 @@ static void data_source_handle_dnd_finished(void * /*data*/,
*/
static void data_source_handle_action(void * /*data*/,
struct wl_data_source * /*wl_data_source*/,
- uint32_t /*dnd_action*/)
+ const uint32_t /*dnd_action*/)
{
/* pass */
}
@@ -822,14 +822,14 @@ static void data_offer_handle_offer(void *data,
static void data_offer_handle_source_actions(void *data,
struct wl_data_offer * /*wl_data_offer*/,
- uint32_t source_actions)
+ const uint32_t source_actions)
{
static_cast<data_offer_t *>(data)->source_actions = source_actions;
}
static void data_offer_handle_action(void *data,
struct wl_data_offer * /*wl_data_offer*/,
- uint32_t dnd_action)
+ const uint32_t dnd_action)
{
static_cast<data_offer_t *>(data)->dnd_action = dnd_action;
}
@@ -857,10 +857,10 @@ static void data_device_handle_data_offer(void * /*data*/,
static void data_device_handle_enter(void *data,
struct wl_data_device * /*wl_data_device*/,
- uint32_t serial,
+ const uint32_t serial,
struct wl_surface *surface,
- wl_fixed_t x,
- wl_fixed_t y,
+ const wl_fixed_t x,
+ const wl_fixed_t y,
struct wl_data_offer *id)
{
input_t *input = static_cast<input_t *>(data);
@@ -903,9 +903,9 @@ static void data_device_handle_leave(void *data, struct wl_data_device * /*wl_da
static void data_device_handle_motion(void *data,
struct wl_data_device * /*wl_data_device*/,
- uint32_t /*time*/,
- wl_fixed_t x,
- wl_fixed_t y)
+ const uint32_t /*time*/,
+ const wl_fixed_t x,
+ const wl_fixed_t y)
{
input_t *input = static_cast<input_t *>(data);
std::lock_guard lock{input->data_offer_dnd_mutex};
@@ -1157,10 +1157,10 @@ struct wl_surface_listener cursor_surface_listener = {
static void pointer_handle_enter(void *data,
struct wl_pointer * /*wl_pointer*/,
- uint32_t serial,
+ const uint32_t serial,
struct wl_surface *surface,
- wl_fixed_t surface_x,
- wl_fixed_t surface_y)
+ const wl_fixed_t surface_x,
+ const wl_fixed_t surface_y)
{
GHOST_WindowWayland *win = window_from_surface(surface);
if (!win) {
@@ -1189,7 +1189,7 @@ static void pointer_handle_enter(void *data,
static void pointer_handle_leave(void *data,
struct wl_pointer * /*wl_pointer*/,
- uint32_t /*serial*/,
+ const uint32_t /*serial*/,
struct wl_surface *surface)
{
/* First clear the `focus_pointer`, since the window won't exist when closing the window. */
@@ -1204,9 +1204,9 @@ static void pointer_handle_leave(void *data,
static void pointer_handle_motion(void *data,
struct wl_pointer * /*wl_pointer*/,
- uint32_t /*time*/,
- wl_fixed_t surface_x,
- wl_fixed_t surface_y)
+ const uint32_t /*time*/,
+ const wl_fixed_t surface_x,
+ const wl_fixed_t surface_y)
{
input_t *input = static_cast<input_t *>(data);
GHOST_WindowWayland *win = window_from_surface(input->focus_pointer);
@@ -1228,10 +1228,10 @@ static void pointer_handle_motion(void *data,
static void pointer_handle_button(void *data,
struct wl_pointer * /*wl_pointer*/,
- uint32_t serial,
- uint32_t /*time*/,
- uint32_t button,
- uint32_t state)
+ const uint32_t serial,
+ const uint32_t /*time*/,
+ const uint32_t button,
+ const uint32_t state)
{
input_t *input = static_cast<input_t *>(data);
GHOST_IWindow *win = window_from_surface(input->focus_pointer);
@@ -1282,9 +1282,9 @@ static void pointer_handle_button(void *data,
static void pointer_handle_axis(void *data,
struct wl_pointer * /*wl_pointer*/,
- uint32_t /*time*/,
- uint32_t axis,
- wl_fixed_t value)
+ const uint32_t /*time*/,
+ const uint32_t axis,
+ const wl_fixed_t value)
{
input_t *input = static_cast<input_t *>(data);
GHOST_IWindow *win = window_from_surface(input->focus_pointer);
@@ -1316,7 +1316,7 @@ static const struct wl_pointer_listener pointer_listener = {
static void tablet_tool_handle_type(void *data,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t tool_type)
+ const uint32_t tool_type)
{
tablet_tool_input_t *tool_input = static_cast<tablet_tool_input_t *>(data);
@@ -1325,22 +1325,22 @@ static void tablet_tool_handle_type(void *data,
static void tablet_tool_handle_hardware_serial(void * /*data*/,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t /*hardware_serial_hi*/,
- uint32_t /*hardware_serial_lo*/)
+ const uint32_t /*hardware_serial_hi*/,
+ const uint32_t /*hardware_serial_lo*/)
{
}
static void tablet_tool_handle_hardware_id_wacom(
void * /*data*/,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t /*hardware_id_hi*/,
- uint32_t /*hardware_id_lo*/)
+ const uint32_t /*hardware_id_hi*/,
+ const uint32_t /*hardware_id_lo*/)
{
}
static void tablet_tool_handle_capability(void * /*data*/,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t /*capability*/)
+ const uint32_t /*capability*/)
{
}
@@ -1362,7 +1362,7 @@ static void tablet_tool_handle_removed(void *data, struct zwp_tablet_tool_v2 *zw
}
static void tablet_tool_handle_proximity_in(void *data,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t serial,
+ const uint32_t serial,
struct zwp_tablet_v2 * /*tablet*/,
struct wl_surface *surface)
{
@@ -1407,7 +1407,7 @@ static void tablet_tool_handle_proximity_out(void *data,
static void tablet_tool_handle_down(void *data,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- uint32_t serial)
+ const uint32_t serial)
{
tablet_tool_input_t *tool_input = static_cast<tablet_tool_input_t *>(data);
input_t *input = tool_input->input;
@@ -1442,8 +1442,8 @@ static void tablet_tool_handle_up(void *data, struct zwp_tablet_tool_v2 * /*zwp_
static void tablet_tool_handle_motion(void *data,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/,
- wl_fixed_t x,
- wl_fixed_t y)
+ const wl_fixed_t x,
+ const wl_fixed_t y
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list