This patch adds an API function that can be used to restrict mouse
movement from going outside a screen
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
EAPI const Eina_List *elput_input_devices_get(Elput_Seat *seat);
/**
+ * Set the maximum position of any existing mouse pointers
+ *
+ * @param manager
+ * @param maxw
+ * @param maxh
+ *
+ * @ingroup Elput_Input_Group
+ * @since 1.18
+ */
+EAPI void elput_input_pointer_max_set(Elput_Manager *manager, int maxw, int maxh);
+
+/**
* @defgroup Elput_Device_Group
*
* Functions that deal with input devices.
EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
return seat->devices;
}
+
+EAPI void
+elput_input_pointer_max_set(Elput_Manager *manager, int maxw, int maxh)
+{
+ Eina_List *l;
+ Elput_Seat *eseat;
+
+ EINA_SAFETY_ON_NULL_RETURN(manager);
+
+ EINA_LIST_FOREACH(manager->input.seats, l, eseat)
+ {
+ if (!eseat->ptr) continue;
+
+ eseat->ptr->maxw = maxw;
+ eseat->ptr->maxh = maxh;
+ }
+}