Hacker News new | ask | show | jobs
by kpxxx 3194 days ago
I'm not quite sure I believe that a lot of people use the X primitives. The alternative to Gtk and Qt is most often not raw Xlib. There are alternative toolkits such as Motif, Xt. And then graphics abstractions such as SDL. Obviously all of these (including Gtk and Qt) use at least some of the X primitives in their rendering or themeing engines, but direct use of Xlib primitives is quite rare. And I think the whole point of the argument is that the commonly used primitives today are things like XRENDER, which aren't really primitives since they are an extension. Precisely the point being made.

Basically, name me an app that uses solely X11 primitives without the use of any extensions and no overlying library over libX11 (and no, xclock doesn't count)

2 comments

Of course i include using toolkits that themselves use X primitives, not only using Xlib directly :-).

For example my own Little Forms library [0] uses the X server's drawing and text operations (you can use Xft instead, it is a build option, but you can also make a static library for binaries that rely only on xlib and nothing else).

[0] http://runtimeterror.com/rep/lforms

Using X primitives means not using X extensions. Using toolkits like Motif remains a simple use of Xlib primitives and most of the code of a Motif application involves direct Xlib primitives.