xref: /freebsd/usr.sbin/bluetooth/bthidd/btuinput.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
144af5666SVladimir Kondratyev /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
344af5666SVladimir Kondratyev  *
444af5666SVladimir Kondratyev  * Copyright (c) 2015-2017 Vladimir Kondratyev <wulf@FreeBSD.org>
544af5666SVladimir Kondratyev  * All rights reserved.
644af5666SVladimir Kondratyev  *
744af5666SVladimir Kondratyev  * Redistribution and use in source and binary forms, with or without
844af5666SVladimir Kondratyev  * modification, are permitted provided that the following conditions
944af5666SVladimir Kondratyev  * are met:
1044af5666SVladimir Kondratyev  * 1. Redistributions of source code must retain the above copyright
1144af5666SVladimir Kondratyev  *    notice, this list of conditions and the following disclaimer.
1244af5666SVladimir Kondratyev  * 2. Redistributions in binary form must reproduce the above copyright
1344af5666SVladimir Kondratyev  *    notice, this list of conditions and the following disclaimer in the
1444af5666SVladimir Kondratyev  *    documentation and/or other materials provided with the distribution.
1544af5666SVladimir Kondratyev  *
1644af5666SVladimir Kondratyev  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1744af5666SVladimir Kondratyev  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1844af5666SVladimir Kondratyev  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1944af5666SVladimir Kondratyev  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2044af5666SVladimir Kondratyev  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2144af5666SVladimir Kondratyev  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2244af5666SVladimir Kondratyev  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2344af5666SVladimir Kondratyev  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2444af5666SVladimir Kondratyev  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2544af5666SVladimir Kondratyev  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2644af5666SVladimir Kondratyev  * SUCH DAMAGE.
2744af5666SVladimir Kondratyev  */
2844af5666SVladimir Kondratyev 
2944af5666SVladimir Kondratyev #ifndef _UINPUT_H_
3044af5666SVladimir Kondratyev #define _UINPUT_H_
3144af5666SVladimir Kondratyev 
3244af5666SVladimir Kondratyev int32_t uinput_open_mouse(hid_device_p const d, bdaddr_p local);
3344af5666SVladimir Kondratyev int32_t uinput_open_keyboard(hid_device_p const d, bdaddr_p local);
3444af5666SVladimir Kondratyev int32_t uinput_rep_mouse(int32_t fd, int32_t x, int32_t y, int32_t z,
3544af5666SVladimir Kondratyev     int32_t t, int32_t buttons, int32_t obuttons);
3644af5666SVladimir Kondratyev int32_t uinput_rep_key(int32_t fd, int32_t key, int32_t make);
3744af5666SVladimir Kondratyev int32_t uinput_rep_cons(int32_t fd, int32_t key, int32_t make);
3844af5666SVladimir Kondratyev int32_t uinput_rep_leds(int32_t fd, int state, int mask);
3944af5666SVladimir Kondratyev int32_t uinput_kbd_status_changed(bthid_session_p s, uint8_t *data,
4044af5666SVladimir Kondratyev     int32_t len);
4144af5666SVladimir Kondratyev 
4244af5666SVladimir Kondratyev #endif /* ndef _UINPUT_H_ */
43