[][src]Function input_sys::libinput_path_add_device

pub unsafe extern "C" fn libinput_path_add_device(
    libinput: *mut libinput,
    path: *const c_char
) -> *mut libinput_device

@ingroup base

Add a device to a libinput context initialized with libinput_path_create_context(). If successful, the device will be added to the internal list and re-opened on libinput_resume(). The device can be removed with libinput_path_remove_device().

If the device was successfully initialized, it is returned in the device argument. The lifetime of the returned device pointer is limited until the next libinput_dispatch(), use libinput_device_ref() to keep a permanent reference.

@param libinput A previously initialized libinput context @param path Path to an input device @return The newly initiated device on success, or NULL on failure.

@note It is an application bug to call this function on a libinput context initialized with libinput_udev_create_context().