Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest possible Ubuntu GUI app

On Windows, no matter which framework you use, all the frameworks need, ultimately, to call the user mode user32::CreateWindowEx API to actually create a window on the desktop.

On Ubuntu, or indeed Linux systems in general, it seems that the choices are to use a widget framework like Wx or Qt or GTK+ to create a GUI application, but all these frameworks feel like they are wrapping something more fundamental. Do these all talk directly to X on Linux? I thought Ubuntu was moving to a non X window manager, so what are they going to use then?

What library would I use to access the window manager all these frameworks use?

like image 822
Chris Becke Avatar asked Jan 15 '11 12:01

Chris Becke


2 Answers

They are all wrapping Xlib , if you ever switch to non-X server you will need an Xlib replacement along with it (or an Xlib wrapper).

like image 87
ismail Avatar answered Oct 21 '22 08:10

ismail


You could in principle write your own X library by learning the X11 protocol and all the related extensions (ICCCM, desktop conventions, ...) but that is a huge task. You would use the lowest level system calls (send, recv, ...) if you did that.

Some implementations of some languages (SML, Common Lisp, Ocaml) made that choice of implementing the X11 protocol without using the Xlib or XCB C libraries. But it is such a big task that I won't recommend it.

And the Wayland that Ubuntu speaks about is not mature yet, but the toolkit libraries (like GTK and Qt) are slowly moving to support it (in addition of supporting X11).

Today, you also have the option to develop Web based applications instead of X11 based ones. Sometimes HTTP + XHTML + AJAX is simpler that recoding an X11 thing from scratch.

But don't start alone the writing of a graphical stack... it is too big a task...

like image 28
Basile Starynkevitch Avatar answered Oct 21 '22 10:10

Basile Starynkevitch