Hello.
Sorry to disturb you with Qt but...
If you want something that will not need any dependencies and will have full control on what Xlib/X11 can do, maybe you may think to use
MSEgui.
With
MSEgui, all what you asked in your last posts, (custom toolbar with transparent background, use of BGRABitmap, etc) can be done, easy and without any dependencies.
You may even create what you want for a "pure" X11 system, where no one widget set is installed (even without GTK2).
Of course it will work also on systems with GTK2, QT, KDE, ... installed.
[EDIT] And it will be compatible with Wayland/XWayland.
And the same code can be used for Windows, with direct access to windows-gdi low level.
Fre;D