问题
I have multiple applications each having a GUI from a different technology.
I need to do this -
1. Create n layers, one for each application, onto which applications draw.
2. Have a layer manager which can perform operations on each of these layers
(like re sizing, changing opacity etc. ) and then combine them to form a
single layer.
Can someone please give an idea as to how I should proceed with this? What APIs might help me into this ? I cant really figure out what should I be searching on google.
Language of implementation: C++
Platform : Linux
Also I would like to know if these requirements can be implemented in a platform independent way ?
回答1:
If I understood your question correctly, you want some kind of simple window manager.
If so, try to avoid using xlib, and use QX11EmbedContainer. Is it fairly simple to embed windows, and form layers by simply showing/hiding specific containers.
This should be a platform independent solution (should work on different hardware, but not on an non-linux OS).
Since you are already using QX11EmbedContainer, and have a request to use xlib only (with c++), you need to use XReparentWindowDisplay function. This is covered in the chapter 9.1 of the xlib standard (you can look it up here). It should be pretty straight forward how to use it.
来源:https://stackoverflow.com/questions/10069450/x11-layer-manager