1
0
forked from drath/libratbag
Commit Graph

10 Commits

Author SHA1 Message Date
Peter Hutterer
0259e69241 Add an open_restricted/close_restricted interface
Same as libinput. Since we need to open device files we need something that's
authorized to open them. So we punt that to the caller.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-19 08:33:49 +10:00
Peter Hutterer
6ca2de81dd tools: use getopt parsing for the ratbag-command
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-19 08:33:49 +10:00
Peter Hutterer
fcda14df61 Drop from_fd, replace with from_udev_device
We don't need the evdev fd, it's more flexible to start with a udev device.
This changes ratbag-command to take a /sys path as well, but for not it'll
do.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-19 08:33:49 +10:00
Peter Hutterer
5dad2e258d tools: fix a typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-18 15:25:23 +10:00
Benjamin Tissoires
2baca1ae9e Implement a correct button mapping in the profiles
Problem is the current implementation requires to actually get the profile
before accessing the buttons. But it may be the simplest and safest way.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-17 17:21:27 -04:00
Benjamin Tissoires
7b17fbd1cc add implemention of ratbag_set_active_profile
It's a 2 callback combo in the driver.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-15 12:16:40 -04:00
Benjamin Tissoires
30718c2495 Add profile implementation
Still not populated with buttons, but it's a good start.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-15 12:14:22 -04:00
Benjamin Tissoires
b98477a7ec Retrieve through udev the hidraw node associated to the given input device
Most gaming mice use a specific HID protocol to configure the device.
Allow to retrieve the hidraw node associated to the mouse so we can talk
to it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-14 17:39:23 -04:00
Benjamin Tissoires
be3ec7317d Add tool ratbag-command to test the library
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-14 17:39:22 -04:00
Peter Hutterer
3fefe97451 Scaffolding for a libratbag, a mouse configuration library
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-13 11:55:07 +10:00