cederom commented on code in PR #4098:
URL: https://github.com/apache/nuttx-apps/pull/4098#discussion_r4642757472


##########
graphics/input/generator/input_gen_event.c:
##########
@@ -517,6 +517,74 @@ int input_gen_mouse_wheel(input_gen_ctx_t ctx, int16_t 
wheel)
 
   return input_gen_umouse_write(dev->fd, wheel);
 }
+
+/****************************************************************************
+ * Name: input_gen_scroll
+ *
+ * Description:
+ *   Perform a scroll operation by splitting total value into multiple
+ *   writes with timing control.
+ *
+ * Input Parameters:
+ *   ctx         - The input generator context.
+ *   value       - Total scroll value (positive/negative for direction).
+ *   step        - Units per write (sign is determined by value).
+ *                 If step >= |value|, writes once with full value.
+ *   interval_ms - Delay in milliseconds between each write.
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success.  On failure, a negated errno value is
+ *   returned.
+ *
+ ****************************************************************************/
+
+int input_gen_scroll(input_gen_ctx_t ctx, int16_t value,
+                     int16_t step, uint32_t interval_ms)
+{
+  FAR struct input_gen_dev_s *dev;
+  int16_t sign;
+  int32_t remaining;
+  int16_t chunk;
+  int     ret;
+
+  if (value == 0 || step <= 0)

Review Comment:
   Do we want to return error on no motion or just no action?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to