[RFC PATCH libinput] Rename scroll_mode to scroll_method

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 18 18:31:03 PST 2014


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

--- 
would like to get some input from native english speakers here. I was
writing hooks to use the new scroll method interface and for some reason
scroll "mode" struck me as the wrong word, with "method" being more
appropriate to describe how the scrolling is triggered. I didn't pick that
up on reviewing, only when I started using the hooks.

fwiw, the definitions of both words:

mode
        a way or manner in which something occurs or is experienced,
        expressed, or done.

method
        a particular procedure for accomplishing or approaching something,
        especially a systematic or established one.

funnily enough 'mode' seems the correct word for natural scrolling, so you'd
set a scroll method and have the natural scroll mode enabled/disabled. which
sounds right to me but feels like it could be inconsistent too.

and that's where I need input from someone who knows this stuff better than
me...

Cheers,
   Peter

fwiw, patch is on top of a few others here, prob won't apply locally on your
box, but it's just a scroll_mode -> scroll_method rename.

 src/evdev.c            |  56 +++++++++++++-------------
 src/evdev.h            |  10 ++---
 src/libinput-private.h |  14 +++----
 src/libinput.c         |  50 +++++++++++------------
 src/libinput.h         | 106 ++++++++++++++++++++++++-------------------------
 test/pointer.c         |   6 +--
 test/trackpoint.c      |   6 +--
 7 files changed, 124 insertions(+), 124 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index bd742a6..5882d80 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -125,8 +125,8 @@ evdev_pointer_notify_button(struct evdev_device *device,
 			device->buttons.change_to_left_handed(device);
 
 		if (state == LIBINPUT_BUTTON_STATE_RELEASED &&
-		    device->scroll.change_scroll_mode)
-			device->scroll.change_scroll_mode(device);
+		    device->scroll.change_scroll_method)
+			device->scroll.change_scroll_method(device);
 	}
 
 }
@@ -217,7 +217,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
 		device->rel.dy = 0;
 
 		/* Use unaccelerated deltas for pointing stick scroll */
-		if (device->scroll.mode == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
+		if (device->scroll.method == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
 		    hw_is_key_down(device, device->scroll.button)) {
 			if (device->scroll.button_scroll_active)
 				evdev_post_scroll(device, time,
@@ -460,7 +460,7 @@ evdev_process_key(struct evdev_device *device,
 				   LIBINPUT_KEY_STATE_RELEASED);
 		break;
 	case EVDEV_KEY_TYPE_BUTTON:
-		if (device->scroll.mode == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
+		if (device->scroll.method == LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
 		    e->code == device->scroll.button) {
 			evdev_button_scroll_button(device, time, e->value);
 			break;
@@ -848,49 +848,49 @@ evdev_init_left_handed(struct evdev_device *device,
 }
 
 static uint32_t
-evdev_scroll_get_modes(struct libinput_device *device)
+evdev_scroll_get_methods(struct libinput_device *device)
 {
 	return LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN;
 }
 
 static void
-evdev_change_scroll_mode(struct evdev_device *device)
+evdev_change_scroll_method(struct evdev_device *device)
 {
-	if (device->scroll.want_mode == device->scroll.mode &&
+	if (device->scroll.want_method == device->scroll.method &&
 	    device->scroll.want_button == device->scroll.button)
 		return;
 
 	if (evdev_any_button_down(device))
 		return;
 
-	device->scroll.mode = device->scroll.want_mode;
+	device->scroll.method = device->scroll.want_method;
 	device->scroll.button = device->scroll.want_button;
 }
 
 static enum libinput_config_status
-evdev_scroll_set_mode(struct libinput_device *device,
-		      enum libinput_config_scroll_mode mode)
+evdev_scroll_set_method(struct libinput_device *device,
+			enum libinput_config_scroll_method method)
 {
 	struct evdev_device *evdev = (struct evdev_device*)device;
 
-	evdev->scroll.want_mode = mode;
-	evdev->scroll.change_scroll_mode(evdev);
+	evdev->scroll.want_method = method;
+	evdev->scroll.change_scroll_method(evdev);
 
 	return LIBINPUT_CONFIG_STATUS_SUCCESS;
 }
 
-static enum libinput_config_scroll_mode
-evdev_scroll_get_mode(struct libinput_device *device)
+static enum libinput_config_scroll_method
+evdev_scroll_get_method(struct libinput_device *device)
 {
 	struct evdev_device *evdev = (struct evdev_device *)device;
 
 	/* return the wanted configuration, even if it hasn't taken
 	 * effect yet! */
-	return evdev->scroll.want_mode;
+	return evdev->scroll.want_method;
 }
 
-static enum libinput_config_scroll_mode
-evdev_scroll_get_default_mode(struct libinput_device *device)
+static enum libinput_config_scroll_method
+evdev_scroll_get_default_method(struct libinput_device *device)
 {
 	struct evdev_device *evdev = (struct evdev_device *)device;
 
@@ -907,7 +907,7 @@ evdev_scroll_set_button(struct libinput_device *device,
 	struct evdev_device *evdev = (struct evdev_device*)device;
 
 	evdev->scroll.want_button = button;
-	evdev->scroll.change_scroll_mode(evdev);
+	evdev->scroll.change_scroll_method(evdev);
 
 	return LIBINPUT_CONFIG_STATUS_SUCCESS;
 }
@@ -935,23 +935,23 @@ evdev_scroll_get_default_button(struct libinput_device *device)
 
 static int
 evdev_init_button_scroll(struct evdev_device *device,
-			 void (*change_scroll_mode)(struct evdev_device *))
+			 void (*change_scroll_method)(struct evdev_device *))
 {
 	libinput_timer_init(&device->scroll.timer, device->base.seat->libinput,
 			    evdev_button_scroll_timeout, device);
-	device->scroll.config.get_modes = evdev_scroll_get_modes;
-	device->scroll.config.set_mode = evdev_scroll_set_mode;
-	device->scroll.config.get_mode = evdev_scroll_get_mode;
-	device->scroll.config.get_default_mode = evdev_scroll_get_default_mode;
+	device->scroll.config.get_methods = evdev_scroll_get_methods;
+	device->scroll.config.set_method = evdev_scroll_set_method;
+	device->scroll.config.get_method = evdev_scroll_get_method;
+	device->scroll.config.get_default_method = evdev_scroll_get_default_method;
 	device->scroll.config.set_button = evdev_scroll_set_button;
 	device->scroll.config.get_button = evdev_scroll_get_button;
 	device->scroll.config.get_default_button = evdev_scroll_get_default_button;
-	device->base.config.scroll_mode = &device->scroll.config;
-	device->scroll.mode = evdev_scroll_get_default_mode((struct libinput_device *)device);
-	device->scroll.want_mode = device->scroll.mode;
+	device->base.config.scroll_method = &device->scroll.config;
+	device->scroll.method = evdev_scroll_get_default_method((struct libinput_device *)device);
+	device->scroll.want_method = device->scroll.method;
 	device->scroll.button = evdev_scroll_get_default_button((struct libinput_device *)device);
 	device->scroll.want_button = device->scroll.button;
-	device->scroll.change_scroll_mode = change_scroll_mode;
+	device->scroll.change_scroll_method = change_scroll_method;
 
 	return 0;
 }
@@ -1045,7 +1045,7 @@ fallback_dispatch_create(struct libinput_device *device)
 
 	if (evdev_device->scroll.want_button &&
 	    evdev_init_button_scroll(evdev_device,
-				     evdev_change_scroll_mode) == -1) {
+				     evdev_change_scroll_method) == -1) {
 		free(dispatch);
 		return NULL;
 	}
diff --git a/src/evdev.h b/src/evdev.h
index 35da319..cc01b3c 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -100,16 +100,16 @@ struct evdev_device {
 
 	struct {
 		struct libinput_timer timer;
-		struct libinput_device_config_scroll_mode config;
-		/* Currently enabled mode, button */
-		enum libinput_config_scroll_mode mode;
+		struct libinput_device_config_scroll_method config;
+		/* Currently enabled method, button */
+		enum libinput_config_scroll_method method;
 		uint32_t button;
 		/* set during device init, used at runtime to delay changes
 		 * until all buttons are up */
-		enum libinput_config_scroll_mode want_mode;
+		enum libinput_config_scroll_method want_method;
 		uint32_t want_button;
 		/* Checks if buttons are down and commits the setting */
-		void (*change_scroll_mode)(struct evdev_device *device);
+		void (*change_scroll_method)(struct evdev_device *device);
 		bool button_scroll_active;
 		double threshold;
 		uint32_t direction;
diff --git a/src/libinput-private.h b/src/libinput-private.h
index 5310160..c361016 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -132,12 +132,12 @@ struct libinput_device_config_left_handed {
 	int (*get_default)(struct libinput_device *device);
 };
 
-struct libinput_device_config_scroll_mode {
-	uint32_t (*get_modes)(struct libinput_device *device);
-	enum libinput_config_status (*set_mode)(struct libinput_device *device,
-						enum libinput_config_scroll_mode mode);
-	enum libinput_config_scroll_mode (*get_mode)(struct libinput_device *device);
-	enum libinput_config_scroll_mode (*get_default_mode)(struct libinput_device *device);
+struct libinput_device_config_scroll_method {
+	uint32_t (*get_methods)(struct libinput_device *device);
+	enum libinput_config_status (*set_method)(struct libinput_device *device,
+						  enum libinput_config_scroll_method method);
+	enum libinput_config_scroll_method (*get_method)(struct libinput_device *device);
+	enum libinput_config_scroll_method (*get_default_method)(struct libinput_device *device);
 	enum libinput_config_status (*set_button)(struct libinput_device *device,
 						  uint32_t button);
 	uint32_t (*get_button)(struct libinput_device *device);
@@ -151,7 +151,7 @@ struct libinput_device_config {
 	struct libinput_device_config_accel *accel;
 	struct libinput_device_config_natural_scroll *natural_scroll;
 	struct libinput_device_config_left_handed *left_handed;
-	struct libinput_device_config_scroll_mode *scroll_mode;
+	struct libinput_device_config_scroll_method *scroll_method;
 };
 
 struct libinput_device {
diff --git a/src/libinput.c b/src/libinput.c
index 3f5370f..aa12bfc 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1533,23 +1533,23 @@ libinput_device_config_buttons_get_default_left_handed(struct libinput_device *d
 }
 
 LIBINPUT_EXPORT uint32_t
-libinput_device_config_scroll_get_modes(struct libinput_device *device)
+libinput_device_config_scroll_get_methods(struct libinput_device *device)
 {
-	if (device->config.scroll_mode)
-		return device->config.scroll_mode->get_modes(device);
+	if (device->config.scroll_method)
+		return device->config.scroll_method->get_methods(device);
 	else
 		return 0;
 }
 
 LIBINPUT_EXPORT enum libinput_config_status
-libinput_device_config_scroll_set_mode(struct libinput_device *device,
-				       enum libinput_config_scroll_mode mode)
+libinput_device_config_scroll_set_method(struct libinput_device *device,
+					 enum libinput_config_scroll_method method)
 {
-	if ((libinput_device_config_scroll_get_modes(device) & mode) != mode)
+	if ((libinput_device_config_scroll_get_methods(device) & method) != method)
 		return LIBINPUT_CONFIG_STATUS_UNSUPPORTED;
 
-	/* Check mode is a single valid mode */
-	switch (mode) {
+	/* Check method is a single valid method */
+	switch (method) {
 	case LIBINPUT_CONFIG_SCROLL_NO_SCROLL:
 	case LIBINPUT_CONFIG_SCROLL_2FG:
 	case LIBINPUT_CONFIG_SCROLL_EDGE:
@@ -1559,26 +1559,26 @@ libinput_device_config_scroll_set_mode(struct libinput_device *device,
 		return LIBINPUT_CONFIG_STATUS_INVALID;
 	}
 
-	if (device->config.scroll_mode)
-		return device->config.scroll_mode->set_mode(device, mode);
-	else /* mode must be _NO_SCROLL to get here */
+	if (device->config.scroll_method)
+		return device->config.scroll_method->set_method(device, method);
+	else /* method must be _NO_SCROLL to get here */
 		return LIBINPUT_CONFIG_STATUS_SUCCESS;
 }
 
-LIBINPUT_EXPORT enum libinput_config_scroll_mode
-libinput_device_config_scroll_get_mode(struct libinput_device *device)
+LIBINPUT_EXPORT enum libinput_config_scroll_method
+libinput_device_config_scroll_get_method(struct libinput_device *device)
 {
-	if (device->config.scroll_mode)
-		return device->config.scroll_mode->get_mode(device);
+	if (device->config.scroll_method)
+		return device->config.scroll_method->get_method(device);
 	else
 		return LIBINPUT_CONFIG_SCROLL_NO_SCROLL;
 }
 
-LIBINPUT_EXPORT enum libinput_config_scroll_mode
-libinput_device_config_scroll_get_default_mode(struct libinput_device *device)
+LIBINPUT_EXPORT enum libinput_config_scroll_method
+libinput_device_config_scroll_get_default_method(struct libinput_device *device)
 {
-	if (device->config.scroll_mode)
-		return device->config.scroll_mode->get_default_mode(device);
+	if (device->config.scroll_method)
+		return device->config.scroll_method->get_default_method(device);
 	else
 		return LIBINPUT_CONFIG_SCROLL_NO_SCROLL;
 }
@@ -1587,32 +1587,32 @@ LIBINPUT_EXPORT enum libinput_config_status
 libinput_device_config_scroll_set_button(struct libinput_device *device,
 					 uint32_t button)
 {
-	if ((libinput_device_config_scroll_get_modes(device) &
+	if ((libinput_device_config_scroll_get_methods(device) &
 	     LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) == 0)
 		return LIBINPUT_CONFIG_STATUS_UNSUPPORTED;
 
 	if (button && !libinput_device_has_button(device, button))
 		return LIBINPUT_CONFIG_STATUS_INVALID;
 
-	return device->config.scroll_mode->set_button(device, button);
+	return device->config.scroll_method->set_button(device, button);
 }
 
 LIBINPUT_EXPORT uint32_t
 libinput_device_config_scroll_get_button(struct libinput_device *device)
 {
-	if ((libinput_device_config_scroll_get_modes(device) &
+	if ((libinput_device_config_scroll_get_methods(device) &
 	     LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) == 0)
 		return 0;
 
-	return device->config.scroll_mode->get_button(device);
+	return device->config.scroll_method->get_button(device);
 }
 
 LIBINPUT_EXPORT uint32_t
 libinput_device_config_scroll_get_default_button(struct libinput_device *device)
 {
-	if ((libinput_device_config_scroll_get_modes(device) &
+	if ((libinput_device_config_scroll_get_methods(device) &
 	     LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) == 0)
 		return 0;
 
-	return device->config.scroll_mode->get_default_button(device);
+	return device->config.scroll_method->get_default_button(device);
 }
diff --git a/src/libinput.h b/src/libinput.h
index 3b39c96..2847317 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -2042,10 +2042,10 @@ int
 libinput_device_config_buttons_get_default_left_handed(struct libinput_device *device);
 
 /**
- * The scroll mode of a device selects when to generate scroll axis events
+ * The scroll method of a device selects when to generate scroll axis events
  * instead of pointer motion events.
  */
-enum libinput_config_scroll_mode {
+enum libinput_config_scroll_method {
 	/**
 	 * Never send scroll events instead of pointer motion events.
 	 * Note scroll wheels, etc. will still send scroll events.
@@ -2070,104 +2070,104 @@ enum libinput_config_scroll_mode {
 /**
  * @ingroup config
  *
- * Check which scroll modes a device supports. The mode defines when to
+ * Check which scroll methods a device supports. The method defines when to
  * generate scroll axis events instead of pointer motion events.
  *
  * @param device The device to configure
  *
- * @return A bitmask of possible modes.
+ * @return A bitmask of possible methods.
  *
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_button
  * @see libinput_device_config_scroll_get_default_button
  */
 uint32_t
-libinput_device_config_scroll_get_modes(struct libinput_device *device);
+libinput_device_config_scroll_get_methods(struct libinput_device *device);
 
 /**
  * @ingroup config
  *
- * Set the scroll mode for this device. The mode defines when to
+ * Set the scroll method for this device. The method defines when to
  * generate scroll axis events instead of pointer motion events.
  *
  * @note Setting @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN enables
- * the scroll mode, but scrolling is only activated when the configured
+ * the scroll method, but scrolling is only activated when the configured
  * button is held down. If no button is set, i.e.
  * libinput_device_config_scroll_get_button() returns 0, scrolling
  * cannot activate.
  *
  * @param device The device to configure
- * @param mode The scroll mode for this device.
+ * @param method The scroll method for this device.
  *
  * @return A config status code.
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_get_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_get_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_button
  * @see libinput_device_config_scroll_get_default_button
  */
 enum libinput_config_status
-libinput_device_config_scroll_set_mode(struct libinput_device *device,
-				       enum libinput_config_scroll_mode mode);
+libinput_device_config_scroll_set_method(struct libinput_device *device,
+					 enum libinput_config_scroll_method method);
 
 /**
  * @ingroup config
  *
- * Get the scroll mode for this device. The mode defines when to
+ * Get the scroll method for this device. The method defines when to
  * generate scroll axis events instead of pointer motion events.
  *
  * @param device The device to configure
- * @return The current scroll mode for this device.
+ * @return The current scroll method for this device.
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_button
  * @see libinput_device_config_scroll_get_default_button
  */
-enum libinput_config_scroll_mode
-libinput_device_config_scroll_get_mode(struct libinput_device *device);
+enum libinput_config_scroll_method
+libinput_device_config_scroll_get_method(struct libinput_device *device);
 
 /**
  * @ingroup config
  *
- * Get the default scroll mode for this device. The mode defines when to
+ * Get the default scroll method for this device. The method defines when to
  * generate scroll axis events instead of pointer motion events.
  *
  * @param device The device to configure
- * @return The default scroll mode for this device.
+ * @return The default scroll method for this device.
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_button
  * @see libinput_device_config_scroll_get_default_button
  */
-enum libinput_config_scroll_mode
-libinput_device_config_scroll_get_default_mode(struct libinput_device *device);
+enum libinput_config_scroll_method
+libinput_device_config_scroll_get_default_method(struct libinput_device *device);
 
 /**
  * @ingroup config
  *
- * Set the button for the @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN mode
+ * Set the button for the @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method
  * for this device.
  *
- * When the current scroll mode is set to @ref
+ * When the current scroll method is set to @ref
  * LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN, no button press/release events
  * will be send for the configured button.
  *
  * When the configured button is pressed, any motion events along a
  * scroll-capable axis are turned into scroll axis events.
  *
- * @note Setting the button does not change the scroll mode. To change the
- * scroll mode call libinput_device_config_scroll_set_mode().
+ * @note Setting the button does not change the scroll method. To change the
+ * scroll method call libinput_device_config_scroll_set_method().
  *
  * If the button is 0, button scrolling is effectively disabled.
  *
@@ -2180,10 +2180,10 @@ libinput_device_config_scroll_get_default_mode(struct libinput_device *device);
  * @retval LIBINPUT_CONFIG_STATUS_INVALID the given button does not
  * exist on this device
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_get_button
  * @see libinput_device_config_scroll_get_default_button
  */
@@ -2194,24 +2194,24 @@ libinput_device_config_scroll_set_button(struct libinput_device *device,
 /**
  * @ingroup config
  *
- * Get the button for the @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN mode for
+ * Get the button for the @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for
  * this device.
  *
- * If @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN scroll mode is not supported,
+ * If @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN scroll method is not supported,
  * or no button is set, this function returns 0.
  *
  * @note The return value is independent of the currently selected
- * scroll-mode. For button scrolling to activate, a device must have the
- * @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN mode enabled, and a non-zero
+ * scroll-method. For button scrolling to activate, a device must have the
+ * @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method enabled, and a non-zero
  * button set as scroll button.
  *
  * @param device The device to configure
  * @return The button which when pressed switches to sending scroll events
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_default_button
  */
@@ -2221,19 +2221,19 @@ libinput_device_config_scroll_get_button(struct libinput_device *device);
 /**
  * @ingroup config
  *
- * Get the default button for LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN mode
+ * Get the default button for LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method
  * for this device.
  *
- * If @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN scroll mode is not supported,
+ * If @ref LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN scroll method is not supported,
  * or no default button is set, this function returns 0.
  *
  * @param device The device to configure
- * @return The default button for LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN mode
+ * @return The default button for LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method
  *
- * @see libinput_device_config_scroll_get_modes
- * @see libinput_device_config_scroll_set_mode
- * @see libinput_device_config_scroll_get_mode
- * @see libinput_device_config_scroll_get_default_mode
+ * @see libinput_device_config_scroll_get_methods
+ * @see libinput_device_config_scroll_set_method
+ * @see libinput_device_config_scroll_get_method
+ * @see libinput_device_config_scroll_get_default_method
  * @see libinput_device_config_scroll_set_button
  * @see libinput_device_config_scroll_get_button
  */
diff --git a/test/pointer.c b/test/pointer.c
index 487cd16..206accd 100644
--- a/test/pointer.c
+++ b/test/pointer.c
@@ -615,7 +615,7 @@ START_TEST(pointer_scroll_button)
 	struct libinput *li = dev->libinput;
 
 	/* Make left button switch to scrolling mode */
-	libinput_device_config_scroll_set_mode(dev->libinput_device,
+	libinput_device_config_scroll_set_method(dev->libinput_device,
 					LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN);
 	libinput_device_config_scroll_set_button(dev->libinput_device,
 					BTN_LEFT);
@@ -639,8 +639,8 @@ START_TEST(pointer_scroll_button)
 	litest_assert_empty_queue(li);
 
 	/* Restore default scroll behavior */
-	libinput_device_config_scroll_set_mode(dev->libinput_device,
-		libinput_device_config_scroll_get_default_mode(
+	libinput_device_config_scroll_set_method(dev->libinput_device,
+		libinput_device_config_scroll_get_default_method(
 			dev->libinput_device));
 	libinput_device_config_scroll_set_button(dev->libinput_device,
 		libinput_device_config_scroll_get_default_button(
diff --git a/test/trackpoint.c b/test/trackpoint.c
index 3d965d4..1d1a10a 100644
--- a/test/trackpoint.c
+++ b/test/trackpoint.c
@@ -81,7 +81,7 @@ START_TEST(trackpoint_middlebutton_noscroll)
 	struct libinput_event *event;
 
 	/* Disable middle button scrolling */
-	libinput_device_config_scroll_set_mode(dev->libinput_device,
+	libinput_device_config_scroll_set_method(dev->libinput_device,
 					LIBINPUT_CONFIG_SCROLL_NO_SCROLL);
 
 	litest_drain_events(li);
@@ -101,8 +101,8 @@ START_TEST(trackpoint_middlebutton_noscroll)
 	litest_assert_empty_queue(li);
 
 	/* Restore default scroll behavior */
-	libinput_device_config_scroll_set_mode(dev->libinput_device,
-		libinput_device_config_scroll_get_default_mode(
+	libinput_device_config_scroll_set_method(dev->libinput_device,
+		libinput_device_config_scroll_get_default_method(
 			dev->libinput_device));
 }
 END_TEST
-- 
2.1.0



More information about the wayland-devel mailing list