5

in Windows, a programmer can use Windows API to write a Windows application. Windows API can be used with C (not necessarily C++). In Windows API you have a message loop and you have to program responses to different messages (eg a right click on client area).

Is there any ubuntu API?

I don't mean Qt or GTK. I'm looking for a raw (C/C++) API so that everything must be (re)designed.

  • I'm not completely sure about what kind of API you're talking about. All libraries on the system have their own - there's no such thing as a single API for the whole OS! Are you referring to libc, standard libraries or "standard" libraries like Xorg? The Windows world and its Win32 API is not a pattern to apply to all other OSs. Linux is not designed like that. – gertvdijk Feb 01 '13 at 21:22
  • http://askubuntu.com/questions/49849/how-do-i-get-started-creating-an-ubuntu-desktop-app – Uri Herrera Feb 01 '13 at 21:22
  • 1
    @UriHerrera That's about Python desktop applications. How does that apply to this C/C++ question? – gertvdijk Feb 01 '13 at 21:23
  • @gertvdijk I was thinking more along the lines of he wanting to create software thus asking for an Ubuntu API. – Uri Herrera Feb 01 '13 at 21:24

1 Answers1

6

I came to Linux from a Win32 API background. Because Windows wraps up the equivalent of the Linux window manager and desktop environment into a single container, there just isn't a one-to-one match. Gtk and Qt really are more or less the equivalent to the Win API.

Keeping in mind that the Win API itself in most cases is a wrapper on lower levels, if you really want to get down into the low-levels of the windowing system, you can look at X11 programming. For example, X Window System and Brief Intro to X11 Programming. But Gtk and Qt are designed to be wrappers around these functions.

chaskes
  • 15,246