SDL2 (Simple DirectMedia Layer) is the software layer that allows a cross platform handling of basilar Video Output, User Input, and so on. It has allowed Software Creators to reuse “programs source codes” across (as I said) several Platforms namely Windows, GNU/Linux, Mac and more recently even Android.
SDL2 can be used as a BackEnd for OpenGL(*) applications, providing cross-platform windowing, graphic output in “desktop” windows, input both from Mouse, Gamepad, Keyboard. (*) Vulkan too more recently
SDL2 can be used as a BackEnd for Cairo Graphics, too, allowing cross-platform app creation with advanced graphics and vector graphics.
https://github.com/tsuu32/sdl2-cairo-example
https://cairographics.org/SDL/ and other links listed below mentioned in the above linked page: https://github.com/tsuu32/sdl2-cairo-example