From ecc8d6c42da41bbe74f8835f489f325946876162 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 13 Dec 2013 11:04:01 +1000 Subject: [PATCH] Document the open/close_restricted interface Specifically, document that it needs to return a negative errno on failure. Signed-off-by: Peter Hutterer --- src/libinput.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/libinput.h b/src/libinput.h index 70fd9eb1..c6a64abc 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -399,7 +399,25 @@ libinput_event_touch_touch_get_touch_type( */ struct libinput_interface { + /** + * Open the device at the given path with the flags provided and + * return the fd. + * + * @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() + * + * @return the file descriptor, or a negative errno on failure. + */ int (*open_restricted)(const char *path, int flags, void *user_data); + /** + * Close the file descriptor. + * + * @param fd The file descriptor to close + * @param user_data The user_data provided in + * libinput_create_from_udev() + */ void (*close_restricted)(int fd, void *user_data); void (*get_current_screen_dimensions)(struct libinput_device *device,