Haskell wlroots bindings

I feel it’s time for another update here. Progress has been slow, but steady thanks to @bullishOnFunctional and @anarchymatt.

The following APIs are now implemented, at least in part:

  • From libwayland: wl_display, wl_list, wl_listener
  • Basic interfaces: wlr_backend, wlr_renderer, wlr_allocator, wlr_output, wlr_seat
  • Compositing: wlr_compositor, wlr_subcompositor, wlr_scene
  • Window management: wlr_xdg_shell
  • Input: wlr_input_device, wlr_keyboard
  • Pointer: wlr_pointer, wlr_cursor, wlr_xcursor_manager
  • Clipboard: wlr_data_device
  • Logging: wlr_log

Plus some others which are important mostly as dependencies for wlr_output and wlr_seat.

One thing I’d like to do now is to try porting over some of the basic parts of the tinywl compositor which comes with wlroots. It could be a little difficult, though, since wlroots makes intensive use of function pointers, which are hard to marshal. I’m sorely tempted to write the relevant C code and include it directly in the low-level bindings, because otherwise it looks like they’re completely unusable.

4 Likes