Skip to content

Commit

Permalink
Bind wlr_libinput_get_device_handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon-Plickat authored and ifreund committed Jun 6, 2021
1 parent c776d61 commit c85fe79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/types/input_device.zig
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,13 @@ pub const InputDevice = extern struct {

extern fn wlr_input_device_get_virtual_keyboard(wlr_dev: *InputDevice) ?*wlr.VirtualKeyboardV1;
pub const getVirtualKeyboard = wlr_input_device_get_virtual_keyboard;

extern fn wlr_input_device_is_libinput(wlr_dev: *InputDevice) bool;
extern fn wlr_libinput_get_device_handle(wlr_dev: *InputDevice) *LibinputDevice;
pub fn getLibinputDevice(wlr_dev: *InputDevice) ?*LibinputDevice {
if (!wlr_input_device_is_libinput(wlr_dev)) return null;
return wlr_libinput_get_device_handle(wlr_dev);
}
};

const LibinputDevice = opaque {};

0 comments on commit c85fe79

Please sign in to comment.