/* What the real-hardware frontends share: key events and the backlight. */ #ifndef RADIO_PLATFORM_LINUX_H #define RADIO_PLATFORM_LINUX_H #include #include "app.h" #define DEFAULT_KEYS_NAME "radio-keys" #define DEFAULT_BACKLIGHT "/sys/class/backlight/radio-backlight/brightness" /* * Feed key presses from an evdev device into the app. path may be NULL to * look for the input device named DEFAULT_KEYS_NAME. Returns false, leaving * the UI display-only, if there is none. */ bool platform_keys_start(struct app *app, const char *path); /* Write to a sysfs brightness file; a NULL path does nothing. */ void platform_backlight_set(const char *path, bool on); /* Run the GLib main loop until SIGINT or SIGTERM. */ void platform_run(void); #endif /* RADIO_PLATFORM_LINUX_H */