When programming with Wayland, in C, how can I get the functionality xcb and Xlib provide? [closed]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
3
down vote
favorite
I understand that Wayland is a compositor, that it somehow is involved with events so software the next level up can register with Wayland to receive events, and so forth. But Wayland doesn't provide windowing, just surfaces to render windows and other graphics into.
I've put a lot of time into teaching myself C programming and create very basic graphics with a mixture of xcb and Xlib, which mix easily:#include <Xlib-xcb.h>
. I'd like to continue programming at that level, using xcb events, xcb graphics primitives, pixmaps, XImages or xcb_image_t's, and the MIT-Shm extension to create shared memory pixmaps and shared memory ximages.
Wayland's mmap'ed surfaces are appealing because they will allow me better flexibility than MIT-Shm, which depends on SysV shared memory.
Is there a software layer providing xcb's level of functionality? Can I depend xcb and Xlib being supported, so an X11 program could run as a Wayland client?
I am not interested in using GTK+ or Qt as alternatives to xcb-like functionality. They are for sophisticated GUI programming and that is not something I want-I want low level programming.
I see Wayland-egl.h, used in examples. Does egl provide functionality similar to what I find in xcb? Where can I find simple but comprehensive tutorials? Are there any as good as Xlib's documentation? Xcb's documentation is atrocious but having the Xlib manuals and tutorials at hand, I've learned to cobble together some useful code.
As hobbyist programmer, the information I find online is very cryptic, but it always turns out to be a matter of familiarity with the various terms and relevant libraries. Actually programming xcb isn't that complex, it's merely verbose and unfamiliar.
The available information is so hard for me to sift through and seems to lack a lot of important details OR it's written in language too obscure and unfamiliar for me to comprehend. Anyone have some pointers for the uninitiated but reasonably good programmer?
xorg programming wayland
closed as too broad by Panther, Eliah Kagan, wjandrea, David Foerster, Eric Carvalho Apr 6 at 13:47
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
3
down vote
favorite
I understand that Wayland is a compositor, that it somehow is involved with events so software the next level up can register with Wayland to receive events, and so forth. But Wayland doesn't provide windowing, just surfaces to render windows and other graphics into.
I've put a lot of time into teaching myself C programming and create very basic graphics with a mixture of xcb and Xlib, which mix easily:#include <Xlib-xcb.h>
. I'd like to continue programming at that level, using xcb events, xcb graphics primitives, pixmaps, XImages or xcb_image_t's, and the MIT-Shm extension to create shared memory pixmaps and shared memory ximages.
Wayland's mmap'ed surfaces are appealing because they will allow me better flexibility than MIT-Shm, which depends on SysV shared memory.
Is there a software layer providing xcb's level of functionality? Can I depend xcb and Xlib being supported, so an X11 program could run as a Wayland client?
I am not interested in using GTK+ or Qt as alternatives to xcb-like functionality. They are for sophisticated GUI programming and that is not something I want-I want low level programming.
I see Wayland-egl.h, used in examples. Does egl provide functionality similar to what I find in xcb? Where can I find simple but comprehensive tutorials? Are there any as good as Xlib's documentation? Xcb's documentation is atrocious but having the Xlib manuals and tutorials at hand, I've learned to cobble together some useful code.
As hobbyist programmer, the information I find online is very cryptic, but it always turns out to be a matter of familiarity with the various terms and relevant libraries. Actually programming xcb isn't that complex, it's merely verbose and unfamiliar.
The available information is so hard for me to sift through and seems to lack a lot of important details OR it's written in language too obscure and unfamiliar for me to comprehend. Anyone have some pointers for the uninitiated but reasonably good programmer?
xorg programming wayland
closed as too broad by Panther, Eliah Kagan, wjandrea, David Foerster, Eric Carvalho Apr 6 at 13:47
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I understand that Wayland is a compositor, that it somehow is involved with events so software the next level up can register with Wayland to receive events, and so forth. But Wayland doesn't provide windowing, just surfaces to render windows and other graphics into.
I've put a lot of time into teaching myself C programming and create very basic graphics with a mixture of xcb and Xlib, which mix easily:#include <Xlib-xcb.h>
. I'd like to continue programming at that level, using xcb events, xcb graphics primitives, pixmaps, XImages or xcb_image_t's, and the MIT-Shm extension to create shared memory pixmaps and shared memory ximages.
Wayland's mmap'ed surfaces are appealing because they will allow me better flexibility than MIT-Shm, which depends on SysV shared memory.
Is there a software layer providing xcb's level of functionality? Can I depend xcb and Xlib being supported, so an X11 program could run as a Wayland client?
I am not interested in using GTK+ or Qt as alternatives to xcb-like functionality. They are for sophisticated GUI programming and that is not something I want-I want low level programming.
I see Wayland-egl.h, used in examples. Does egl provide functionality similar to what I find in xcb? Where can I find simple but comprehensive tutorials? Are there any as good as Xlib's documentation? Xcb's documentation is atrocious but having the Xlib manuals and tutorials at hand, I've learned to cobble together some useful code.
As hobbyist programmer, the information I find online is very cryptic, but it always turns out to be a matter of familiarity with the various terms and relevant libraries. Actually programming xcb isn't that complex, it's merely verbose and unfamiliar.
The available information is so hard for me to sift through and seems to lack a lot of important details OR it's written in language too obscure and unfamiliar for me to comprehend. Anyone have some pointers for the uninitiated but reasonably good programmer?
xorg programming wayland
I understand that Wayland is a compositor, that it somehow is involved with events so software the next level up can register with Wayland to receive events, and so forth. But Wayland doesn't provide windowing, just surfaces to render windows and other graphics into.
I've put a lot of time into teaching myself C programming and create very basic graphics with a mixture of xcb and Xlib, which mix easily:#include <Xlib-xcb.h>
. I'd like to continue programming at that level, using xcb events, xcb graphics primitives, pixmaps, XImages or xcb_image_t's, and the MIT-Shm extension to create shared memory pixmaps and shared memory ximages.
Wayland's mmap'ed surfaces are appealing because they will allow me better flexibility than MIT-Shm, which depends on SysV shared memory.
Is there a software layer providing xcb's level of functionality? Can I depend xcb and Xlib being supported, so an X11 program could run as a Wayland client?
I am not interested in using GTK+ or Qt as alternatives to xcb-like functionality. They are for sophisticated GUI programming and that is not something I want-I want low level programming.
I see Wayland-egl.h, used in examples. Does egl provide functionality similar to what I find in xcb? Where can I find simple but comprehensive tutorials? Are there any as good as Xlib's documentation? Xcb's documentation is atrocious but having the Xlib manuals and tutorials at hand, I've learned to cobble together some useful code.
As hobbyist programmer, the information I find online is very cryptic, but it always turns out to be a matter of familiarity with the various terms and relevant libraries. Actually programming xcb isn't that complex, it's merely verbose and unfamiliar.
The available information is so hard for me to sift through and seems to lack a lot of important details OR it's written in language too obscure and unfamiliar for me to comprehend. Anyone have some pointers for the uninitiated but reasonably good programmer?
xorg programming wayland
xorg programming wayland
asked Apr 2 at 21:38
DeeDeeK
294
294
closed as too broad by Panther, Eliah Kagan, wjandrea, David Foerster, Eric Carvalho Apr 6 at 13:47
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Panther, Eliah Kagan, wjandrea, David Foerster, Eric Carvalho Apr 6 at 13:47
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11
add a comment |Â
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
This is embarrassing: I should have checked the X.Org's Wayland FAQs more than once. I found the answer to my question right where I looked for it the first time...
[wayland.freedesktop.org/faq][1]
...there are some clients which rely on X11, and always will be. To that end, XWayland provides a plugin for Wayland compositors, running a real X server. This gives legacy clients a real and compliant X11 platform to run on, displayed side by side with native Wayland clients in your Wayland session
I apologize for the phrasing of my question, "will Xlib and XCB be around for a long time still?" The phrase "long time still" is asking for an opinion and I meant factual knowledge.
Where it say int the quote included here that there "always will be" clients relying on X11, I interpret it to mean "for a long time still." It's kind of vague, I know. Perhaps as a programmer I expect too much exactness from natural languages.
Another good piece of inexact news, which has bearing on whether it's worthwhile writing code which uses X11 is that there is little to no overhead penalty "the overhead of running X on Wayland."
This all has me decided: I'll continue to #include <Xlib-xcb.h>
and won't worry about it.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
This is embarrassing: I should have checked the X.Org's Wayland FAQs more than once. I found the answer to my question right where I looked for it the first time...
[wayland.freedesktop.org/faq][1]
...there are some clients which rely on X11, and always will be. To that end, XWayland provides a plugin for Wayland compositors, running a real X server. This gives legacy clients a real and compliant X11 platform to run on, displayed side by side with native Wayland clients in your Wayland session
I apologize for the phrasing of my question, "will Xlib and XCB be around for a long time still?" The phrase "long time still" is asking for an opinion and I meant factual knowledge.
Where it say int the quote included here that there "always will be" clients relying on X11, I interpret it to mean "for a long time still." It's kind of vague, I know. Perhaps as a programmer I expect too much exactness from natural languages.
Another good piece of inexact news, which has bearing on whether it's worthwhile writing code which uses X11 is that there is little to no overhead penalty "the overhead of running X on Wayland."
This all has me decided: I'll continue to #include <Xlib-xcb.h>
and won't worry about it.
add a comment |Â
up vote
0
down vote
This is embarrassing: I should have checked the X.Org's Wayland FAQs more than once. I found the answer to my question right where I looked for it the first time...
[wayland.freedesktop.org/faq][1]
...there are some clients which rely on X11, and always will be. To that end, XWayland provides a plugin for Wayland compositors, running a real X server. This gives legacy clients a real and compliant X11 platform to run on, displayed side by side with native Wayland clients in your Wayland session
I apologize for the phrasing of my question, "will Xlib and XCB be around for a long time still?" The phrase "long time still" is asking for an opinion and I meant factual knowledge.
Where it say int the quote included here that there "always will be" clients relying on X11, I interpret it to mean "for a long time still." It's kind of vague, I know. Perhaps as a programmer I expect too much exactness from natural languages.
Another good piece of inexact news, which has bearing on whether it's worthwhile writing code which uses X11 is that there is little to no overhead penalty "the overhead of running X on Wayland."
This all has me decided: I'll continue to #include <Xlib-xcb.h>
and won't worry about it.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
This is embarrassing: I should have checked the X.Org's Wayland FAQs more than once. I found the answer to my question right where I looked for it the first time...
[wayland.freedesktop.org/faq][1]
...there are some clients which rely on X11, and always will be. To that end, XWayland provides a plugin for Wayland compositors, running a real X server. This gives legacy clients a real and compliant X11 platform to run on, displayed side by side with native Wayland clients in your Wayland session
I apologize for the phrasing of my question, "will Xlib and XCB be around for a long time still?" The phrase "long time still" is asking for an opinion and I meant factual knowledge.
Where it say int the quote included here that there "always will be" clients relying on X11, I interpret it to mean "for a long time still." It's kind of vague, I know. Perhaps as a programmer I expect too much exactness from natural languages.
Another good piece of inexact news, which has bearing on whether it's worthwhile writing code which uses X11 is that there is little to no overhead penalty "the overhead of running X on Wayland."
This all has me decided: I'll continue to #include <Xlib-xcb.h>
and won't worry about it.
This is embarrassing: I should have checked the X.Org's Wayland FAQs more than once. I found the answer to my question right where I looked for it the first time...
[wayland.freedesktop.org/faq][1]
...there are some clients which rely on X11, and always will be. To that end, XWayland provides a plugin for Wayland compositors, running a real X server. This gives legacy clients a real and compliant X11 platform to run on, displayed side by side with native Wayland clients in your Wayland session
I apologize for the phrasing of my question, "will Xlib and XCB be around for a long time still?" The phrase "long time still" is asking for an opinion and I meant factual knowledge.
Where it say int the quote included here that there "always will be" clients relying on X11, I interpret it to mean "for a long time still." It's kind of vague, I know. Perhaps as a programmer I expect too much exactness from natural languages.
Another good piece of inexact news, which has bearing on whether it's worthwhile writing code which uses X11 is that there is little to no overhead penalty "the overhead of running X on Wayland."
This all has me decided: I'll continue to #include <Xlib-xcb.h>
and won't worry about it.
answered Apr 5 at 20:57
DeeDeeK
294
294
add a comment |Â
add a comment |Â
II would post on the wayland mailing list, part of what you ask is speculative.
â Panther
Apr 3 at 1:24
I shall do so. And part of the question is simply whether anyone knows of a windowing system which runs on Wayland, as apparently EGL is, which would give similar functionality to xcb. I ought to have written ONLY about that. I will ask on the wayland mailing list, as well as repeat here: Will Xlib and XCB be around for a long time still? Surely someone here might know something of their future. I will find that mailing list however. THanks
â DeeDeeK
Apr 4 at 19:56
I anticipate X and the X libs will be around for a long time but slowly phased out. You are sort of asking us to speculate.
â Panther
Apr 4 at 23:11