mouse: Add method to show/hide the system pointer
Add a new set_ptr_visible() method to the mouse uclass to allow hiding and showing the system mouse pointer. This is useful with sandbox when rendering a custom mouse pointer, such as in expo mode. The method is optional and returns -ENOSYS if not supported by the driver. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -83,6 +83,16 @@ int mouse_get_pos(struct udevice *dev, struct vid_pos *pos)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mouse_set_ptr_visible(struct udevice *dev, bool visible)
|
||||
{
|
||||
struct mouse_ops *ops = mouse_get_ops(dev);
|
||||
|
||||
if (!ops->set_ptr_visible)
|
||||
return -ENOSYS;
|
||||
|
||||
return ops->set_ptr_visible(dev, visible);
|
||||
}
|
||||
|
||||
UCLASS_DRIVER(mouse) = {
|
||||
.id = UCLASS_MOUSE,
|
||||
.name = "mouse",
|
||||
|
||||
Reference in New Issue
Block a user