ecore_drm2: Add API to return pointer position

This commit is contained in:
Christopher Michael 2024-01-17 07:32:13 -05:00
parent cfb8cabb3b
commit 868a0b42ac
2 changed files with 13 additions and 0 deletions

View File

@ -83,6 +83,7 @@ EAPI Eina_Bool ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device *dev, in
EAPI void ecore_drm2_device_calibrate(Ecore_Drm2_Device *dev, int w, int h);
EAPI Eina_Bool ecore_drm2_device_vt_set(Ecore_Drm2_Device *dev, int vt);
EAPI int ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *dev);
EAPI void ecore_drm2_device_pointer_xy_get(Ecore_Drm2_Device *dev, int *x, int *y);
/* Display API functions */
EAPI char *ecore_drm2_display_name_get(Ecore_Drm2_Display *disp);

View File

@ -462,3 +462,15 @@ ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *dev)
return dev->clock_id;
}
EAPI void
ecore_drm2_device_pointer_xy_get(Ecore_Drm2_Device *dev, int *x, int *y)
{
if (x) *x = 0;
if (y) *y = 0;
EINA_SAFETY_ON_NULL_RETURN(dev);
EINA_SAFETY_ON_NULL_RETURN(dev->em);
elput_input_pointer_xy_get(dev->em, NULL, x, y);
}