[PATCH weston 04/17] uevdev: rename API functions

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 5 03:33:01 PDT 2012


So we can have another API without udev beside this, for other
backends.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/compositor-drm.c     |   14 +++++++-------
 src/compositor-openwfd.c |    2 +-
 src/udev-evdev.c         |   22 +++++++++++-----------
 src/udev-evdev.h         |   14 +++++++-------
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 62f21f3..8e48960 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1712,7 +1712,7 @@ drm_destroy(struct weston_compositor *ec)
 	struct weston_seat *seat, *next;
 
 	wl_list_for_each_safe(seat, next, &ec->seat_list, link)
-		evdev_input_destroy(seat);
+		uevdev_input_destroy(seat);
 
 	wl_event_source_remove(d->udev_drm_source);
 	wl_event_source_remove(d->drm_source);
@@ -1776,14 +1776,14 @@ vt_func(struct weston_compositor *compositor, int event)
 		drm_compositor_set_modes(ec);
 		weston_compositor_damage_all(compositor);
 		wl_list_for_each(seat, &compositor->seat_list, link) {
-			evdev_add_devices(ec->udev, seat);
-			evdev_enable_udev_monitor(ec->udev, seat);
+			uevdev_add_devices(ec->udev, seat);
+			uevdev_enable_udev_monitor(ec->udev, seat);
 		}
 		break;
 	case TTY_LEAVE_VT:
 		wl_list_for_each(seat, &compositor->seat_list, link) {
-			evdev_disable_udev_monitor(seat);
-			evdev_remove_devices(seat);
+			uevdev_disable_udev_monitor(seat);
+			uevdev_remove_devices(seat);
 		}
 
 		compositor->focus = 0;
@@ -1923,7 +1923,7 @@ drm_compositor_create(struct wl_display *display,
 
 	path = NULL;
 
-	evdev_input_create(&ec->base, ec->udev, seat);
+	uevdev_input_create(&ec->base, ec->udev, seat);
 
 	loop = wl_display_get_event_loop(ec->base.wl_display);
 	ec->drm_source =
@@ -1958,7 +1958,7 @@ err_udev_monitor:
 err_drm_source:
 	wl_event_source_remove(ec->drm_source);
 	wl_list_for_each_safe(weston_seat, next, &ec->base.seat_list, link)
-		evdev_input_destroy(weston_seat);
+		uevdev_input_destroy(weston_seat);
 err_sprite:
 	destroy_sprites(ec);
 err_egl:
diff --git a/src/compositor-openwfd.c b/src/compositor-openwfd.c
index a684168..3519ac4 100644
--- a/src/compositor-openwfd.c
+++ b/src/compositor-openwfd.c
@@ -657,7 +657,7 @@ wfd_compositor_create(struct wl_display *display,
 		return NULL;
 	}
 
-	evdev_input_create(&ec->base, ec->udev, seat);
+	uevdev_input_create(&ec->base, ec->udev, seat);
 
 	loop = wl_display_get_event_loop(ec->base.wl_display);
 	ec->wfd_source =
diff --git a/src/udev-evdev.c b/src/udev-evdev.c
index c4dfcb9..0f67169 100644
--- a/src/udev-evdev.c
+++ b/src/udev-evdev.c
@@ -71,7 +71,7 @@ device_removed(struct evdev_input_device *device)
 }
 
 void
-evdev_add_devices(struct udev *udev, struct weston_seat *seat_base)
+uevdev_add_devices(struct udev *udev, struct weston_seat *seat_base)
 {
 	struct evdev_seat *seat = (struct evdev_seat *) seat_base;
 	struct udev_enumerate *e;
@@ -148,7 +148,7 @@ evdev_udev_handler(int fd, uint32_t mask, void *data)
 }
 
 int
-evdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base)
+uevdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base)
 {
 	struct evdev_seat *master = (struct evdev_seat *) seat_base;
 	struct wl_event_loop *loop;
@@ -184,7 +184,7 @@ evdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base)
 }
 
 void
-evdev_disable_udev_monitor(struct weston_seat *seat_base)
+uevdev_disable_udev_monitor(struct weston_seat *seat_base)
 {
 	struct evdev_seat *seat = (struct evdev_seat *) seat_base;
 
@@ -198,8 +198,8 @@ evdev_disable_udev_monitor(struct weston_seat *seat_base)
 }
 
 void
-evdev_input_create(struct weston_compositor *c, struct udev *udev,
-		   const char *seat_id)
+uevdev_input_create(struct weston_compositor *c, struct udev *udev,
+		    const char *seat_id)
 {
 	struct evdev_seat *seat;
 
@@ -213,19 +213,19 @@ evdev_input_create(struct weston_compositor *c, struct udev *udev,
 
 	wl_list_init(&seat->devices_list);
 	seat->seat_id = strdup(seat_id);
-	if (!evdev_enable_udev_monitor(udev, &seat->base)) {
+	if (!uevdev_enable_udev_monitor(udev, &seat->base)) {
 		free(seat->seat_id);
 		free(seat);
 		return;
 	}
 
-	evdev_add_devices(udev, &seat->base);
+	uevdev_add_devices(udev, &seat->base);
 
 	c->seat = &seat->base;
 }
 
 void
-evdev_remove_devices(struct weston_seat *seat_base)
+uevdev_remove_devices(struct weston_seat *seat_base)
 {
 	struct evdev_seat *seat = (struct evdev_seat *) seat_base;
 	struct evdev_input_device *device, *next;
@@ -237,12 +237,12 @@ evdev_remove_devices(struct weston_seat *seat_base)
 }
 
 void
-evdev_input_destroy(struct weston_seat *seat_base)
+uevdev_input_destroy(struct weston_seat *seat_base)
 {
 	struct evdev_seat *seat = (struct evdev_seat *) seat_base;
 
-	evdev_remove_devices(seat_base);
-	evdev_disable_udev_monitor(&seat->base);
+	uevdev_remove_devices(seat_base);
+	uevdev_disable_udev_monitor(&seat->base);
 
 	wl_list_remove(&seat->base.link);
 	free(seat->seat_id);
diff --git a/src/udev-evdev.h b/src/udev-evdev.h
index 7a88c2d..a4a9ce9 100644
--- a/src/udev-evdev.h
+++ b/src/udev-evdev.h
@@ -26,22 +26,22 @@
 #include <libudev.h>
 
 void
-evdev_add_devices(struct udev *udev, struct weston_seat *seat_base);
+uevdev_add_devices(struct udev *udev, struct weston_seat *seat_base);
 
 void
-evdev_remove_devices(struct weston_seat *seat_base);
+uevdev_remove_devices(struct weston_seat *seat_base);
 
 void
-evdev_input_create(struct weston_compositor *c, struct udev *udev,
-		   const char *seat);
+uevdev_input_create(struct weston_compositor *c, struct udev *udev,
+		    const char *seat);
 
 void
-evdev_input_destroy(struct weston_seat *seat);
+uevdev_input_destroy(struct weston_seat *seat);
 
 int
-evdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base);
+uevdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base);
 
 void
-evdev_disable_udev_monitor(struct weston_seat *seat_base);
+uevdev_disable_udev_monitor(struct weston_seat *seat_base);
 
 #endif /* UDEV_EVDEV_H */
-- 
1.7.8.6



More information about the wayland-devel mailing list