Both Windows (Win32 API) and OS X (Cocoa) have their own APIs to handle windows, events and other OS stuff. I have never really got a clear answer as to what Linux’s equival
The closest thing to Win32 in linux would be the libc, as you mention not only the UI but events and "other os stuff"