artyom-poptsov / guile-udev

GNU Guile bindings to libudev.
GNU General Public License v3.0
7 stars 3 forks source link

[feature require] pointer->udev-device and udev->pointer. #6

Open Z572 opened 11 months ago

Z572 commented 11 months ago

libinput have libinput_udev_create_context and libinput_device_get_udev_device require udev and udev_device struct

If guile-udev provide udev->pointer and pointer->udev-device, i can use them at guile-libinput

artyom-poptsov commented 11 months ago

Hello,

please check this branch: https://github.com/artyom-poptsov/guile-udev/tree/wip-udev-pointers

Does it look like something that you requested?

This is new for me so I want to make sure I understood the feature request correctly.

Thanks!

-- avp

Z572 commented 11 months ago

Yes this is what I need, but there are problems with this version, for example pointer->udev executing the same pointer twice should return the same udev, see define-wrapped-pointer-type. It uses make-weak-value-hash-table internally