udev: rename create_from_udev to udev_create_for_seat

Maintain proper namespacing rename the backend-specific calls to
	libinput_<backend>_<foo>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2014-01-29 15:35:20 +10:00
parent 606249f91c
commit 75427b0788
4 changed files with 24 additions and 24 deletions

View file

@ -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

View file

@ -336,10 +336,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;

View file

@ -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);

View file

@ -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;