Example code can be found here.
Add a module_sdl2 to replace / to propose an alternative to the module_x11.