Where do I start if I want to write a wayland compositor?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 21:16:44

问题


I imagine there isn't a "Beginner's guide to wayland server programming" drifting around the web, and the weston source looks daunting.

Is there a barebones wayland server I can look at to give me an idea where to start? Something I can run under X that I can confirm is recieving input. I'm sure I can go from there.


回答1:


Take a look at the Small Wayland Compositor. You can either use it as library to build upon, or check out how it does things internally if you want to start from scratch.




回答2:


I wrote a minimal wayland compositor that runs on top of X11 with the hope that it might be useful for other people who want to learn how to write a wayland compositor.
It's about 500 lines of code that are really just the minimal code that is needed to host multiple instances of weston-terminal and move them around.




回答3:


I can only recommend to take a look at the KWayland sources (especially if you're interested in how the wayland protocol maps to an object oriented world).
KWayland is an object oriented (C++/Qt) wrapper around the wayland client and server libraries and it also includes a minimal server (tests/renderingservertest.cpp).



来源:https://stackoverflow.com/questions/24960352/where-do-i-start-if-i-want-to-write-a-wayland-compositor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!