summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_device.c
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-11 09:07:48 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit13337c2583d089909dd2c872fcfa9cab11e9eb70 (patch)
tree674b8177f5f3451e9d22755f5865b0aad0668f31 /src/lib/ecore_drm2/ecore_drm2_device.c
parent3c332e1f88881b918abb1c2d042ca8d391f8d588 (diff)
ecore-drm2: Add API functions needed to port Ecore_Evas drm
This patch adds 2 new API functions which are required by Ecore_Evas in order for it to function with drm. These API functions allow for restricting pointer movement, and for setting the window id which will be used when sending input events Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index 9e7d7a6063..4b3afea2b1 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -226,3 +226,36 @@ ecore_drm2_device_pointer_warp(Ecore_Drm2_Device *device, int x, int y)
226 226
227 elput_input_pointer_xy_set(device->em, NULL, x, y); 227 elput_input_pointer_xy_set(device->em, NULL, x, y);
228} 228}
229
230EAPI void
231ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int window)
232{
233 const Eina_List *seats, *l;
234 const Eina_List *devs, *ll;
235 Elput_Seat *seat;
236 Elput_Device *dev;
237
238 EINA_SAFETY_ON_NULL_RETURN(device);
239 EINA_SAFETY_ON_NULL_RETURN(device->em);
240
241 seats = elput_manager_seats_get(device->em);
242 if (!seats) return;
243
244 EINA_LIST_FOREACH(seats, l, seat)
245 {
246 devs = elput_input_devices_get(seat);
247 if (!devs) continue;
248
249 EINA_LIST_FOREACH(devs, ll, dev)
250 elput_device_window_set(dev, window);
251 }
252}
253
254EAPI void
255ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, int h)
256{
257 EINA_SAFETY_ON_NULL_RETURN(device);
258 EINA_SAFETY_ON_NULL_RETURN(device->em);
259
260 elput_input_pointer_max_set(device->em, w, h);
261}