Skip to content
Snippets Groups Projects
  1. Nov 10, 2020
    • Simon McVittie's avatar
      input-device: Add a monitor based on dlopening libudev · 31de3793
      Simon McVittie authored
      
      This is the same approach used by SDL. It doesn't work well in most
      containers.
      
      To facilitate testing this, change sysroot/run-in-sysroot.py so that it
      doesn't share /run with the host, and signals "we're in a container"
      by creating /run/host.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      31de3793
    • Simon McVittie's avatar
      input-device: Add skeleton API for enumeration and monitoring · a08464d9
      Simon McVittie authored
      
      This includes:
      
      * a public interface implemented by input device monitors
      * a public interface to be implemented by the input devices they signal
      * a mock implementation for unit-testing
      * a unit test for the API
      * a simple implementation in terms of inotify on /dev
      * a monitor that can print input devices in JSON format on stdout,
        and optionally monitor them
      
      Implementations in terms of udev, SDL, or a portal service are not yet
      included. Details of the devices, beyond their paths in /dev and /sys,
      are also not included.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      a08464d9
Loading