Why isn't there the Unix API? I mean, as there is the Windows API.
I know a lot of things in the Unix world is modular, and those things put together creates a whole system. This sounds good but does create some problems when you try to make a native Unix app.
For example, you want to program a nice word processor with a cool name WP. The Windows version of WP will be built by calling the Windows API. You can either code this directly in C, or use any of the various wrapper libraries out there. But still, the program must be constructed by calling winapi, which provides every single functionality that a programmer may need to build a Windows app, from basic system calls to GUI, 3D, multimedia or anything else with more than a decade of backwards compatibility. If it weren't like this, Wine could never exist.
Now you want to create a Unix version of WP. The standard C and C++ library and the POSIX API is very stable and well supported in any Unix variants. The problem occurs when you try to do more. So you need to create a window for WP, but how? There is X11, but this is not the only one. People think X11 should be replaced and now are making two incompatible replacements, Wayland and Mir. Even for X11, there is Xlib and xcb. xcb claims they are 'better', and it is true in some ways, but where is the documentation? You eventually choose Xlib to do the task, but the X11 standard by itself only defines very basic features. Anything else you'd expect for a GUI application such as window events or clipboard support needs to be dealt with extensions, by calling
XInternAtom. This sentence is merely my personal opinion, but the use of Atoms in X is extremely unintuitive. And another problem is that not every window manager for X support these extensions well. So let's just leave this dirtiness to the developers of GTK+ and Qt, who break backwards compatibility per each new version. Is it even possible to have portable drag-and-drop support in Linux?
It really seems to me that the Unix community is killing themselves in the Desktop world. I know that the things I mentioned doesn't even matter to set up a BSD server, but it does matter if you ever try to build a portable native Linux app.
What is making up all of this mess? Is there really an effort to clean this up and standardize things for the modern desktop environment of Unix? Why isn't there the Unix API? Will there ever be one?