Skip to content

Basic Desktop API

Thursday, 19 May 2005  |  daniel molkentin

Kurt has an interesting point on a common api for basic desktop usage, hidden under some stuff I basically agree with but don't think it's easy to solve: A minimal desktop API for applications that do not use DE libs directly. In fact, Matthias, Scott and me discussed a solution to a similar problem back in Nove Hrady. We were wondering how to enable the use of KDE widgets in Qt applications.

For that we came up with a very thin C API (which is probably still in Scotts drawer) which can be reimplemented by several providers. Handling e.g. file dialogs is trivial, and even printing is sort of easy: the preprocessed printing (read: postscript) data would be pushed into a unix socket provided by the API. Of course it gets trickier when looking at details, but that's a second iteration :)

That would give us native dialogs for the most common dialogs:

  • Generic Yes/No/Cancel Dialogs
  • Save (as)...
  • Open...
  • Print...

Of course more are possible. On the technical side, it's an interesting question on wether those providers should be DCOP/DBUS services with the API being an interface definition or if we should go for a plain C interface, which could be wrapped by other languages. The advantage of the latter is flexibility, the problem with the former is that every application would need do use whatever IPC we use. I don't think we should enforce the use of IPC, but I am open for a discussion here.