[PATCH libinput 5/6] udev: rename create_from_udev to udev_create_for_seat
Peter Hutterer
peter.hutterer at who-t.net
Wed Feb 5 20:13:09 PST 2014
Maintain proper namespacing rename the backend-specific calls to
libinput_<backend>_<foo>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/libinput.h | 10 +++++-----
src/udev-seat.c | 8 ++++----
test/udev.c | 28 ++++++++++++++--------------
tools/event-debug.c | 2 +-
4 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/libinput.h b/src/libinput.h
index 38a5a52..e91918e 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -670,7 +670,7 @@ struct libinput_interface {
* @param path The device path to open
* @param flags Flags as defined by open(2)
* @param user_data The user_data provided in
- * libinput_create_from_udev()
+ * libinput_udev_create_for_seat()
*
* @return the file descriptor, or a negative errno on failure.
*/
@@ -680,7 +680,7 @@ struct libinput_interface {
*
* @param fd The file descriptor to close
* @param user_data The user_data provided in
- * libinput_create_from_udev()
+ * libinput_udev_create_for_seat()
*/
void (*close_restricted)(int fd, void *user_data);
};
@@ -702,7 +702,7 @@ struct libinput_interface {
* error.
*/
struct libinput *
-libinput_create_from_udev(const struct libinput_interface *interface,
+libinput_udev_create_for_seat(const struct libinput_interface *interface,
void *user_data,
struct udev *udev,
const char *seat_id);
@@ -957,8 +957,8 @@ libinput_seat_get_user_data(struct libinput_seat *seat);
*
* Return the physical name of the seat. For libinput contexts created from
* udev, this is always the same value as passed into
- * libinput_create_from_udev() and all seats from that context will have the
- * same physical name.
+ * libinput_udev_create_for_seat() and all seats from that context will have
+ * the same physical name.
*
* The physical name of the seat is one that is usually set by the system or
* lower levels of the stack. In most cases, this is the base filter for
diff --git a/src/udev-seat.c b/src/udev-seat.c
index b564c83..bf6ce66 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -337,10 +337,10 @@ static const struct libinput_interface_backend interface_backend = {
};
LIBINPUT_EXPORT struct libinput *
-libinput_create_from_udev(const struct libinput_interface *interface,
- void *user_data,
- struct udev *udev,
- const char *seat_id)
+libinput_udev_create_for_seat(const struct libinput_interface *interface,
+ void *user_data,
+ struct udev *udev,
+ const char *seat_id)
{
struct udev_input *input;
diff --git a/test/udev.c b/test/udev.c
index 235d10e..ee25673 100644
--- a/test/udev.c
+++ b/test/udev.c
@@ -55,22 +55,22 @@ START_TEST(udev_create_NULL)
struct udev *udev = (struct udev*)0xdeadbeef;
const char *seat = (const char*)0xdeaddead;
- li = libinput_create_from_udev(NULL, NULL, NULL, NULL);
+ li = libinput_udev_create_for_seat(NULL, NULL, NULL, NULL);
ck_assert(li == NULL);
- li = libinput_create_from_udev(&interface, NULL, NULL, NULL);
+ li = libinput_udev_create_for_seat(&interface, NULL, NULL, NULL);
ck_assert(li == NULL);
- li = libinput_create_from_udev(NULL, NULL, udev, NULL);
+ li = libinput_udev_create_for_seat(NULL, NULL, udev, NULL);
ck_assert(li == NULL);
- li = libinput_create_from_udev(NULL, NULL, NULL, seat);
+ li = libinput_udev_create_for_seat(NULL, NULL, NULL, seat);
ck_assert(li == NULL);
- li = libinput_create_from_udev(&interface, NULL, udev, NULL);
+ li = libinput_udev_create_for_seat(&interface, NULL, udev, NULL);
ck_assert(li == NULL);
- li = libinput_create_from_udev(NULL, NULL, udev, seat);
+ li = libinput_udev_create_for_seat(NULL, NULL, udev, seat);
ck_assert(li == NULL);
- li = libinput_create_from_udev(&interface, NULL, NULL, seat);
+ li = libinput_udev_create_for_seat(&interface, NULL, NULL, seat);
ck_assert(li == NULL);
}
END_TEST
@@ -85,7 +85,7 @@ START_TEST(udev_create_seat0)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
fd = libinput_get_fd(li);
@@ -113,7 +113,7 @@ START_TEST(udev_create_empty_seat)
ck_assert(udev != NULL);
/* expect a libinput reference, but no events */
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seatdoesntexist");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seatdoesntexist");
ck_assert(li != NULL);
fd = libinput_get_fd(li);
@@ -147,7 +147,7 @@ START_TEST(udev_added_seat_default)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
libinput_dispatch(li);
@@ -184,7 +184,7 @@ START_TEST(udev_double_suspend)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
fd = libinput_get_fd(li);
@@ -215,7 +215,7 @@ START_TEST(udev_double_resume)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
fd = libinput_get_fd(li);
@@ -266,7 +266,7 @@ START_TEST(udev_suspend_resume)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
fd = libinput_get_fd(li);
@@ -305,7 +305,7 @@ START_TEST(udev_device_sysname)
udev = udev_new();
ck_assert(udev != NULL);
- li = libinput_create_from_udev(&simple_interface, NULL, udev, "seat0");
+ li = libinput_udev_create_for_seat(&simple_interface, NULL, udev, "seat0");
ck_assert(li != NULL);
libinput_dispatch(li);
diff --git a/tools/event-debug.c b/tools/event-debug.c
index 3e89bf1..e2d30b3 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -139,7 +139,7 @@ open_udev(struct libinput **li)
return 1;
}
- *li = libinput_create_from_udev(&interface, NULL, udev, seat);
+ *li = libinput_udev_create_for_seat(&interface, NULL, udev, seat);
if (!*li) {
fprintf(stderr, "Failed to initialize context from udev\n");
return 1;
--
1.8.4.2
More information about the wayland-devel
mailing list